/**
 * Main CSS — New NHAASA Design
 * Black/dark-green theme, Montserrat typography, applied to all pages.
 */

/* ===== IMPORTS & RESET ===== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

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

/* ===== CUSTOM SCROLLBAR ===== */
body {
    scrollbar-width: thin;
    scrollbar-color: #1c913d #094119;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0941196b; }
::-webkit-scrollbar-thumb {
    background-color: #1c913da1;
    border-radius: 20px;
    border: 3px solid #094119;
}

/* ===== BASE ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #000 !important;
    background-color: #000 !important;
    font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

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

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

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2rem; }
/* Back-button before content gets a bigger bottom gap */
.btn + .scores-table-card,
.btn + .comp-detail-layout,
.btn + .comp-cards-grid,
.btn + .card,
.btn + .config-panel {
    margin-top: 1.8rem;
}
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 2rem; }

/* Center standalone buttons and table wrappers within page-content */
.page-content > .btn,
.page-content > button {
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0;
}

/* Table wrapper for horizontal scroll on small screens */
.table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin-top: 1rem;
    border-radius: 8px;
}

/* Spacing between sections inside page-content */
.page-content section {
    margin-bottom: 2.5rem;
}

.page-content section:last-child {
    margin-bottom: 0;
}

/* Page actions row — for centering CTA buttons on inner pages */
.page-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ===== SPINNER ===== */
.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid #1c913d;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.comp-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    width: 100%;
}

/* ===== SHARED SECTION HEADINGS ===== */
.section-heading {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    letter-spacing: -0.5px;
}

.section-heading::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #1c913d, #4cba5f, transparent);
    margin: 0.9rem auto 0;
}

/* ===== MAINTENANCE BANNER ===== */
.maintenance-banner {
    background: linear-gradient(90deg, #2b1800, #3d2200, #2b1800);
    border-bottom: 1px solid rgba(214,137,16,0.45);
    padding: 0.55rem 1.2rem;
    position: fixed;
    top: calc(var(--top-navbar-height, 40px) + var(--main-navbar-height, 60px));
    left: 0;
    right: 0;
    z-index: 998;
    width: 100%;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.maintenance-banner.nav-hidden {
    transform: translateY(calc(-100% - var(--top-navbar-height, 40px) - var(--main-navbar-height, 60px)));
    opacity: 0;
    pointer-events: none;
}

.maintenance-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    max-width: 1200px;
    margin: 0 auto;
}

.maintenance-banner-icon {
    color: #d68910;
    font-size: 0.95rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.maintenance-banner-text {
    flex: 1;
    font-family: "Montserrat", sans-serif;
    font-size: 0.79rem;
    color: #e8c87a;
    line-height: 1.6;
}

.maintenance-banner-text strong { color: #f5d88a; }

.maintenance-banner-downtime {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: #c8a050;
}

.maintenance-banner-close {
    background: none;
    border: none;
    color: #d68910;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 0.5rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.maintenance-banner-close:hover { color: #f5d070; }

@media (max-width: 600px) {
    .maintenance-banner-text { font-size: 0.72rem; }
    .maintenance-banner-downtime { font-size: 0.68rem; }
}

/* ===== HERO ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Bottom fade using ::after so child elements (scroll hint) are not masked */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 34%;
    background: linear-gradient(to bottom, transparent, #000 88%);
    z-index: 4;
    pointer-events: none;
}

.video-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-slideshow video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.video-slideshow video.active {
    opacity: 1;
    z-index: 1;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 0 1rem;
}

.hero-content img {
    width: 140px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    text-shadow:
        1px 1px 0 rgba(0,0,0,0.9),
        2px 2px 0 rgba(0,0,0,0.8),
        3px 3px 0 rgba(0,0,0,0.7),
        4px 4px 0 rgba(0,0,0,0.5),
        0 0 40px rgba(28,145,61,0.6),
        0 0 80px rgba(28,145,61,0.3),
        0 6px 20px rgba(0,0,0,1);
    line-height: 1.15;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    max-width: 600px;
    font-family: "Montserrat", sans-serif;
    opacity: 0.9;
    margin-bottom: 0.2rem;
}

.hero-tagline {
    font-size: clamp(0.72rem, 1.6vw, 1rem) !important;
    font-style: italic;
    opacity: 0.7 !important;
    letter-spacing: 0.5px;
    margin-top: 0.2rem !important;
}

/* Scroll hint — positioned at the visual bottom of the hero */
.hero-scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: scrollBounce 2s ease-in-out infinite;
    cursor: default;
    pointer-events: none;
}

.hero-scroll-hint span {
    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.hero-scroll-arrow {
    width: 22px;
    height: 22px;
    border-right: 2px solid rgba(255,255,255,0.9);
    border-bottom: 2px solid rgba(255,255,255,0.9);
    transform: rotate(45deg);
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
    50%       { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

/* ===== POST HERO CARDS ===== */
#postHeroCards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem 1.75rem;
    margin: 60px 20px;
    flex-wrap: wrap;
}

.postHeroCard {
    width: 190px;
    height: 254px;
    background: #171717;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 3px 1px #00000088;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    /* Spacing fallback for browsers without flex-gap support */
    margin: 0.6rem;
}

.postHeroCard .postHeroCardContent {
    border-radius: 10px;
    background: #171717;
    width: 186px;
    height: 250px;
    z-index: 1;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 18%;
    padding-top: 10%;
    position: relative;
    text-align: center;
}

.postHeroCardContent i {
    width: 20%;
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55px;
}

.postHeroCardContent span {
    margin-top: 8%;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
}

.postHeroCardContent::before {
    opacity: 0;
    transition: opacity 300ms;
    content: " ";
    display: block;
    background: #fff5;
    width: 50px;
    height: 50px;
    position: absolute;
    filter: blur(50px);
}

.postHeroCard:hover .postHeroCardContent::before { opacity: 1; }

.postHeroCard::before {
    opacity: 1;
    content: "";
    position: absolute;
    display: block;
    width: 120px;
    height: 300px;
    transform: rotate(0deg) translateY(50%);
    background: linear-gradient(90deg, #1c913d, transparent);
    transition: opacity 300ms;
    animation: rotation_9018 3000ms infinite linear;
    animation-play-state: paused;
}

.postHeroCard::after {
    opacity: 1;
    content: "";
    position: absolute;
    display: block;
    width: 120px;
    height: 300px;
    transform: rotate(0deg) translateY(-50%);
    background: linear-gradient(90deg, transparent, #1c913d);
    transition: opacity 300ms;
    animation: rotation_9019 3000ms infinite linear;
    animation-play-state: paused;
}

.postHeroCard:hover::before,
.postHeroCard:hover::after {
    animation-play-state: running;
}

.postHeroCard:hover .glass { opacity: 0; }

.glass {
    position: absolute;
    content: "";
    display: block;
    width: 190px;
    height: 254px;
    background: #17171733;
    backdrop-filter: blur(50px);
    z-index: 1;
    transition-duration: 0.5s;
}

@keyframes rotation_9018 {
    0%   { transform: rotate(0deg) translateY(50%); }
    100% { transform: rotate(360deg) translateY(50%); }
}
@keyframes rotation_9019 {
    0%   { transform: rotate(0deg) translateY(-50%); }
    100% { transform: rotate(360deg) translateY(-50%); }
}

/* ===== YOUTUBE SECTION ===== */
#youtubeVideoSection {
    padding: 100px 20px;
    background: linear-gradient(to bottom, black, #094119);
    position: relative;
}

.youtube-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.youtube-content { text-align: center; color: #fff; }

.youtube-content h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    margin-bottom: 12px;
}

.youtube-content p {
    font-size: 1.1rem;
    color: #ccc;
    font-family: "Montserrat", sans-serif;
}

.youtube-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(28, 145, 61, 0.3);
    overflow: hidden;
    line-height: 0;
}

/* ===== ABOUT SECTION ===== */
#aboutSection {
    padding: 100px 5% 100px 5%;
    background: linear-gradient(to bottom, #094119, black);
    position: relative;
}

#aboutSection h2 {
    margin-bottom: 3%;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    position: relative;
    padding-bottom: 1rem;
}

#aboutSection h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #1c913d, #4cba5f, transparent);
    border-radius: 3px;
    margin-top: 0.8rem;
}

#aboutSectionContent {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8%;
    flex-wrap: wrap;
}

#aboutSectionContent > p {
    flex: 1;
    min-width: 280px;
    color: #ddd;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.8;
}

#aboutSectionButtons {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

/* ===== CTA BUTTONS ===== */
.cta-button {
    display: inline-block;
    padding: 16px 42px;
    background-color: #181a1b;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    text-align: center;
    border: none;
    cursor: pointer;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(28, 145, 61, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 400px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
    color: #ccc !important;
    text-decoration: none !important;
}

.cta-button span { position: relative; z-index: 1; }

.readMore {
    background-color: #232627;
    border: 2px solid #1c913d;
    box-shadow: 0 0 10px #094119, 0 0 20px #1c913d, 0 0 30px #094119;
}

/* ===== INNER PAGE HEADING STYLES (not home) ===== */
#mainContent h1,
#mainContent h2,
#mainContent h3,
#mainContent h4 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #fff;
}

#mainContent .card h1,
#mainContent .card h2,
#mainContent .card h3,
#mainContent .card h4 {
    text-shadow: none;
}

/* ===== INNER PAGE BUTTON OVERRIDES (not home) ===== */
#mainContent .cta-button {
    background-color: #094119;
    border-radius: 15px;
    padding: 12px 32px;
    margin-top: 1rem;
}

