/* ============================================================
   SMART POWER GENERATION — RESPONSIVE FINAL (VERSION 19.0)
   Complete multi-page mobile-first lockdown
   ============================================================ */

/* ---- Global Reset ---- */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

/* ---- Desktop: hide hamburger ---- */
.mobile-menu-btn { display: none; }

/* ============================================================
   TABLET + MOBILE NAVIGATION (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {

    .navbar {
        height: 70px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 5000 !important;
        background: #fff !important;
    }

    .navbar .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px !important;
        padding: 0 16px !important;
    }

    .logo-img {
        height: 42px !important;
        width: auto !important;
    }

    /* ---- HAMBURGER BUTTON ---- */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        background: transparent !important;
        border: 2px solid #4d0d12 !important;
        border-radius: 8px !important;
        color: #4d0d12 !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        flex-shrink: 0 !important;
    }

    .mobile-menu-btn svg {
        width: 28px !important;
        height: 28px !important;
        display: block !important;
        pointer-events: none !important;
        fill: #4d0d12 !important;
    }

    /* ---- SLIDE-IN SIDEBAR MENU ---- */
    .nav-links {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 9998 !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12) !important;
    }

    .nav-links.active {
        right: 0 !important;
    }

    .nav-links ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 28px !important;
        text-align: center !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .nav-cta { display: none !important; }
}

/* ============================================================
   MOBILE STACKING — ALL PAGES (≤992px)
   ============================================================ */
@media (max-width: 992px) {

    /* Typography scale-down */
    .main-heading { font-size: 1.85rem !important; line-height: 1.2 !important; }
    .section-title,
    .section-title-large,
    .section-title-alt,
    .sf-title,
    .vm-vision-heading,
    .vm-mission-heading { font-size: 1.55rem !important; line-height: 1.2 !important; }
    h1, h2, h3, h4 { word-wrap: break-word !important; overflow-wrap: break-word !important; }

    /* ---- Universal Grid Stacking ---- */
    /* Home */
    .hero-grid,
    .values-grid,
    .hardware-grid,
    .standard-header,
    .asymmetric-grid,
    .experts-grid,
    .compliance-flex,
    .compliance-logos,
    .container-flex,
    .stats-flex-row,
    /* About */
    .corporate-grid,
    .corp-top-row,
    .wide-card-inner,
    .about-stats-footer,
    .presence-header,
    .presence-row,
    /* Products */
    .generator-series-grid,
    .compliance-grid-products,
    .adv-modules-grid,
    .rental-grid,
    .rental-img-cluster,
    .rental-feature-box,
    .ats-stats,
    .sync-diagram,
    .pricing-grid-alt,
    .promise-grid,
    /* Vision */
    .vm-grid,
    .sf-top-grid,
    .sf-cert-bar,
    .sf-cert-badges,
    .sow-grid,
    /* Contact & Footer */
    .contact-grid,
    .footer-grid
    {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 24px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* ---- Component-specific overrides ---- */
    .detail-item {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        text-align: center !important;
    }


    /* Hero */
    .hero-image-wrapper { order: -1 !important; width: 100% !important; margin-bottom: 20px !important; }
    .load-card { position: relative !important; left: 0 !important; bottom: 0 !important; transform: none !important; margin: 20px auto 0 !important; }

    /* Icons (centered) */
    .value-icon-box,
    .icon-maroon-small,
    .expert-icon-sm,
    .sf-icon,
    .std-icon-maroon,
    .icon-square,
    .promise-icon-maroon-bg,
    .rental-icon-maroon,
    .controls-icon {
        margin: 0 auto 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Cards */
    .value-card,
    .prowess-card,
    .sf-card,
    .series-card,
    .presence-card,
    .adv-card,
    .pricing-card-alt,
    .promise-item {
        width: 100% !important;
        max-width: 100% !important;
        padding: 28px 18px !important;
    }

    /* Rental section */
    .rental-visuals { width: 100% !important; order: -1 !important; }
    .r-img-large, .r-img-small { width: 100% !important; height: auto !important; }

    /* Presence cards */
    .presence-card .card-image-box { height: 300px !important; }

    /* Stats bar (About) */
    .about-stats-bar { padding: 50px 0 !important; }
    .stat-num-alt { font-size: 2.4rem !important; letter-spacing: -1px !important; }

    /* Shared Vision */
    .wide-card-inner { padding: 36px 16px !important; }

    /* Buttons full-width */
    .btn, .btn-primary, .btn-secondary { width: 100% !important; text-align: center !important; margin: 6px 0 !important; }

    /* Footer columns */
    .footer-grid { gap: 30px !important; }
    .footer-col-main, .footer-col { width: 100% !important; text-align: center !important; }
}

/* ============================================================
   SMALL PHONES (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .main-heading { font-size: 1.6rem !important; }
    .section-title, .section-title-alt { font-size: 1.35rem !important; }

    .whatsapp-float {
        width: 52px !important;
        height: 52px !important;
        bottom: 18px !important;
        right: 18px !important;
        z-index: 10000 !important;
    }

    .whatsapp-float svg {
        width: 26px !important;
        height: 26px !important;
    }
}

/* ============================================================
   PREMIUM GLOBAL ANIMATIONS (added by add_animations.py)
   ============================================================ */

/* ── Floating / Bobbing ── */
@keyframes float-bob {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}
.float-anim { animation: float-bob 4s ease-in-out infinite; }

/* ── Pulse ring (WhatsApp / CTA buttons) ── */
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(77,13,18,0.35); }
    70%  { box-shadow: 0 0 0 18px rgba(77,13,18,0); }
    100% { box-shadow: 0 0 0 0 rgba(77,13,18,0); }
}
.btn-primary, .btn.btn-primary { animation: pulse-ring 2.5s cubic-bezier(0.455,0.03,0.515,0.955) infinite; }

