/* ====================================================================
   Nashville Cowboys Marktoberdorf - Gemeinsames Stylesheet
   Western-Look, Farben aus dem Vereinslogo (Rot / Schwarz / Leder)
   Farben und Schriften zentral ueber die Variablen in :root anpassen.
   ==================================================================== */

/* ---------- Schriften (lokal gehostet, keine Google-Verbindung) ----------
   Rye (SIL Open Font License) - Western-Display fuer grosse Ueberschriften
   Roboto Slab (Apache 2.0)    - Slab-Serif fuer Navigation, Buttons, Zwischentitel */
@font-face {
    font-family: "Rye";
    src: url("fonts/rye-regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto Slab";
    src: url("fonts/roboto-slab-variable.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #1b130e;
    --leather: #6b3f22;
    --saddle: #b8713f;
    --saddle-light: #d9a473;
    --red: #c8371f;
    --red-dark: #9c2915;
    --parchment: #f3e7cf;
    --paper: #fbf6ea;
    --sand: #e2cda4;
    --text: #2b2019;
    --muted: #6e5a4a;
    --line: rgba(107, 63, 34, 0.22);

    --win: #3c8a4e;
    --loss: #c8371f;
    --draw: #d08c1d;

    --font-western: "Rye", "Roboto Slab", Georgia, serif;
    --font-display: "Roboto Slab", Rockwell, Georgia, serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --radius: 12px;
    --header-h: 76px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-sm: 0 4px 14px rgba(43, 32, 25, 0.12);
}

/* ---------- Basis ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    min-height: 100vh;
    background-color: var(--ink);
    /* dunkle Holzdielen */
    background-image:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 180px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 7px),
        linear-gradient(180deg, #2c1d13 0%, #1b130e 60%, #150f0b 100%);
    background-attachment: fixed;
}

img { max-width: 100%; }

h1, h2, h3, h4 {
    overflow-wrap: break-word;
    hyphens: auto;
}
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn, .link-button, .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary, .link-button, .submit-btn {
    background: var(--red);
    color: var(--paper);
    box-shadow: 0 3px 0 var(--red-dark);
}

.btn-primary:hover, .link-button:hover, .submit-btn:hover {
    background: var(--red-dark);
    color: var(--paper);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #6f1d0e;
}

.btn-ghost {
    background: transparent;
    color: var(--parchment);
    border-color: rgba(243, 231, 207, 0.55);
}

.btn-ghost:hover {
    color: var(--ink);
    background: var(--parchment);
    border-color: var(--parchment);
}

.link-button { margin-top: 1rem; font-size: 0.85rem; padding: 0.6rem 1.2rem; }
.submit-btn { width: 100%; }
.submit-btn:disabled { opacity: 0.7; cursor: wait; transform: none; }

/* ---------- Header / Navigation ---------- */
header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(27, 19, 14, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 3px solid var(--red);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background: rgba(21, 15, 11, 0.98);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-h);
    gap: 1rem;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }

.logo img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--saddle);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--parchment);
}

.logo-text small {
    font-size: 0.68rem;
    letter-spacing: 0.32em;
    color: var(--saddle-light);
    font-weight: 400;
}

.logo:hover .logo-text { color: var(--paper); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-item { position: relative; }

.nav-links > li > a {
    position: relative;
    display: block;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--sand);
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links > li > a::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.35rem;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-links > li > a:hover { color: var(--paper); }
.nav-links > li > a:hover::after { transform: scaleX(1); }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding: 0.4rem;
    list-style: none;
    background: var(--ink);
    border: 1px solid rgba(226, 205, 164, 0.15);
    border-top: 3px solid var(--red);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 0.55rem 0.9rem;
    color: var(--sand);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
}

.dropdown a:hover { background: rgba(200, 55, 31, 0.18); color: var(--paper); }

.mobile-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 9px;
    background: none;
    border: 0;
    cursor: pointer;
}

.mobile-menu span {
    display: block;
    height: 3px;
    margin: 3px 0;
    background: var(--parchment);
    border-radius: 2px;
}

/* ---------- Main / Sektionen ---------- */
main { padding-top: var(--header-h); }

.section {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    margin: 2.5rem auto;
    padding: 4.5rem 0 4rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background:
        radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(139, 90, 43, 0.16), transparent 60%),
        var(--parchment);
    /* Leder-Naht */
    outline: 2px dashed rgba(107, 63, 34, 0.35);
    outline-offset: -12px;
}

.section h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
}

.section h2::before,
.section h2::after {
    content: "";
    flex: 0 1 70px;
    height: 2px;
    background: var(--red);
}

.section-eyebrow {
    display: block;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 0.4rem;
}

