/* ==========================================================================
   Herbstfest SV Todtnau – Stylesheet
   Herbstliches Farbschema (Laub, Orange, Braun, Grün)
   ========================================================================== */

:root {
    --color-bg: #fff7ef;
    --color-surface: #ffffff;
    --color-primary: #c65102;
    /* kräftiges Herbst-Orange */
    --color-primary-dark: #8f3a00;
    --color-secondary: #7a8b2e;
    /* laubgrün */
    --color-accent: #e8a020;
    /* goldgelb */
    --color-text: #33251a;
    --color-text-muted: #6d5a48;
    --color-border: #ecdcc9;
    --shadow-sm: 0 2px 8px rgba(101, 61, 20, 0.08);
    --shadow-md: 0 8px 24px rgba(101, 61, 20, 0.12);
    --radius: 14px;
    --max-width: 1080px;
    --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 0.5em;
}

a {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 247, 239, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--color-border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-primary-dark);
    text-decoration: none;
    white-space: nowrap;
}

.nav__logo {
    height: 40px;
    width: auto;
    display: block;
}

.nav__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    padding: 0.25rem 0.1rem;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.nav__links a:hover,
.nav__links a:focus {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}

.btn:hover,
.btn:focus {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 2px solid #fff;
}

.btn--ghost:hover,
.btn--ghost:focus {
    background: #fff;
    color: var(--color-primary-dark);
}

