/* Shared site chrome (copied from social-care.php) + community event pages. Used by events.php and event.php. */

:root {
    --primary: #0b3d91;
    --primary-dark: #062a67;
    --primary-light: #eaf2ff;
    --blue: #1769e0;
    --gold: #f4c542;
    --gold-dark: #d9a900;
    --text: #172033;
    --muted: #667085;
    --white: #ffffff;
    --bg: #f7f9fc;
    --border: #e6eaf0;
    --heading-font: "Plus Jakarta Sans", sans-serif;
    --body-font: "DM Sans", sans-serif;
    --container: 1180px;
    --radius: 22px;
    --shadow: 0 18px 50px rgba(11, 61, 145, 0.10);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text);
    background: white;
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

.container {
    width: min(100% - 40px, var(--container));
    margin-inline: auto;
}

/* =========================================
   TOP BAR
========================================= */
.topbar {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
}

.topbar-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar a:hover {
    color: var(--gold);
}

/* =========================================
   HEADER
========================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(11, 61, 145, .08);
}

.nav {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

.logo-mark {
    width: 80px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text strong {
    display: block;
    color: var(--primary);
    font-family: var(--heading-font);
    font-size: 14px;
    line-height: 1.25;
}

.logo-text span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 27px;
    font-size: 14px;
    font-weight: 600;
}

.nav-links a {
    position: relative;
    padding: 29px 0;
}

.nav-links a:not(.nav-donate)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 22px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: .3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after, .nav-links .active::after {
    width: 100%;
}

.nav-links .active {
    color: var(--primary);
}

.nav-donate {
    padding: 12px 20px !important;
    color: white !important;
    background: var(--primary);
    border-radius: 100px;
}

.nav-donate:hover {
    background: var(--primary-dark);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
}

/* =========================================
   HERO
========================================= */
.page-hero {
    position: relative;
    min-height: 440px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(4, 29, 72, .96) 0%, rgba(7, 51, 113, .88) 48%, rgba(7, 51, 113, .28) 100%),
        url("https://images.unsplash.com/photo-1584515979956-d9f6e5d09982?auto=format&fit=crop&w=2000&q=85") center / cover;
}

.page-hero::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -210px;
    top: -180px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 50%;
    box-shadow: 0 0 0 75px rgba(255, 255, 255, .025), 0 0 0 150px rgba(255, 255, 255, .018);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    color: white;
    padding: 80px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--gold);
}

.hero-content h1 {
    font-family: var(--heading-font);
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 22px;
}

.hero-content h1 span {
    color: var(--gold);
}

.hero-content p {
    max-width: 650px;
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .82);
    margin-bottom: 30px;
}

/* =========================================
   BUTTONS
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 25px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    transition: .3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gold);
    color: #202020;
}

.btn-primary:hover {
    background: #ffd95f;
    transform: translateY(-3px);
}

.btn-outline {
    color: white;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .08);
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* =========================================
   GENERAL SECTIONS
========================================= */
section {
    padding: 90px 0;
}

.section-heading {
    max-width: 730px;
    margin-bottom: 50px;
}

.section-heading.center {
    margin-inline: auto;
    text-align: center;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 100px;
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 15px;
}

.section-heading h2 {
    font-family: var(--heading-font);
    font-size: clamp(31px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin-bottom: 15px;
}

.section-heading p {
    color: var(--muted);
    font-size: 16px;
}

/* =========================================
   DETAIL SECTION
========================================= */
.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 75px;
    align-items: flex-start;
}

.detail-content h3 {
    font-family: var(--heading-font);
    font-size: 26px;
    margin-bottom: 18px;
    color: var(--primary);
}

.detail-content p {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.8;
}

.detail-content ul {
    list-style: none;
    margin-bottom: 30px;
}

.detail-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 14px;
    font-size: 15px;
}

.detail-content ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--gold-dark);
    font-weight: bold;
    font-size: 16px;
}

/* Stats Card Group */
.stats-group {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px;
}

