:root {
    --bg-color: #fafafa;
    --text-color: #f4f4f4;
    --accent-color: #888;
    --card-height: 400px;
    --font-main: 'Vazirmatn', Barlow;
}


@font-face {
    font-family: Barlow;
    src: url('Assets/Fonts/Barlow-Light.ttf');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* 1. Prevent Scrolling during load */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* 2. Loader Styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.counter {
    font-family: Barlow;
    font-size: 4rem; /* Big counter */
    font-weight: 200;
    color: #fff;
    font-variant-numeric: tabular-nums; /* Prevents jitter when numbers change */
}



/* Header */
header {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px;
    mix-blend-mode: difference; /* Makes header visible on light or dark bg */
    opacity: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Important: Keeps logo left and menu right despite dir="rtl" */
    flex-direction: row-reverse; 
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #fff;
}

/* Burger Menu Styles */
.burger-menu {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px; /* Space between lines */
    z-index: 1001; /* Must be higher than nav overlay */
}

.burger-menu span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* --- BURGER TO CROSS ANIMATION --- */
/* When the 'toggle' class is added by JS: */

/* 1. Rotate top line */
.burger-menu.toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: #000;
}

/* 2. Hide middle line */
.burger-menu.toggle span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px); /* Slide it out slightly */
}

/* 3. Rotate bottom line */
.burger-menu.toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #000;
}


/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    
    /* FIX: Solid Black Background to block page content */
    background: #fff; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%); /* Hidden top */
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999; /* Below burger button (1001), above header (1000) */
}

.mobile-nav.active {
    transform: translateY(0); /* Slide down */
}

/* Menu Links */
.mobile-nav ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.mobile-nav a {
    text-decoration: none;
    color: #000;
    font-size: 2.5rem; /* Larger text */
    display: block;
    margin: 30px 0;
    font-weight: 300;
    font-family: 'Vazirmatn', sans-serif;
    
    /* Slight hover effect */
    transition: color 0.3s;
}

.mobile-nav a:hover {
    color: #888;
}

/* Hero Section */

.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    
    /* CSS MASKING SETUP */
    /* Replace YOUR-LOGO.png with your actual file path */
    -webkit-mask-image: url('Assets/Diar Mark.PNG');
    mask-image: url('Assets/Diar Mark.PNG');
    
    /* Center the logo mask */
    -webkit-mask-position: center center;
    mask-position: center center;
    
    /* Don't repeat the logo */
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    
    /* Initial size of the logo mask - adjust as needed */
    /* We start small, GSAP will animate this to HUGE */
    -webkit-mask-size: 20%; 
    mask-size: 20%;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}

.hero-content {
    padding: 20px;
    z-index: 1;
}

.hero-title, .hero-text {
    /* We handle visibility purely in JS to avoid FOUC (Flash of Unstyled Content) */
    opacity: 0; 
    
    /* CRITICAL FIX: Disable CSS transitions so they don't fight GSAP */
    transition: none !important; 
    
    /* Performance hint for smoother rendering */
    will-change: transform, opacity;
    
    /* Prevents font weight shifting during fade-in */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-text {
    font-size: 0.8rem;
    font-weight: 300;
    transition-delay: 0.2s; /* Delays text slightly after title */
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0; /* Hidden initially, JS will reveal it */
    animation: fadeIn 1s ease-out 3s forwards; /* Auto reveal after 3s if JS fails */
}

/* Mouse Outline */
.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    position: relative;
}

/* The Moving Wheel */
.wheel {
    width: 2px;
    height: 6px;
    background: #fff;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

/* Down Arrows */
.arrow span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    transform: rotate(45deg);
    margin: -4px 0;
    animation: scrollArrow 2s infinite;
}

.arrow span:nth-child(2) { animation-delay: 0.2s; }
.arrow span:nth-child(3) { animation-delay: 0.4s; }

/* Animations */
@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

@keyframes scrollArrow {
    0% { opacity: 0; transform: rotate(45deg) translate(-5px, -5px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(5px, 5px); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Load Animation Classes */
.loaded .hero-title, 
.loaded .hero-text {
    opacity: 1;
    transform: translateY(0);
}

/* Marquee Ribbon */
/* Marquee Ribbon */
.marquee-section {
    background: #fff;
    padding: 30px 0;
    overflow: hidden;
    border-bottom: 1px solid #333;
    
    /* FIX: Force LTR for the animation math to work perfectly */
    direction: ltr; 
}

.marquee-track {
    display: flex; /* Removes whitespace glitches */
    align-items: center;
    gap: 80px; /* Consistent spacing between logos */
    
    /* FIX: Ensure track is exactly the width of its content */
    width: max-content; 
    
    animation: marquee 30s linear infinite;
    /* Hardware acceleration for smoothness */
    will-change: transform; 
}

.marquee-track img {
    height: 50px;
    width: auto;
    
    /* Minimalist styling */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* Ensure images don't shrink */
    flex-shrink: 0; 
}

.marquee-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    /* Move exactly half the width (since we have 2 sets) */
    100% { transform: translateX(-50%); } 
}

/* Brands Section */
.brands-section {
    padding: 60px 20px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 300;
    color: #000;
    text-align: center;
}

.brands-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Columns */
    
    /* gap: row-gap column-gap; 
       Increased row gap to 40px, kept column gap at 10px 
    */
    gap: 40px 10px; 
}

.brand-card {
    position: relative;
    height: 300px;
    width: 100%;
    overflow: hidden;
    border-radius: 0; /* REMOVED Border Radius */
}

.card-bg {
    width: 100%;
    height: 120%; /* Taller for parallax room */
    object-fit: cover;
    position: absolute;
    top: -10%;
    left: 0;
    
    /* CRITICAL FIX 1: Remove CSS transition so it doesn't fight GSAP */
    transition: none !important;
    
    /* CRITICAL FIX 2: Optimize rendering performance */
    will-change: transform;
}

.brand-card:hover .card-bg {
    transform: scale(1.05);
}

.card-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.9);
    color: #000;
    padding: 5px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 0; /* REMOVED Border Radius */
    z-index: 2;
}

