/* DESIGN SYSTEM - VIBRANT PREMIUM UPGRADE */
:root {
    --primary-dark: #1A1A1A; /* Charcoal */
    --primary-green: #00c853; /* Palm Green */
    --secondary-green: #00e676; /* Vibrant Green */
    --accent-green: #00ff88; /* Neon Mint Green */
    --power-green: #69f0ae; /* Light Mint */
    --light-green: #f1f8f5; /* Very Light Green Tint */
    --pure-white: #FFFFFF;
    --off-white: #F5F5F5;
    --charcoal: #1A1C1B;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --transition-smooth: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    --container-width: 1400px;
    --header-height: 75px;
    
    --sh-primary: 0 10px 30px rgba(0, 255, 136, 0.3);
}

/* RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--off-white);
    -webkit-overflow-scrolling: touch; /* Momentum scrolling */
    overflow-x: hidden;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE / Edge */
}
html::-webkit-scrollbar {
    display: none;                /* Chrome, Safari, Opera */
}

@media (max-width: 768px) {
    html {
        scroll-behavior: auto; /* Disable JS smooth scroll for native speed on mobile */
    }
}


body {
    padding-top: var(--header-height);
    overflow-x: hidden;
    animation: fadeInPage 0.4s ease-out forwards;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
body::-webkit-scrollbar {
    display: none;
}

@keyframes fadeInPage {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* =============================================
   PAGE FRAME — NEON GREEN HIGH-TECH REFLECTION
   A fixed neon glow border around every page.
   ============================================= */
body::before {
    content: '';
    position: fixed;
    inset: 0;                      /* covers full viewport */
    z-index: 9999;
    pointer-events: none;          /* never blocks clicks */
    border: 3px solid rgba(0, 255, 136, 0.4); /* Neon green core */
    border-radius: 0px;
    box-shadow:
        /* intense inner reflection bleed onto the page */
        inset 0 0 20px rgba(0, 200, 83, 0.3),
        inset 0 0 80px rgba(0, 200, 83, 0.15),
        inset 0 0 150px rgba(0, 200, 83, 0.05),
        /* outer glow */
        0 0 15px rgba(0, 255, 136, 0.3),
        0 0 40px rgba(0, 200, 83, 0.15);
    animation: framePulseGreen 4s ease-in-out infinite;
}

/* Disable heavy animation on mobile for better performance */
@media (max-width: 768px) {
    body::before {
        animation: none !important; /* Disable animation entirely on mobile */
        border-width: 1.5px;
        box-shadow: inset 0 0 10px rgba(0, 200, 83, 0.1);
        opacity: 0.7;
    }
}


@keyframes framePulseGreen {
    0%, 100% {
        box-shadow:
            inset 0 0 20px rgba(0, 200, 83, 0.3),
            inset 0 0 80px rgba(0, 200, 83, 0.15),
            inset 0 0 150px rgba(0, 200, 83, 0.05),
            0 0 15px rgba(0, 255, 136, 0.3),
            0 0 40px rgba(0, 200, 83, 0.15);
        border-color: rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow:
            inset 0 0 30px rgba(0, 255, 136, 0.5),
            inset 0 0 120px rgba(0, 200, 83, 0.25),
            inset 0 0 250px rgba(0, 200, 83, 0.1),
            0 0 30px rgba(0, 255, 136, 0.5),
            0 0 80px rgba(0, 200, 83, 0.25);
        border-color: rgba(0, 255, 136, 0.7); /* Intensely bright crest */
    }
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

/* Global Font Size Reductions for Inline Styles */
h1[style*="font-size: 3rem"], h2[style*="font-size: 3rem"], h3[style*="font-size: 3rem"] { font-size: 2.6rem !important; }
h1[style*="font-size: 2.5rem"], h2[style*="font-size: 2.5rem"], h3[style*="font-size: 2.5rem"] { font-size: 2.2rem !important; }
h1[style*="font-size: 2.2rem"], h2[style*="font-size: 2.2rem"], h3[style*="font-size: 2.2rem"] { font-size: 1.95rem !important; }
h1[style*="font-size: 2rem"], h2[style*="font-size: 2rem"], h3[style*="font-size: 2rem"] { font-size: 1.8rem !important; }
h1[style*="font-size: 1.8rem"], h2[style*="font-size: 1.8rem"], h3[style*="font-size: 1.8rem"] { font-size: 1.6rem !important; }
h1[style*="font-size: 1.4rem"], h2[style*="font-size: 1.4rem"], h4[style*="font-size: 1.4rem"] { font-size: 1.25rem !important; }
h1[style*="font-size: 1.3rem"], h2[style*="font-size: 1.3rem"], h4[style*="font-size: 1.3rem"] { font-size: 1.15rem !important; }
h1[style*="font-size: 1.2rem"], h2[style*="font-size: 1.2rem"], h4[style*="font-size: 1.2rem"] { font-size: 1.1rem !important; }

p {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

/* UTILITIES */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem; /* More space for content on small screens */
    }
}


.section-padding {
    padding: 6rem 0;
}

.text-center { text-align: center; }
.text-white { color: var(--pure-white); }
.bg-dark { background-color: var(--primary-dark); }
.bg-light { background-color: var(--light-green); }

/* BUTTONS - PREMIUM UPGRADE */
.btn {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 0.85rem;
    border: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-green) 100%);
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.3);
}