#mainContent .cta-button.readMore {
    background-color: #232627;
    border-radius: 15px;
    padding: 12px 32px;
    margin-top: 1rem;
}

/* ===== BOW 3D MODEL ===== */
#bowModelWrapper {
    margin-top: 4rem;
    text-align: center;
}

.bow-model-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    margin-bottom: 1.5rem;
}

#bowModelViewer {
    width: 60%;
    height: 520px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(28, 145, 61, 0.35);
    background: rgba(9, 65, 25, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

#bowModel {
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

@media (max-width: 768px) {
    #bowModelViewer {
        width: 95%;
        height: 360px;
    }
}

/* ===== LARGE CARD SECTION ===== */
#largeCardSection {
    text-align: center;
    padding: 15vh 5%;
    background: #000;
}

#largeCardSection h2 {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    margin-bottom: 8vh;
    position: relative;
}

#largeCardSection h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #1c913d, #4cba5f, transparent);
    border-radius: 3px;
    margin: 0.8rem auto 0;
}

#largeCardContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    align-items: stretch;
}

.largeCard {
    flex: 1 1 280px;
    max-width: 420px;
    height: 45vh;
    min-height: 280px;
    background-color: #1a2e22;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    color: white;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.largeCard-content {
    padding: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    color: white;
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
    height: 100%;
}

.largeCard-title {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    font-family: "Montserrat", sans-serif;
    margin: 0 !important;
}

.largeCard-para {
    font-weight: 700;
    font-size: 1.6rem;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    font-family: "Montserrat", sans-serif;
    margin-bottom: 0.6rem !important;
}

.largeCard:hover {
    transform: rotateY(8deg) rotateX(8deg) scale(1.04);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.largeCard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent 60%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.largeCard:hover::before { transform: translateX(-100%); }

.largeCard::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent 60%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.largeCard:hover::after { transform: translateX(100%); }

.largeCardButton {
    display: inline-block;
    border-radius: 8px;
    background: linear-gradient(to bottom, #094119, rgba(9,65,25,0.3));
    color: #fff;
    text-align: center;
    font-size: 0.9rem;
    padding: 12px 20px;
    transition: all 0.5s ease;
    cursor: pointer;
    margin: 5px;
    text-decoration: none !important;
    border: 2px solid #1c913d;
    box-shadow: 0 0 10px #094119, 0 0 20px #1c913d, 0 0 30px #094119;
}

.largeCardButton span {
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: 0.5s;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.largeCardButton span::after {
    content: '»';
    position: absolute;
    opacity: 0;
    top: 0;
    right: -15px;
    transition: 0.5s;
}

.largeCardButton:hover span {
    padding-right: 18px;
    color: #ccc;
}

.largeCardButton:hover span::after {
    opacity: 1;
    right: 0;
    color: #ccc;
}

/* ===== UPCOMING COMPETITIONS SECTION ===== */
#upcomingCompetitionsSection {
    text-align: center;
    background: #000;
    padding: 100px 5%;
}

#upcomingCompetitionsSection h2 {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    margin-bottom: 6vh;
    position: relative;
}

#upcomingCompetitionsSection h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #1c913d, #4cba5f, transparent);
    border-radius: 3px;
    margin: 0.8rem auto 0;
}

.competitions-home-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 4vh;
}

/* Competition card on home page */
.comp-home-card {
    background: #111;
    border: 1px solid rgba(28, 145, 61, 0.3);
    border-radius: 12px;
    padding: 2rem 2rem 1.8rem;
    flex: 1 1 320px;
    max-width: 420px;
    text-align: left;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.comp-home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1c913d, transparent);
    transition: opacity 0.3s;
    opacity: 0.7;
}

.comp-home-card:hover {
    transform: translateY(-6px);
    border-color: #1c913d;
    box-shadow: 0 12px 36px rgba(28,145,61,0.2);
}

.comp-home-card:hover::before { opacity: 1; }

.comp-home-card h3 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.8rem;
}

.comp-home-card p {
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.4rem;
}

.comp-home-card p strong {
    color: #1c913d;
}

.comp-home-card .comp-badge {
    display: inline-block;
    align-self: flex-start;
    background: rgba(28,145,61,0.15);
    color: #1c913d;
    border: 1px solid rgba(28,145,61,0.4);
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    width: fit-content;
}

.comp-home-card .comp-view-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 1rem;
    padding: 7px 18px;
    background: transparent;
    color: #1c913d;
    border: 1px solid #1c913d;
    border-radius: 6px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    width: fit-content;
}

.comp-home-card .comp-view-btn:hover {
    background: #1c913d;
    color: #fff;
}

/* ===== NEWS & EVENTS ===== */
#newsAndEvents {
    text-align: center;
    background: linear-gradient(to bottom, #000, #094119);
    padding: 100px 5%;
    position: relative;
}

#newsAndEvents h2 {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    margin-bottom: 6vh;
    position: relative;
}

#newsAndEvents h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #1c913d, #4cba5f, transparent);
    border-radius: 3px;
    margin: 0.8rem auto 0;
}

.largeNewsCardContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 6vh;
}

.newsCardContainer {
    flex: 1 1 260px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.newsCard {
    width: 100%;
    height: 22vh;
    min-height: 160px;
    background-color: #1a2e22;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.newsCard:hover {
    transform: rotateY(8deg) rotateX(8deg) scale(1.04);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.newsCard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}
.newsCard:hover::before { transform: translateX(-100%); }

.newsCard::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}
.newsCard:hover::after { transform: translateX(100%); }

