/* ==========================================================================
   Global Variables & Reset
   ========================================================================== */
:root {
    --primary: #0f172a;        /* Deep Slate */
    --primary-light: #1e293b;
    --accent: #2563eb;         /* Electric Blue */
    --accent-hover: #1d4ed8;
    --surface: #ffffff;
    --background: #f8fafc;     /* Light Gray/Blue */
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


            /* =========================================
           ROOT VARIABLES 
           ========================================= */
        :root {
            --color-primary: #0056b3;
            --color-primary-hover: #004494;
            --color-secondary: #00a8ff;
            --color-text-dark: #1e293b;
            --color-bg-light: #f1f5f9;
            --color-white: #ffffff;
            --color-primary-glow: rgba(0, 86, 179, 0.3);
            --font-body: 'Inter', system-ui, -apple-system, sans-serif;
            --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
        }

        * { box-sizing: border-box; }

        body {
            margin: 0;
            font-family: var(--font-body);
            background-color: #f8fafc;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* =========================================
           FIXED HEADER
           ========================================= */
        .site-header {
            position: fixed;
            top: 0; left: 0;
            width: 100%;
            z-index: 1200;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
            transition: all 0.4s var(--transition-smooth);
            border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        }

        .site-header.scrolled {
            background: rgba(255,255,255,0.98);
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        /* =========================================
           HEADER WRAPPER
           ========================================= */
        .header-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 0;
        }

        .logo a {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .logo img {
            height: 48px;
            width: auto;
            object-fit: contain;
            transition: transform 0.3s ease;
        }

        .logo:hover img { transform: scale(1.02); }

        /* =========================================
           DESKTOP NAV
           ========================================= */
        .main-nav {
            flex: 1;
            display: flex;
            justify-content: flex-end;
            padding-right: 40px;
        }

        .nav-list {
            display: flex;
            list-style: none;
            align-items: center;
            gap: 4px;
            margin: 0;
            padding: 0;
        }

        .nav-list > li { position: relative; }
        .nav-list > li.has-megamenu { position: static; }

        .nav-link {
            display: block;
            padding: 10px 16px;
            color: var(--color-text-dark);
            text-decoration: none;
            font-size: 15px;
            font-weight: 600;
            transition: color 0.3s ease;
            position: relative;
            white-space: nowrap;
            cursor: pointer;
        }

        .nav-link:hover, .nav-link.active { color: var(--color-primary); }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0; left: 50%;
            transform: translateX(-50%);
            width: 0; height: 3px;
            background: var(--color-primary);
            transition: width 0.3s ease;
            border-radius: 3px 3px 0 0;
        }

        .nav-link:hover::after, .nav-link.active::after { width: 60%; }

        /* Dropdown Arrow */
        .has-dropdown > .nav-link { padding-right: 28px; }

        .has-dropdown > .nav-link::before {
            content: '';
            position: absolute;
            right: 8px; top: 50%;
            transform: translateY(-50%);
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 5px solid currentColor;
            transition: transform 0.3s ease;
        }

        .has-dropdown:hover > .nav-link::before {
            transform: translateY(-50%) rotate(180deg);
        }

        /* =========================================
           DROPDOWNS (Desktop)
           ========================================= */
        .dropdown-menu {
            position: absolute;
            top: calc(100% + 5px);
            left: 0;
            background: var(--color-white);
            min-width: 260px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.12);
            border-radius: 8px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: all 0.3s var(--transition-smooth);
            list-style: none;
            padding: 10px 0;
            border-top: 4px solid var(--color-primary);
            z-index: 1300;
        }

        .dropdown-right > .dropdown-menu { left: auto; right: 0; }

        .has-dropdown:hover > .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-menu li a {
            display: block;
            padding: 12px 24px;
            color: #475569;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
            border-left: 3px solid transparent;
        }

        .dropdown-menu li a:hover {
            background: var(--color-bg-light);
            color: var(--color-primary);
            border-left-color: var(--color-primary);
            padding-left: 28px;
        }

        /* =========================================
           MEGAMENU (Desktop)
           ========================================= */
        .megamenu-panel {
            position: absolute;
            top: calc(100% + 5px);
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            width: 96vw;
            max-width: 1200px;
            background: var(--color-white);
            box-shadow: 0 15px 40px rgba(0,0,0,0.12);
            border-radius: 0 0 12px 12px;
            border-top: 4px solid var(--color-primary);
            padding: 30px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s var(--transition-smooth);
            z-index: 1300;
            max-height: calc(100vh - 90px);
            overflow-y: auto;
            list-style: none;
        }

        .megamenu-panel::-webkit-scrollbar { width: 6px; }
        .megamenu-panel::-webkit-scrollbar-track { background: var(--color-bg-light); }
        .megamenu-panel::-webkit-scrollbar-thumb { background: rgba(0,86,179,0.4); border-radius: 4px; }

        .has-megamenu:hover > .megamenu-panel {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .megamenu-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 30px;
        }

        .mega-col h4 {
            color: var(--color-text-dark);
            font-size: 13px;
            font-weight: 700;
            margin: 0 0 12px 0;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--color-bg-light);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .mega-col ul { list-style: none; padding: 0; margin: 0; }

        .mega-col ul li a {
            padding: 7px 0;
            color: #64748b;
            font-size: 13.5px;
            display: flex;
            align-items: center;
            text-decoration: none;
            transition: all 0.2s ease;
        }

        .mega-col ul li a::before {
            content: '→';
            margin-right: 8px;
            opacity: 0;
            transform: translateX(-8px);
            transition: all 0.2s ease;
            color: var(--color-primary);
            font-size: 12px;
        }

        .mega-col ul li a:hover {
            color: var(--color-primary);
            transform: translateX(4px);
        }

        .mega-col ul li a:hover::before {
            opacity: 1;
            transform: translateX(0);
        }

        /* =========================================
           HEADER CTA
           ========================================= */
        .header-cta { flex-shrink: 0; }

        .btn-get-quote {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--color-primary);
            color: var(--color-white);
            padding: 12px 28px;
            border-radius: 30px;
            text-decoration: none;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px var(--color-primary-glow);
        }

        .btn-get-quote:hover {
            transform: translateY(-2px);
            background: var(--color-primary-hover);
            box-shadow: 0 8px 25px rgba(0,86,179,0.4);
        }

        /* =========================================
           MOBILE TOGGLE BUTTON
           ========================================= */
        .mobile-menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: space-around;
            width: 32px;
            height: 26px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 0;
            z-index: 1500;
            flex-shrink: 0;
        }

        .mobile-menu-toggle span {
            display: block;
            width: 100%;
            height: 3px;
            background-color: var(--color-text-dark);
            border-radius: 10px;
            transition: all 0.3s ease;
            transform-origin: center;
        }

        /* Hamburger → X animation */
        .mobile-menu-toggle.active span:nth-child(1) {
            transform: translateY(11.5px) rotate(45deg);
        }
        .mobile-menu-toggle.active span:nth-child(2) {
            opacity: 0;
            transform: scaleX(0);
        }
        .mobile-menu-toggle.active span:nth-child(3) {
            transform: translateY(-11.5px) rotate(-45deg);
        }

        /* Overlay */
        .nav-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 1199;
        }
        .nav-overlay.active { display: block; }

        /* =========================================
           RESPONSIVE — TABLET & MOBILE
           ========================================= */
        @media (max-width: 1024px) {

            .mobile-menu-toggle { display: flex; }
            .header-cta { display: none; }

            /* Slide-in panel */
            .main-nav {
                position: fixed;
                top: 0; right: -105%;
                width: 320px;
                height: 100vh;
                background: var(--color-white);
                padding: 70px 0 30px;
                box-shadow: -8px 0 30px rgba(0,0,0,0.15);
                transition: right 0.4s var(--transition-smooth);
                overflow-y: auto;
                z-index: 1400;
                flex-direction: column;
                justify-content: flex-start;
                padding-right: 0;
            }

            .main-nav.active { right: 0; }

            .nav-list {
                flex-direction: column;
                align-items: flex-start;
                width: 100%;
                gap: 0;
            }

            .nav-list > li {
                width: 100%;
                border-bottom: 1px solid #e9eef4;
            }

            .nav-link {
                padding: 16px 20px;
                font-size: 15px;
                width: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .nav-link::after { display: none; }

            /* Arrow stays inside on mobile */
            .has-dropdown > .nav-link::before {
                position: static;
                transform: none;
                margin-left: 6px;
                transition: transform 0.3s ease;
                flex-shrink: 0;
            }

            .has-dropdown.open > .nav-link::before {
                transform: rotate(180deg);
            }

            /* Hide hover-based dropdowns on mobile */
            .has-dropdown:hover > .dropdown-menu { opacity: 0; visibility: hidden; }
            .has-megamenu:hover > .megamenu-panel { opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(10px); }

            /* Mobile dropdown — hidden by default, shown via JS */
            .dropdown-menu,
            .megamenu-panel {
                position: static !important;
                opacity: 1 !important;
                visibility: visible !important;
                transform: none !important;
                box-shadow: none !important;
                border: none !important;
                border-radius: 0 !important;
                display: none;
                background: #f8fafc;
                padding: 0 !important;
                width: 100% !important;
                max-width: 100% !important;
                max-height: none !important;
                overflow: visible !important;
                min-width: unset !important;
                border-top: none !important;
            }

            .dropdown-menu.open,
            .megamenu-panel.open { display: block; }

            .dropdown-menu li a {
                padding: 13px 20px 13px 38px;
                border-left: 3px solid transparent;
                font-size: 14px;
            }

            .dropdown-menu li a:hover {
                padding-left: 44px;
            }

            /* Megamenu mobile grid reset */
            .megamenu-grid {
                display: block;
            }

            .mega-col {
                width: 100%;
                border-bottom: 1px solid #e9eef4;
            }

            .mega-col h4 {
                padding: 14px 20px 14px 38px;
                margin: 0;
                background: #edf2f7;
                font-size: 12px;
                border-bottom: 1px solid #dde3ea;
                cursor: default;
            }

            .mega-col ul li a {
                padding: 11px 20px 11px 50px;
                font-size: 13.5px;
                transform: none !important;
            }

            .mega-col ul li a::before { display: none; }
        }

        @media (max-width: 480px) {
            .logo img { height: 40px; }
            .main-nav { width: 88%; }
        }

        /* =========================================
   MOBILE MENU ALIGNMENT OVERRIDE
   ========================================= */
@media (max-width: 1024px) {
    /* 1. Ensure the link container spreads across the full width */
    .nav-list > li > .nav-link {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
    }

    /* 2. Hide the old arrow that is pushing the text to the right */
    .has-dropdown > .nav-link::before {
        display: none !important;
    }

    /* 3. Recreate the arrow on the right side (after the text) */
    .has-dropdown > .nav-link::after {
        content: '';
        display: inline-block;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
        transition: transform 0.3s ease;
        flex-shrink: 0;
        margin-left: 10px;
    }

    /* 4. Rotate the new right-side arrow when the accordion opens */
    .has-dropdown.open > .nav-link::after {
        transform: rotate(180deg);
    }
}
        
/* ==========================================================================
   Typography, Buttons & Utility
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-2px);
}

section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-kicker {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 1rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ==========================================================================
   1. Hero Section
   ========================================================================== */
.video-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.7) 50%, rgba(15,23,42,0.4) 100%);
}

