/* ============================================================
   Urlaub im Brombachtal — Hauptstylesheet
   Mobile-First, CSS Custom Properties, keine Framework-Abhängigkeit.
   CI aus urlaub-im-brombachtal.de (odd-Theme) übernommen.
   ============================================================ */

:root {
    --c-primary:      #97be0d;   /* Odenwald-Grün — Primär */
    --c-primary-dark: #7a9a0a;
    --c-secondary:    #f39200;   /* Herbst-Orange — Sekundär */
    --c-accent-blue:  #5B99B3;   /* Himmel-Blau — h3/h4 */
    --c-accent-red:   #cd0f25;   /* Signal-Rot — Hervorhebung */

    --c-text:         #393939;
    --c-text-muted:   #666;
    --c-bg:           #ffffff;
    --c-bg-alt:       #f6f7f1;   /* leicht grünlich-warm */
    --c-border:       #e2e2d8;

    --radius:         8px;
    --shadow:         0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg:      0 8px 24px rgba(0,0,0,0.14);

    --ff-heading:     "Bad Script", "Caveat", cursive;
    --ff-body:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

    --max-width:      1140px;
}

/* ============================================================
   RESET / BASIS
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--ff-body);
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.0625rem);
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-primary-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--c-secondary); }

h1, h2, h3, h4 {
    font-family: var(--ff-heading);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 1rem;
}
h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.5rem); color: var(--c-primary); }
h2 { font-size: clamp(1.5rem, 3.5vw + 0.5rem, 2.5rem); color: var(--c-primary); }
h3 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem); color: var(--c-accent-blue); }
h4 { font-size: 1.2rem; color: var(--c-accent-red); }

p { margin: 0 0 1rem; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */

.site-header {
    background: var(--c-bg);
    border-bottom: 2px solid var(--c-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 1rem;
}

.site-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.site-logo img { height: 48px; width: auto; }
.site-logo__text {
    font-family: var(--ff-heading);
    font-size: 1.4rem;
    color: var(--c-primary);
    line-height: 1.1;
    display: none;
}

/* Hamburger-Toggle (Mobile) */
.nav-toggle {
    background: none;
    border: 0;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    justify-content: center;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--c-text);
    transition: transform 0.2s;
}

.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
}
.site-nav.is-open { display: block; }

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;
}
.site-nav li { }
.site-nav a {
    display: block;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    font-weight: 500;
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover,
.site-nav a.is-active {
    color: var(--c-primary);
}

@media (min-width: 768px) {
    .site-logo__text { display: block; }
    .nav-toggle { display: none; }
    .site-nav {
        display: block;
        position: static;
        border: 0;
        box-shadow: none;
    }
    .site-nav ul {
        display: flex;
        gap: 0.5rem;
        padding: 0;
    }
    .site-nav a {
        border-bottom: 0;
        padding: 0.5rem 0.9rem;
        border-radius: var(--radius);
    }
    .site-nav a:hover,
    .site-nav a.is-active {
        background: var(--c-bg-alt);
    }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--c-bg-alt);
}
.hero__image {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
}
.hero__content {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 3rem 1rem;
    text-align: center;
    width: 100%;
}
.hero__content h1 {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero__lead {
    font-size: clamp(1.1rem, 2vw + 0.5rem, 1.35rem);
    max-width: 640px;
    margin: 0 auto 1.5rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
    .hero { min-height: 65vh; }
}

/* ============================================================
   SECTION
   ============================================================ */

.section {
    padding: 2.5rem 0;
}
@media (min-width: 768px) {
    .section { padding: 4rem 0; }
}
.section--alt { background: var(--c-bg-alt); }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
}
.section-head__eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.section-head__title {
    margin: 0 0 0.75rem;
}
.section-head__lead {
    color: var(--c-text-muted);
    font-size: 1.1rem;
}

/* ============================================================
   LISTE: Firmen / Sights
   ============================================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Startseiten-Teaser: feste 2×2-Komposition statt auto-fit.
   Variante 4er-Reihe: `.teaser-grid` ab lg auf `repeat(4, 1fr)` setzen. */
.teaser-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 576px) {
    .teaser-grid { grid-template-columns: repeat(2, 1fr); }
}

.card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.card__image {
    aspect-ratio: 16 / 10;
    background: var(--c-bg-alt);
    overflow: hidden;
}
.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-muted);
    font-size: 0.85rem;
    font-family: var(--ff-heading);
}
.card__image--logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #fdfdfa;
    border-bottom: 1px solid var(--c-border);
}
.card__image--logo img {
    width: auto;
    max-width: 70%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}
