/* ===============================
    1. GLOBAL & RESET
=============================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #ffffff;
    color: #1a1f26;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

/* ===============================
    2. NAVBAR (OVERLAY STYLE)
=============================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    z-index: 1000;
    display: flex;
    align-items: center; /* Vertical alignment for everything */
    background: transparent; /* Overlay over video */
    transition: all 0.4s ease;
    padding: 0 8%;
}

/* Glass effect when scrolling */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    height: 75px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ensures Logo and Links are on one line */
}

/* BRAND/LOGO ALIGNMENT */
.brand {
    display: flex;
    align-items: center; /* ALIGNS NAME STRAIGHT TO LOGO */
    gap: 15px;
    text-decoration: none;
}

.brand-logo {
    height: 45px;
    width: auto;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff; /* White over video */
    transition: color 0.3s;
}

.navbar.scrolled .brand-name {
    color: #0f172a; /* Dark after scroll */
}

/* LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff; /* White over video */
    transition: all 0.3s;
}

.navbar.scrolled .nav-links a {
    color: #334155;
}

.nav-links a:hover {
    color: #0284c7 !important;
}

/* ===============================
    3. HERO & VIDEO CLARITY FIX
=============================== */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    background: #000; /* Dark base improves video depth */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* VIDEO CLARITY TUNING */
    filter: brightness(0.9) contrast(1.1); 
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Adjusting opacity: 
       0.6 at the start (left) gives text contrast.
       0.2 at the end (right) lets the video shine through.
    */
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.2) 100%
    );
    z-index: 2;
    /* Optional: adds a very subtle blur to help text pop without darkening the video */
    backdrop-filter: blur(1px); 
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 8%;
    max-width: 900px;
}

/* ===============================
    4. BRANDS SECTION (CLEAN)
=============================== */
.brands-section {
    padding: 100px 0;
    background: #ffffff;
}

.brand-logo-card {
    background: transparent; /* Removed gray boxes */
    border: none;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-card img {
    max-width: 160px;
    filter: grayscale(0); /* Full color logos */
    opacity: 0.9;
    transition: opacity 0.3s;
}

.brand-logo-card:hover img {
    opacity: 1;
}
/* ===============================
    GLOBAL - LIGHT MODE
=============================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: #ffffff; /* Crisp White Background */
    color: #1a1f26;      /* Deep Professional Dark Text */
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ===============================
    NAVBAR - OVERLAY & ALIGNMENT
=============================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px; /* Slightly taller for breathing room */
    z-index: 1000;
    
    /* Starts completely transparent */
    background: transparent; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    
    transition: all 0.4s ease-in-out;
    display: flex;
    align-items: center;
}

/* This class is added via your script.js when scrolling */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 75px; /* Shrinks slightly when scrolling for a premium feel */
    border-bottom: 1px solid #e2e8f0;
}

.nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    align-items: center; /* Vertical alignment for all items */
    justify-content: space-between;
}

/* BRAND ALIGNMENT FIX */
.brand {
    display: flex;
    align-items: center; /* Centers Logo and Text vertically */
    gap: 15px;
    text-decoration: none;
}

.brand-logo {
    height: 50px; /* Adjust based on your logo size */
    width: auto;
    display: block;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0;
    line-height: 1; /* Prevents text from pushing down */
    
    /* Responsive Color Change */
    color: #0f172a; 
}

/* Ensures text remains white/visible over video before scroll */
.navbar:not(.scrolled) .brand-name,
.navbar:not(.scrolled) .nav-links a {
    color: #ffffff;
}

.navbar:not(.scrolled) .nav-cta {
    border-color: #ffffff;
    color: #ffffff !important;
}

/* NAVIGATION LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
}

.navbar.scrolled .nav-links a {
    color: #334155;
}

/* ===============================
    HERO FIX - NO PADDING TOP
=============================== */
.hero {
    margin-top: 0; /* Ensures video stays behind the navbar */
    padding-top: 0;
    height: 100vh;
    position: relative;
}

/* ===============================
    HERO SECTION
=============================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Adjusting opacity: 
       0.6 at the start (left) gives text contrast.
       0.2 at the end (right) lets the video shine through.
    */
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.2) 100%
    );
    z-index: 2;
    /* Optional: adds a very subtle blur to help text pop without darkening the video */
    backdrop-filter: blur(1px); 
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 8%;
    max-width: 850px;
}

