:root {
    --primary: #0f4c81;
    --primary-dark: #0b3760;
    --accent: #d4a017;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f8fafc;
    --white: #ffffff;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 76, 129, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.topbar {
    background: #111827;
    color: #e5e7eb;
    font-size: 0.9rem;
}

.topbar-content {
    padding: 0.6rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
}

.navbar.scrolled {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.nav-content {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
    color: var(--primary);
}

.brand-logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: min(300px, 62vw);
    object-fit: contain;
    object-position: left center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.4rem;
}

.nav-links a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.2rem;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 78vh;
    color: var(--white);
}

.hero-slider {
    overflow: hidden;
}

.hero-slides {
    position: relative;
    min-height: 78vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
    background-color: #0f172a;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.hero-slider-btn:hover {
    background: rgba(212, 160, 23, 0.95);
    color: #111827;
}

.hero-slider-btn-prev {
    left: 1rem;
}

.hero-slider-btn-next {
    right: 1rem;
}

.hero-slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.45rem;
}

.hero-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-slider-dot.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

.page-hero {
    color: var(--white);
    padding: 5.4rem 0;
    background-size: cover;
    background-position: center;
    position: relative;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(9, 32, 54, 0.75), rgba(12, 62, 107, 0.7));
}

.page-hero .container {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.page-hero-about {
    background-image: url("https://images.unsplash.com/photo-1521791136064-7986c2920216?auto=format&fit=crop&w=1400&q=80");
}

.page-hero-membership {
    background-image: url("https://images.unsplash.com/photo-1434030216411-0b793f4b4173?auto=format&fit=crop&w=1400&q=80");
}

.page-hero-leadership {
    background-image: url("https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1400&q=80");
}

.page-hero-events {
    background-image: url("https://images.unsplash.com/photo-1511578314322-379afb476865?auto=format&fit=crop&w=1400&q=80");
}

.page-hero-contact {
    background-image: url("https://images.unsplash.com/photo-1517048676732-d65bc937f952?auto=format&fit=crop&w=1400&q=80");
}

.page-hero-gallery {
    background-image: url("https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=1400&q=80");
}

.page-hero-blog {
    background-image: url("https://images.unsplash.com/photo-1504711434969-e33886168f5c?auto=format&fit=crop&w=1400&q=80");
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.blog-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.blog-card-image:hover img {
    transform: scale(1.03);
}

.blog-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
}

.blog-card-body h2 {
    font-size: 1.2rem;
    margin: 0.35rem 0 0.5rem;
    line-height: 1.35;
}

.blog-card-body h2 a {
    color: #0f172a;
    text-decoration: none;
}

.blog-card-body h2 a:hover {
    color: var(--primary);
}

.blog-card-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-card-body p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.blog-read-more {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.blog-read-more:hover {
    text-decoration: underline;
}

.article-page {
    padding-top: 2rem;
}

.article-inner {
    max-width: 720px;
}

.article-back {
    margin-bottom: 1rem;
}

.article-back a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.article-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    margin: 0.5rem 0 0.75rem;
    color: #0f172a;
}

.article-excerpt {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.article-featured {
    margin: 0 0 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-featured img {
    width: 100%;
    display: block;
    max-height: 420px;
    object-fit: cover;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.gallery-item {
    margin: 0;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-item figcaption {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--muted);
    border-top: 1px solid #e5e7eb;
}

.gallery-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0.5rem;
    box-sizing: border-box;
    margin: 0;
    border: 0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    cursor: zoom-in;
    text-align: left;
    transition: opacity 0.2s ease;
    overflow: hidden;
}

.gallery-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.gallery-thumb:hover {
    opacity: 0.92;
}

.gallery-thumb:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    cursor: pointer;
}

.gallery-lightbox-inner {
    position: relative;
    z-index: 1;
    width: min(96vw, 1100px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox-close {
    position: absolute;
    top: -2.75rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s ease;
}

.gallery-lightbox-nav:hover {
    background: rgba(212, 160, 23, 0.95);
    color: #111827;
}

.gallery-lightbox-prev {
    left: 0.5rem;
}

.gallery-lightbox-next {
    right: 0.5rem;
}

.gallery-lightbox-stage {
    background: #020617;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    max-height: calc(92vh - 4rem);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-lightbox-img {
    display: block;
    width: 100%;
    max-height: calc(92vh - 7rem);
    object-fit: contain;
    background: #020617;
}

.gallery-lightbox-caption {
    margin: 0;
    padding: 0.85rem 1.1rem;
    color: #e2e8f0;
    font-size: 0.98rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .gallery-lightbox-prev {
        left: 0.25rem;
    }

    .gallery-lightbox-next {
        right: 0.25rem;
    }

    .gallery-lightbox-nav {
        width: 2.6rem;
        height: 2.6rem;
    }

    .gallery-lightbox-close {
        top: -2.4rem;
    }
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #f3d07b;
    margin-bottom: 0.7rem;
}

.eyebrow.dark {
    color: var(--primary);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.07rem;
    max-width: 660px;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #111827;
}

.btn-primary:hover {
    background: #b8870c;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #d1d5db;
    color: var(--white);
}

.section {
    padding: 4.6rem 0;
}

.section.alt {
    background: var(--bg);
}

.stats {
    background: #102a43;
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stats-grid article {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    text-align: center;
    padding: 1.4rem;
}

.stats-grid h3 {
    font-size: 1.9rem;
    color: #f3d07b;
}

.split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.split h2,
.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: #0f172a;
}

.card-list {
    display: grid;
    gap: 1rem;
}

.card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card {
    background: var(--white);
    padding: 1.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card:hover {
    transform: translateY(-3px);
    transition: transform 0.2s ease;
}

.graphic-card {
    background: linear-gradient(145deg, #0f4c81, #123a61);
    color: #eaf3ff;
    border-radius: var(--radius);
    padding: 1.3rem;
    box-shadow: var(--shadow);
}

.graphic-card h3 {
    margin-bottom: 0.65rem;
    color: #ffffff;
}

.graphic-card ul {
    padding-left: 1.1rem;
}

.graphic-card li {
    margin-bottom: 0.45rem;
}

.section-intro {
    color: var(--muted);
    margin-bottom: 1.3rem;
}

.alert {
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert.success {
    background: #dcfce7;
    color: #14532d;
}

.alert.error {
    background: #fee2e2;
    color: #7f1d1d;
}

.membership-popup {
    position: fixed;
    inset: 0;
    z-index: 6500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.membership-popup.is-open {
    display: flex;
}

.membership-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.membership-popup__card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
}

.membership-popup__card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    color: #0f172a;
}

.membership-popup__card p {
    margin: 0 0 1.25rem;
    color: var(--muted);
    line-height: 1.55;
    text-align: left;
}

.membership-popup.is-open .membership-popup__card .btn {
    min-width: 120px;
}

.membership-popup--success .membership-popup__card {
    border-top: 4px solid #16a34a;
}

.membership-popup--error .membership-popup__card {
    border-top: 4px solid #dc2626;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
}

.form-grid .full {
    grid-column: span 2;
}

.leaders {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.leader-card,
.event {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow);
}

.leader-profile {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Fixed 4:3 frame (not square): every photo scales to fit inside without cropping */
.leader-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 0;
    padding: 0.75rem;
    box-sizing: border-box;
    background: linear-gradient(180deg, #e8eef5 0%, #dbe4f0 100%);
    overflow: hidden;
}

.leader-photo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.leader-body {
    padding: 1rem;
}

.leader-body h3 {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.25;
}

@media (min-width: 981px) {
    .leaders .leader-body h3 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.leader-position {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.leader-body p {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.leader-body a {
    color: var(--primary);
    text-decoration: none;
}

.leader-body a:hover {
    text-decoration: underline;
}

.tag {
    display: inline-block;
    background: #dbeafe;
    color: #1e3a8a;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.timeline-item {
    border-left: 4px solid var(--accent);
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.timeline-item h3 {
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.footer {
    background: #111827;
    color: #e5e7eb;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.footer h3,
.footer h4 {
    color: var(--white);
}

.footer ul {
    list-style: none;
}

.footer a {
    color: #d1d5db;
    text-decoration: none;
}

.footer a:hover {
    color: #f9fafb;
}

.copyright {
    text-align: center;
    margin-top: 1.5rem;
    color: #9ca3af;
}

@media (max-width: 980px) {
    .stats-grid,
    .leaders,
    .events-grid,
    .timeline-grid,
    .contact-grid,
    .feature-grid,
    .gallery-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .brand-logo {
        height: 52px;
        max-width: min(240px, 58vw);
    }

    .menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 88px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem;
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .form-grid,
    .footer-grid,
    .stats-grid,
    .leaders,
    .events-grid,
    .timeline-grid,
    .contact-grid,
    .feature-grid,
    .gallery-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .full {
        grid-column: auto;
    }

    .hero-slider-btn {
        width: 2.35rem;
        height: 2.35rem;
    }

    .hero-slider-btn-prev {
        left: 0.5rem;
    }

    .hero-slider-btn-next {
        right: 0.5rem;
    }
}
