/* ═══════════════════════════════════════════════════════
   BNR Infrastructure — Shared Global Styles
   Canonical tokens, nav, footer, mobile menu
═══════════════════════════════════════════════════════ */

:root {
    --primary: #144bb8;
    --primary-dark: #0d337b;
    --bg-light: #f6f6f8;
    --bg-dark: #111621;
    --white: #ffffff;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    --container-max: 1280px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--slate-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── SITE HEADER ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    height: 80px;
    display: flex;
    align-items: center;
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--slate-900);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    flex-shrink: 0;
}

.logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Desktop nav */
.nav-links {
    display: none;
    gap: 0.25rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links { display: flex; }
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-600);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
    background-color: rgba(20, 75, 184, 0.06);
}

.nav-link.active {
    color: var(--primary);
    background-color: rgba(20, 75, 184, 0.1);
}

/* Header actions (CTA + hamburger) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-header {
    display: none;
    padding: 0.625rem 1.25rem;
    background-color: var(--primary);
    color: #fff !important;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(20, 75, 184, 0.25);
    transition: var(--transition);
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .btn-header { display: inline-flex; align-items: center; gap: 0.375rem; }
}

.btn-header:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -3px rgba(20, 75, 184, 0.3);
}

.btn-admin {
    display: none;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--slate-300);
    color: var(--slate-600);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
    align-items: center;
    gap: 0.3rem;
}

@media (min-width: 1024px) {
    .btn-admin { display: inline-flex; }
}

.btn-admin:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ── HAMBURGER BUTTON ── */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
    background: rgba(20, 75, 184, 0.06);
}

@media (min-width: 768px) {
    .hamburger { display: none; }
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--slate-900);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* X state */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE MENU ── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99;
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    border-top: 1px solid var(--slate-200);
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu.open {
    display: flex;
}

/* Hide mobile menu on desktop */
@media (min-width: 768px) {
    .mobile-menu { display: none !important; }
}

.mobile-menu .nav-link {
    font-size: 1.0625rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    color: var(--slate-700, #334155);
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--slate-100);
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-menu .btn-header {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 5rem 0 4rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.07) 1px, transparent 0);
    background-size: 36px 36px;
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .page-hero h1 { font-size: 3.5rem; }
}

.page-hero p {
    font-size: 1.125rem;
    opacity: 0.85;
    max-width: 40rem;
    margin: 0 auto;
}

/* ── CANONICAL DARK FOOTER ── */
.site-footer {
    background-color: var(--slate-900);
    color: var(--slate-400);
    padding: 4rem 1.5rem 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer-logo-wrap {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 800;
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
}

.footer-logo img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

.footer-tagline {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--slate-400);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--slate-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.social-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.footer-heading {
    color: white;
    font-weight: 700;
    margin-bottom: 1.375rem;
    font-size: 0.9375rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: rgba(20, 75, 184, 0.9);
}

.contact-info {
    font-size: 0.875rem;
    line-height: 1.7;
}

.contact-bold {
    color: white;
    font-weight: 700;
    display: block;
    margin-top: 0.875rem;
}

.footer-bottom {
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--slate-800);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--slate-500);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.bottom-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.bottom-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-links a:hover { color: white; }

/* ── SECTIONS ── */
.section-label {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
}

@media (min-width: 768px) {
    .section-title { font-size: 3rem; }
}

.section-desc {
    color: var(--slate-500);
    font-size: 1.0625rem;
    margin-top: 1rem;
    line-height: 1.6;
}

/* ── CARDS ── */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

/* ── MATERIAL ICON ── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── SCROLL-TO-TOP ── */
#scrollTopBtn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(20, 75, 184, 0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 90;
    pointer-events: none;
}

#scrollTopBtn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scrollTopBtn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ── REVEAL ANIMATION ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* ── LOADING SKELETON ── */
.skeleton {
    background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 50%, var(--slate-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── SPIN KEYFRAME (used by forms) ── */
@keyframes spin {
    to { transform: rotate(360deg); }
}