.card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.card__title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--c-primary);
    font-family: var(--ff-heading);
    line-height: 1.2;
}
.card__meta {
    font-size: 0.85rem;
    color: var(--c-text-muted);
}
.card__desc {
    margin: 0.25rem 0;
    color: var(--c-text);
    font-size: 0.95rem;
}
.card__footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--c-border);
    font-size: 0.9rem;
}
.card__footer a { color: var(--c-primary-dark); text-decoration: none; }
.card__footer a:hover { text-decoration: underline; }

.card__credit {
    display: block;
    font-size: 0.7rem;
    color: var(--c-text-muted);
    padding: 0.4rem 1.25rem 0;
    font-style: italic;
}

.card__badge {
    display: inline-block;
    background: var(--c-secondary);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.3rem;
    vertical-align: middle;
}

/* ============================================================
   EVENT-GRID (Startseiten-Teaser, 2-spaltig)
   ============================================================ */

.event-source-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--c-text-muted);
    margin: -0.5rem auto 1.5rem;
    max-width: 640px;
    padding: 0.5rem 1rem;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
}
.event-source-hint span { color: var(--c-primary); font-weight: 600; margin-right: 0.3rem; }

.event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .event-grid { grid-template-columns: repeat(2, 1fr); }
}

.event-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
@media (min-width: 576px) {
    .event-card { grid-template-columns: 160px 1fr; }
}
.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--c-primary);
    color: inherit;
}

.event-card__image {
    aspect-ratio: 1 / 1;
    background: var(--c-bg-alt);
    overflow: hidden;
}
.event-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Veranstalter-Logo als Fallback (Event ohne eigenes Bild, aber Firma hat Logo):
   contain + Weißraum, damit das Logo nicht abgeschnitten wird. */
.event-card__image--logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: #fdfdfa;
}
.event-card__image--logo img {
    width: auto;
    height: auto;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

/* Datum-Platzhalter als letzter Fallback (weder Bild noch Logo vorhanden). */
.event-card__image--date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: var(--c-primary);
    background: linear-gradient(135deg, var(--c-bg-alt) 0%, #eef1e3 100%);
}
.event-card__image--date span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--c-secondary);
}
.event-card__image--date strong {
    font-family: var(--ff-heading);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1;
}

.event-card__body {
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    justify-content: center;
}
.event-card__title {
    font-family: var(--ff-body);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--c-text);
    line-height: 1.3;
    margin: 0 0 0.15rem;
}
.event-card:hover .event-card__title { color: var(--c-primary); }

.event-card__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--c-text-muted);
}
.event-card__ico {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--c-text-muted);
}
.event-card__kat {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    font-weight: 600;
    margin-top: 0.3rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #2a2a2a;
    color: #d4d4d4;
    padding: 2rem 1rem 1.5rem;
    margin-top: 3rem;
}
.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.site-footer p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover { color: var(--c-primary); }
.site-footer__bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

/* ============================================================
   UMFRAGE
   ============================================================ */

.umfrage {
    max-width: 720px;
    margin: 0 auto;
}
.umfrage-fortschritt {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}
.umfrage-fortschritt__step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg-alt);
    border: 2px solid var(--c-border);
    color: var(--c-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}
.umfrage-fortschritt__step.is-active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}
.umfrage-fortschritt__step.is-done {
    background: var(--c-bg);
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.frage {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.frage__label {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--c-text);
}
.frage__label .req { color: var(--c-accent-red); }

.optionen {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.optionen label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.optionen label:hover { border-color: var(--c-primary); background: var(--c-bg-alt); }
.optionen input[type="radio"]:checked + span,
.optionen input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--c-primary);
}
.optionen input {
    accent-color: var(--c-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.frage input[type="text"],
.frage textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}
.frage input[type="text"]:focus,
.frage textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(151, 190, 13, 0.18);
}
.frage textarea { min-height: 140px; resize: vertical; }

.umfrage-aktion {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost {
    background: transparent;
    color: var(--c-primary);
    border: 1.5px solid var(--c-primary);
}
.btn--ghost:hover { background: var(--c-primary); color: #fff; }

/* DSGVO-Checkbox */
.form-dsgvo {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--c-text-muted);
}
.form-dsgvo input { margin-top: 0.25rem; }

/* Honeypot: unsichtbar für Menschen, Bots füllen trotzdem */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   MELDUNGEN
   ============================================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}
.alert--info    { background: #eef4f6; border-color: var(--c-accent-blue); }
.alert--warn    { background: #fff5e6; border-color: var(--c-secondary); }
.alert--error   { background: #fce9eb; border-color: var(--c-accent-red); }
.alert--success { background: #f0f5e2; border-color: var(--c-primary); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