/* Pulsierende Animation, um Aufmerksamkeit auf den Button zu lenken */
.btn--pulse {
    animation: ctaPulse 2.4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 5rem 1.25rem 4.5rem;
    /* BILD: site/assets/svt_kandermatt_herbst.png
       Dunkles Overlay sorgt für lesbaren Text; Farbverlauf dient als Fallback. */
    background:
        linear-gradient(180deg, rgba(45, 20, 5, 0.30) 0%, rgba(45, 20, 5, 0.45) 100%),
        url("../assets/svt_kandermatt_herbst.png") center / cover no-repeat,
        linear-gradient(135deg, #c65102 0%, #8f3a00 55%, #5c3a12 100%);
    background-position: center;
    overflow: hidden;
}

.hero::after {
    content: "🍂🍁🍂🍁";
    position: absolute;
    inset: 0;
    font-size: 3rem;
    opacity: 0.12;
    letter-spacing: 2rem;
    line-height: 4rem;
    word-break: break-word;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.hero__logo {
    display: block;
    width: 140px;
    height: auto;
    margin: 0 auto 1.25rem;
    background: #fff;
    border-radius: 50%;
    padding: 0.6rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.hero__anniversary {
    margin: -0.6rem 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin-bottom: 0.4rem;
}

.hero__title {
    white-space: nowrap;
}

.hero__club {
    display: none;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffe9cf;
    margin: 0 0 0.5rem;
}

@media (max-width: 760px) {
    .hero__title-suffix {
        display: none;
    }

    .hero__club {
        display: block;
    }
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.hero__location {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 1.75rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    padding: 4rem 0;
}

.section--alt {
    background: #fdeede;
}

.section__title {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: var(--color-primary-dark);
    margin-bottom: 0.4rem;
}

.section__lead {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

/* --------------------------------------------------------------------------
   Programm-Timeline
   -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: linear-gradient(var(--color-accent), var(--color-secondary));
    border-radius: 3px;
}

.timeline__item {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.1rem;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 1.4rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-bg);
}

/* Start-/End-Meilensteine */
.timeline__milestone {
    background: linear-gradient(120deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 1.05rem 1.4rem;
}

.timeline__milestone--end {
    background: linear-gradient(120deg, var(--color-secondary), #566321);
}

.timeline__milestone::before {
    width: 22px;
    height: 22px;
    top: 50%;
    left: -1.78rem;
    transform: translateY(-50%);
    background: var(--color-primary-dark);
    border: 4px solid var(--color-bg);
}

.timeline__milestone--end::before {
    background: #566321;
}

.timeline__milestone-time {
    font-weight: 800;
    font-size: clamp(1.15rem, 3.2vw, 1.6rem);
    letter-spacing: 0.01em;
}

.tl-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent);
    transition: color 0.15s, border-color 0.15s;
}

.tl-link:hover,
.tl-link:focus {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tl-badge-link {
    float: right;
    display: block;
    margin: 0 0 0.5rem 1rem;
    border-radius: 50%;
    transition: transform 0.15s;
}

.tl-badge-link:hover,
.tl-badge-link:focus {
    transform: scale(1.05);
}

.tl-badge {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.timeline__time {
    display: inline-block;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 0.15rem;
}

.timeline__title {
    font-size: 1.15rem;
    margin: 0 0 0.35rem;
}

.timeline__item ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Karten (Essen & Getränke, Regeln)
   -------------------------------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.card__icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.card h3 {
    color: var(--color-primary-dark);
    margin-bottom: 0.6rem;
}

.card ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text-muted);
}

.card li {
    margin-bottom: 0.3rem;
}

.card--highlight {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(232, 160, 32, 0.25), var(--shadow-sm);
}

.tag-highlight {
    display: inline-block;
    background: var(--color-accent);
    color: #402a00;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Bilder-Karussell (Essen & Getränke)
   -------------------------------------------------------------------------- */
.carousel {
    position: relative;
    max-width: 900px;
    margin: 2.5rem auto 0;
}

.carousel__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.25rem 0.25rem 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
}

.carousel__track::-webkit-scrollbar {
    height: 8px;
}

.carousel__track::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 8px;
}

.carousel__slide {
    position: relative;
    flex: 0 0 auto;
    width: clamp(220px, 72vw, 300px);
    aspect-ratio: 4 / 3;
    margin: 0;
    scroll-snap-align: center;
}

.carousel__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.6rem 0.9rem 0.7rem;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(transparent, rgba(51, 37, 26, 0.82));
}

.carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 3;
    transition: background 0.15s, transform 0.12s;
}

.carousel__nav:hover,
.carousel__nav:focus {
    background: var(--color-primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.carousel__nav--prev {
    left: -10px;
}

.carousel__nav--next {
    right: -10px;
}

/* Bild-Platzhalter – Fallback, wenn die Bilddatei fehlt */
.ph {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: var(--shadow-sm);
}

.ph img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ph--fallback::after {
    content: "🖼 " attr(data-label);
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
    .carousel__nav {
        display: none;
        /* auf dem Smartphone bequem per Wischen bedienbar */
    }
}

/* --------------------------------------------------------------------------
   Foot-Pong-Teaser
   -------------------------------------------------------------------------- */
.teaser {
    text-align: center;
    background: linear-gradient(135deg, #c65102 0%, #8f3a00 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    max-width: 820px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.teaser h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.teaser p {
    max-width: 560px;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
}

.teaser__note {
    display: inline-block;
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.teaser .btn {
    background: #fff;
    color: var(--color-primary-dark);
}

.teaser .btn:hover,
.teaser .btn:focus {
    background: var(--color-accent);
    color: #402a00;
}

/* Einladende Anmeldungs-Box */
.teaser--cta {
    position: relative;
    overflow: hidden;
}

.teaser--cta::before {
    content: "🏆";
    position: absolute;
    right: -1.5rem;
    bottom: -3.5rem;
    font-size: 13rem;
    line-height: 1;
    opacity: 0.1;
    pointer-events: none;
    transform: rotate(-8deg);
}

.teaser--cta>* {
    position: relative;
    z-index: 1;
}

.teaser__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    padding: 0.32rem 0.95rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.teaser__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.teaser .btn--cta {
    background: var(--color-accent);
    color: #402a00;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 1rem 1.9rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    animation: ctaPulse 2.4s ease-in-out infinite;
}

.teaser .btn--cta:hover,
.teaser .btn--cta:focus {
    background: #fff;
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.teaser .btn--ghost-light {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.teaser .btn--ghost-light:hover,
.teaser .btn--ghost-light:focus {
    background: #fff;
    color: var(--color-primary-dark);
}

@keyframes ctaPulse {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    }

    50% {
        transform: translateY(-3px);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
    }
}

@media (prefers-reduced-motion: reduce) {
    .teaser .btn--cta {
        animation: none;
    }

    .btn--pulse {
        animation: none;
    }
}

.facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.facts li {
    font-weight: 600;
}

.facts strong {
    display: block;
    font-size: 1.6rem;
}

/* Fakten auf dem Smartphone kompakt – bei mehreren Fakten zweispaltig */
@media (max-width: 560px) {
    .facts {
        flex-wrap: wrap;
        gap: 0.75rem 0.5rem;
        margin-bottom: 1.5rem;
    }

    .facts li {
        flex: 1 1 40%;
        text-align: center;
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .facts strong {
        font-size: 1.2rem;
        white-space: nowrap;
    }
}

/* --------------------------------------------------------------------------
   Regel-Seite
   -------------------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, #7a8b2e 0%, #566321 100%);
    color: #fff;
    text-align: center;
    padding: 3.5rem 1.25rem;
}

.page-hero__badge {
    display: block;
    width: 340px;
    max-width: 82%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
}

.rules {
    max-width: 820px;
    margin: 0 auto;
}

.rule-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.rule-block h2 {
    color: var(--color-primary-dark);
    margin-bottom: 0.75rem;
}

.rule-block h3 {
    color: var(--color-secondary);
    font-size: 1.05rem;
    margin: 1.1rem 0 0.4rem;
}

.rule-block ul {
    margin: 0;
    padding-left: 1.25rem;
}

.rule-block ul ul {
    margin: 0.4rem 0;
    padding-left: 1.2rem;
    list-style: circle;
}

.rule-block ol {
    margin: 0 0 0.5rem;
    padding-left: 1.4rem;
}

.rule-block li {
    margin-bottom: 0.5rem;
}

.callout {
    background: rgba(232, 160, 32, 0.15);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: #33251a;
    color: #f3e7d8;
    text-align: center;
    padding: 2.5rem 1.25rem;
}

.footer__logo {
    width: 90px;
    height: auto;
    margin: 0 auto 1rem;
    background: #fff;
    border-radius: 50%;
    padding: 0.4rem;
}

.site-footer a {
    color: var(--color-accent);
}

.site-footer p {
    margin: 0.25rem 0;
}

/* "Sportanlage Kandermatt" soll nie mitten im Namen umbrechen */
.footer__place {
    white-space: nowrap;
}

.br-mobile {
    display: none;
}

/* Auf Smartphones "Sportanlage Kandermatt" in eine eigene Zeile rücken */
@media (max-width: 768px) {
    .br-mobile {
        display: inline;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablets und kleiner */
@media (max-width: 900px) {
    .section {
        padding: 3.5rem 0;
    }

    .hero {
        padding: 4rem 1.25rem 3.5rem;
    }
}

/* Große Smartphones / kleine Tablets */
@media (max-width: 640px) {
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 0.5rem 1rem;
    }

    .nav__brand {
        font-size: 0.95rem;
    }

    .nav__logo {
        height: 34px;
    }

    .nav__links {
        justify-content: center;
        width: 100%;
        gap: 0.25rem 0.9rem;
    }

    .section {
        padding: 3rem 0;
    }

    .hero {
        padding: 3.5rem 1.25rem 3rem;
    }

    .hero::after {
        letter-spacing: 1rem;
        font-size: 2.2rem;
    }

    .hero__logo {
        width: 120px;
    }

    .timeline {
        padding-left: 1.25rem;
    }

    .timeline__item {
        padding: 1rem;
    }

    .teaser {
        padding: 2.25rem 1.1rem;
    }

    .rule-block {
        padding: 1.25rem 1.1rem;
    }
}

/* Kleine Smartphones */
@media (max-width: 400px) {
    .container {
        padding: 0 1rem;
    }

    .nav__brand span {
        display: none;
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .facts {
        gap: 0.75rem 1.25rem;
    }
}

/* Ruhige Darstellung bei reduzierter Bewegung */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.001ms !important;
    }
}