.newsInfo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.newsInfo h3 {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.newsInfo p {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    margin: 0;
}

.newsInfo a {
    cursor: pointer;
    display: inline-block;
    position: relative;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.3s;
    padding-right: 0;
}

.newsInfo a::after {
    content: '»';
    position: absolute;
    top: 0;
    right: -16px;
    transition: 0.3s;
    opacity: 0.7;
}

.newsInfo a:hover {
    padding-right: 18px;
    color: #a8f0c0;
}

/* ===== READ MORE BUTTON ===== */
.readMoreNewsButton {
    display: inline-block;
    transition: 0.5s;
    border-radius: 0.5em;
    box-shadow:
        inset rgba(54, 69, 75, 1) -1px -1px 6px 0px,
        rgba(54, 69, 75, 1) -1px -1px 6px 0px;
    border: solid 2px #030f14;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.8em 1.8em;
    outline: none;
    user-select: none;
    text-decoration: none !important;
}

.readMoreNewsButton:hover {
    text-decoration: none !important;
    box-shadow:
        inset 0px -6px 18px -6px rgba(3, 15, 20, 1),
        inset 0px 6px 18px -6px rgba(3, 15, 20, 1),
        -1px -1px 6px 0px rgb(54, 69, 75);
}

.readMoreNewsButton:active {
    box-shadow:
        inset 0px -12px 12px -6px rgba(3, 15, 20, 1),
        inset 0px 12px 12px -6px rgba(3, 15, 20, 1),
        inset 12px 0px 12px -6px rgba(3, 15, 20, 1),
        inset -12px 0px 12px -6px rgba(3, 15, 20, 1),
        -1px -1px 6px 0px rgba(54, 69, 75, 1);
}

.readMoreNewsButton span {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    color: #fff;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
}

.readMoreNewsButton span::after {
    content: '»';
    position: absolute;
    top: 0;
    right: -16px;
    transition: 0.3s;
}

.readMoreNewsButton:hover span {
    padding-right: 18px;
    color: #ccc;
}

/* ===== CTA SECTION ===== */
.cta {
    padding: 120px 20px;
    background: linear-gradient(to bottom, #094119, #000);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #fff;
    margin-bottom: 1.2rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    font-family: "Montserrat", sans-serif;
}

/* ===== FOOTER ===== */
.footer {
    background: #000;
    color: #fff;
    padding: 0;
    margin: 0;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding: 80px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-column {
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

.footer-column h3 {
    font-size: 1.7rem;
    margin-bottom: 16px;
    color: #1c913d;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #1c913d;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column > p {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-family: "Montserrat", sans-serif;
}

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

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bbb;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-size: 0.88rem;
    font-family: "Montserrat", sans-serif;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: #1c913d;
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none !important;
}

.footer-social a:hover {
    background: #1c913d;
    transform: translateY(-3px);
    color: #000 !important;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #bbb;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-family: "Montserrat", sans-serif;
}

.contact-info li i {
    color: #1c913d;
    margin-top: 3px;
    font-size: 0.9rem;
    min-width: 18px;
}

.footer-bottom {
    background: #000;
    padding: 22px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #1a1a1a;
}

.footer-bottom p {
    margin: 0;
    color: #666;
    font-size: 0.82rem;
    font-family: "Montserrat", sans-serif;
}

.footer-bottom-links {
    display: flex;
    gap: 22px;
}

.footer-bottom-links a {
    color: #666;
    text-decoration: none !important;
    font-size: 0.82rem;
    font-family: "Montserrat", sans-serif;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover { color: #1c913d; }

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.modal.hidden { display: none; }

/* Lock body scroll when any modal is present — prevents page-level scrollbar flicker */
body:has(.modal:not(.hidden)) {
    overflow: hidden;
}

.modal-content {
    background: transparent;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    color: #fff;
    /* overflow:hidden clips the spinning pseudo-elements */
    overflow: hidden;
    /* 3px gap so the spinning border is visible */
    padding: 3px;
    z-index: 9;
}

/* Spinning glow strip A — conic-gradient so it always covers the full modal */
.modal-content::before {
    content: "";
    display: block;
    position: absolute;
    /* 200% × 200% centred so corners are always covered when rotating */
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(
        transparent 0deg,
        rgba(28, 145, 61, 0.0) 80deg,
        #1c913d 120deg,
        rgba(28, 145, 61, 0.0) 160deg,
        transparent 180deg,
        transparent 360deg
    );
    animation: modal_spin_a 3s linear infinite;
    animation-play-state: paused;
    pointer-events: none;
    z-index: 0;
}

/* Spinning glow strip B — offset by 180° */
.modal-content::after {
    content: "";
    display: block;
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(
        transparent 0deg,
        transparent 260deg,
        rgba(28, 145, 61, 0.0) 280deg,
        #1c913d 300deg,
        rgba(28, 145, 61, 0.0) 340deg,
        transparent 360deg
    );
    animation: modal_spin_a 3s linear infinite;
    animation-play-state: paused;
    pointer-events: none;
    z-index: 0;
}

.modal-content:hover::before,
.modal-content:hover::after {
    animation-play-state: running;
}

@keyframes modal_spin_a {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Inner fill layer — covers full interior, sits above spinning strips */
.modal-body {
    position: relative;
    z-index: 2;
    background: #111;
    border-radius: 10px;
    padding: 2.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 6px);
    /* hide scrollbar across all browsers */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
}
.modal-body::-webkit-scrollbar {
    display: none;                /* Chrome/Safari */
}

.modal-body h2 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.modal-body .close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    line-height: 1;
}

.modal-body .close:hover { color: #fff; }

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #ccc;
    font-size: 0.85rem;
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1c913d;
}

select option { background: #1a1a1a; }

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    font-family: "Montserrat", sans-serif;
}

.form-footer a {
    color: #1c913d;
    font-weight: 600;
}

.form-footer a:hover { color: #4caf50; }

.form-error {
    background: rgba(192, 57, 43, 0.15);
    border: 1px solid #c0392b;
    color: #e74c3c;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: "Montserrat", sans-serif;
    margin-bottom: 1rem;
    text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none !important;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #1c913d, #157a32);
    color: #fff;
    box-shadow: 0 2px 8px rgba(28,145,61,0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #21a847, #1c913d);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(28,145,61,0.4);
    color: #fff;
}

.btn-secondary {
    background: #0f2c18;
    color: #fff;
    border: 1px solid rgba(28,145,61,0.3);
}

.btn-secondary:hover {
    background: #142e1e;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(28,145,61,0.6);
    color: #1c913d;
}

.btn-outline:hover {
    background: rgba(28,145,61,0.1);
    border-color: #1c913d;
    color: #4cba5f;
}

.btn-danger {
    background: linear-gradient(135deg, #c0392b, #a93226);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192,57,43,0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d44232, #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(192,57,43,0.35);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #d68910, #b7770d);
    color: #fff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e6950f, #d68910);
    transform: translateY(-2px);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #1c913d, #157a32);
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #21a847, #1c913d);
    transform: translateY(-2px);
    color: #fff;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
    margin: 2px 2px 0 0;
}

.action-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-width: 200px;
}

/* Status badges in member table */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-approved  { background: rgba(28,145,61,0.2);  color: #1c913d; border: 1px solid #1c913d; }
.status-active    { background: rgba(28,145,61,0.2);  color: #1c913d; border: 1px solid #1c913d; }
.status-pending   { background: rgba(214,137,16,0.15); color: #d68910; border: 1px solid rgba(214,137,16,0.5); }
.status-suspended { background: rgba(230,126,34,0.15); color: #e67e22; border: 1px solid rgba(230,126,34,0.5); }
.status-terminated{ background: rgba(192,57,43,0.15);  color: #c0392b; border: 1px solid rgba(192,57,43,0.5); }
.status-rejected  { background: rgba(192,57,43,0.15);  color: #c0392b; border: 1px solid rgba(192,57,43,0.5); }

/* Password field with eye toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 2.8rem;
}

.eye-toggle {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    user-select: none;
    transition: color 0.2s;
}

.eye-toggle:hover {
    color: #1c913d;
}

/* ===== INNER PAGE LAYOUT ===== */

/* Page header banner */
.page-header {
    background: linear-gradient(160deg, #071a0e 0%, #0d2918 50%, #000 100%);
    color: #fff;
    padding: 5rem 2rem 3rem;
    text-align: center;
    padding-top: calc(var(--top-navbar-height, 40px) + 12vh + 2rem);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(28,145,61,0.15);
}

.page-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #1c913d, transparent);
    border-radius: 3px;
}

.page-header h1 {
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    text-shadow: 0 2px 16px rgba(0,0,0,0.5);
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
}

.page-header p {
    color: rgba(255,255,255,0.85);
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    margin: 0;
}

/* Content container for inner pages */
.page-content {
    padding: 3rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

/* When page-content is rendered directly without a .page-header sibling,
   it needs to clear the fixed top-bar + mainNavbar (~40px + 12vh) */
#mainContent > .page-content:first-child,
.page-standalone {
    padding-top: calc(var(--top-navbar-height, 40px) + 12vh + 2rem);
}

/* #mainContent background is transparent — body #000 shows through */
#mainContent {
    min-height: calc(100vh - 200px);
    padding-bottom: 0;
    background: transparent;
}

/* Inner centering wrapper (used inside page-content when needed) */
.page-content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Gradient wrapper — used on pages that have a page-header + page-content structure.
   Applied via a wrapping div rendered by each page template. */
.page-body {
    background: linear-gradient(to bottom, black, #094119 40%, black);
    padding-bottom: 1px; /* prevent margin collapse */
}

/* ===== CARDS (inner pages) ===== */
.card {
    background: #0f0f0f;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.6rem;
    margin-bottom: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(28,145,61,0.4), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    border-color: rgba(28,145,61,0.25);
}

.card:hover::before { opacity: 1; }

.card-header {
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    color: #1c913d;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    margin: 0;
}

.card-body {
    color: #ccc;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
}

.card-body p { margin-bottom: 0.6rem; }

.card-body strong { color: #fff; }

.card h1, .card h2, .card h3, .card h4 {
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.card p, .card li {
    color: #ccc;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card ol, .card ul {
    padding-left: 1.4rem;
    margin-top: 0.5rem;
}

/* Spacing between cards and their contained .btn */
.card .btn {
    margin-top: 1.2rem;
}

/* ===== GRIDS ===== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(28,145,61,0.15);
    color: #a8f0c0;
    border: 1px solid rgba(28,145,61,0.4);
}

.alert-error {
    background: rgba(220, 53, 69, 0.15);
    color: #f5a0a8;
    border: 1px solid rgba(220,53,69,0.4);
}

.alert-info {
    background: rgba(13, 110, 253, 0.12);
    color: #9ec5fe;
    border: 1px solid rgba(13,110,253,0.35);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.12);
    color: #ffe08a;
    border: 1px solid rgba(255,193,7,0.35);
}

/* ===== TOAST ALERTS ===== */
.toast-alert {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    z-index: 10500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.4rem;
    border-radius: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    pointer-events: all;
    white-space: nowrap;
    max-width: calc(100vw - 3rem);
}
.toast-alert.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-success { background: #0a2e15; color: #a8f0c0; border: 1px solid rgba(28,145,61,0.5); }
.toast-error   { background: #2e0a0a; color: #f5a0a8; border: 1px solid rgba(220,53,69,0.5); }
.toast-info    { background: #0a1a2e; color: #9ec5fe; border: 1px solid rgba(13,110,253,0.4); }
.toast-warning { background: #2e2200; color: #ffe08a; border: 1px solid rgba(255,193,7,0.4); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-message { flex: 1; white-space: normal; }

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(28,145,61,0.2);
    color: #1c913d;
    border: 1px solid rgba(28,145,61,0.4);
}

.badge-success {
    background: rgba(28,145,61,0.2);
    color: #a8f0c0;
    border-color: rgba(28,145,61,0.4);
}

.badge-warning {
    background: rgba(255,193,7,0.15);
    color: #ffe08a;
    border-color: rgba(255,193,7,0.35);
}

.badge-error {
    background: rgba(220,53,69,0.15);
    color: #f5a0a8;
    border-color: rgba(220,53,69,0.4);
}

/* ===== SECTION HEADINGS (inner pages) ===== */
#mainContent h2 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.2rem;
    margin-top: 2rem;
}

#mainContent h2:first-child {
    margin-top: 0;
}

#mainContent h3 {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.8rem;
}

#mainContent p {
    color: #ccc;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
}

#mainContent ul, #mainContent ol {
    color: #ccc;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    padding-left: 1.4rem;
}

/* ===== LOADING OVERLAY ===== */
#pageLoadingOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
#pageLoadingOverlay.visible {
    opacity: 1;
    pointer-events: all;
}
.loader-target {
    position: relative;
    width: 72px;
    height: 72px;
}
.loader-target .ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}
.loader-target .ring-1 {
    inset: 0;
    border-top-color: #1c913d;
    border-right-color: rgba(28,145,61,0.3);
    animation: loaderSpin 1s linear infinite;
}
.loader-target .ring-2 {
    inset: 12px;
    border-bottom-color: #4cba5f;
    border-left-color: rgba(76,186,95,0.3);
    animation: loaderSpin 0.7s linear infinite reverse;
}
.loader-target .ring-3 {
    inset: 24px;
    border-top-color: rgba(28,145,61,0.6);
    animation: loaderSpin 1.4s linear infinite;
}
.loader-target .loader-dot {
    position: absolute;
    inset: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #1c913d;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(28,145,61,0.8);
    animation: loaderPulse 1s ease-in-out infinite;
}
/* Crosshair lines */
.loader-target::before,
.loader-target::after {
    content: '';
    position: absolute;
    background: rgba(28,145,61,0.25);
    border-radius: 2px;
}
.loader-target::before {
    width: 2px; height: 100%;
    left: 50%; top: 0;
    transform: translateX(-50%);
}
.loader-target::after {
    width: 100%; height: 2px;
    top: 50%; left: 0;
    transform: translateY(-50%);
}
.loader-text {
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: loaderFade 1.2s ease-in-out infinite;
}
@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}
@keyframes loaderPulse {
    0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%,-50%) scale(1.4); opacity: 0.7; }
}
@keyframes loaderFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== PROGRESS BAR ===== */
.progress-bar-container {
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin: 0.4rem 0 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #094119, #1c913d);
    border-radius: 20px;
    transition: width 0.6s ease;
}

/* ===== DASHBOARD STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #0d2018, #112d1c);
    border: 1px solid rgba(28,145,61,0.25);
    border-radius: 10px;
    padding: 1.4rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #1c913d;
    transform: translateY(-3px);
}

.stat-value {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: #1c913d;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Montserrat", sans-serif;
    font-size: 0.88rem;
}

th {
    background: rgba(28,145,61,0.15);
    color: #1c913d;
    font-weight: 700;
    padding: 0.75rem 1rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(28,145,61,0.3);
}

td {
    padding: 0.75rem 1rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

tr:hover td { background: rgba(28,145,61,0.05); }

/* ===== NEWS PAGE ===== */
.news-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:1.5rem; }
.news-card { background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; overflow:hidden; transition:all 0.25s ease; display:flex; flex-direction:column; flex:1 1 280px; max-width:400px; }
.news-card:hover { transform:translateY(-4px); border-color:rgba(28,145,61,0.3); box-shadow:0 12px 32px rgba(0,0,0,0.4); }
.news-card--featured { flex:1 1 100%; max-width:100%; flex-direction:row; max-height:320px; }
.news-card--featured .news-card-img { width:45%; flex-shrink:0; }
.news-card--featured .news-card-img img { height:100%; }
.news-card-img { position:relative; overflow:hidden; height:200px; }
.news-card-img img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s ease; }
.news-card:hover .news-card-img img { transform:scale(1.04); }
.news-card-img--placeholder { background:linear-gradient(135deg,#0d1f14,#112d1c); display:flex; align-items:center; justify-content:center; color:rgba(28,145,61,0.3); font-size:3rem; height:100%; }
.news-card-category { position:absolute; top:0.8rem; left:0.8rem; background:rgba(28,145,61,0.85); color:#fff; font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; padding:3px 10px; border-radius:4px; font-family:"Montserrat",sans-serif; }
.news-card-body { padding:1.4rem; flex:1; display:flex; flex-direction:column; gap:0.6rem; }
.news-card-date { font-size:0.78rem; color:#666; font-family:"Montserrat",sans-serif; }
.news-card-body h3 { font-family:"Montserrat",sans-serif; font-weight:700; font-size:1rem; color:#fff; margin:0; line-height:1.4; }
.news-card-excerpt { font-family:"Montserrat",sans-serif; font-size:0.85rem; color:#aaa; line-height:1.6; flex:1; margin:0; }
.news-card-body .btn { align-self:flex-start; margin-top:auto; }
.article-body { font-family:"Montserrat",sans-serif; color:#ccc; line-height:1.8; font-size:0.95rem; }
.article-body h2,.article-body h3 { color:#fff; margin:1.8rem 0 0.8rem; }
.article-body p { margin-bottom:1rem; }
.article-body ul,.article-body ol { padding-left:1.4rem; margin-bottom:1rem; }
.article-body a { color:#1c913d; }

/* ===== GALLERY PAGE ===== */
.gallery-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:1.2rem; }
.gallery-album-card { border-radius:12px; overflow:hidden; cursor:pointer; background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); transition:all 0.25s ease; flex:1 1 250px; max-width:340px; }
.gallery-album-card:hover { transform:translateY(-4px); border-color:rgba(28,145,61,0.3); box-shadow:0 12px 32px rgba(0,0,0,0.4); }
.gallery-album-thumb { position:relative; height:200px; overflow:hidden; }
.gallery-album-thumb img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s ease; }
.gallery-album-card:hover .gallery-album-thumb img { transform:scale(1.06); }
.gallery-album-count { position:absolute; bottom:0.7rem; right:0.7rem; background:rgba(0,0,0,0.7); color:#fff; font-size:0.78rem; font-family:"Montserrat",sans-serif; font-weight:600; padding:3px 10px; border-radius:20px; backdrop-filter:blur(4px); }
.gallery-album-info { padding:1rem 1.2rem; }
.gallery-album-info h3 { font-family:"Montserrat",sans-serif; font-weight:700; font-size:0.95rem; color:#fff; margin:0 0 0.3rem; }
.gallery-album-info p { font-family:"Montserrat",sans-serif; font-size:0.8rem; color:#888; margin:0; }

/* ===== CONTACT PAGE ===== */
.contact-layout { display:grid; grid-template-columns:1fr 1.6fr; gap:2rem; align-items:start; }
.contact-info-panel,.contact-form-panel { background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; padding:2rem; }
.contact-panel-title { font-family:"Montserrat",sans-serif; font-weight:700; font-size:1.1rem; color:#fff; margin-bottom:1.6rem; padding-bottom:0.8rem; border-bottom:1px solid rgba(255,255,255,0.07); }
.contact-detail-item { display:flex; gap:1rem; align-items:flex-start; margin-bottom:1.4rem; }
.contact-detail-icon { width:40px; height:40px; background:rgba(28,145,61,0.12); border-radius:8px; display:flex; align-items:center; justify-content:center; color:#1c913d; font-size:1rem; flex-shrink:0; }
.contact-detail-item strong { display:block; font-family:"Montserrat",sans-serif; font-size:0.8rem; color:#888; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:0.2rem; }
.contact-detail-item span,.contact-detail-item a { font-family:"Montserrat",sans-serif; font-size:0.88rem; color:#ccc; line-height:1.5; }
.contact-detail-item a:hover { color:#1c913d; }

/* ===== POLICIES PAGE ===== */
.policy-cards { display:flex; flex-direction:column; gap:0.9rem; max-width:720px; margin:0 auto; }
.policy-card { background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; padding:1.4rem 1.6rem; display:flex; align-items:center; gap:1.2rem; cursor:pointer; transition:all 0.2s ease; }
.policy-card:hover { border-color:rgba(28,145,61,0.35); transform:translateX(4px); box-shadow:0 4px 16px rgba(0,0,0,0.3); }
.policy-card-icon { width:52px; height:52px; background:rgba(28,145,61,0.1); border-radius:10px; display:flex; align-items:center; justify-content:center; color:#1c913d; font-size:1.4rem; flex-shrink:0; }
.policy-card-body { flex:1; }
.policy-card-body h3 { font-family:"Montserrat",sans-serif; font-weight:700; font-size:1rem; color:#fff; margin:0 0 0.3rem; }
.policy-card-body p { font-family:"Montserrat",sans-serif; font-size:0.85rem; color:#888; margin:0 0 0.8rem; }

/* ===== COMPETITIONS LIST PAGE ===== */
.comp-filters { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:1.5rem; padding:1.2rem 1.4rem; background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; }
.comp-filter-group { display:flex; flex-direction:column; gap:0.35rem; min-width:160px; flex:1; }
.comp-filter-group label { font-family:"Montserrat",sans-serif; font-size:0.75rem; font-weight:600; color:#888; text-transform:uppercase; letter-spacing:0.5px; }
.comp-filter-group select { background:#1a1a1a; border:1px solid rgba(255,255,255,0.1); color:#fff; border-radius:8px; padding:0.5rem 0.8rem; font-family:"Montserrat",sans-serif; font-size:0.85rem; }
.comp-cards-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:1.2rem; }
.comp-list-card { background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; padding:1.4rem 1.6rem; cursor:pointer; transition:all 0.22s ease; display:flex; flex-direction:column; gap:0.8rem; flex:1 1 320px; max-width:480px; }
.comp-list-card:hover { border-color:rgba(28,145,61,0.35); transform:translateY(-3px); box-shadow:0 8px 28px rgba(0,0,0,0.4); }
.comp-list-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:0.5rem; }
.comp-list-card h3 { font-family:"Montserrat",sans-serif; font-weight:700; font-size:1.05rem; color:#fff; margin:0; line-height:1.3; }
.comp-list-meta { display:flex; gap:1rem; flex-wrap:wrap; }
.comp-list-meta span { font-family:"Montserrat",sans-serif; font-size:0.8rem; color:#888; display:flex; align-items:center; gap:0.35rem; }
.comp-list-meta span i { color:#1c913d; }
.comp-list-footer { display:flex; justify-content:space-between; align-items:center; padding-top:0.6rem; border-top:1px solid rgba(255,255,255,0.05); }
.comp-spots { font-family:"Montserrat",sans-serif; font-size:0.8rem; display:flex; align-items:center; gap:0.4rem; }
.comp-spots.spots-low { color:#e74c3c; }
.comp-spots.spots-medium { color:#d68910; }
.comp-spots.spots-ok { color:#888; }
.comp-view-link { font-family:"Montserrat",sans-serif; font-size:0.8rem; color:#1c913d; font-weight:600; display:flex; align-items:center; gap:0.3rem; transition:gap 0.2s; }
.comp-list-card:hover .comp-view-link { gap:0.5rem; }
.comp-tag { font-family:"Montserrat",sans-serif; font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.6px; padding:3px 10px; border-radius:4px; background:rgba(28,145,61,0.12); color:#4cba5f; }
.comp-tag--tier { background:rgba(13,110,253,0.12); color:#6ea8fe; }
.comp-tag--bow { background:rgba(214,137,16,0.12); color:#d68910; }
.comp-entry-fee { font-family:"Montserrat",sans-serif; font-size:0.85rem; font-weight:700; color:#1c913d; white-space:nowrap; }

/* ===== COMPETITION DETAIL PAGE ===== */
.comp-detail-layout { display:grid; grid-template-columns:1fr 320px; gap:1.5rem; align-items:start; }
.comp-detail-main { display:flex; flex-direction:column; gap:1rem; }
.comp-detail-sidebar { position:sticky; top:80px; }
.comp-detail-info-card { background:#0f0f0f; border:1px solid rgba(255,255,255,0.07); border-radius:12px; padding:1.4rem 1.6rem; }
.comp-detail-info-card h3 { font-family:"Montserrat",sans-serif; font-weight:700; font-size:1rem; color:#fff; margin-bottom:1.2rem; padding-bottom:0.8rem; border-bottom:1px solid rgba(255,255,255,0.07); }
.comp-detail-row { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; padding:0.6rem 0; border-bottom:1px solid rgba(255,255,255,0.04); }
.comp-detail-row:last-child { border-bottom:none; }
.comp-detail-row span { font-family:"Montserrat",sans-serif; font-size:0.82rem; color:#888; display:flex; align-items:center; gap:0.4rem; white-space:nowrap; }
.comp-detail-row span i { color:#1c913d; width:14px; }
.comp-detail-row strong { font-family:"Montserrat",sans-serif; font-size:0.85rem; color:#ddd; text-align:right; }

/* ===== SCORES PAGES ===== */
.scores-table-card { background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; overflow:hidden; }
.rank-badge { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; font-size:0.75rem; font-weight:700; font-family:"Montserrat",sans-serif; }
.rank-1 { background:rgba(255,215,0,0.15); color:#ffd700; }
.rank-2 { background:rgba(192,192,192,0.15); color:#c0c0c0; }
.rank-3 { background:rgba(205,127,50,0.15); color:#cd7f32; }
.rank-other { background:rgba(255,255,255,0.07); color:#888; }
.badge-success { background:rgba(28,145,61,0.15); color:#4cba5f; padding:3px 10px; border-radius:20px; font-size:0.75rem; font-weight:600; font-family:"Montserrat",sans-serif; display:inline-flex; align-items:center; gap:0.3rem; }
.badge-muted { background:rgba(255,255,255,0.07); color:#888; padding:3px 10px; border-radius:20px; font-size:0.75rem; font-weight:600; font-family:"Montserrat",sans-serif; }

/* ===== NATIONAL COLOURS ===== */
.colours-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:1rem; }
.colours-card { background:#0f0f0f; border:1px solid rgba(255,255,255,0.06); border-radius:12px; padding:1.2rem 1.4rem; display:flex; align-items:center; gap:1rem; flex:1 1 260px; max-width:360px; }
.colours-card-icon { width:48px; height:48px; background:rgba(192,57,43,0.12); border-radius:10px; display:flex; align-items:center; justify-content:center; color:#e74c3c; font-size:1.3rem; flex-shrink:0; }
.colours-card-info h3 { font-family:"Montserrat",sans-serif; font-weight:700; font-size:0.95rem; color:#fff; margin:0 0 0.4rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-main {
        gap: 24px;
        padding: 56px 32px;
    }
}

@media (max-width: 768px) {
    .contact-layout { grid-template-columns:1fr; }
    .comp-detail-layout { grid-template-columns:1fr; }
    .comp-detail-sidebar { position: static; }
    .news-card--featured { flex-direction:column; max-height:none; }
    .news-card--featured .news-card-img { width:100%; height:200px; }
    .comp-filters { flex-direction:column; }
    .admin-modules-grid { grid-template-columns:1fr; }
    .admin-stats-grid { grid-template-columns:repeat(2, 1fr); }
    /* Stat cards: shrink padding/icon/value for 2-column mobile layout */
    .admin-stat-card { padding: 1rem 1.1rem; gap: 0.75rem; }
    .admin-stat-icon { width: 40px; height: 40px; font-size: 1.05rem; }
    .admin-stat-value { font-size: 1.5rem; }
    .admin-stat-label { font-size: 0.72rem; letter-spacing: 0.2px; }
    /* Module cards: tighten for full-width stacked layout */
    .admin-module-card { padding: 1rem 1.1rem; gap: 0.8rem; }
    .admin-module-icon { width: 38px; height: 38px; font-size: 1.05rem; }
    .admin-module-info h3 { font-size: 0.88rem; }
    .admin-module-info p { font-size: 0.75rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 2rem; }

    #postHeroCards {
        gap: 0;
        margin-top: 50px;
    }

    .postHeroCard {
        width: 150px;
        height: 200px;
        margin: 0.7rem;
    }

    .postHeroCard .postHeroCardContent {
        width: 146px;
        height: 196px;
    }

    .postHeroCardContent i { font-size: 40px; }

    #aboutSectionContent { flex-direction: column; gap: 2rem; }
    #aboutSectionContent > p { width: 100%; }
    #aboutSectionButtons { width: 100%; }

    .footer-main {
        gap: 14px;
        padding: 42px 18px;
    }
    .footer-column h3 { font-size: 1.1rem; margin-bottom: 10px; }
    .footer-column h4 { font-size: 0.75rem; letter-spacing: 0; margin-bottom: 10px; }
    .footer-column > p { font-size: 0.7rem; line-height: 1.5; margin-bottom: 10px; }
    .footer-column ul li { margin-bottom: 6px; }
    .footer-column ul li a { font-size: 0.7rem; }
    .contact-info li { font-size: 0.68rem; gap: 6px; }
    .footer-social a { width: 28px; height: 28px; font-size: 0.78rem; }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 20px;
    }

    .form-row { grid-template-columns: 1fr; }

    .page-header {
        padding-top: calc(var(--top-navbar-height, 40px) + 12vh + 1rem);
    }

    .cta-content h2 { font-size: 1.8rem; }

    /* Tighter page & modal padding on tablets/phones */
    .page-content { padding: 2rem 1.1rem 4rem; }
    .modal-content { width: 94%; }
    .modal-body { padding: 1.6rem; }
    .modal-body h2 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    /* Stat cards: further reduce for very small screens */
    .admin-stats-grid { gap: 0.65rem; }
    .admin-stat-card { padding: 0.75rem 0.8rem; gap: 0.5rem; }
    .admin-stat-icon { width: 30px; height: 30px; font-size: 0.85rem; }
    .admin-stat-value { font-size: 1.2rem; }
    .admin-stat-label { font-size: 0.62rem; }

    #postHeroCards {
        gap: 0;
        justify-content: center;
    }

    .postHeroCard {
        width: 130px;
        height: 174px;
        margin: 0.55rem;
    }

    .postHeroCard .postHeroCardContent {
        width: 126px;
        height: 170px;
    }

    .postHeroCardContent i { font-size: 34px; }
    .postHeroCardContent span { font-size: 0.72rem; }

    .page-content { padding: 1.6rem 0.9rem 3.5rem; }
}

/* ===== ADMIN DASHBOARD ===== */

/* Stat cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* 2-col stats / 1-col modules at all mobile widths — placed here (after base
   grid definitions) so these queries always win */
@media (max-width: 900px) {
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-modules-grid { grid-template-columns: 1fr; }
}

.admin-stat-card {
    background: linear-gradient(135deg, #0d1f14, #112d1c);
    border: 1px solid rgba(28,145,61,0.2);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.25s ease;
}

.admin-stat-card:hover {
    border-color: rgba(28,145,61,0.55);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.admin-stat-card.accent-warning { border-color: rgba(214,137,16,0.2); }
.admin-stat-card.accent-warning:hover { border-color: rgba(214,137,16,0.55); }
.admin-stat-card.accent-warning .admin-stat-icon { background: rgba(214,137,16,0.12); color: #d68910; }
.admin-stat-card.accent-warning .admin-stat-value { color: #d68910; }

.admin-stat-card.accent-blue { border-color: rgba(13,110,253,0.2); }
.admin-stat-card.accent-blue:hover { border-color: rgba(13,110,253,0.5); }
.admin-stat-card.accent-blue .admin-stat-icon { background: rgba(13,110,253,0.12); color: #6ea8fe; }
.admin-stat-card.accent-blue .admin-stat-value { color: #6ea8fe; }

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(28,145,61,0.12);
    color: #1c913d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.admin-stat-body { flex: 1; }

.admin-stat-value {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    color: #1c913d;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.admin-stat-label {
    font-family: "Montserrat", sans-serif;
    font-size: 0.78rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Section titles */
.admin-section-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
    padding-left: 0.75rem;
    border-left: 3px solid #1c913d;
}

/* Module/action cards */
.admin-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Force single column on all mobile sizes — must be after the base definition */
@media (max-width: 640px) {
    .admin-modules-grid { grid-template-columns: 1fr !important; }
}
.admin-module-card {
    background: #111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.admin-module-card:hover {
    background: #161616;
    border-color: rgba(28,145,61,0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.admin-module-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.admin-module-info { flex: 1; }

.admin-module-info h3 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    margin: 0 0 0.2rem;
}

.admin-module-info p {
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.admin-module-arrow {
    color: #444;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.admin-module-card:hover .admin-module-arrow { color: #1c913d; }

/* ---- Responsive admin card sizing — placed AFTER base definitions so these always win ---- */
@media (max-width: 768px) {
    .admin-stat-card { padding: 1rem 1.1rem; gap: 0.75rem; }
    .admin-stat-icon { width: 40px; height: 40px; font-size: 1.05rem; }
    .admin-stat-value { font-size: 1.5rem; }
    .admin-stat-label { font-size: 0.72rem; letter-spacing: 0.2px; }
    .admin-module-card { padding: 1rem 1.1rem; gap: 0.8rem; }
    .admin-module-icon { width: 38px; height: 38px; font-size: 1.05rem; }
    .admin-module-info h3 { font-size: 0.88rem; }
    .admin-module-info p { font-size: 0.75rem; }
}
@media (max-width: 600px) {
    .admin-stats-grid { gap: 0.7rem; }
    .admin-stat-card { padding: 0.85rem 0.9rem; gap: 0.6rem; }
    .admin-stat-icon { width: 34px; height: 34px; font-size: 0.95rem; }
    .admin-stat-value { font-size: 1.3rem; }
    .admin-stat-label { font-size: 0.66rem; letter-spacing: 0; }
    .admin-module-card { padding: 0.9rem 1rem; gap: 0.7rem; }
    .admin-module-info h3 { font-size: 0.85rem; }
    .admin-module-info p { font-size: 0.72rem; }
}
@media (max-width: 480px) {
    .admin-stats-grid { gap: 0.55rem; }
    .admin-stat-card { padding: 0.75rem 0.8rem; gap: 0.5rem; }
    .admin-stat-icon { width: 30px; height: 30px; font-size: 0.85rem; }
    .admin-stat-value { font-size: 1.2rem; }
    .admin-stat-label { font-size: 0.62rem; }
}

/* Pending application cards */
.pending-count-badge {
    background: rgba(214,137,16,0.15);
    color: #d68910;
    border: 1px solid rgba(214,137,16,0.35);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.78rem;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

.pending-apps-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.pending-app-card {
    background: #111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: border-color 0.2s;
}

.pending-app-card:hover { border-color: rgba(28,145,61,0.3); }

.pending-app-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #094119, #1c913d);
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.pending-app-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pending-app-info strong {
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    color: #fff;
}

.pending-app-info span {
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    color: #aaa;
}

.pending-app-date { color: #666 !important; font-size: 0.75rem !important; }

.pending-app-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #555;
    background: #0d0d0d;
    border: 1px dashed #222;
    border-radius: 12px;
}

.empty-state i { font-size: 2.5rem; margin-bottom: 0.8rem; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ===== CREATE COMPETITION PAGE ===== */

.create-comp-layout {
    max-width: 760px;
    margin: 0 auto;
}

.create-comp-form { display: flex; flex-direction: column; gap: 0; }

.form-section {
    background: #111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.8rem;
    margin-bottom: 1.2rem;
}

.form-section-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1c913d;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i { font-size: 0.85rem; }

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

/* ===== SYSTEM CONFIG PAGE ===== */
.config-panel {
    background: #111;
    border: 1px solid rgba(28,145,61,0.25);
    border-radius: 12px;
    padding: 0;
    max-width: 800px;
    margin: 1.8rem auto 0;
    overflow: hidden;
}

.config-category {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.config-category:last-child { border-bottom: none; }

.config-category-title {
    font-family: "Montserrat", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #1c913d;
    padding: 1rem 2rem 0.6rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(28,145,61,0.04);
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.config-row:hover { background: rgba(255,255,255,0.02); }
.config-category > .config-row:last-child { border-bottom: none; }

.config-info { flex: 1; }
.config-info h4 { margin-bottom: 0.3rem; font-size: 1rem; }
.config-desc { font-size: 0.85rem; color: #aaa; line-height: 1.5; margin: 0; }
.config-updated { font-size: 0.75rem; color: #555; margin-top: 0.25rem; display: block; }

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #333;
    border-radius: 28px;
    transition: background 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    top: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color, #1c913d);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(26px);
}
/* ── Change-notification box (top-right card) ────────────────────────────────── */
.change-box {
    position: fixed;
    top: calc(var(--top-navbar-height, 60px) + 12px);
    right: 16px;
    z-index: 1200;
    width: 280px;
    background: linear-gradient(160deg, #0e1f14 0%, #0a1a10 100%);
    border: 1px solid rgba(28, 145, 61, 0.45);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(28,145,61,0.12);
    padding: 0;
    overflow: hidden;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.34, 1.36, 0.64, 1), opacity 0.28s ease;
}

.change-box.change-box-visible {
    transform: translateX(0);
    opacity: 1;
}

.change-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem 0.5rem;
    border-bottom: 1px solid rgba(28, 145, 61, 0.2);
}

.change-box-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #7fff9a;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
}

.change-box-bell {
    animation: bellShake 0.7s ease 0.5s both;
}

@keyframes bellShake {
    0%,100% { transform: rotate(0); }
    20%      { transform: rotate(-18deg); }
    40%      { transform: rotate(18deg); }
    60%      { transform: rotate(-10deg); }
    80%      { transform: rotate(8deg); }
}

.change-box-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}
.change-box-close:hover { color: #fff; }

.change-box-list {
    list-style: none;
    margin: 0;
    padding: 0.6rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.change-box-list li {
    font-size: 0.8rem;
    color: #c8f0d0;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.4;
}

.change-box-list li .fas {
    color: #1c913d;
    width: 14px;
    text-align: center;
}

.change-box-refresh {
    display: block;
    width: calc(100% - 2rem);
    margin: 0 1rem 0.9rem;
    padding: 0.45rem 0;
    background: rgba(28, 145, 61, 0.18);
    border: 1px solid rgba(28, 145, 61, 0.4);
    border-radius: 8px;
    color: #7fff9a;
    font-size: 0.78rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    letter-spacing: 0.3px;
}
.change-box-refresh:hover {
    background: rgba(28, 145, 61, 0.32);
    border-color: rgba(28, 145, 61, 0.7);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    border-radius: 6px;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ── Member action buttons uniform grid ─────────────────────────────────────── */
.member-action-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ===== LAPTOP / MACBOOK RESPONSIVE (1200px – 1440px) ===== */
@media (max-width: 1440px) {
    /* Hero */
    .hero-content h1 {
        font-size: clamp(1.8rem, 3.8vw, 3.2rem);
    }
    .hero-content p {
        font-size: clamp(0.9rem, 1.8vw, 1.2rem);
    }
    .hero-content img {
        width: 110px;
    }

    /* Page header */
    .page-header h1 {
        font-size: clamp(1.4rem, 3vw, 2.2rem);
    }
    .page-header {
        padding-top: calc(var(--top-navbar-height, 40px) + 10vh + 1.5rem);
        padding-bottom: 2rem;
    }

    /* Inner page content clears nav */
    #mainContent > .page-content:first-child,
    .page-standalone {
        padding-top: calc(var(--top-navbar-height, 40px) + 10vh + 1.5rem);
    }

    /* Section headings */
    .youtube-content h2,
    #aboutSection h2,
    #largeCardSection h2,
    #upcomingCompetitionsSection h2,
    #newsAndEvents h2,
    .cta-content h2 {
        font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    }

    /* Post-hero cards */
    #postHeroCards {
        gap: 2.5%;
        margin: 40px 16px;
    }

    /* Cards */
    .card {
        padding: 1.3rem;
    }

    /* Page content width */
    .page-content {
        padding: 2rem 1.5rem 4rem;
    }
}

@media (max-width: 1280px) {
    .hero-content h1 {
        font-size: clamp(1.6rem, 3.4vw, 2.8rem);
    }
    .hero-content p {
        font-size: clamp(0.88rem, 1.6vw, 1.1rem);
    }
    .hero-content img {
        width: 95px;
        margin-bottom: 1rem;
    }
    .page-header h1 {
        font-size: clamp(1.3rem, 2.6vw, 2rem);
    }
}

/* ── Competition modal inputs ────────────────────────────────────────────────── */
.comp-modal-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    color: #ddd;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.comp-modal-input:focus {
    outline: none;
    border-color: rgba(28,145,61,0.5);
    background: rgba(28,145,61,0.05);
}
.comp-modal-input option {
    background: #1a1a2e;
    color: #ddd;
}
/* Remove number-input spin buttons inside competition modal */
.no-spin::-webkit-inner-spin-button,
.no-spin::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.no-spin { -moz-appearance: textfield; appearance: textfield; }
.comp-err {
    color: #e74c3c;
    font-size: 0.75rem;
    min-height: 1rem;
    display: block;
    margin-top: 0.2rem;
}

/* ===== GLOBAL RESPONSIVE SAFETY NET & REFINEMENTS ===== */

/* Kill stray horizontal scroll — html overflow-x hidden is universally supported
   and does NOT break position:sticky (which scrolls within body, not html). */
html { overflow-x: hidden; }
html, body { max-width: 100%; }

/* Media never overflows its container */
img, video, iframe, model-viewer { max-width: 100%; }
img, video { height: auto; }

/* Long words / URLs wrap instead of forcing horizontal scroll */
p, h1, h2, h3, h4, li, td, th, a, span, strong { overflow-wrap: break-word; }

/* Data tables scroll horizontally instead of squashing unreadably */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrapper > table { min-width: 560px; }

/* All grid/flex children must be constrained to their track — prevents
   elements with intrinsic min-width from causing page-level overflow */
.page-content > *,
.admin-stats-grid > *,
.admin-modules-grid > *,
.grid-2 > *, .grid-3 > *, .grid-4 > *,
.form-row > *,
.comp-cards-grid > *,
.gallery-grid > *,
.colours-grid > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mid-size phones — finer adjustments */
@media (max-width: 600px) {
    .change-box { width: calc(100vw - 24px); right: 12px; }
    .toast-alert { max-width: calc(100vw - 1.5rem); white-space: normal; }
    .section-heading { margin-bottom: 2rem; }
    .stat-value { font-size: 1.6rem; }
    .admin-stat-value { font-size: 1.4rem; }
    .admin-stat-icon { width: 34px; height: 34px; font-size: 0.95rem; }
    .admin-stat-card { padding: 0.85rem 0.9rem; gap: 0.6rem; }
    .admin-stat-label { font-size: 0.66rem; letter-spacing: 0; }
    .admin-module-card { padding: 0.9rem 1rem; gap: 0.7rem; }
    .card { padding: 1.2rem; }
    .form-section { padding: 1.2rem; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .page-header { padding-left: 1rem; padding-right: 1rem; }

    /* Logged-in: let admin pending-application rows wrap cleanly */
    .pending-app-card { flex-wrap: wrap; }
    .pending-app-actions { width: 100%; }
    .pending-app-actions .btn { flex: 1; justify-content: center; }

    /* Footer: keep 5 columns, aggressive font scale, no letter-spacing */
    .footer-main { gap: 8px; padding: 28px 10px; }
    .footer-column h3 { font-size: 0.88rem; margin-bottom: 8px; }
    .footer-column h4 { font-size: 0.6rem; margin-bottom: 8px; letter-spacing: 0; }
    /* Hide the long description paragraph in NHAASA column — saves significant space */
    .footer-column > p { display: none; }
    .footer-column ul li { margin-bottom: 5px; }
    .footer-column ul li a { font-size: 0.6rem; }
    .contact-info li { font-size: 0.58rem; gap: 4px; margin-bottom: 6px; }
    .footer-social { gap: 5px; margin-top: 8px; }
    .footer-social a { width: 24px; height: 24px; font-size: 0.68rem; }
}

/* Very small phones */
@media (max-width: 380px) {
    .postHeroCard { width: 118px; height: 158px; margin: 0.45rem; }
    .postHeroCard .postHeroCardContent { width: 114px; height: 154px; }
    .postHeroCardContent i { font-size: 30px; }
    .btn { padding: 0.55rem 1rem; font-size: 0.8rem; }
    .btn-sm { padding: 4px 9px; font-size: 0.72rem; }
    .modal-body { padding: 1.2rem; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }

    /* Footer: smallest scale, still 5 columns in one row */
    .footer-main { gap: 5px; padding: 22px 7px; }
    .footer-column h3 { font-size: 0.76rem; margin-bottom: 6px; }
    .footer-column h4 { font-size: 0.54rem; margin-bottom: 6px; letter-spacing: 0; }
    .footer-column ul li { margin-bottom: 4px; }
    .footer-column ul li a { font-size: 0.54rem; }
    .contact-info li { font-size: 0.52rem; gap: 3px; margin-bottom: 4px; }
    .footer-social a { width: 20px; height: 20px; font-size: 0.6rem; }
}

/* ===== INSTRUCTORS PAGE ===== */

.instructor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.instructor-card {
    flex: 1 1 300px;
    max-width: 420px;
    background: #0d1a0f;
    border: 1px solid rgba(28,145,61,0.2);
    border-radius: 16px;
    padding: 1.8rem 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.instructor-card:hover {
    border-color: rgba(28,145,61,0.6);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.instructor-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(28,145,61,0.15);
    border: 2px solid rgba(28,145,61,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1c913d;
    margin-bottom: 0.5rem;
}

.instructor-card-body { width: 100%; }

.instructor-card-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    margin: 0 0 0.4rem;
}

.instructor-card-title {
    font-size: 0.82rem;
    color: #aaa;
    margin: 0.3rem 0 0.4rem;
    font-style: italic;
}

.instructor-card-meta {
    font-size: 0.83rem;
    color: #999;
    margin: 0.2rem 0;
}

.instructor-card-meta i {
    color: #1c913d;
    margin-right: 5px;
}

.instructor-card-specs {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0.4rem 0 0.6rem;
}

.instructor-card-specs i {
    color: #1c913d;
    margin-right: 5px;
}

.instructor-card-cta {
    margin-top: 0.8rem;
    display: inline-block;
}

/* ===== GALLERY MEDIA GRID ===== */

.gallery-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-media-item {
    border-radius: 10px;
    overflow: hidden;
    background: #0d1a0f;
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-media-item:hover {
    transform: scale(1.02);
    border-color: rgba(28,145,61,0.4);
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.gallery-video {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    background: #000;
}

.gallery-caption {
    font-size: 0.78rem;
    color: #999;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.gallery-media-item { cursor: default; }
.gallery-img-item { cursor: zoom-in; }
.gallery-img-item:hover .gallery-img { opacity: 0.85; transition: opacity 0.15s; }

/* ===== GALLERY LIGHTBOX ===== */

.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active { display: flex; }

.gallery-lb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    max-width: 88vw;
    max-height: 90vh;
}

.gallery-lb-img {
    max-width: 88vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

.gallery-lb-arrow {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 4rem;
    cursor: pointer;
    padding: 0 1.2rem;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-lb-arrow:hover { color: #fff; transform: scale(1.15); }

.gallery-lb-close {
    position: absolute;
    top: 1rem;
    right: 1.4rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    z-index: 1;
}

.gallery-lb-close:hover { color: #fff; }

.gallery-lb-caption {
    color: #ccc;
    font-size: 0.88rem;
    text-align: center;
    max-width: 80vw;
    min-height: 1.2em;
    font-family: "Montserrat", sans-serif;
}

.gallery-lb-counter {
    color: #666;
    font-size: 0.78rem;
    font-family: "Montserrat", sans-serif;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .gallery-lb-arrow { font-size: 2.8rem; padding: 0 0.5rem; }
    .gallery-lb-img { max-height: 70vh; }
}

@media (max-width: 600px) {
    .gallery-media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
}

/* ===== PDF VIEWER ===== */

.pdf-viewer {
    display: block;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    border: none;
    border-radius: 8px;
    background: #111;
}

/* ===== INSTRUCTOR DETAIL PAGE ===== */

.inst-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1c913d;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.2s;
}

.inst-back-link:hover { color: #25c050; }

.inst-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.inst-detail-sidebar {
    background: #0d1a0f;
    border: 1px solid rgba(28,145,61,0.2);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: sticky;
    top: calc(var(--top-navbar-height, 48px) + 1.2rem);
}

.inst-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(28,145,61,0.15);
    border: 3px solid rgba(28,145,61,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: #1c913d;
    margin: 0 auto 1rem;
}

.inst-sidebar-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 0.5rem;
}

.inst-sidebar-org,
.inst-sidebar-province,
.inst-sidebar-exp {
    font-size: 0.82rem;
    color: #aaa;
    margin: 0.4rem 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
}

.inst-sidebar-org i,
.inst-sidebar-province i,
.inst-sidebar-exp i {
    color: #1c913d;
    margin-top: 2px;
    flex-shrink: 0;
}

.inst-sidebar-bio {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.6;
    text-align: left;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.inst-detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.inst-detail-section {
    background: #0d1a0f;
    border: 1px solid rgba(28,145,61,0.15);
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
}

.inst-section-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 1.2rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(28,145,61,0.25);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.inst-section-title i { color: #1c913d; }

.inst-achievements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.inst-achievements-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: #ccc;
    line-height: 1.5;
}

.inst-achievements-list li i {
    color: #d4a017;
    flex-shrink: 0;
    margin-top: 3px;
}

.inst-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.inst-list li {
    font-size: 0.88rem;
    color: #ccc;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.inst-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #1c913d;
    font-weight: 700;
}

.inst-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.inst-timeline-item {
    display: grid;
    grid-template-columns: 64px 16px 1fr;
    gap: 0 0.75rem;
    align-items: start;
    padding-bottom: 1.2rem;
}

.inst-timeline-year {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    color: #1c913d;
    text-align: right;
    padding-top: 3px;
}

.inst-timeline-dot {
    width: 12px;
    height: 12px;
    background: #1c913d;
    border-radius: 50%;
    margin-top: 4px;
    position: relative;
    flex-shrink: 0;
}

.inst-timeline-dot::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 1.2rem - 12px);
    background: rgba(28,145,61,0.25);
}

.inst-timeline-item:last-child .inst-timeline-dot::after { display: none; }

.inst-timeline-text {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.6;
}

.inst-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inst-tag {
    background: rgba(28,145,61,0.12);
    border: 1px solid rgba(28,145,61,0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.82rem;
    color: #1c913d;
    font-family: "Montserrat", sans-serif;
}

.inst-vision { border-color: rgba(28,145,61,0.35); }

.inst-quote {
    font-size: 0.95rem;
    color: #ddd;
    font-style: italic;
    line-height: 1.7;
    border-left: 3px solid #1c913d;
    padding-left: 1.2rem;
    margin: 0 0 0.8rem;
}

.inst-slogan {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1c913d;
    text-align: right;
    letter-spacing: 1px;
}

.inst-link {
    color: #1c913d;
    text-decoration: none;
}

.inst-link:hover { color: #25c050; text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .inst-detail-layout {
        grid-template-columns: 1fr;
    }
    .inst-detail-sidebar {
        position: static;
    }
}

@media (max-width: 480px) {
    .instructor-card { padding: 1.3rem 1.1rem; }
    .inst-detail-section { padding: 1.2rem 1.1rem; }
}
