/* Blue Label Energy — shared site chrome (header, nav, mega-menu, top-bar, buttons) */
/* Loaded on every page. Page-specific styles (hero, content, forms) stay inline per page. */

header { display:flex; justify-content:space-between; align-items:center; padding:16px 5%; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,0.06); position:sticky; top:0; z-index:1000; transition: background-color 0.25s ease, backdrop-filter 0.25s ease, box-shadow 0.25s ease; }
header.is-scrolled { background: rgba(255,255,255,0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.logo { font-size:1.5rem; font-weight:800; color:var(--primary-blue); text-decoration:none; letter-spacing:-0.5px; }
.logo span { color:var(--accent-blue); }
nav ul { display:flex; list-style:none; gap:25px; }
nav a { text-decoration:none; color:var(--text-dark); font-weight:600; font-size:0.95rem; }
nav a:hover { color:var(--accent-blue); }
.btn { background:var(--accent-blue); color:#fff; padding:10px 22px; border-radius:5px; text-decoration:none; font-weight:700; display:inline-block; border:none; cursor:pointer; font-size:0.95rem; }
.btn:hover { background:var(--primary-blue); }

/* Top Bar */
.top-bar { background-color: var(--primary-blue); color: #d9e2ec; padding: 8px 5%; font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; }
.top-bar-right { display: flex; align-items: center; gap: 40px; }
.top-bar-tagline { font-weight: 600; }
.top-bar .locale { display: flex; gap: 15px; }
.top-bar .locale a.active { color: #fff; font-weight: 700; }
.top-bar .utility-links { display: flex; gap: 20px; }
.top-bar a { color: #d9e2ec; text-decoration: none; font-weight: 600; }
.top-bar .utility-links a:hover { text-decoration: underline; }

/* Mega Menu */
.has-dropdown { position: relative; }
.has-dropdown > a { display: flex; align-items: center; gap: 4px; }
.has-dropdown > a::after { content: "▾"; font-size: 0.7rem; }
.has-dropdown::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 620px; height: 18px; }
.mega-menu { display: none; position: absolute; top: calc(100% + 18px); left: 50%; transform: translateX(-50%); background: #fff; border-radius: 10px; box-shadow: 0 20px 40px rgba(0,20,50,0.18); padding: 28px; gap: 40px; width: 620px; }
.has-dropdown:hover .mega-menu { display: flex; }
.mega-col h4 { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 12px; }
.mega-col a { display: block; padding: 5px 0; font-size: 0.92rem; font-weight: 500; color: var(--text-dark); }
.mega-col a:hover { color: var(--accent-blue); }
.mega-col a.see-all { color: var(--accent-blue); font-weight: 700; margin-top: 4px; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-actions .icon-link { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.9rem; }
.header-actions .icon-link:hover { color: var(--accent-blue); }
.header-actions .login-link { font-weight: 600; font-size: 0.9rem; text-decoration: none; color: var(--primary-blue); }

@media (max-width: 900px) {
    .header-actions .icon-link span.label { display: none; }
}

.mobile-menu-btn { display: none; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; padding: 4px; color: var(--primary-blue); }
.mobile-menu-btn svg { width: 24px; height: 24px; display: block; }

.mobile-drawer { display: none; position: fixed; inset: 0; z-index: 2000; }
.mobile-drawer.active { display: block; }
.mobile-drawer-overlay { position: absolute; inset: 0; background: rgba(0,10,30,0.5); }
.mobile-drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: 82%; max-width: 340px; background: #fff; box-shadow: -10px 0 30px rgba(0,0,0,0.15); overflow-y: auto; padding: 22px; transform: translateX(100%); transition: transform 0.25s ease; }
.mobile-drawer.active .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer-close { display: flex; align-items: center; justify-content: center; margin-left: auto; background: none; border: none; padding: 4px; cursor: pointer; color: var(--text-muted); }
.mobile-drawer-close svg { width: 20px; height: 20px; display: block; }
.mobile-drawer-btn { display: block; width: fit-content; text-align: center; background: var(--accent-blue); color: #fff; padding: 10px 26px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; text-decoration: none; margin: 6px auto 20px; }
.mobile-drawer h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 18px 0 8px; }
.mobile-drawer .drawer-link { display: block; padding: 9px 0; color: var(--text-dark); text-decoration: none; font-weight: 500; border-bottom: 1px solid #f1f5f9; }
.mobile-drawer .drawer-link.see-all { color: var(--accent-blue); font-weight: 700; border-bottom: none; }
.mobile-drawer-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.mobile-drawer-foot a { display: block; padding: 8px 0; color: var(--text-dark); text-decoration: none; font-weight: 600; }

@media (max-width: 768px) {
    .top-bar .utility-links { display: none; }
    nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .header-actions .btn { padding: 8px 14px; font-size: 0.85rem; }
    .header-actions { gap: 12px; }
}

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; padding: 0; color: inherit; }
.theme-toggle svg { width: 15px; height: 15px; display: block; }

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,20,50,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.15s;
    z-index: 1500;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-blue); }
.back-to-top svg { width: 20px; height: 20px; }

/* ===== Dark mode ===== */
:root[data-theme="dark"] { --text-dark: #e2e8f0; --text-muted: #94a3b8; --light-bg: #16233b; --border-color: #2a3b52; }
:root[data-theme="dark"] body { background: #0b1526; }
:root[data-theme="dark"] header { background: #0f1c30; }
:root[data-theme="dark"] header.is-scrolled { background: rgba(15,28,48,0.72); }
:root[data-theme="dark"] .logo { color: #fff; }
:root[data-theme="dark"] nav a { color: #cbd5e1; }
:root[data-theme="dark"] .mega-menu { background: #0f1c30; box-shadow: 0 20px 40px rgba(0,0,0,0.55); }
:root[data-theme="dark"] .mega-col a { color: #cbd5e1; }
:root[data-theme="dark"] .header-actions .icon-link,
:root[data-theme="dark"] .header-actions .login-link { color: #cbd5e1; }
:root[data-theme="dark"] .mobile-menu-btn { color: #e2e8f0; }
:root[data-theme="dark"] .mobile-drawer-panel { background: #0f1c30; }
:root[data-theme="dark"] .mobile-drawer .drawer-link { color: #cbd5e1; border-color: #223349; }
:root[data-theme="dark"] .mobile-drawer h4 { color: #94a3b8; }
:root[data-theme="dark"] .mobile-drawer-close { color: #94a3b8; }

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 { color: #e2e8f0; }

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .plan-card,
:root[data-theme="dark"] .faq-item,
:root[data-theme="dark"] .role,
:root[data-theme="dark"] .quote-form,
:root[data-theme="dark"] .pay-card,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .apply-section,
:root[data-theme="dark"] .audit-cta,
:root[data-theme="dark"] .zip-cta,
:root[data-theme="dark"] .step-num {
    background: #101d33 !important;
    border-color: #223349 !important;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    background: #0f1c30 !important;
    border-color: #2a3b52 !important;
    color: #e2e8f0 !important;
}