/* Glassmorphism Text Box */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    
    /* GLASS EFFECT START */
    background: rgba(0, 0, 0, 0.45); /* Dark semi-transparent tint */
    backdrop-filter: blur(10px);      /* The blur effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* Subtle glass edge */
    /* GLASS EFFECT END */

    z-index: 2;
    text-align: right;
}

.en-title {
    font-family: Barlow;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Helps text pop on glass */
}

.fa-subtitle {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.8rem;
    color: #ddd; /* Slightly brighter to read on glass */
    font-weight: 300;
}


/* Contact / CTA */
.cta-section {
    padding: 80px 20px;
    text-align: center;
    background: #111;
}

.cta-container {
    max-width: 600px;
    margin: 0 auto;
}

.cta-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.minimal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.minimal-form input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    padding: 15px 0;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    text-align: right;
}

.minimal-form input:focus {
    border-bottom-color: #fff;
}

.minimal-form button {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.minimal-form button:hover {
    background: #ddd;
}

/* --- MODERN FOOTER --- */
.modern-footer {
    position: relative;
    background-color: #000000;
    /* Height is important here to allow scrolling room for the effect */
    min-height: 70vh; 
    font-family: 'Vazirmatn', sans-serif;
    color: #888;
    overflow: hidden; /* Keeps the image inside */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Covering Image */
.footer-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Sits on top of content */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Allows clicking through if needed, but usually we want it to fade first */
}

.footer-cover img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    
    /* FIX: Define the starting blur as 0px here. 
       Also, keep the order SAME as your Javascript (blur first, then invert) */
    filter: blur(0px) invert(1);
    
    /* Performance optimization */
    will-change: filter, transform, opacity; 
}

/* The Real Content */
.footer-content-wrapper {
    position: relative;
    width: 100%;
    z-index: 1; /* Under the cover */
    padding: 0px 0px 0px;
    opacity: 0; /* Hidden initially, revealed by GSAP */
    transform: translateY(0px); /* Pushed down initially */
}

/* ... Keep your existing Grid/Column styles below ... */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; 
    gap: 40px;
    text-align: center; 
    padding-top: 30px;

}

/* Footer Columns */
.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    text-decoration: none;
    color: #888;
    transition: color 0.3s ease, padding-right 0.3s ease;
}

.footer-col a:hover {
    color: #fff;
    padding-right: 5px; /* Slight nudge on hover */
}

/* Brand Column Specifics */
.brand-col .footer-logo {
    width: 120px; /* Adjust based on your logo shape */
    margin-bottom: 15px;
    opacity: 0.8;
    /* Optional: Invert color if your logo is black */
    /* filter: invert(1); */ 
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

/* Footer Bottom (Copyright) */
.footer-bottom {
    border-top: 1px solid #1a1a1a;
    margin-top: 50px;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    font-size: 0.75rem;
    font-family: 'Oswald', sans-serif; /* English font for copyright */
    letter-spacing: 1px;
    color: #444;
}


/* --- BRAND MODAL / SHEET --- */
.brand-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000; /* Above everything */
    background: rgba(0,0,0,0.6); /* Dim background */
    backdrop-filter: blur(5px);
    
    /* Initially Hidden */
    opacity: 0;
    pointer-events: none; 
    transition: opacity 0.3s ease;
    
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align sheet to bottom */
}

.brand-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.brand-sheet {
    width: 100%;
    max-width: 600px; /* Max width for desktop */
    height: 85vh; /* Takes up 85% of screen height */
    background: #111;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow-y: auto; /* Scrollable content */
    position: relative;
    border-top: 1px solid #333;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
    
    /* INITIAL STATE FOR GSAP: Pushed down 100% */
    transform: translateY(100%); 
}

/* Close Button */
.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.close-modal-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    position: absolute;
}
.close-modal-btn span:nth-child(1) { transform: rotate(45deg); }
.close-modal-btn span:nth-child(2) { transform: rotate(-45deg); }

/* Sheet Content */
.sheet-header-img {
    position: relative;
    width: 100%;
    height: 250px;
}

