/* ═══════════════════════════════════════════════════════
   SafeHaven – header_footer_styles.css
   Global reset, CSS variables, shared navbar & footer
   ═══════════════════════════════════════════════════════ */

/* ─── Variables ────────────────────────────────────── */
:root {
    --navy-900: #0a1628;
    --navy-800: #0f1e33;
    --navy-700: #152a42;
    --navy-600: #1c3650;
    --navy-500: #243f5c;
    --navy-400: #2d5070;

    --accent:       #3498db;
    --accent-light: #5dade2;
    --accent-pale:  rgba(52,152,219,0.12);
    --accent-glow:  rgba(52,152,219,0.35);

    --green:        #27ae60;
    --green-light:  #2ecc71;
    --green-pale:   rgba(39,174,96,0.13);

    --orange:       #e67e22;
    --orange-pale:  rgba(230,126,34,0.13);

    --red:          #e74c3c;
    --red-light:    #e8877a;
    --red-pale:     rgba(231,76,60,0.13);

    --teal:         #1abc9c;
    --teal-pale:    rgba(26,188,156,0.13);

    --yellow:       #f1c40f;
    --yellow-pale:  rgba(241,196,15,0.13);

    --text-primary:   #eef2f7;
    --text-secondary: #8fa8c2;
    --text-muted:     #5a7a9a;
    --white:          #ffffff;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 8px  rgba(0,0,0,0.18);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.22);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.28);

    --ease: cubic-bezier(0.4,0,0.2,1);
    --transition: 0.25s var(--ease);
}

/* ─── Reset ────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; font-size:16px; }
body {
    font-family:'DM Sans',system-ui,sans-serif;
    background:var(--navy-900);
    color:var(--text-primary);
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
    min-height:100vh;
}
a { color:var(--accent-light); text-decoration:none; transition:color var(--transition); }
a:hover { color:var(--accent); }
img,svg { display:block; max-width:100%; }
button { font-family:inherit; }
input,textarea,select {
    font-family:inherit;
    font-size:0.92rem;
}

/* ─── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:var(--navy-800); }
::-webkit-scrollbar-thumb { background:var(--navy-500); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--navy-400); }

/* ─── Utility ──────────────────────────────────────── */
.container { max-width:1140px; margin:0 auto; padding:0 24px; }

.badge {
    display:inline-flex; align-items:center; gap:6px;
    padding:4px 12px; border-radius:20px;
    font-size:0.76rem; font-weight:600; letter-spacing:0.4px;
}
.badge-green  { background:var(--green-pale);  color:var(--green-light); }
.badge-blue   { background:var(--accent-pale); color:var(--accent-light); }
.badge-orange { background:var(--orange-pale); color:var(--orange); }
.badge-red    { background:var(--red-pale);    color:var(--red-light); }
.badge-yellow { background:var(--yellow-pale); color:var(--yellow); }

.alert {
    border-radius:var(--radius-md); padding:12px 16px;
    margin-bottom:18px; font-size:0.87rem;
}
.alert-success { background:var(--green-pale);  border:1px solid var(--green);  color:var(--green-light); }
.alert-error   { background:var(--red-pale);    border:1px solid var(--red);    color:var(--red-light); }
.alert-warning { background:var(--orange-pale); border:1px solid var(--orange); color:var(--orange); }
.alert-info    { background:var(--accent-pale); border:1px solid var(--accent);color:var(--accent-light); }
.alert ul { list-style:none; padding:0; }
.alert ul li+li { margin-top:3px; }