.section-lead {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
    font-size: 1.15rem;
    color: var(--muted);
}

.section-meta { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.empty-note {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    font-size: 1.05rem;
    padding: 1.5rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--parchment);
    padding: 5rem 0 5.5rem;
    background:
        radial-gradient(ellipse at 75% 50%, rgba(184, 113, 63, 0.25), transparent 60%),
        linear-gradient(135deg, #120c08 0%, #2b1a10 55%, #3a2214 100%);
    border-bottom: 3px solid var(--red);
}

/* Dartscheiben-Ringe im Hintergrund */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(circle at 76% 50%, rgba(200, 55, 31, 0.12) 0 22px, transparent 22px 44px);
    -webkit-mask-image: radial-gradient(circle at 76% 50%, #000 0%, transparent 58%);
    mask-image: radial-gradient(circle at 76% 50%, #000 0%, transparent 58%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--saddle-light);
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--paper);
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.hero h1 span { display: block; color: var(--red); }

.hero-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.5rem 0;
    color: var(--red);
    font-size: 0.9rem;
}

.hero-divider::before,
.hero-divider::after {
    content: "";
    height: 2px;
    width: 60px;
    background: rgba(243, 231, 207, 0.35);
}

.hero p { font-size: 1.25rem; max-width: 520px; color: var(--sand); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero-badge {
    justify-self: center;
    width: min(360px, 80%);
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow:
        0 0 0 6px var(--ink),
        0 0 0 10px var(--saddle),
        0 0 0 14px var(--ink),
        0 25px 60px rgba(0, 0, 0, 0.6);
}

/* ---------- Karten ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.card {
    position: relative;
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(43, 32, 25, 0.18); }

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 1.1rem;
    border-radius: 50%;
    font-size: 1.7rem;
    color: var(--paper);
    background: var(--red);
    box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--red);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.03em;
    color: var(--ink);
    margin-bottom: 0.6rem;
}

.card p { color: var(--muted); }
.card p strong { color: var(--text); }

/* ---------- Mannschaften ---------- */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.team-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 5px solid var(--leather);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.team-card:hover,
.team-card:focus-visible {
    transform: translateY(-5px);
    border-top-color: var(--red);
    box-shadow: 0 14px 30px rgba(43, 32, 25, 0.2);
}

.team-card-head { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.4rem 1rem; }

/* Sheriffstern mit Nummer */
.team-number {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding-top: 4px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--paper);
    background: var(--red);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.team-card h3 { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; color: var(--ink); }

.team-liga {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.1rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--leather);
    background: rgba(184, 113, 63, 0.15);
    border-radius: 4px;
}

.team-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 0 1.4rem 1.2rem; }
.team-meta dt { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.team-meta dd { font-weight: 600; color: var(--text); }
.team-rank { font-family: var(--font-display); font-size: 1.15rem; color: var(--red); }

.team-card-cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.4rem;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--leather);
    background: rgba(107, 63, 34, 0.07);
    border-top: 1px dashed var(--line);
    transition: color 0.2s ease, background 0.2s ease;
}

.team-card:hover .team-card-cta { color: var(--paper); background: var(--red); }

/* Zahlen immer mit gleich hohen Ziffern (Georgia-Fallback hat Mediaevalziffern) */
.team-number, .team-rank, .match-score, .match-round, .hero p, .section h2, .card h3 {
    font-variant-numeric: lining-nums tabular-nums;
}

.team-number, .team-rank, .match-score {
    font-family: var(--font-body);
    font-weight: 800;
}

/* ---------- Galerie ---------- */
.gallery-card { cursor: pointer; }
.gallery-card .card-icon { font-size: 1.9rem; }

.gallery-modal, .team-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(12, 8, 5, 0.88);
    backdrop-filter: blur(4px);
}

.gallery-modal-content, .team-modal-content {
    position: relative;
    width: 95%;
    margin: 3vh auto;
    max-height: 94vh;
    max-height: 94dvh;
    overflow-y: auto;
    padding: 2rem;
    background: var(--parchment);
    border-radius: var(--radius);
    border-top: 5px solid var(--red);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.gallery-modal-content { max-width: 1200px; }
.team-modal-content { max-width: 920px; }

.gallery-close, .team-modal-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2001;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 1;
    color: var(--paper);
    background: var(--ink);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gallery-close:hover, .team-modal-close:hover { background: var(--red); }

.gallery-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.gallery-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.gallery-item:hover { transform: translateY(-4px); }

.gallery-item img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: zoom-in;
}