.sheet-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sheet-overlay {
    position: absolute;
    top: 0; 
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #111, transparent);
}

.sheet-header-img h2 {
    position: absolute;
    bottom: 20px;
    left: 20px; /* English Title left aligned */
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.sheet-content {
    padding: 30px 20px;
    text-align: right; /* RTL text */
}

.sheet-content h3 {
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.sheet-content p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* Download Button */
.download-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #ddd;
}



/* =========================================
   DESKTOP MEDIA QUERY (min-width: 1024px)
   ========================================= */
   @media (min-width: 1024px) {

    /* --- GLOBAL ADJUSTMENTS --- */
    :root {
        --card-height: 500px;
    }

/* --- 1. HEADER & NAVIGATION (FIXED) --- */
    
    /* 1. Hide Mobile Elements */
    .burger-menu {
        display: none !important; /* Force hide */
    }

    /* 2. Header Container: Force Logo to Left */
    .header-container {
        display: flex;
        flex-direction: row-reverse; /* In RTL, this puts start (Logo) on Left */
        justify-content: space-between;
        align-items: center;
        padding: 30px 50px;
        width: 100%;
        
    }

    .logo {
        font-size: 1.8rem;
        z-index: 1003; /* Ensure above nav */
    }

    /* 3. Navigation: Force to Right */
    .mobile-nav {
        /* Reset absolute positioning from mobile */
        position: absolute; 
        top: 40px;
        
        /* Force location: Right side of screen */
        right: 50px; 
        left: auto; 
        
        width: auto;
        height: auto;
        background: transparent;
        transform: none !important; /* Disable slide transform */
        pointer-events: all;
        z-index: 1002;
    }

    .mobile-nav ul {
        display: flex;
        flex-direction: row-reverse; /* Flips list so 1st item is right-most */
        gap: 50px;
        padding: 0;
        margin: 0;
    }

    .mobile-nav ul li { margin: 0; }

    .mobile-nav a {
        font-size: 0.95rem; /* Sleek, small text */
        margin: 0;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 2px; /* High-end tracking */
        font-weight: 500;
        position: relative;

    }

    /* Elegant Underline Hover */
    .mobile-nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: -5px;
        right: 0; /* Expands from right to left in RTL */
        background-color: #fff;
        transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .mobile-nav a:hover::after { width: 100%; }

    /* --- 2. HERO SECTION --- */
    .hero-title {
        font-size: 5.5rem;
        margin-bottom: 20px;
    }

    .hero-text {
        font-size: 1.1rem;
        max-width: 600px;
        margin: 0 auto;
    }

    /* --- 3. BRANDS GRID --- */
    .brands-section { padding: 100px 50px; }

    .brands-grid {
        grid-template-columns: repeat(4, 1fr); 
        gap: 30px;
    }

    .brand-card {
        height: 500px;
        cursor: pointer;
    }
    
    .card-content {
        transform: translateY(10px);
        transition: transform 0.3s ease;
    }
    
    .brand-card:hover .card-content {
        transform: translateY(0);
    }

    /* --- 4. CONTACT SECTION --- */
    .cta-section {
        padding: 150px 80px;
        text-align: right;
    }

    .cta-container {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 80px;
        align-items: center;
    }

    .cta-container h2 {
        font-size: 3.5rem;
        line-height: 1.1;
    }
    
    .minimal-form {
        margin-top: 0;
        padding: 40px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
    }

    /* --- 5. FOOTER --- */
    .footer-container {
        grid-template-columns: 2fr 1fr 1fr;
        text-align: right;
        padding: 80px 50px;
    }
    
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-cover img {
        width: 400px;
        height: 400px;
    }

    /* --- 6. MODAL (UPDATED: Right Sidebar Layout) --- */
    .brand-modal-overlay {
        justify-content: flex-end; 
        align-items: stretch; 
        padding: 0;
    }

    .brand-sheet {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        
        /* INCREASED WIDTH HERE */
        width: 650px; 
        
        height: 100vh;
        margin: 0;
        border-radius: 0;
        
        display: flex;
        flex-direction: column;
        
        /* Box Shadow for depth */
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    /* Keep the rest the same... */
    .sheet-header-img {
        width: 100%;
        height: 40vh; 
        flex-shrink: 0; 
        order: unset;
    }
    
    .sheet-content {
        flex-grow: 1; 
        padding: 40px;
        display: flex;
        flex-direction: column;
        overflow: hidden; 
    }

    /* Scrollable Text Area */
    .sheet-content p {
        overflow-y: auto; /* Only the text scrolls if it's too long */
        padding-left: 10px; /* Space for scrollbar */
        margin-bottom: 20px;
        
        /* Custom Scrollbar for sleek look */
        scrollbar-width: thin;
        scrollbar-color: #444 #111;
    }

    /* Button Pinned to Bottom */
    .download-btn {
        margin-top: auto; /* Magic CSS: Pushes button to very bottom */
        flex-shrink: 0;
    }

    .sheet-header-img h2 {
        font-size: 3rem;
        right: auto;
        left: 30px;
        bottom: 30px;
        text-align: left;
    }
}