/* SURGE PROTECTOR - UNIFIED DESIGN SYSTEM 
   Matches Index & Gallery Branding 
*/

:root {
    --primary-black: #414141;
    --luxury-gold: #D4AF37;
    --deep-gold: #996515;
    --bg-white: #FFFFFF;
    --text-muted: #64748b;
    --glass-white: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(212, 175, 55, 0.2);
    --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --slate-light: #f8fafc;
}

/* ================= BASE STYLES ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--primary-black); 
    background: var(--bg-white); 
    line-height: 1.7; 
    overflow-x: hidden; 
}

h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 700; }

/* ================= PERFECTLY CENTERED OVERLAY ================= */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff; /* Using pure white for the luxury look */
    display: flex;
    align-items: center;    /* Vertical Center */
    justify-content: center; /* Horizontal Center */
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.overlay-content {
    display: flex;
    flex-direction: column; /* Stacks logo on top of text */
    align-items: center;    /* Ensures both children are centered horizontally */
    text-align: center;
}

.loading-logo {
    width: 110px;          /* Slightly larger for better presence */
    height: auto;
    margin-bottom: 30px;    /* Generous space between logo and label */
    filter: drop-shadow(0 10px 20px rgba(212, 175, 55, 0.2));
    animation: breathe 2s infinite ease-in-out;
}

.overlay-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #D4AF37;         /* Match your gold accent */
    text-transform: uppercase;
    letter-spacing: 12px;
    
    /* THE FIX: text-indent offsets the extra spacing on the last letter 
       to ensure the text is mathematically centered */
    text-indent: 12px; 
    white-space: nowrap;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
}
/* ================= NAVIGATION (EXACT LANDING SYNC) ================= */
.nav {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 30px 8%; /* Original landing padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent; /* Starts transparent for that high-end look */
    z-index: 1000;
    transition: var(--transition);
}

.nav.shrink {
    padding: 15px 8%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 700; /* Bold, premium weight */
    font-size: 1.2rem;
    color: var(--primary-black);
    letter-spacing: -0.5px; /* Tighter tracking for modern branding */
}

.logo-icon {
    width: 35px;
    height: auto;
    margin-right: 12px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 35px; /* Consistent spacing between links */
}

.nav-actions a {
    text-decoration: none;
    color: var(--primary-black);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s ease;
}

.nav-actions a:hover {
    color: var(--luxury-gold);
}

/* ================= SYNCED PRIMARY BUTTON ================= */
.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f1d38e 50%, #b38b47 100%);
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 4px; /* Sharp, modern edges */
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.3);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(197, 160, 89, 0.5);
    background: linear-gradient(135deg, #f1d38e 0%, #d4af37 50%, #b38b47 100%);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.btn-outline {
    border: 1.5px solid var(--primary-black);
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}
/* ================= SECTION COMMON ================= */
section { padding: 120px 8%; }
.reveal { opacity: 0; transform: translateY(30px); transition: var(--transition); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ================= ENERGY HERO ================= */
.energy-hero { text-align: center; padding-top: 180px; }
.sub-label { display: block; color: var(--luxury-gold); text-transform: uppercase; letter-spacing: 5px; font-weight: 700; font-size: 0.75rem; margin-bottom: 15px; }
.energy-hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 20px; }
.energy-hero p { max-width: 700px; margin: 0 auto 60px; color: var(--text-muted); font-size: 1.1rem; }

.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

.benefit-card {
    background: #fff; padding: 50px 40px; border-radius: 40px;
    border: 1px solid #f0f0f0; transition: var(--transition);
}
.benefit-card:hover { transform: translateY(-10px); border-color: var(--luxury-gold); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }

.card-icon { color: var(--luxury-gold); font-size: 0.8rem; font-weight: 800; opacity: 0.4; margin-bottom: 20px; }
.benefit-card h2 { font-size: 1.4rem; margin-bottom: 20px; }
.benefit-card ul { list-style: none; text-align: left; }
.benefit-card li { margin-bottom: 12px; font-size: 0.95rem; color: var(--text-muted); position: relative; padding-left: 20px; }
.benefit-card li::before { content: "•"; color: var(--luxury-gold); position: absolute; left: 0; font-weight: bold; }