/* ── Shimmer for section titles ── */
@keyframes shimmer-slide {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.section-title, .section-title-large, .section-title-alt {
    background: linear-gradient(90deg, #111 40%, #4d0d12 50%, #111 60%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-slide 5s linear infinite;
}

/* ── Gradient border cards ── */
@keyframes border-rotate {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.cat-card, .value-card, .sf-card, .pricing-card-alt {
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.cat-card::after, .value-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #4d0d12, #ff9a9e, #4d0d12);
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    animation: border-rotate 3s ease infinite;
    transition: opacity 0.35s ease;
}
.cat-card:hover::after, .value-card:hover::after { opacity: 1; }

/* ── Hero stat numbers counting animation ── */
@keyframes count-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stat-num, .kva-range strong, .stat-num-alt, .corp-stat strong {
    animation: count-up 0.8s ease-out both;
}

/* ── Slide-in underline for nav links ── */
.nav-links ul li a {
    position: relative;
    transition: color 0.3s ease;
}
.nav-links ul li a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -3px;
    width: 0; height: 2px;
    background: #4d0d12;
    transition: width 0.35s ease;
}
.nav-links ul li a:hover::after,
.nav-links ul li a.active::after { width: 100%; }

/* ── Staggered card entrance ── */
.cat-card:nth-child(1) { animation-delay: 0.05s; }
.cat-card:nth-child(2) { animation-delay: 0.15s; }
.cat-card:nth-child(3) { animation-delay: 0.25s; }
.cat-card:nth-child(4) { animation-delay: 0.35s; }
.cat-card:nth-child(5) { animation-delay: 0.45s; }

/* ── Rotating icon on hover ── */
.cat-icon, .value-icon-box, .promise-icon-maroon-bg, .ben-icon {
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.cat-card:hover .cat-icon,
.value-card:hover .value-icon-box,
.ben-card:hover .ben-icon { transform: rotate(10deg) scale(1.15); }

/* ── Hero image subtle zoom ── */
.vision-hero-img, .hero-image-wrapper img, .comp-img img, .panel-img-box img {
    transition: transform 6s ease;
}
.vision-hero:hover .vision-hero-img { transform: scale(1.04); }

/* ── WhatsApp float pulse ── */
.whatsapp-float {
    animation: float-bob 3s ease-in-out infinite, wp-pulse 2s ease-in-out infinite;
}
@keyframes wp-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 8px 40px rgba(37,211,102,0.7); }
}

/* ── Section entrance with line ── */
.section-title::before, .section-title-alt::before {
    display: none; /* prevent double-underline from shimmer + pseudo */
}