.hero-title {
    font-size: clamp(40px, 5vw, 64px);
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: #010e1f;
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-btn {
    display: inline-block;
    padding: 16px 35px;
    background: #0284c7;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.2);
}

/* ===============================
    ABOUT SECTION
=============================== */
.premium-about {
    padding: 100px 8%;
    background: #f8fafc;
}

.about-inner {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
}

.about-tag {
    color: #0284c7;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about-title {
    font-size: 42px;
    color: #0f172a;
    margin: 20px 0;
}

.about-desc {
    color: #64748b;
    line-height: 1.8;
}

.about-card {
    padding: 25px;
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #0284c7;
    color: #334155;
    font-weight: 600;
}

/* ===============================
    SOLUTIONS GRID
=============================== */
.solutions-section {
    padding: 100px 0;
    background: white;
    text-align: center;
}

.expertise-title {
    font-size: 48px;
    color: #0f172a;
    margin-bottom: 10px;
    text-align: center;
}

.expertise-subtitle {
    color: #64748b;
    margin-bottom: 60px;
}




/* ===============================
    FINAL SOLUTIONS GRID FIX
=============================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 280px);
    gap: 30px;
    justify-content: center;
    perspective: 1200px;
}

.sq-card {
    height: 320px; /* Increased slightly for better fit */
    cursor: pointer;
    position: relative;
    transition: transform 0.4s ease;
}

.sq-card:hover {
    transform: translateY(-10px);
}

.sq-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: none; /* Let GSAP handle rotation */
}

.face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* FRONT FACE */
.front {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transform: rotateY(0deg);
}

/* BACK FACE - FIXED SCROLLING & COLLISION */
.back {
    background: #0f172a; 
    color: #fff;
    transform: rotateY(180deg);
    border: 1px solid #0284c7;
    
    /* Separation Logic */
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important; /* Removes outer collision */
    overflow: hidden; 
}

/* Fixed Header - Never scrolls */
.back h5 {
    color: #0284c7;
    font-size: 14px;
    text-transform: uppercase;
    padding: 20px 20px 12px 20px;
    margin: 0;
    background: #0f172a;
    border-bottom: 1px solid rgba(2, 132, 199, 0.3);
    flex-shrink: 0;
    text-align: left;
}

/* Scroll Area - Only this moves */
.content-scroll {
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 15px 20px;
    flex-grow: 1;
    text-align: left;
}

.back ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.back li {
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
    color: #cbd5e1;
}

.back li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0284c7;
    font-weight: bold;
}

/* Modern Scrollbar */
.content-scroll::-webkit-scrollbar {
    width: 4px;
}
.content-scroll::-webkit-scrollbar-thumb {
    background: #0284c7;
    border-radius: 10px;
}
/* TARGET THE EMOJI ICONS */
.front .icon {
    font-size: 64px !important; /* Adjust this from 60px to 80px depending on preference */
    margin-bottom: 20px;        /* Adds breathing room between icon and text */
    line-height: 1;
    display: block;
    transition: transform 0.4s ease;
}

/* HOVER EFFECT: Makes the icon pop when the card is hovered */
.sq-card:hover .front .icon {
    transform: scale(1.2) rotate(5deg);
}

/* ENSURE FRONT FACE REMAINS CENTERED */
.face.front {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}





/* ===============================
    BRANDS SECTION (CLEAN - NO OVERLAYS)
=============================== */
.brands-section {
    padding: 80px 0;
    background: #ffffff;
    overflow: hidden;
}

.tag {
    color: #0284c7;
    font-weight: 700;
    display: block;
    margin-bottom: 15px;
}

.brands-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    /* Soft fade on edges */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.brand-track {
    display: flex;
    /* (Width 200 + Margin 60) * 88 logos */
    width: calc(260px * 88); 
    animation: scrollBrands 60s linear infinite;
}

.brand-logo-card {
    width: 200px;
    height: 100px;
    margin: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* PROBLEM FIXED: No gray box */
    border: none;            /* PROBLEM FIXED: No outline */
    filter: none;            /* PROBLEM FIXED: Original colors visible */
}

.brand-logo-card img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-logo-card:hover img {
    transform: scale(1.1);
}

@keyframes scrollBrands {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-260px * 44)); }
}

.brand-track:hover {
    animation-play-state: paused;
}