.gallery-item-content { padding: 0.9rem 1rem; }
.gallery-item h4 { font-family: var(--font-display); color: var(--ink); margin-bottom: 0.25rem; }
.gallery-item p { color: var(--muted); font-size: 0.9rem; }

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
    cursor: zoom-out;
}

.image-lightbox img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* ---------- Team-Modal ---------- */
.team-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--line);
}

.team-modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.team-modal-header p {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.15rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--leather);
    border-radius: 4px;
}

.team-modal-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 1.25rem;
    border-bottom: 3px solid var(--ink);
}

.team-modal-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--leather);
    background: rgba(107, 63, 34, 0.1);
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.team-modal-tab:hover { background: rgba(107, 63, 34, 0.2); }
.team-modal-tab.active { color: var(--paper); background: var(--ink); }
.team-modal-tab-content { display: none; }
.team-modal-tab-content.active { display: block; }

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.team-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
    background: var(--paper);
    border-radius: 8px;
    overflow: hidden;
}

.team-modal-table th {
    padding: 0.7rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--sand);
    background: var(--ink);
}

.team-modal-table td { padding: 0.6rem 0.5rem; text-align: center; border-bottom: 1px solid var(--line); }
.team-modal-table th:first-child, .team-modal-table td:first-child { width: 40px; }
.team-modal-table th:nth-child(2), .team-modal-table td:nth-child(2) { text-align: left; }
.team-modal-table tbody tr:hover { background: rgba(184, 113, 63, 0.1); }

.team-modal-table .highlight-row {
    font-weight: 700;
    background: rgba(200, 55, 31, 0.12);
    box-shadow: inset 4px 0 0 var(--red);
}

.team-modal-table .highlight-row:hover { background: rgba(200, 55, 31, 0.18); }

.meister { color: var(--win); font-weight: 700; }
.absteiger { color: var(--loss); font-weight: 700; }
.table-legend { margin-top: 0.75rem; font-size: 0.85rem; color: var(--muted); }

.match-list { display: flex; flex-direction: column; gap: 8px; }

.match-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 0.9rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left-width: 5px;
    border-radius: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.match-item:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }

.match-round {
    min-width: 80px;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
    color: var(--paper);
    background: var(--leather);
    border-radius: 4px;
}

.match-date { min-width: 80px; font-size: 0.85rem; text-align: center; color: var(--muted); }

.match-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.match-home, .match-away { flex: 1; }
.match-home { text-align: right; }
.match-away { text-align: left; }

.match-vs { font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; color: var(--red); }

.match-score {
    min-width: 70px;
    padding: 0.35rem 0.7rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
    color: var(--paper);
    background: var(--ink);
    border-radius: 4px;
}

.match-score.pending { color: var(--muted); background: rgba(0, 0, 0, 0.06); font-weight: 400; }
.match-item .our-team { font-weight: 700; color: var(--red-dark); }

.match-win  { border-left-color: var(--win); }
.match-loss { border-left-color: var(--loss); }
.match-draw { border-left-color: var(--draw); }
.match-open { border-left-color: #b9ab98; }

.team-modal-loading { text-align: center; padding: 2.5rem; color: var(--leather); }

.team-modal-loading i {
    display: block;
    margin-bottom: 1rem;
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

.team-modal-error { text-align: center; padding: 2rem; color: var(--loss); }
.team-modal-error i { display: block; margin-bottom: 0.6rem; font-size: 2rem; }

.team-modal-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--line);
}

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }

.contact-info, .contact-form {
    padding: 2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.contact-info h3, .contact-form h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    padding-bottom: 0.6rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--red);
}

.contact-list { list-style: none; display: grid; gap: 1.1rem; }

.contact-list li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.8rem;
    align-items: start;
}

.contact-list i {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--paper);
    background: var(--leather);
    font-size: 0.95rem;
}

.contact-list strong { display: block; color: var(--ink); }
.contact-list span { color: var(--muted); }

.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--leather);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font: inherit;
    color: var(--text);
    background: #fff;
    border: 2px solid var(--sand);
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(200, 55, 31, 0.15);
}

/* ---------- Footer ---------- */
footer {
    margin-top: 3rem;
    padding: 3rem 0 2.5rem;
    text-align: center;
    color: var(--sand);
    background: #120c08;
    border-top: 3px solid var(--red);
}

.footer-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 0 0 2px #120c08, 0 0 0 4px var(--saddle);
}

.footer-motto {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--parchment);
    margin-bottom: 1rem;
}

.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin: 1rem 0; }

footer a {
    color: var(--sand);
    text-decoration: none;
    border-bottom: 1px solid rgba(226, 205, 164, 0.35);
}

footer a:hover { color: var(--paper); border-bottom-color: var(--red); }

