/**
 * FPOS Ostschweiz Events Hub – Frontend Styles
 * Mobile-first, ohne externe Dependencies
 */

:root {
    --oeh-primary: #2a6fbf;
    --oeh-primary-dark: #1d5a9e;
    --oeh-accent: #f59e0b;
    --oeh-bg: #ffffff;
    --oeh-bg-alt: #f5f7fa;
    --oeh-border: #e1e5eb;
    --oeh-text: #1f2937;
    --oeh-text-muted: #6b7280;
    --oeh-radius: 10px;
    --oeh-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --oeh-shadow-hover: 0 6px 20px rgba(0,0,0,0.10);
}

/* ===== Updated Badge ===== */
.oeh-updated {
    background: var(--oeh-bg-alt);
    border-left: 4px solid var(--oeh-primary);
    padding: 8px 14px;
    margin: 14px 0 20px;
    font-size: 0.9em;
    color: var(--oeh-text-muted);
    border-radius: 4px;
}

/* ===== Filter Tabs ===== */
.oeh-filters {
    background: var(--oeh-bg-alt);
    border-radius: var(--oeh-radius);
    padding: 16px;
    margin: 24px 0;
}
.oeh-filters__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    line-height: 2.2;
}
.oeh-filters__group:last-child { margin-bottom: 0; }
.oeh-filters__group strong {
    min-width: 100px;
    color: var(--oeh-text);
    font-size: 0.92em;
}
.oeh-filters__group a {
    background: var(--oeh-bg);
    border: 1px solid var(--oeh-border);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.88em;
    color: var(--oeh-text);
    text-decoration: none;
    transition: all 0.15s;
}
.oeh-filters__group a:hover {
    background: var(--oeh-primary);
    color: #fff;
    border-color: var(--oeh-primary);
}