.btn-outline {
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--accent-green);
    color: var(--primary-dark);
}

/* NAVBAR - PREMIUM HIGH CONTRAST */
nav {
    height: var(--header-height);
    background: #0A0A0A; /* Solid Darker Charcoal */
    backdrop-filter: blur(25px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    z-index: 10100; /* Higher than the neon frame (9999) */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3); /* Subtle green glow border */
    transition: var(--transition-smooth);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
nav::-webkit-scrollbar {
    display: none;
}

@media (max-width: 991px) {
    nav {
        backdrop-filter: none; /* Disabling expensive blur on mobile */
        -webkit-backdrop-filter: none;
        height: 60px;
        background: #0A0A0A;
        border-bottom: 2px solid rgba(0, 255, 136, 0.4); /* Stronger indicator */
        position: fixed;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    :root {
        --header-height: 60px;
    }
}



nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    padding: 0.5rem 0;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: #FFFFFF !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--accent-green) !important;
}

.nav-links a.active {
    color: var(--accent-green) !important;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

@media (max-width: 991px) {
    .nav-links a.active {
        text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    }
}

.mobile-nav-link {
    display: none;
}

/* CARDS - MODERN FLOATING EFFECT */
.feature-card {
    background: var(--charcoal);
    padding: 3.5rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
    border: 1px solid var(--glass-border);
    color: var(--pure-white);
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent-green);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-green);
    color: var(--accent-green);
    border-radius: 50%;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.logo img {
    height: 55px;
    width: auto;
    filter: brightness(1.2);
}

@media (max-width: 480px) {
    .logo img {
        height: 45px; /* Slightly larger for clarity on tiny screens */
    }
}


/* HERO SECTION - HOME PAGE BASE */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--pure-white);
    background: var(--primary-dark);
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 18, 11, 0.4) 0%, rgba(0, 18, 11, 0.9) 100%);
}

@keyframes kenBurns {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(1%, 1%); }
}

.hero video, .hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 30s infinite alternate ease-in-out;
    opacity: 0.8;
}

/* NEON SUB-PAGE HERO - ELECTRIFYING TEAL/BLUE/GREEN */
.hero-neon {
    position: relative;
    min-height: 70vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #0c0c0c;
}

.hero-bg-anim {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: center/cover no-repeat;
    animation: kenBurnsHeader 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
    will-change: transform;
}

@media (max-width: 768px) {
    .hero-bg-anim {
        animation: none; /* Disable expensive scaling animation on mobile */
        transform: scale(1.05); /* Minimal static scale to avoid gaps */
    }
}

#hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1.2;
    pointer-events: none;
}

@keyframes kenBurnsHeader {
    0% { transform: scale(1) translate(0px, 0px); }
    100% { transform: scale(1.15) translate(1.5%, 1.5%); }
}

.hero-neon .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-neon .hero-content {
    z-index: 2;
    position: relative;
    width: 100%;
}

