/* ═══════════════════════════════════════════════════════════════
   World Hanguk Tang Soo Do Federation — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

:root {
    --accent:       #c41e3a;
    --accent-hover: #d92644;
    --accent-soft:  rgba(196, 30, 58, 0.12);
    --navy:         #0a0f1c;
    --navy-surface: #111a2e;
    --navy-mid:     #1a2940;
    --bg:           #0a0f1c;
    --text:         #f0f2f7;
    --muted:        #8b95a8;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* ── Nav ─────────────────────────────────────────────────────── */
nav {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
    background: rgba(0, 0, 0, 0);
    border-bottom: 1px solid rgba(255, 255, 255, 0);
}

nav.scrolled {
    backdrop-filter: blur(12px);
    background: rgba(10, 15, 28, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.nav-logo {
    height: 3.5rem;
    width: 3.5rem;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled .nav-logo {
    height: 2.75rem;
    width: 2.75rem;
}

@media (min-width: 1024px) {
    .nav-logo { height: 4.5rem; width: 4.5rem; }
    nav.scrolled .nav-logo { height: 3rem; width: 3rem; }
}

.footer-logo {
    width: 5.5rem;
    height: 5.5rem;
    object-fit: contain;
}

/* ── Nav typography (shared — all pages via nav-footer.js) ─────── */
.nav-brand-text {
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    line-height: 1.5;
}

@media (min-width: 1024px) {
    .nav-brand-text { font-size: 0.75rem; }
}

.nav-links-desktop {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (min-width: 1536px) {
    .nav-links-desktop { font-size: 0.8125rem; }
}

.nav-links-desktop a,
.nav-links-desktop button {
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.nav-dropdown-toggle svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* ── Nav Dropdown ────────────────────────────────────────────── */
.nav-dropdown {
    position: relative;
}

/* Invisible bridge so the cursor can reach the menu without losing hover */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: max(100%, 220px);
    height: 0.75rem;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 220px;
    background: rgba(17, 26, 46, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transition-delay: 0.15s;
    padding: 0.5rem 0;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.75rem;
    left: 0;
    right: 0;
    height: 0.75rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: rgba(196, 30, 58, 0.08);
    color: var(--accent);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(10, 15, 28, 0.4) 0%,
        rgba(10, 15, 28, 0.65) 45%,
        rgba(10, 15, 28, 0.94) 100%
    );
}

/* ── Reveal Animation ──────────────────────────────────────────── */
/* Default: fully visible. If js/main.js fails to load (e.g. the js/
   folder didn't get uploaded), the site is still readable. The
   hidden-then-reveal effect only applies once JS has run. */
.reveal {
    opacity: 1;
    transform: none;
}

.js-ready .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 8px; }
::-webkit-scrollbar-track        { background: #0a0f1c; }
::-webkit-scrollbar-thumb        { background: #2a3f5f; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover  { background: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-gold {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gold:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(196, 30, 58, 0.35);
}

.btn-outline {
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline:hover {
    background: rgba(196, 30, 58, 0.12);
    transform: translateY(-2px);
}

/* ── Feature Cards ─────────────────────────────────────────────── */
.feature-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
}

.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.feature-card:hover img {
    transform: scale(1.08);
}

.feature-card-overlay {
    position: absolute;
    inset: 0;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.15) 100%);
    transition: all 0.4s ease;
}

.feature-card:hover .feature-card-overlay {
    background: linear-gradient(to top, rgba(196, 30, 58, 0.75) 0%, rgba(10, 15, 28, 0.45) 100%);
}

.feature-card-desc {
    font-size: 0.75rem;
    color: #f0f2f7;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.feature-card:hover .feature-card-desc {
    opacity: 1;
    transform: translateY(0);
}

@media (hover: none) {
    .feature-card img { transform: scale(1.05); }
    .feature-card-overlay {
        background: linear-gradient(to top, rgba(196, 30, 58, 0.75) 0%, rgba(10, 15, 28, 0.45) 100%);
    }
    .feature-card-desc {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Section Decorators ────────────────────────────────────────── */
.gold-rule::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 1rem auto 0;
}

.gold-rule-left::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 1rem 0 0;
}

/* ── Pillar Cards ──────────────────────────────────────────────── */
.pillar-card {
    background: rgba(17, 26, 46, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.pillar-card:hover {
    border-color: rgba(196, 30, 58, 0.35);
    transform: translateY(-4px);
}

/* ── Mobile Menu ───────────────────────────────────────────────── */
#mobile-menu {
    transition: transform 0.4s ease-in-out;
    transform: translateX(100%);
}

#mobile-menu.open {
    transform: translateX(0);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-submenu.open {
    max-height: 200px;
}

.mobile-dropdown-toggle .mobile-dropdown-chevron {
    transition: transform 0.25s ease;
}

.mobile-dropdown-toggle.open .mobile-dropdown-chevron {
    transform: rotate(180deg);
}

.mobile-dropdown-toggle.open {
    color: var(--accent);
}

/* ── Gallery ───────────────────────────────────────────────────── */
.gallery-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ── Event Cards ───────────────────────────────────────────────── */
.event-card {
    border: 1px solid rgba(196, 30, 58, 0.2);
    background: rgba(17, 26, 46, 0.5);
    transition: border-color 0.3s ease;
}

.event-card:hover {
    border-color: rgba(196, 30, 58, 0.5);
}

.event-card-flyer {
    border-bottom: 1px solid rgba(196, 30, 58, 0.15);
    background: rgba(17, 26, 46, 0.6);
}

.event-card-flyer img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 320px;
    padding: 0.5rem;
}

.events-layout {
    align-items: stretch;
}

.events-stack {
    min-height: 100%;
}

.event-card-featured .event-card-flyer img {
    max-height: 420px;
}

@media (min-width: 1024px) {
    .event-card-featured {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .event-card-featured .event-card-flyer {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .event-card-featured .event-card-flyer img {
        max-height: 480px;
    }
}

/* ── Section Backgrounds ───────────────────────────────────────── */
.bg-disciplines {
    background:
        radial-gradient(ellipse at 80% 10%, rgba(42, 69, 112, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 90%, rgba(196, 30, 58, 0.08) 0%, transparent 50%),
        #0c1220;
}

.bg-pillars {
    background:
        radial-gradient(ellipse at 15% 85%, rgba(196, 30, 58, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(42, 69, 112, 0.25) 0%, transparent 50%),
        #0a0f1c;
}

.bg-events {
    background:
        radial-gradient(ellipse at 5% 15%, rgba(196, 30, 58, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 95% 85%, rgba(30, 48, 80, 0.35) 0%, transparent 50%),
        #0b101c;
}

/* ── Inner Page Hero ───────────────────────────────────────────── */
.page-hero {
    position: relative;
    padding: 10rem 1.5rem 5rem;
    min-height: 42vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .page-hero { padding: 12rem 3rem 6rem; min-height: 48vh; }
}

.page-hero-bg {
    position: absolute;
    inset: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 15, 28, 0.55) 0%, rgba(10, 15, 28, 0.94) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    margin: 0 auto;
    width: 100%;
}

/* Inner pages: nav starts with glass background */
nav.inner-nav {
    backdrop-filter: blur(12px);
    background: rgba(10, 15, 28, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

nav.inner-nav .nav-logo {
    height: 2.75rem;
    width: 2.75rem;
}

@media (min-width: 1024px) {
    nav.inner-nav .nav-logo { height: 3rem; width: 3rem; }
}

/* ── Content Blocks ──────────────────────────────────────────────── */
.content-section {
    padding: 4rem 1.5rem;
}

@media (min-width: 1024px) {
    .content-section { padding: 5rem 3rem; }
}

.info-card {
    background: rgba(17, 26, 46, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem;
}

.date-badge {
    display: inline-block;
    background: rgba(196, 30, 58, 0.12);
    border: 1px solid rgba(196, 30, 58, 0.35);
    color: var(--accent);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.4rem 0.85rem;
}

.members-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(155, 28, 28, 0.15);
    border: 1px solid rgba(155, 28, 28, 0.4);
    color: #e8a0a0;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
}

.prose-muted p,
.prose-muted li {
    color: #8b95a8;
    line-height: 1.75;
}

.prose-muted h3 {
    font-family: 'Cinzel', serif;
    color: #f0f2f7;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-muted ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 1rem 0;
}

.prose-muted li { margin-bottom: 0.5rem; }

.process-steps {
    counter-reset: step;
}

.process-step {
    position: relative;
    padding-left: 3.5rem;
    padding-bottom: 2rem;
    border-left: 1px solid rgba(196, 30, 58, 0.2);
    margin-left: 1rem;
}

.process-step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.process-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -1rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tournament-flyer {
    border: 1px solid rgba(196, 30, 58, 0.2);
    overflow: hidden;
    background: rgba(17, 26, 46, 0.4);
}

.tournament-flyer img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.tournament-flyer img.flyer-poster,
.event-card-flyer img {
    aspect-ratio: auto;
    object-fit: contain;
}

/* ── Vision / Mission / Values ─────────────────────────────────── */
.statement-card {
    background: rgba(17, 26, 46, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem;
}

@media (min-width: 1024px) {
    .statement-card { padding: 2.5rem; }
}

.statement-card blockquote {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #f0f2f7;
    font-style: italic;
}

@media (min-width: 768px) {
    .statement-card blockquote { font-size: 1.25rem; }
}

.value-card {
    background: rgba(17, 26, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.75rem;
    transition: border-color 0.3s ease;
    height: 100%;
}

.value-card:hover {
    border-color: rgba(196, 30, 58, 0.3);
}

.value-number {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.value-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b95a8;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.value-pill {
    display: inline-block;
    border: 1px solid rgba(196, 30, 58, 0.25);
    color: #f0f2f7;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.value-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Leadership Cards ──────────────────────────────────────────── */
.leader-featured {
    background: rgba(17, 26, 46, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .leader-featured { padding: 3rem 4rem; }
}

.leader-portrait {
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    border: 2px solid rgba(196, 30, 58, 0.5);
    padding: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .leader-portrait { width: 14rem; height: 14rem; }
}

.leader-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.leader-featured:hover .leader-portrait img,
.leader-card:hover .leader-portrait img {
    filter: grayscale(0%);
}

.leader-card {
    background: rgba(17, 26, 46, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.75rem;
    height: 100%;
    transition: border-color 0.3s ease;
}

.leader-card:hover {
    border-color: rgba(196, 30, 58, 0.25);
}

.leader-card .leader-portrait {
    width: 7rem;
    height: 7rem;
    margin: 0 auto 1.25rem;
}

.leader-credentials {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.leader-credentials li {
    font-size: 0.8rem;
    color: #8b95a8;
    padding: 0.35rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.leader-credentials li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.leader-pending {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8b95a8;
    font-style: italic;
}

.history-timeline-item {
    border-left: 1px solid rgba(196, 30, 58, 0.25);
    padding-left: 1.5rem;
    padding-bottom: 1.5rem;
    margin-left: 0.5rem;
}

.history-timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

/* ── Tournament Scoring ────────────────────────────────────────── */
.scoring-general {
    background: rgba(17, 26, 46, 0.55);
    border: 1px solid rgba(196, 30, 58, 0.2);
    padding: 1.75rem;
}

.scoring-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.scoring-nav a {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #8b95a8;
    transition: all 0.2s ease;
}

.scoring-nav a:hover {
    border-color: rgba(196, 30, 58, 0.4);
    color: var(--accent);
}

.scoring-rule-card {
    background: rgba(17, 26, 46, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.scoring-rule-card h3 {
    font-family: 'Cinzel', serif;
    color: #f0f2f7;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.scoring-rule-card h3 span {
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
}

.scoring-rule-card h4 {
    font-family: 'Cinzel', serif;
    color: #f0f2f7;
    font-size: 0.85rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.scoring-rule-card ul,
.scoring-rule-card ol {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}

.scoring-rule-card li {
    color: #8b95a8;
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.scoring-rule-card p {
    color: #8b95a8;
    font-size: 0.875rem;
    line-height: 1.7;
}

.scoring-rule-card li strong,
.scoring-rule-card p strong {
    color: #f0f2f7;
    font-weight: 500;
}

.warning-tier {
    list-style: none !important;
    padding-left: 0 !important;
}

.warning-tier li {
    padding-left: 0;
}