/* ===== Event Grid ===== */
.oeh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0 30px;
}
.oeh-grid--top { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.oeh-grid--compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ===== Event Card ===== */
.oeh-card {
    background: var(--oeh-bg);
    border: 1px solid var(--oeh-border);
    border-radius: var(--oeh-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: var(--oeh-shadow);
}
.oeh-card:hover {
    box-shadow: var(--oeh-shadow-hover);
    transform: translateY(-2px);
}
.oeh-card__img {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--oeh-bg-alt);
}
.oeh-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.oeh-card__body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.oeh-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82em;
    color: var(--oeh-text-muted);
}
.oeh-card__date { font-weight: 500; }
.oeh-card__badge {
    background: var(--oeh-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78em;
    font-weight: 600;
}
.oeh-card__badge--free { background: #16a34a; }
.oeh-card__title {
    margin: 0;
    font-size: 1.08em;
    line-height: 1.3;
}
.oeh-card__title a {
    color: var(--oeh-text);
    text-decoration: none;
}
.oeh-card__title a:hover { color: var(--oeh-primary); }
.oeh-card__location {
    font-size: 0.88em;
    color: var(--oeh-text-muted);
    margin: 0;
}
.oeh-card__excerpt {
    font-size: 0.9em;
    color: var(--oeh-text);
    margin: 4px 0 0;
    line-height: 1.45;
}
.oeh-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.oeh-tag {
    font-size: 0.74em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--oeh-bg-alt);
    color: var(--oeh-text-muted);
}
.oeh-tag--kanton { background: #e0e7ff; color: #3730a3; }
.oeh-tag--kat    { background: #fef3c7; color: #92400e; }

/* ===== Kanton- und Kategorie-Blocks ===== */
.oeh-kanton-block, .oeh-kat-block {
    scroll-margin-top: 80px;
    margin: 40px 0;
    padding-top: 10px;
    border-top: 2px solid var(--oeh-border);
}
.oeh-kanton-block h3, .oeh-kat-block h3 {
    margin: 16px 0 6px;
    color: var(--oeh-primary-dark);
}
.oeh-kanton-desc {
    color: var(--oeh-text-muted);
    margin: 0 0 14px;
}
.oeh-more {
    margin-top: 14px;
    font-weight: 500;
}
.oeh-more a {
    color: var(--oeh-primary);
    text-decoration: none;
}
.oeh-more a:hover { text-decoration: underline; }

/* ===== Saisonkalender ===== */
.oeh-saison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.oeh-saison__month {
    background: var(--oeh-bg-alt);
    border-radius: var(--oeh-radius);
    padding: 14px 16px;
    scroll-margin-top: 80px;
}
.oeh-saison__month h4 {
    margin: 0 0 10px;
    color: var(--oeh-primary-dark);
    border-bottom: 1px solid var(--oeh-border);
    padding-bottom: 6px;
}
.oeh-saison__month ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.oeh-saison__month li {
    padding: 4px 0;
    font-size: 0.92em;
    line-height: 1.4;
}
.oeh-saison__date {
    display: inline-block;
    min-width: 48px;
    color: var(--oeh-text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.oeh-saison__month a {
    color: var(--oeh-text);
    text-decoration: none;
}
.oeh-saison__month a:hover { color: var(--oeh-primary); text-decoration: underline; }
.oeh-saison__month em {
    color: var(--oeh-text-muted);
    font-size: 0.88em;
}

/* ===== FAQ ===== */
.oeh-faq {
    margin: 20px 0;
}
.oeh-faq__item {
    background: var(--oeh-bg);
    border: 1px solid var(--oeh-border);
    border-radius: var(--oeh-radius);
    margin-bottom: 10px;
    overflow: hidden;
}
.oeh-faq__item summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    background: var(--oeh-bg-alt);
    list-style: none;
    position: relative;
}
.oeh-faq__item summary::-webkit-details-marker { display: none; }
.oeh-faq__item summary::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3em;
    color: var(--oeh-primary);
}
.oeh-faq__item[open] summary::after { content: '−'; }
.oeh-faq__item summary h4 {
    display: inline;
    margin: 0;
    font-size: 1em;
}
.oeh-faq__answer {
    padding: 14px 18px 18px;
    line-height: 1.55;
}
.oeh-faq__answer p:last-child { margin-bottom: 0; }

/* ===== Empty State ===== */
.oeh-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--oeh-text-muted);
    padding: 30px 20px;
    background: var(--oeh-bg-alt);
    border-radius: var(--oeh-radius);
    margin: 0;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .oeh-filters__group strong { min-width: auto; flex-basis: 100%; }
    .oeh-grid, .oeh-grid--top, .oeh-grid--compact {
        grid-template-columns: 1fr;
    }
}

/* ===== Event Meta Box (auf Single-Event-Seiten) ===== */
.oeh-event-meta-box {
    background: linear-gradient(135deg, var(--oeh-bg-alt) 0%, #eef2f7 100%);
    border-left: 5px solid var(--oeh-primary);
    border-radius: var(--oeh-radius);
    padding: 22px 26px;
    margin: 24px 0 28px;
    box-shadow: var(--oeh-shadow);
}
.oeh-event-meta-box__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px 32px;
}
.oeh-event-meta-box__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.oeh-event-meta-box__label {
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--oeh-text-muted);
    font-weight: 600;
}
.oeh-event-meta-box__value {
    font-size: 1em;
    color: var(--oeh-text);
    line-height: 1.4;
}
.oeh-event-meta-box__value time { font-weight: 600; color: var(--oeh-primary-dark); }
.oeh-event-meta-box__free { color: #16a34a; }
.oeh-event-meta-box__cta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.oeh-event-meta-box__btn {
    display: inline-block;
    background: var(--oeh-primary);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}
.oeh-event-meta-box__btn:hover { background: var(--oeh-primary-dark); }

/* ===== Event Hero Image ===== */
.oeh-event-hero {
    margin: 0 0 24px;
    border-radius: var(--oeh-radius);
    overflow: hidden;
}
.oeh-event-hero__img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Related Events ===== */
.oeh-related {
    margin: 50px 0 20px;
    padding-top: 30px;
    border-top: 2px solid var(--oeh-border);
}
.oeh-related h2 {
    margin: 0 0 18px;
    color: var(--oeh-primary-dark);
}