/* IMPROVED READABILITY - SECTION THEMES */
.bg-dark h2, .bg-dark p, .bg-dark li {
    color: var(--pure-white) !important;
}

.bg-light h2, .bg-light p, .bg-light li {
    color: var(--primary-dark) !important;
}

section[style*="background-color: var(--pure-white)"] h2,
section[style*="background-color: var(--pure-white)"] p {
    color: var(--primary-dark) !important;
}

/* 3D CARD ANIMATION */
.product-card {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.6s ease;
    perspective: 1000px;
}

.product-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg) translateY(-10px) !important;
    box-shadow: 0 40px 80px rgba(192, 192, 192, 0.2);
}

.hero-content {
    max-width: 1000px;
    z-index: 1;
    text-align: center;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 7vw, 4.8rem);
    color: var(--pure-white);
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3.5rem;
    font-weight: 400;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* WHY PALMBRI SECTION */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
}
.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--accent-green);
}

/* PRODUCT SHOWCASE */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 0;
}

.product-item {
    position: relative;
    height: 450px;
    overflow: hidden;
    cursor: pointer;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 2rem;
    background: linear-gradient(transparent, rgba(8, 28, 21, 0.9));
    color: var(--pure-white);
    transition: var(--transition-smooth);
}

.product-item:hover .product-img {
    transform: scale(1.1);
}

.product-item:hover .product-overlay {
    padding-bottom: 4rem;
}

.product-overlay h3 {
    color: var(--pure-white);
    margin-bottom: 0.5rem;
}

footer {
    background-color: #0A0A0A;
    padding: 5rem 0 3rem;
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}
@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-logo img {
    height: 55px; /* Increased from 40px for clarity */
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--power-green);
    margin-bottom: 2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--power-green);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* RESPONSIVE */
/* ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--accent-green);
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    transition: var(--transition-smooth);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .nav-links {
        gap: 0.8rem;
    }
    .nav-links a {
        font-size: 0.75rem;
    }
}

@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        z-index: 10200;
    }
    
    .nav-extra {
        display: none !important;
    }
    
    .mobile-nav-link {
        display: block;
        padding: 1.5rem;
        background: rgba(0, 255, 136, 0.05);
    }

    .mobile-nav-link .btn {
        width: 100%;
        text-align: center;
        background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-green) 100%);
        color: var(--primary-dark);
        padding: 1rem !important;
        font-weight: 800;
        box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: #0D0D0D;
        gap: 0;
        padding: 0;
        border-top: 1px solid rgba(0, 255, 136, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
        opacity: 0;
        z-index: 10000;
        box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        max-height: 100vh;
        opacity: 1;
        overflow-y: auto;
    }
    
    .nav-links li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li a {
        display: block;
        padding: 1.2rem 2rem;
        font-size: 0.95rem;
        color: #FFFFFF !important;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-links li a.active {
        background: rgba(0, 255, 136, 0.1);
        color: var(--accent-green) !important;
        border-left: 4px solid var(--accent-green);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    /* Fix laggy fixed backgrounds on mobile */
    [style*="background-attachment: fixed"],
    .fixed-bg {
        background-attachment: scroll !important;
    }
}


@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* =============================================
   UNIFIED PRODUCT IMAGE FRAMEWORK
   Used across PV Modules, BESS, Inverters, Mounting
   ============================================= */

/* BESS, Inverters, Mounting Pages */
.product-img-glow {
    box-shadow: none;
    transition: box-shadow 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    cursor: pointer;
}
.product-img-glow:hover {
    box-shadow: 0 0 25px 5px rgba(0, 255, 136, 0.4), 0 0 50px 15px rgba(0, 200, 83, 0.15) !important;
    transform: scale(1.03);
}

/* PV Modules Page Image */
.featured-product-image img {
    transition: box-shadow 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    cursor: pointer;
}
.featured-product-image img:hover {
    box-shadow: 0 0 25px 8px rgba(0, 255, 136, 0.4), 0 0 60px 20px rgba(0, 200, 83, 0.15) !important;
    transform: scale(1.02);
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.15));
}
