/*
 * Shared styles for the redesigned MTTA pages (home, classes, tournaments, training,
 * gallery, contact, about, summer camp). Each page links this file right after
 * includes/head.php and keeps only its own layout rules in its <style> block.
 * Old-template pages (payment, 404) do not use it.
 */
:root {
    --ink: #171a22;
    --ink-2: #232838;
    --muted: #454a58;
    --soft: #f5f6fa;
    --line: #e4e6ee;
    --line-2: #d9dce6;
    --red: #ed2855;
    --red-dark: #c91b43;
    --red-text: #a8152f;
    --pink: #fff1f4;
    --max: 1184px;
    --head: 'Space Grotesk', 'Inter', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', system-ui, Arial, sans-serif; color: var(--ink); background: #fff; line-height: 1.5; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--red-text); }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ff9fb4; outline-offset: 2px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 2000; }

/* Header and navigation (markup in /header.html) */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 84px; background: var(--ink); display: flex; align-items: center; justify-content: space-between; padding: 0 48px; transition: height .25s ease; }
header.small { height: 64px; }
.logo img { height: 56px; width: auto; padding: 0; display: block; transition: height .25s ease; }
header.small .logo img { height: 44px; }
.nav-links { display: flex; align-items: center; gap: 4px 26px; margin: 0; }
.nav-links a { color: #e9ebf2; text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 10px 0; transition: color .2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: #ffd4de; }
.nav-links a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.menu-selector { display: none; cursor: pointer; width: 44px; height: 44px; border-radius: 10px; background: #2a2f3d; align-items: center; justify-content: center; }
.menu-icon { width: 22px; height: 22px; background: transparent; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 1px; width: 20px; height: 2px; background: #fff; }
.menu-icon::before { top: 6px; box-shadow: 0 5px 0 #fff; }
.menu-icon::after { top: 16px; }

/* Layout */
main { margin-top: 84px; }
.wrap { width: min(100% - 96px, var(--max)); margin: 0 auto; }
.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red-text); }
h2.sec { margin: 0 0 8px; font-family: var(--head); font-size: 34px; line-height: 1.15; }
.lead { margin: 0 0 28px; color: var(--muted); font-size: 17px; }
.fine { margin: 0; font-size: 14px; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; text-align: center; }
.btn-primary { background: var(--red-dark); color: #fff; }
.btn-primary:hover { background: var(--red-text); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2f3d; color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Common blocks */
.hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 56px 0; }
.hero h1 { margin: 0 0 18px; font-family: var(--head); font-size: 48px; line-height: 1.05; letter-spacing: -.02em; }
.hero .intro { margin: 0 0 24px; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 34em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(23, 26, 34, .06); }
.badge { display: inline-block; background: var(--pink); color: var(--red-text); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.cta { background: var(--ink); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 48px 0; }
.cta h2 { margin: 0 0 8px; font-family: var(--head); font-size: 28px; line-height: 1.2; }
.cta p { margin: 0; color: #c9ccd6; }
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }

/* Club hours table (rendered by mtta_hours_table() in includes/head.php) */
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours th, .hours td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.hours thead th { font-size: 13px; color: var(--muted); font-weight: 600; border-top: 0; background: var(--soft); }
.hours-box { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; background: #fff; }

/* Photo pop-up (tournaments and gallery) */
.lightbox { width: min(1100px, 100vw - 32px); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 16px; background: #0f1117; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(10, 12, 18, .82); }
.lb-inner { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 22px; }
.lb-title { margin: 0; font-family: var(--head); font-size: 20px; line-height: 1.25; }
.lb-meta { margin: 2px 0 0; font-size: 13px; color: #b9bdcb; }
.lb-btn { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn[disabled] { opacity: .3; cursor: default; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; flex: 1 1 auto; padding: 0 64px; }
.lb-stage img { display: block; width: 100%; height: min(680px, calc(100vh - 260px)); object-fit: contain; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 16px; scroll-snap-type: x proximity; }
.lb-thumb { flex: none; width: 92px; height: 69px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #232838; cursor: pointer; opacity: .65; scroll-snap-align: center; }
.lb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 1; }
.lb-thumb[aria-current="true"] { border-color: var(--red); opacity: 1; }
body.lb-open { overflow: hidden; }

footer { background: var(--ink); color: #d9dce6; font-size: 14px; padding: 28px 48px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid #2a2f3d; }
footer p { margin: 0; }
footer a { color: #ffd4de; }

@media screen and (max-width: 900px) {
    header { padding: 0 16px; height: 72px; }
    header.small { height: 60px; }
    .logo img { height: 46px; }
    .menu-selector { display: flex; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; flex-direction: column; align-items: stretch; background: var(--ink-2); padding: 6px 16px 12px; gap: 0; }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 16px; padding: 13px 0; border-bottom: 1px solid #343a4c; }
    .nav-links a[aria-current="page"] { box-shadow: none; color: #ffd4de; }
    main { margin-top: 72px; }
    .wrap { width: min(100% - 32px, var(--max)); }
    .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 28px 0 32px; }
    .hero h1 { font-size: 32px; }
    .hero .intro { font-size: 16px; }
    .actions .btn { flex: 1 1 100%; }
    h2.sec { font-size: 26px; }
    .lightbox { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; margin: 0; }
    .lb-inner { max-height: 100vh; height: 100%; }
    .lb-stage { padding: 0 8px; }
    .lb-stage img { height: calc(100vh - 230px); }
    .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-thumb { width: 72px; height: 54px; }
    footer { padding: 22px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