/* ================= POWER FACTOR (Dark) ================= */
.dark-section { 
    background: var(--primary-black); color: #fff; 
    border-radius: 60px; margin: 0 2% 100px; padding: 100px 8%;
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h1 { color: #fff; font-size: 2.8rem; }
.sub-label.gold { color: var(--luxury-gold); }

.pfc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 80px; }
.pfc-card { 
    background: var(--glass-white); padding: 40px; border-radius: 20px;
    border: 1px solid var(--glass-border); transition: 0.4s;
}
.pfc-card:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--luxury-gold); }
.pfc-card h3 { color: var(--luxury-gold); margin-bottom: 15px; }

/* Beer Analogy Visualization */
.beer-analogy { text-align: center; }
.analogy-img-wrapper { 
    max-width: 550px; margin: 40px auto; padding: 15px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 25px;
}
.analogy-img-wrapper img { width: 100%; border-radius: 15px; }



/* ================= COMPLIANCE & GEMP ================= */
.compliance-container { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.compliance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compliance-grid img { width: 100%; height: 180px; object-fit: cover; border-radius: 15px; border: 1px solid #eee; cursor: zoom-in; transition: 0.3s; }
.compliance-grid img:hover { transform: scale(1.05); border-color: var(--luxury-gold); }

.gemp-glass-card { 
    background: var(--slate-light); border-radius: 40px; padding: 80px; 
    border: 1px solid #f0f0f0; 
}
.gemp-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.gemp-visual img { width: 100%; border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.1); }

/* ================= CENTERED FOOTER ================= */
.site-footer {
    padding: 80px 8% 40px; text-align: center;
    display: flex; flex-direction: column; align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05); background: #fff;
}
.site-footer p { color: var(--text-muted); font-size: 0.9rem; }

/* ================= LIGHTBOX ================= */
#ee-lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95);
    display: none; align-items: center; justify-content: center; z-index: 10000;
}
#ee-lightbox.show { display: flex; }
#ee-lightbox-img { max-width: 90%; max-height: 85%; border-radius: 10px; box-shadow: 0 0 50px rgba(0,0,0,0.5); }

/* ================= RESPONSIVE & MOBILE MENU ================= */
@media (max-width: 900px) {
    .nav { padding: 15px 5%; }

    .nav-toggle { 
        display: flex !important; 
        flex-direction: column;
        gap: 5px;
        z-index: 2000; 
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--primary-black);
        transition: 0.3s;
    }

    .nav-actions {
        display: flex !important; 
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Full screen height for luxury feel */
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center; /* Centers buttons */
        justify-content: center;
        padding: 40px 0;
        z-index: 1500;

        /* Animation Start */
        transform: translateY(-100%); 
        opacity: 0;
        transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
        pointer-events: none;
    }

    .nav-actions.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-actions a {
        width: 80%;
        max-width: 280px;
        text-align: center;
        margin: 10px 0 !important;
        font-size: 1.1rem;
        opacity: 0;
        transform: translateY(15px);
        transition: 0.5s ease;
    }

    .nav-actions.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* HAMBURGER TO 'X' */
    .nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* LAYOUT ADJUSTMENTS */
    .compliance-container, .gemp-layout { grid-template-columns: 1fr; text-align: center; }
    .compliance-grid { grid-template-columns: 1fr 1fr; }
    section { padding: 80px 5%; }
    .dark-section { margin: 0 0 60px; border-radius: 0; }
}

@media (max-width: 900px) {
    .nav-actions .btn-primary {
        width: 80%;
        max-width: 280px;
        padding: 16px 0 !important; /* Slightly taller for easier thumb-tapping */
        margin: 10px 0 !important;
    }
}