.hero-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    align-items: center;
    width: 100%;
}

.hero-eyebrow {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.hero-title {
    color: white;
    font-size: clamp(3rem, 6vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: #e2e8f0;
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-proof {
    display: flex;
    gap: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 2rem;
}

.hero-proof div {
    display: flex;
    flex-direction: column;
}

.hero-proof strong {
    font-size: 1.75rem;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-proof span {
    font-size: 0.875rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-machine-card {
    position: relative;
}

.hero-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.hero-carousel-track::-webkit-scrollbar {
    display: none;
}

.hero-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-carousel-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-carousel-slide:hover img {
    transform: scale(1.05);
}

.hero-machine-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(15,23,42,0.95), transparent);
    display: flex;
    flex-direction: column;
}

.hero-machine-caption span {
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 0.25rem;
}

.hero-machine-caption strong {
    color: white;
    font-size: 1.25rem;
}

/* ==========================================================================
   2. About Section
   ========================================================================== */
.about-section { background-color: var(--surface); }

.about-redesign {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.about-highlights span {
    background: var(--background);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    transition: var(--transition);
}

.about-highlights span:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.about-media-panel {
    position: relative;
}

.about-media-panel img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.media-note {
    position: absolute;
    bottom: -2rem;
    left: -2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 280px;
    border-left: 4px solid var(--accent);
}

.media-note strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   3. Why Choose Us Section
   ========================================================================== */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.why-us-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    z-index: 1;
}

.why-us-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border-color: transparent;
}

.card-icon-wrapper {
    width: 72px;
    height: 72px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent);
    transition: var(--transition);
}

.why-us-card:hover .card-icon-wrapper {
    background: var(--accent);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.why-us-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.why-us-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.why-us-card:hover .card-accent {
    transform: scaleX(1);
}

/* ==========================================================================
   4. Products Section (Strictly 3 Categories Per Row)
   ========================================================================== */
.products-section { background-color: var(--surface); }

/* Because your HTML wraps each card in its own .product-category div, 
   we must apply the grid to the main container holding all the categories */
.products-section > .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Forces exactly 3 items per line */
    gap: 2rem;
    align-items: stretch;
}

/* Force the header section to span all 3 columns so it stays at the top */
.products-section .section-header {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.product-category { 
    margin-bottom: 0; 
    display: flex;
    flex-direction: column;
}

.category-title {
    border-bottom: 2px solid var(--background);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.35rem; /* Adjusted slightly so titles fit side-by-side */
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

.product-grid {
    display: block;
    flex: 1; /* Ensures cards stretch to equal height */
}

.product-card {
    display: block;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--background);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.1);
    border-color: var(--accent);
}

.product-image {
    position: relative;
    padding-top: 85%; /* Adjusted aspect ratio for the 3-column view */
    overflow: hidden;
    background: white;
    height: 100%;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* ==========================================================================
   5. Services Section (Strictly 4 per row / 1 line)
   ========================================================================== */
.services-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Exactly 4 cards in one line */
    gap: 1.5rem;
}

.service-showcase-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
}