/* Reveal animation (JS toggles .visible) */
.reveal { opacity:0; transform:translateY(18px); transition:opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.reveal.visible { opacity:1; transform:translateY(0); }

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */
.navbar {
    position:fixed; top:0; left:0; right:0; z-index:1000;
    background:rgba(10,22,40,0.78);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(52,152,219,0.14);
    transition:background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
    background:rgba(10,22,40,0.96);
    box-shadow:var(--shadow-md);
}

.nav-inner {
    max-width:1180px; margin:0 auto; padding:0 24px;
    height:64px; display:flex; align-items:center; justify-content:space-between;
}

/* Logo */
.nav-logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.nav-logo-icon {
    width:34px; height:34px;
    background:linear-gradient(135deg,var(--navy-600),var(--navy-400));
    border-radius:8px;
    display:flex; align-items:center; justify-content:center;
}
.nav-logo-icon svg { width:18px; height:18px; }
.nav-logo-text {
    font-family:'Playfair Display',serif;
    font-weight:700; font-size:1.2rem; color:var(--white);
}

/* Links */
.nav-links { display:flex; gap:24px; list-style:none; }
.nav-links a {
    color:var(--text-secondary); font-size:0.88rem; font-weight:500;
    position:relative; padding-bottom:3px; transition:color var(--transition);
}
.nav-links a::after {
    content:''; position:absolute; bottom:0; left:0;
    width:0; height:2px; background:var(--accent);
    border-radius:1px; transition:width 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color:var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width:100%; }

/* Nav actions */
.nav-actions { display:flex; align-items:center; gap:10px; }
.nav-user { color:var(--text-muted); font-size:0.82rem; margin-right:4px; }
.btn-nav {
    font-size:0.84rem; font-weight:600; padding:7px 16px;
    border-radius:var(--radius-sm); border:none; cursor:pointer;
    transition:all var(--transition);
}
.btn-nav-ghost {
    background:transparent; border:1px solid rgba(52,152,219,0.35);
    color:var(--accent-light);
}
.btn-nav-ghost:hover { background:var(--accent-pale); border-color:var(--accent); }
.btn-nav-primary { background:var(--accent); color:var(--white); }
.btn-nav-primary:hover { background:#2e86c1; }

/* Mobile hamburger */
.nav-hamburger {
    display:none; flex-direction:column; gap:5px;
    background:none; border:none; cursor:pointer; padding:4px;
}
.nav-hamburger span { width:22px; height:2px; background:var(--text-secondary); border-radius:2px; transition:all 0.3s; }

/* Mobile panel */
.nav-mobile-panel {
    display:none; position:absolute; top:64px; left:0; right:0;
    background:rgba(10,22,40,0.97); backdrop-filter:blur(18px);
    border-bottom:1px solid rgba(52,152,219,0.14);
    padding:20px 24px; flex-direction:column; gap:16px;
}
.nav-mobile-panel.open { display:flex; }
.nav-mobile-panel .nav-links { flex-direction:column; gap:12px; }
.nav-mobile-panel .nav-actions { justify-content:flex-start; flex-wrap:wrap; }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
    background:var(--navy-800);
    border-top:1px solid rgba(52,152,219,0.1);
    padding:52px 0 20px;
    margin-top:auto;
}
.footer-grid {
    display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:40px;
}
.footer-brand-logo { display:flex; align-items:center; gap:9px; margin-bottom:12px; }
.footer-brand-logo span { font-family:'Playfair Display',serif; font-weight:700; font-size:1.1rem; color:var(--white); }
.footer-col p { color:var(--text-muted); font-size:0.85rem; line-height:1.7; max-width:260px; }
.footer-col h4 { color:var(--white); font-size:0.88rem; font-weight:600; margin-bottom:14px; letter-spacing:0.3px; }
.footer-col ul { list-style:none; }
.footer-col ul li { margin-bottom:8px; }
.footer-col ul li a, .footer-col ul li { color:var(--text-muted); font-size:0.84rem; }
.footer-col ul li a:hover { color:var(--accent-light); }
.footer-divider { border:none; border-top:1px solid rgba(52,152,219,0.1); margin:32px 0 16px; }
.footer-bottom { text-align:center; color:var(--text-muted); font-size:0.78rem; }

/* ─── Responsive ───────────────────────────────────── */
@media(max-width:768px){
    .nav-links,.nav-actions { display:none; }
    .nav-hamburger { display:flex; }
    .footer-grid { grid-template-columns:1fr; gap:28px; }
}