/* ===============================
    SCROLLBAR
=============================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #0284c7; }




.contact-section {
    padding: 100px 8%;
    background: #f8fafc; /* Matches your About section */
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.contact-title {
    font-size: 42px;
    color: #0f172a;
    margin-bottom: 20px;
}

.contact-subtitle {
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.6;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: #334155;
    font-weight: 600;
}

.info-icon {
    font-size: 24px;
}

/* Form Styling */
.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: #0284c7;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #0284c7;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #025da1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
.form-result {
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

/* Optional: Add a loading state to the button */
.submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}


/* ===============================
    UNIFIED PREMIUM FOOTER
=============================== */
.main-footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 80px 8% 40px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

/* Column Widths */
.brand-col { flex: 1.5; min-width: 300px; }
.address-col { flex: 2.5; min-width: 320px; }
.links-col { flex: 1; min-width: 150px; text-align: center;}

/* Brand Styling */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.footer-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    align-items: flex-start;
}

.footer-brand .brand-name {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* Office Grid - Desktop Side-by-Side */
.office-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.footer-col h4 {
    color: #0284c7;
    margin-bottom: 25px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.office h5 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 12px;
}

.office p {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 8px;
    word-wrap: break-word; /* Fixes text cutoff */
}

/* Links */
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
}

.footer-col ul li a:hover { color: #0284c7; }

/* Bottom Bar */
.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* ===============================
    MOBILE DEBUG FIXES
=============================== */
@media (max-width: 992px) {
    .office-grid {
        grid-template-columns: 1fr; /* Stacks offices early for tablet */
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: 60px 5% 30px;
    }

    .footer-container {
        flex-direction: column; /* Vertical stack for all main columns */
        text-align: left;
    }

    .brand-col, .address-col, .links-col {
        width: 100%;
        min-width: 100%;
    }

    .footer-brand {
        align-items: flex-start; /* Keeps logo/text left-aligned */
    }

    .footer-brand .brand-name {
        font-size: 20px;
    }

    .footer-col h4 {
        margin-top: 20px;
        margin-bottom: 15px;
    }
    
    .office-grid {
        gap: 40px; /* More space between stacked offices */
    }
}

/* ===============================
    REFINED RESPONSIVE SYSTEM
=============================== */

/* --- Tablet & Small Laptops (1024px and below) --- */
@media (max-width: 1024px) {
    .nav-inner { padding: 0 4%; }
    
    .about-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .grid-container {
        grid-template-columns: repeat(2, 280px);
    }

    .footer-container {
        gap: 30px;
    }
    
    .office-grid {
        grid-template-columns: 1fr; /* Stacks offices on tablet to prevent overlap */
    }
}

/* --- Mobile Standard (768px and below) --- */
@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 0 5%; height: 70px; }
    .nav-links { display: none; } 
    .brand-logo { height: 35px; }

    /* Hero & Sections */
    .hero-content { padding: 0 5%; text-align: center; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .about-title { font-size: 32px; }
    
    /* Solutions Grid */
    .grid-container {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
    .sq-card { height: 350px; }

    /* Contact Section */
    .contact-container { grid-template-columns: 1fr; gap: 40px; }
    .contact-title { font-size: 30px; text-align: center; }

    /* UNIFIED FOOTER FIX */
    .main-footer { padding: 60px 5% 30px; }

    .footer-container {
        flex-direction: column !important; /* Force stack */
        text-align: left !important; /* Keep design professional, not centered */
        align-items: flex-start;
    }

    .brand-col, .address-col, .links-col {
        width: 100% !important;
        min-width: 100%;
    }

    .office-grid {
        grid-template-columns: 1fr !important; /* Force Saudi & India to stack */
        gap: 35px;
    }

    .footer-brand { align-items: flex-start; }
    .footer-brand .brand-name { font-size: 20px; }
    
    .footer-col h4 {
        margin-top: 20px;
        margin-bottom: 15px;
        text-align: left; /* Ensure headers don't center */
    }
    
    .footer-col ul { text-align: left; } /* Keep links aligned left */
}

/* --- Small Mobile (480px and below) --- */
@media (max-width: 480px) {
    .hero-title { font-size: 26px; }
    .about-right { grid-template-columns: 1fr; }
    .expertise-title { font-size: 26px; }
    
    .brand-logo-card { width: 130px; margin: 0 10px; }
    
    .footer-logo { height: 50px; }
    .footer-brand .brand-name { font-size: 18px; }
}