.service-visual {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--primary-light);
}

.service-gradient-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    transition: opacity 0.4s;
}

.gradient-1 { background: linear-gradient(135deg, #3b82f6, #2dd4bf); }
.gradient-2 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.gradient-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.gradient-4 { background: linear-gradient(135deg, #10b981, #3b82f6); }

.service-showcase-card:hover .service-gradient-bg {
    opacity: 0.4;
}

.service-icon-large {
    color: white;
    z-index: 1;
    transition: transform 0.4s;
}

.service-showcase-card:hover .service-icon-large {
    transform: scale(1.2);
}

.service-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.service-features li {
    display: flex;
    align-items: center;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.service-features li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ==========================================================================
   6. Clients Section
   ========================================================================== */
.clients-section {
    background: white;
    padding-bottom: 6rem;
    overflow: hidden;
}

.clients-marquee-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 3rem 0;
    background: var(--background, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.clients-marquee-row {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.clients-track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-around;
    gap: 3rem;
    min-width: 100%;
    animation: scroll 35s linear infinite; 
    padding-right: 3rem;
}

.client-card {
    width: 160px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* Removed white box background */
    border-radius: 0;
    padding: 1rem;
    box-shadow: none; /* Removed box shadow */
    transition: var(--transition, all 0.3s ease);
}

.client-card:hover {
    transform: scale(1.1) translateY(-2px); /* Slightly enhanced scale on hover */
}

.client-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    /* Removed grayscale and opacity completely so original photos show */
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content { animation: fadeInUp 1s ease-out forwards; }
.hero-machine-card { opacity: 0; animation: fadeInUp 1s ease-out 0.4s forwards; }

/* =========================================
   CLIENT MARQUEE FIXES (Height & Seamless Loop)
   ========================================= */

/* 1. Decrease the overall height by reducing padding */
.clients-marquee-wrapper {
    padding: 1.5rem 0 !important; /* Decreased from 3rem */
}

/* 2. Decrease the size of the client images */
.client-card {
    height: 60px !important; /* Decreased from 90px */
    width: 120px !important; /* Decreased from 160px proportionally */
    padding: 0.5rem !important;
}

/* 3. Force the track to wrap tightly around the 24 images */
.clients-track {
    width: max-content !important; 
    padding-right: 0 !important; /* Remove right padding to prevent a gap in the loop */
    animation: seamless-scroll 25s linear infinite !important;
}

/* 4. The magic seamless loop animation */
/* Because there are 2 sets of 12 images, scrolling exactly 50% resets the loop invisibly */
@keyframes seamless-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Responsive Breakpoints (Graceful scaling for laptops, tablets, and phones)
   ========================================================================== */

/* Smaller Desktop / Laptops */
@media (max-width: 1200px) {
    .services-showcase {
        grid-template-columns: repeat(2, 1fr); /* Drops to 2 rows of 2 on smaller laptops */
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-shell, .about-redesign {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-content {
        text-align: center;
        padding-top: 4rem;
    }
    
    .hero-desc { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }
    .hero-proof { justify-content: center; }

    .media-note {
        position: relative;
        bottom: auto;
        left: auto;
        margin: -3rem auto 0;
        z-index: 2;
    }

    /* Wrap products into 2 columns on tablets */
    .products-section > .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    section { padding: 4rem 0; }
    .section-title { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; }
    
    .hero-proof {
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 1.5rem;
    }
    
    .hero-proof div {
        align-items: center;
        text-align: center;
    }
    
    .video-hero-section {
        min-height: auto;
        padding-bottom: 4rem;
    }
    
    .hero-carousel-slide img {
        height: 300px;
    }
    
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stack products and services into 1 column on phones */
    .products-section > .container {
        grid-template-columns: 1fr;
    }
    
    .services-showcase {
        grid-template-columns: 1fr;
    }
}

/* Center the Precision Engineering card */

/* Desktop (3 columns): Push it to the 2nd (middle) column */
@media (min-width: 1025px) {
    #precision-engineering {
        grid-column: 2; 
    }
}

/* Tablet (2 columns): Make it span the whole row but stay centered and normal size */
@media (max-width: 1024px) and (min-width: 769px) {
    #precision-engineering {
        grid-column: 1 / -1;
        width: calc(50% - 1rem); /* Matches the width of the other cards */
        margin: 0 auto;
    }
}

/* =========================================
   FLOATING BUTTONS (WhatsApp & Back to Top)
   ========================================= */
.floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Ensures buttons never overlap */
    z-index: 2000;
}

.floating-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white, #ffffff);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

/* Hover Animation */
.floating-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* WhatsApp Styling */
.whatsapp-btn {
    background-color: #25D366; 
}
.whatsapp-btn:hover {
    background-color: #1ebe57;
}

/* Back to Top Styling */
.back-to-top {
    background-color: var(--color-primary, #0056b3); 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-primary-hover, #004494);
    transform: translateY(-4px); /* Overrides the transform origin to ensure it floats up */
}

/* RESPONSIVE: Tablet */
@media (max-width: 1024px) {
    .floating-container {
        bottom: 25px;
        right: 25px;
    }
}

/* RESPONSIVE: Phone */
@media (max-width: 480px) {
    .floating-container {
        bottom: 15px;
        right: 15px;
        gap: 12px; /* Rigid spacing to prevent UI overlap on small screens */
    }
    .floating-btn {
        width: 45px;
        height: 45px;
    }
    .floating-btn svg {
        width: 20px;
        height: 20px;
    }
    .whatsapp-btn svg {
        width: 24px;
        height: 24px;
    }
}