.stats-group h4 {
    font-family: var(--heading-font);
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.stat-item {
    margin-bottom: 25px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-family: var(--heading-font);
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

/* =========================================
   CTA SECTION
========================================= */
.cta-section {
    background: var(--primary-light);
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 90px;
    padding: 60px 40px;
}

.cta-section h2 {
    font-family: var(--heading-font);
    font-size: 32px;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.cta-section p {
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 25px;
    color: var(--muted);
}

/* =========================================
   FOOTER
========================================= */
footer {
    background: #0b1a30;
    color: rgba(255, 255, 255, .75);
    padding: 80px 0 30px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 65px;
}

.footer-brand p {
    margin-top: 20px;
    line-height: 1.6;
}

.footer-title {
    font-family: var(--heading-font);
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 22px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, .5);
    font-size: 13px;
}

.socials {
    display: flex;
    gap: 15px;
}

.socials a:hover {
    color: var(--gold);
}

/* Back to top button */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 900;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .15);
    display: grid;
    place-items: center;
    font-weight: bold;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1050px) {
    .nav-links {
        gap: 17px;
    }
    .detail-grid {
        gap: 45px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) {
    .topbar-right {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .nav-links {
        position: absolute;
        top: 82px;
        left: 20px;
        right: 20px;
        background: white;
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 15px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        box-shadow: var(--shadow);
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        padding: 12px;
        border-radius: 8px;
    }
    .nav-links a::after {
        display: none;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 28px, var(--container));
    }
    .topbar-left {
        font-size: 11px;
    }
    .logo {
        min-width: auto;
    }
    .logo-text strong {
        font-size: 11px;
    }
    .logo-text span {
        display: none;
    }
    .logo-mark {
        width: 64px;
        height: 56px;
    }
    .page-hero {
        min-height: 380px;
    }
    .hero-content h1 {
        font-size: 36px;
    }
    section {
        padding: 60px 0;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================
   EVENTS
========================================= */
.page-hero.event-hero { min-height: 400px; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-facts li { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 100px; padding: 7px 15px; font-size: 14px; color: white; }

.event-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 50px; align-items: start; }
.event-body h2 { font-family: var(--heading-font); font-size: 26px; color: var(--primary-dark); margin: 0 0 14px; }
.event-body .desc { color: #3d4a5c; font-size: 16px; white-space: pre-line; margin-bottom: 30px; }
.event-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow); }
.event-info { display: grid; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.event-info div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 15px; }
.event-info dt { color: var(--muted); font-weight: 600; }
.event-info a { color: var(--blue); font-weight: 600; }

.reg-card { position: sticky; top: 110px; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.reg-card h2 { font-family: var(--heading-font); font-size: 22px; color: var(--primary-dark); margin-bottom: 4px; }
.reg-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.reg-card label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.reg-card label .opt { color: var(--muted); font-weight: 400; }
.reg-card input, .reg-card select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: white; }
.reg-card input:focus, .reg-card select:focus { outline: 2px solid var(--blue); border-color: transparent; }
.reg-card .btn { width: 100%; margin-top: 20px; }
.reg-card .field-err { color: #c0392b; font-size: 13px; margin-top: 4px; }
.reg-card .hp { position: absolute; left: -9999px; }
.reg-status { border-radius: 14px; padding: 16px 18px; font-weight: 600; }
.reg-status.ok { background: #e8f7ee; color: #146c3a; }
.reg-status.closed { background: var(--bg); color: var(--muted); }
.reg-status.err { background: #fdecea; color: #a12a1d; margin-bottom: 10px; }

.events-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.event-card { display: flex; flex-direction: column; background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .3s; }
.event-card:hover { transform: translateY(-5px); }
.event-card .thumb { aspect-ratio: 16 / 9; background: var(--primary-light); }
.event-card .thumb img { height: 100%; object-fit: cover; }
.event-card .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card h3 { font-family: var(--heading-font); font-size: 19px; color: var(--primary-dark); line-height: 1.3; }
.event-card .meta { color: var(--muted); font-size: 14px; }
.event-card .more { margin-top: auto; color: var(--blue); font-weight: 700; font-size: 14px; }
.event-card.past { opacity: .75; }
.tag { align-self: flex-start; background: var(--primary-light); color: var(--primary); border-radius: 100px; padding: 4px 12px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.events-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.events-past-title { margin-top: 70px; }

@media (max-width: 950px) {
    .event-grid { grid-template-columns: 1fr; }
    .reg-card { position: static; }
}