.footer-copy { font-size: 0.85rem; color: rgba(226, 205, 164, 0.6); }

/* ---------- Impressum / Rechtliches ---------- */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--sand);
}

.back-button:hover { color: var(--paper); }

.legal-section {
    margin: 1.5rem 0 2.5rem;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background:
        radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
        var(--parchment);
    outline: 2px dashed rgba(107, 63, 34, 0.35);
    outline-offset: -12px;
}

.legal-section h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    padding-bottom: 0.6rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--red);
}

.legal-section h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); margin: 2rem 0 0.75rem; }
.legal-section h3 { font-size: 1.05rem; color: var(--leather); margin: 1.4rem 0 0.5rem; }
.legal-section p, .legal-section ul { margin-bottom: 1rem; }
.legal-section { overflow-wrap: anywhere; hyphens: auto; }
.legal-section ul { padding-left: 1.4rem; }

.legal-section .contact-info {
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--red);
}

.legal-stand { margin-top: 2rem; font-style: italic; color: var(--leather); }

/* ---------- Western-Schrift fuer grosse Ueberschriften ---------- */
.hero h1,
.section h2,
.logo-text,
.footer-motto,
.legal-section h1,
.team-modal-header h2,
.gallery-title {
    font-family: var(--font-western);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.hero h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.05; }
.logo-text small { font-family: var(--font-display); font-weight: 500; }

@media (max-width: 420px) {
    /* Legs-Spalte auf schmalen Handys ausblenden, Details gibt es auf 2K */
    .team-modal-table th:nth-child(9), .team-modal-table td:nth-child(9) { display: none; }
}

/* ---------- Animation ---------- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .fade-in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nav-links > li > a { padding: 0.7rem 0.55rem; font-size: 0.8rem; }
}

@media (max-width: 1000px) {
    :root { --header-h: 68px; }

    .mobile-menu { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0 1rem;
        background: var(--ink);
        border-bottom: 3px solid var(--red);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }

    .nav-links.active { display: flex; }
    .nav-links > li > a { padding: 0.8rem 1.5rem; font-size: 0.95rem; }
    .nav-links > li > a::after { display: none; }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        margin: 0 1.5rem;
        padding: 0 0 0 0.75rem;
        background: none;
        border: 0;
        border-left: 2px solid var(--red);
        border-radius: 0;
        box-shadow: none;
    }

    .logo img { width: 46px; height: 46px; }
    .logo-text { font-size: 1.1rem; }

    .hero { padding: 3rem 0 3.5rem; text-align: center; }
    .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
    .hero-badge { grid-row: 1; width: min(220px, 60%); }
    .hero-eyebrow { letter-spacing: 0.18em; font-size: 0.75rem; }
    .hero p { margin: 0 auto; }
    .hero-divider, .hero-actions { justify-content: center; }

    .hero::before {
        background: repeating-radial-gradient(circle at 50% 22%, rgba(200, 55, 31, 0.12) 0 18px, transparent 18px 36px);
        -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 45%);
        mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 45%);
    }

    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .section {
        width: calc(100% - 16px);
        margin: 1.25rem auto;
        padding: 3rem 0 2.5rem;
        outline-offset: -8px;
    }

    .section h2::before, .section h2::after { flex-basis: 24px; }
    .cards, .teams-grid { grid-template-columns: 1fr; }
    .contact-info, .contact-form, .legal-section { padding: 1.5rem; }

    .gallery-modal-content, .team-modal-content {
        width: calc(100% - 16px);
        margin: 8px auto;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 1rem 0.85rem 1.25rem;
    }

    .gallery-close, .team-modal-close { width: 34px; height: 34px; font-size: 22px; }
    .team-modal-header { padding-right: 36px; padding-left: 36px; }
    .team-modal-links .link-button { width: 100%; }
    .legal-section h1 { font-size: 1.6rem; }
    .legal-section h2 { font-size: 1.15rem; }

    .team-modal-header h2 { font-size: 1.35rem; }
    .team-modal-tab { padding: 0.6rem 0.5rem; font-size: 0.82rem; }
    .team-modal-table { font-size: 0.78rem; }
    .team-modal-table th, .team-modal-table td { padding: 0.5rem 0.25rem; }
    .team-modal-table th { font-size: 0.66rem; letter-spacing: 0.02em; }
    .team-modal-table th:first-child, .team-modal-table td:first-child { width: 24px; }

    .match-item { flex-wrap: wrap; gap: 6px; }
    .match-round, .match-date { min-width: auto; font-size: 0.72rem; }
    .match-teams { order: 3; width: 100%; font-size: 0.85rem; }
    .match-score { min-width: auto; margin-left: auto; font-size: 0.85rem; }
}