/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    /* Colors - Modernized Palette */
    --primary-color: #1e3a8a;
    /* Richer Royal Blue (fits logo) */
    --secondary-color: #3b82f6;
    /* Bright Blue for secondary accents */
    --accent-color: #d4af37;
    /* Elegant Gold */

    /* Text */
    --text-dark: #1f2937;
    /* Soft Charcoal (not black) */
    --text-light: #ffffff;
    --text-muted: #6b7280;
    /* Cool Gray */

    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;
    /* Very light cool gray */
    --bg-subtle: #eff6ff;
    /* Very subtle blue tint */

    /* Typography */
    --font-heading-en: 'Inter', sans-serif;
    --font-body-en: 'Inter', sans-serif;
    --font-heading-ar: 'Amiri', serif;
    --font-body-ar: 'Tajawal', sans-serif;

    /* Spacing */
    --container-width: 1270px;
    --header-height: 80px;
}



/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body-en);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    padding-top: var(--header-height);
    /* Restore global padding for fixed header */
    overflow-x: hidden;
}

/* Typography Defaults */
h1,
h2 {
    font-family: 'Inter', sans-serif;
    color: #1B86C8;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    color: #1B86C8;
    /* Request: Small titles color */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* Minimalist Button - Flat & Solid */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 4px;
    /* Slightly sharper corners */
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: none;
    /* Sentence case is friendlier */
    box-shadow: none;
    /* Flat design */
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #152c6b;
    /* Darker shade */
    transform: translateY(-1px);
}

.btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Hero Minimalist Button (White) */
.btn-minimal-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--text-light);
    backdrop-filter: blur(5px);
    /* Modern glass touch */
}

.btn-minimal-light:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    border-color: var(--text-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ... existing styles ... */



/* Header */
/* Header */
header {
    background-color: #ffffff;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
    transition: transform 0.3s ease-in-out;
}

.header-hidden {
    transform: translateY(-100%);
}

header .container {
    max-width: var(--container-width);
    /* Constrain width to bring elements closer to center */
    padding: 0 40px;
    /* Balanced horizontal padding, vertical centered by flex */
    height: 100%;
    /* Ensure container takes full header height for vertical centering */
}

/* ... existing nav styles ... */
/* Removing empty dir=rtl rule to fix lint */

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Push logo and lang to edges */
    width: 100%;
    position: relative;
    /* Context for absolute centering */
    height: 100%;
}

.mobile-toggle {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    height: 40px;
    /* Slightly larger for better visibility */
    z-index: 10;
    /* Ensure clickable */
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    position: absolute;
    /* Force true center alignment */
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    margin: 0;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1B86C8 !important;
    /* Request: Blue menu text */
    white-space: nowrap;
    transition: all 0.3s ease;
    /* Smooth transition for reaction */
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    /* Slight lift */
    text-shadow: 0 4px 8px rgba(27, 134, 200, 0.2);
    /* Glow effect */
}

/* Add animated underline effect */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

.lang-switch {
    position: relative;
    z-index: 10;
}

.lang-current {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.lang-current:hover {
    color: var(--accent-color);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-top: 8px;
    min-width: 60px;
    display: none;
    flex-direction: column;
    z-index: 1001;
}

.lang-dropdown.active {
    display: flex;
}

.lang-option {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-align: left;
    transition: background-color 0.2s ease;
}

.lang-option:hover {
    background-color: var(--bg-light);
}

/* Hero Section */
.hero {
    height: 60vh;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.75), rgba(59, 130, 246, 0.65)), url('../img/hero-bg-new.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    display: flex;
    align-items: center;
    color: var(--text-light);
    margin-top: 60px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.2;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 50px;
    /* Push button down */
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero p:empty {
    display: none;
    margin: 0;
    padding: 0;
}

/* ... existing hero content styles ... */

/* ... existing hero content styles ... */

/* Expertise Marquee (Auto Scrolling) */
.expertise-marquee {
    overflow: hidden;
    padding: 40px 0;
    position: relative;
    width: 100%;
}

.marquee-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 40s linear infinite;
    /* Slower for more content */
    padding-right: 30px;
    /* Ensure total width is divisible by 4 */
}

/* Pause animation on hover for accessibility */
/* .marquee-track:hover {
    animation-play-state: paused;
} */

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-25%);
        /* Move exactly 1/4th (one set) */
    }
}

.expertise-card {
    min-width: 280px;
    height: 280px;
    /* Taller for image */
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    /* Stack image and text */
    align-items: center;
    justify-content: flex-start;
    /* Top align so image is at top */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    /* Clip image corners */
    padding: 0;
    /* Remove padding to let image flush */
}

