/*
    Personal Portfolio Website - Styles
    ====================================
    
    Color Palette (Dark, Trustworthy Theme):
    - Primary Background: #1a1f2e (Deep navy/charcoal)
    - Secondary Background: #242938 (Slightly lighter)
    - Accent Color: #3498db (Steel blue)
    - Accent Hover: #2980b9 (Darker steel blue)
    - Text Primary: #f0f2f5 (Off-white)
    - Text Secondary: #b0b8c4 (Light gray)
    - Success/Highlight: #27ae60 (Emerald green)
    
    How to Customize Colors:
    Simply edit the CSS variables in the :root selector below to change the color scheme.
    
    Typography:
    - English: Inter font family
    - Arabic: Cairo font family
    
    Author: Mohamed Ali
*/

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Color Palette - Dark Theme */
    --primary-bg: #1a1f2e;           /* Deep navy/charcoal - main background */
    --secondary-bg: #242938;         /* Slightly lighter - card backgrounds */
    --accent: #3498db;               /* Steel blue - primary accent */
    --accent-hover: #2980b9;         /* Darker steel blue - hover state */
    --accent-light: #5dade2;         /* Lighter steel blue - highlights */
    
    /* Semantic Colors */
    --text-primary: #f0f2f5;         /* Main text - off-white */
    --text-secondary: #b0b8c4;       /* Secondary text - light gray */
    --text-muted: #8a95a5;           /* Muted text */
    --border-color: #3d4659;         /* Border color */
    
    /* Social Brand Colors (for hover states) */
    --instagram-color: #e1306c;
    --facebook-color: #1877f2;
    --tiktok-color: #000000;
    --whatsapp-color: #25d366;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.35);
    
    /* Spacing */
    --container-width: 1200px;
    --header-height: 70px;
    --section-padding: 80px 0;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* RTL-specific Variables */
[dir="rtl"] {
    --shadow-direction: -4px;
}

/* ==================== RESET & BASE STYLES ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-en);
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* RTL-specific body styles */
[dir="rtl"] body {
    font-family: var(--font-ar);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ==================== LAYOUT UTILITIES ==================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.main {
    flex: 1;
}

/* ==================== HEADER & NAVIGATION ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo / Brand */
.nav-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color var(--transition-normal);
}

.nav-logo:hover .logo-text {
    color: var(--accent);
}

/* Navigation Menu - Desktop */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
    transition: color var(--transition-normal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Toggle Button */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.lang-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.lang-divider {
    color: var(--border-color);
    opacity: 0.5;
}

.lang-ar,
.lang-en {
    transition: opacity var(--transition-fast);
}

[dir="rtl"] .lang-en {
    opacity: 0.5;
}

[dir="rtl"] .lang-ar {
    opacity: 1;
}

[dir="ltr"] .lang-en {
    opacity: 1;
}

[dir="ltr"] .lang-ar {
    opacity: 0.5;
}

/* Mobile Hamburger Menu Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.nav-toggle.active .line-1 {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .line-2 {
    opacity: 0;
}

.nav-toggle.active .line-3 {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    background: radial-gradient(ellipse at top, rgba(52, 152, 219, 0.08) 0%, transparent 50%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image-wrapper {
    margin: 0 auto 24px;
    position: relative;
    display: inline-block;
}

.hero-image {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(52, 152, 219, 0.3);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero CTA Button */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-md), 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    transition: transform var(--transition-normal);
}

.btn:hover .btn-icon {
    transform: translateX(5px);
}

[dir="rtl"] .btn:hover .btn-icon {
    transform: translateX(-5px);
}

/* ==================== SERVICES SECTION ==================== */
.services-section {
    background: var(--secondary-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Service Card */
.service-card {
    background: var(--primary-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    opacity: 0; /* Hidden initially for scroll animation */
    transform: translateY(30px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    color: var(--accent);
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== CONTACT SECTION ==================== */
.contact-section {
    background: var(--primary-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Contact Info */
.contact-info {
    background: var(--secondary-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateX(-30px);
    transition: all var(--transition-normal);
}

.contact-info.visible {
    opacity: 1;
    transform: translateX(0);
}

.contact-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact-info-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.contact-email-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 32px;
    transition: all var(--transition-normal);
}

.contact-email-link:hover {
    color: var(--accent-light);
    transform: translateX(5px);
}

[dir="rtl"] .contact-email-link:hover {
    transform: translateX(-5px);
}

.contact-email-link svg {
    flex-shrink: 0;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.social-link svg {
    transition: all var(--transition-normal);
}

.social-instagram:hover {
    background: var(--instagram-color);
    border-color: var(--instagram-color);
    color: white;
}

.social-facebook:hover {
    background: var(--facebook-color);
    border-color: var(--facebook-color);
    color: white;
}

.social-tiktok:hover {
    background: var(--tiktok-color);
    border-color: var(--tiktok-color);
    color: white;
}

.social-whatsapp:hover {
    background: var(--whatsapp-color);
    border-color: var(--whatsapp-color);
    color: white;
}

/* Contact Form */
.contact-form {
    background: var(--secondary-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateX(30px);
    transition: all var(--transition-normal);
}

.contact-form.visible {
    opacity: 1;
    transform: translateX(0);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Submit Button */
.contact-form .btn {
    margin-top: 8px;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--secondary-bg);
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet (max-width: 992px) */
@media screen and (max-width: 992px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .contact-content {
        gap: 32px;
    }
}

/* Mobile (max-width: 768px) */
@media screen and (max-width: 768px) {
    :root {
        --header-height: 60px;
        --section-padding: 50px 0;
    }
    
    /* Mobile Navigation */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--secondary-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 80px 40px;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }
    
    [dir="ltr"] .nav-menu {
        right: 0;
    }
    
    [dir="rtl"] .nav-menu {
        left: 0;
        right: auto;
        transform: translateX(-100%);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 12px 0;
    }
    
    /* Mobile overlay */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: -1;
    }
    
    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    /* Language Toggle on Mobile */
    .lang-toggle {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding-top: calc(var(--header-height) + 20px);
    }
    
    .hero-image {
        width: 150px;
        height: 150px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-tagline {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    /* Services Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 24px;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    /* Contact Mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .contact-info,
    .contact-form {
        padding: 28px;
    }
    
    .contact-info-title {
        font-size: 1.3rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Small Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .service-icon {
        width: 64px;
        height: 64px;
    }
    
    .service-icon svg {
        width: 36px;
        height: 36px;
    }
}

/* ==================== ACCESSIBILITY ==================== */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Print styles */
@media print {
    .header,
    .nav-toggle,
    .lang-toggle,
    .contact-form {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }
}

/* ==================== ANIMATION CLASSES ==================== */

/* Scroll reveal animation base */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Focus ring animation */
.focus-ring:focus {
    outline: none;
}

.focus-ring:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

