/* ==========================================================================
   DimeSuite Global Design System
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-deep-navy: #0B1220;
    --card-slate: #151D2B;
    --primary-emerald: #00C389;
    --secondary-blue: #4F8CFF;
    --text-white: #FFFFFF;
    --text-light-grey: #A0AABF;
    
    /* Typography */
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Borders */
    --radius-md: 12px;
    --radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
body, html {
    margin: 0;
    padding: 0;
    background-color: var(--bg-deep-navy);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin: 0 0 1rem 0;
    font-weight: 700;
}

a {
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(11, 18, 32, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =======================================================
   Logo Global Fix, Spring, and AI Stars
   ======================================================= */
.brand-logo { 
    display: flex; 
    align-items: center; 
    position: relative; 
    text-decoration: none;
    width: 200px; /* Locks the width so the flex layout never shifts */
    height: 40px; /* Locks the bounding height */
}

/* Shrunk the image down to 38px */
.brand-logo img {
    height: 38px; 
    width: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

/* Minor spring and emerald glow on hover */
.brand-logo:hover img {
    transform: scale(1.03); 
    filter: drop-shadow(0 0 10px rgba(0, 195, 137, 0.5));
}

/* (Leave the .brand-logo::before and ::after AI Star code exactly as it is below this!) */

/* 1 & 2. Consistent, slightly larger size across all pages */
.brand-logo img {
    height: 45px; /* Bumped up from 35px */
    width: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

/* Minor spring and emerald glow on hover */
.brand-logo:hover img {
    transform: scale(1.03); /* Very subtle pop */
    filter: drop-shadow(0 0 10px rgba(0, 195, 137, 0.5));
}


/* Starting anchor points */
.brand-logo::before { left: 10px; }
.brand-logo::after { right: 30px; }

/* Trigger the one-time burst on hover */
.brand-logo:hover::before { 
    animation: starBurstLeft 0.8s ease-out forwards; 
}

/* Starting position (hidden near the center) */
.brand-logo::before { top: 50%; left: 10px; transform: scale(0) rotate(0deg); }
.brand-logo::after { top: 50%; right: 10px; transform: scale(0) rotate(0deg); }

/* Shoot outwards and twinkle on hover */
.brand-logo:hover::before {
    opacity: 1;
    top: -15px;
    left: -20px;
    transform: scale(1.2) rotate(45deg);
    text-shadow: 0 0 12px rgba(0, 195, 137, 0.8);
}

.brand-logo:hover::after {
    opacity: 1;
    top: -5px;
    right: -25px;
    transform: scale(0.9) rotate(15deg);
    text-shadow: 0 0 12px rgba(0, 195, 137, 0.8);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-light-grey);
    font-weight: 500;
    display: inline-block; /* Crucial: This allows the scale transform to work! */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-emerald) !important;
    transform: scale(1.1) translateY(-2px);
    text-shadow: 0 5px 15px rgba(0, 195, 137, 0.4); /* Adds the glowing aura */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-emerald);
    color: var(--bg-deep-navy);
    box-shadow: 0 4px 14px rgba(0, 195, 137, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 195, 137, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.btn-secondary:hover {
    border-color: var(--secondary-blue);
    color: var(--secondary-blue);
}

/* Hero Section */
.hero {
    padding: 12rem 0 6rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light-grey);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Floating Animation */
.floating-dashboard {
    width: 115%;
    max-width: none;
    margin-left: -5%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: float 6s ease-in-out infinite;
    border: 1px solid rgba(255,255,255,0.05);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}
/* Infinite Logo Ticker */
.logo-ticker {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* This creates a beautiful fade-out effect on the left and right edges */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-track {
    display: flex;
    align-items: center;
    width: max-content;
    /* Adjust '20s' to make the scroll faster or slower */
    animation: scrollLogos 20s linear infinite;
    opacity: 0.5;
}

.logo-track img {
    margin: 0 3rem; /* Creates the gap between the logos */
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.logo-track img:hover {
    opacity: 1; /* Makes the specific logo light up when hovered */
}

/* The actual scrolling physics */
@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Premium Cards */
.products-section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

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

.premium-card {
    background-color: var(--card-slate);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1; 
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 140, 255, 0.3);
    box-shadow: 0 10px 40px rgba(79, 140, 255, 0.1);
    z-index: 50; 
}

.premium-card .subtitle {
    color: var(--primary-emerald);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.premium-card .badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(79, 140, 255, 0.1);
    color: var(--secondary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 100;
}

/* Image Hover Zoom Effects (Ultra-Magnification) */
.product-img-wrapper {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s ease; 
}

.product-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 7px;
}

.premium-card:hover .product-img-wrapper { 
    transform: scale(1.15); 
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6); 
    z-index: 90; 
}}

/* Benefit Cards (Why DimeSuite) */
.benefit-card {
    padding: 2rem;
    background: var(--card-slate);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
    /* Springy transform curve to match the platform workflow steps */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
}

.benefit-card:hover {
    transform: scale(1.2) translateY(-5px); /* Zooms 5% and lifts up */
    box-shadow: 0 15px 35px rgba(0, 195, 137, 0.1); /* Soft emerald shadow */
    border-color: rgba(0, 195, 137, 0.3); /* Subtle emerald border glow */
    z-index: 10;
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 4rem 0 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul a { 
    color: var(--text-light-grey); 
    display: inline-block; /* Allows the spring physics to work */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, text-shadow 0.3s ease;
}

.footer-column ul a:hover { 
    color: var(--primary-emerald); 
    transform: scale(1.1) translateY(-2px); 
    text-shadow: 0 5px 15px rgba(0, 195, 137, 0.4); 
}

.footer-bottom {
    text-align: center;
    color: var(--text-light-grey);
    font-size: 0.875rem;
}
/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Hidden off-screen initially */
    left: 0;
    width: 100%;
    background: rgba(26, 29, 36, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 195, 137, 0.3);
    padding: 1.5rem;
    z-index: 9999;
    transition: bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.cookie-banner.show {
    bottom: 0; /* Slides up smoothly */
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center; /* Changed from space-between to center */
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    color: var(--text-light-grey);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center; /* Centers the actual text */
    max-width: 800px; /* Keeps the text from getting too wide to read */
    /* Removed flex: 1 so it stops pushing the buttons away */
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .cookie-content { flex-direction: column; align-items: flex-start; }
    .cookie-buttons { width: 100%; justify-content: stretch; }
    .cookie-buttons button { flex: 1; }
}

/* =========================================
   Mobile Navigation & Hamburger Menu
   ========================================= */
/* 1. Prevent iOS Safari from creating phantom horizontal scrolling */
html, body { 
    overflow-x: hidden; 
    width: 100%; 
    position: relative; 
}

/* 2. Hide mobile elements on desktop */
.mobile-menu-toggle { display: none; cursor: pointer; z-index: 1000; }
.mobile-only-cta { display: none; }

.mobile-menu-toggle .bar {
    display: block; width: 25px; height: 3px; margin: 5px auto;
    transition: all 0.3s ease-in-out; background-color: var(--text-white, #ffffff); border-radius: 3px;
}

/* 3. Mobile Layout Trigger */
@media (max-width: 992px) {
    .desktop-cta { display: none; }
    .mobile-only-cta { display: block; margin-top: 1rem; }
    
    /* Lock hamburger to the right side */
    .mobile-menu-toggle { 
        display: block; position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); 
    }

    /* The Slide-Out Menu (Safari-Proof Hiding) */
    .nav-links {
        position: fixed; top: 70px; left: 0; width: 100%; height: 100vh;
        background-color: rgba(26, 29, 36, 0.98); backdrop-filter: blur(15px);
        flex-direction: column; text-align: center; padding: 2rem 2rem 5rem 2rem;
        border-top: 1px solid rgba(0, 195, 137, 0.3); z-index: 999;
        
        /* The magic lines that prevent the weird left block: */
        transform: translateX(100%);
        visibility: hidden;
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
    }

    /* When active, slide it into view */
    .nav-links.active { 
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }

    .nav-links li { margin: 1.5rem 0; }
    .nav-links a { font-size: 1.2rem; display: block; }

    /* Hamburger "X" Animation */
    .mobile-menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}


/* =========================================
   Z-Index Fix for Clickable Hamburger
   ========================================= */
.navbar {
    position: relative; /* Ensures z-index activates */
    z-index: 99999 !important; /* Forces nav to sit above all videos and toggle switches */
}

.mobile-menu-toggle {
    z-index: 99999 !important;
}

/* =========================================
   Mobile Spacing & Typography Tweaks
   ========================================= */
@media (max-width: 768px) {
    /* 1. Shrink the massive headlines so they fit on a phone screen */
    h1, .pricing-header h1, .platform-hero h1 {
        font-size: 2.3rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    h2, .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* 2. Tame the massive Hero padding across all pages */
    .hero, 
    .pricing-header, 
    .platform-hero {
        padding-top: 8rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* 3. Tighten up the Trust Center, Company, and general sections */
    section.container,
    #dimerec,
    #dimexplain,
    #dimeai {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    #about {
        padding-top: 8rem !important;
        padding-bottom: 3rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* 4. Make sure standard text stays readable but compact */
    p {
        font-size: 1rem !important; 
    }
}

/* =========================================
   Mobile Layout & Hover Fixes
   ========================================= */
@media (max-width: 992px) {
    
   /* 1. Make the Mobile Menu CTA Emerald with Dark Text */
    .mobile-only-cta .btn-primary {
        background-color: var(--primary-emerald) !important;
        color: #1A1D24 !important; /* Hardcoded dark slate/black so it is super visible */
        font-weight: 700 !important;
        border: none !important;
    }

    /* 2. Disable Hover Effects (Jumps & Green Glows) on Touch Screens */
    .card:hover, .premium-card:hover, .benefit-card:hover, 
    .faq-card:hover, .pricing-card:hover, .trust-card:hover, 
    .comparison-table tbody tr:hover {
        transform: none !important;
        background: var(--card-slate) !important; /* Resets to default dark background */
        box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important; /* Default subtle shadow */
        border-color: rgba(255, 255, 255, 0.05) !important; /* Default border */
    }
    
    /* Fix specific hovers that use different default backgrounds */
    .solution-text-card:hover { transform: none !important; background: rgba(255, 255, 255, 0.02) !important; border-color: rgba(0, 195, 137, 0.3) !important; box-shadow: none !important; }
    .step:hover { transform: none !important; background: transparent !important; box-shadow: none !important; }

    /* 3. Hide the Workflow Video on Mobile */
    .workflow-visual {
        display: none !important;
    }

    /* 4. Fix Careers Form Cutting Off (Bulletproof Flexbox) */
    #careers > div {
        display: flex !important;
        flex-direction: column !important; /* Stacks vertically */
        width: 100% !important;
        gap: 2rem !important;
    }
    
    #careers > div > div {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 1.5rem !important; /* Shrinks the massive padding */
    }

    .form-control {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    input[type="file"].form-control {
        font-size: 0.85rem !important;
        white-space: normal !important; 
        padding: 0.5rem !important;
        overflow: hidden !important; /* Stops the file button from stretching the screen */
    }

    /* 5. Fix Office Address & Solutions Layouts for Portrait Mode (Stack vertically) */
    #contact .faq-card {
        grid-template-columns: 1fr !important; /* Stacks the map under the address */
    }
    
    #dimerec, #dimexplain, #dimeai {
        grid-template-columns: 1fr !important; /* Stacks text and video */
        text-align: center !important;
        gap: 3rem !important;
    }

/* 6. Move the Hero Video above the Text on Mobile */
    .hero-container {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .hero-visual {
        order: -1 !important; /* This magical line pushes the video to the very top! */
        margin-bottom: 2rem !important;
        width: 100% !important;
    }

    /* Reorder DimeXplain so text sits ABOVE the video on mobile */
    #dimexplain > div:nth-child(1) { order: 2; }
    #dimexplain > div:nth-child(2) { order: 1; }
    
    /* Center the solution text since it is stacked */
    .solution-text-card { text-align: left; }

    /* Flatten 3D videos so they look clean and legible on narrow portrait screens */
    .solution-video-wrapper {
        transform: none !important;
    }
    .perspective-stage:hover .solution-video-wrapper {
        transform: none !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4) !important; 
        border-color: rgba(255, 255, 255, 0.1) !important;
    }
}

/* =========================================
   Smart Sticky Navigation Bar
   ========================================= */
.navbar {
    position: fixed !important; /* Overrides the inline HTML to make it sticky */
    top: 0;
    left: 0;
    width: 100%;
    /* Adds a solid dark background so it doesn't clash with text as it scrolls */
    background-color: rgba(26, 29, 36, 0.98); 
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), padding 0.3s ease, box-shadow 0.3s ease !important;
}

/* This class gets actively added/removed by JavaScript */
.nav-hidden {
    transform: translateY(-100%) !important; /* Slides it up off the screen */
}