.expertise-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.expertise-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
    margin-bottom: 20px;
}

.expertise-card:hover img {
    filter: grayscale(0%);
}

.expertise-card h3 {
    font-size: 1.15rem;
    margin: 0;
    text-align: center;
    color: #1B86C8;
    /* Request: Small titles color */
    font-weight: 700;
    white-space: normal;
    padding: 0 20px;
    line-height: 1.4;
    flex-grow: 1;
    /* Push against bottom */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    /* Softer corners */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    /* Very subtle shadow */
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.1);
    /* Blue glow on hover */
    border-color: rgba(59, 130, 246, 0.2);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1B86C8;
    /* Request: Small titles color */
}

.card p {
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card-img {
    width: calc(100% + 60px);
    margin: -30px -30px 20px -30px;
    height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}

/* Team Cards */
.team-card {
    text-align: center;
    margin-top: 120px;
    /* Massive space for 200px avatar */
    position: relative;
    overflow: visible;
    padding-top: 120px;
    /* Space inside */
}

.team-avatar {
    width: 200px;
    /* Maximum size */
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    overflow: hidden;
    position: absolute;
    top: -100px;
    /* Half out */
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid #fff;
    /* Thick bold border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    /* Bouncy transition */
    z-index: 2;
}

/* Animate avatar separately on hover */
.team-card:hover .team-avatar {
    transform: translateX(-50%) scale(1.1) translateY(-10px);
    /* Pop up and zoom */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Focus on faces */
    border-radius: 50%;
}

.team-card h3 {
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--accent-color) !important;
    font-weight: 600;
    margin-bottom: 1rem !important;
}

/* Footer */
footer {
    background: #f8f9fa;
    /* Very clear grey */
    color: var(--text-dark);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-heading-en);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Lighter border */
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* RTL Support */
[dir="rtl"] {
    font-family: var(--font-body-ar);
    text-align: right;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .logo {
    font-family: var(--font-heading-ar);
}


/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        gap: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
        margin-left: auto;
        /* Push to right */
        margin-right: 20px;
    }
}

/* ... existing styles ... */

/* --- Contact Page Redesign (LegalUp Style) --- */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Strict 2-column split */
    gap: 60px;
    align-items: start;
    padding: 40px 0;
}

.contact-info-side {
    padding-right: 20px;
}

.contact-form-side {
    background: var(--bg-white);
    /* Clean look, no heavy shadow/card background needed if on white */
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    /* Light grey border */
    border-radius: 6px;
    /* Modern subtle radius */
    font-family: var(--font-body-en);
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    background: #F9FAFB;
    /* Very slight off-white input bg */
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    /* Blue glow ring */
    background: #ffffff;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-details-list {
    margin-top: 30px;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contact-item p,
.contact-item a {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.map-container {
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    /* Specific height for map in column */
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
        /* Stack on mobile/tablet */
        gap: 40px;
    }

    .contact-info-side {
        padding-right: 0;
        order: 2;
        /* Form first on mobile? Or info first? usually info first */
        order: 1;
    }

    .contact-form-side {
        order: 2;
    }
}

/* Client Card Override - Force white background even in dark mode */
.client-card {
    background: #ffffff !important;
    min-width: 200px !important;
    height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

.client-card img {
    /* height: 100px !important; Removed to allow better centering of varying logos */
    max-height: 120px !important;
    max-width: 160px !important;
    width: auto !important;
    margin: 0 !important;
    /* Remove bottom margin for centering */
    filter: none !important;
    object-fit: contain !important;
}

.somoprint-logo {
    max-width: 72px !important;
    /* Increased by 2x from 36px */
    max-height: 54px !important;
    /* Increased correspondingly */
}

/* Specific rule for text-only cards */
.client-card h3 {
    margin: 0 !important;
    width: 100% !important;
    text-align: center !important;
    flex-grow: 0 !important;
}


/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #64b5f6;
        /* Soft Blue */
        --secondary-color: #ecf0f1;
        /* Light Gray */
        --text-dark: #e0e0e0;
        --text-muted: #b0b0b0;
        --bg-light: #2c2c2c;
        /* Lighter grey for sections */
        --bg-white: #222222;
        /* Dark Grey background */
    }

    .card,
    header,
    footer,
    .lang-dropdown {
        background-color: #2c2c2c !important;
        /* Force override */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .lang-option {
        color: #e0e0e0;
    }

    .lang-option:hover {
        background-color: #383838;
    }

    /* Invert logo if it is black/dark */
    .logo img {
        filter: brightness(0) invert(1);
    }
}