:root {
    --freistil-blue:  var(--ast-global-color-0, #2719b7);
    --freistil-white: #ffffff;
    --freistil-dark:  color-mix(in srgb, var(--freistil-blue) 80%, black);
    --freistil-border: 2px solid var(--freistil-blue);
}

/* ---------------------------------------------------------------
   TERMINLISTE
--------------------------------------------------------------- */
.freistil-liste {
    border-top: var(--freistil-border);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.freistil-row {
    background: var(--freistil-white);
    border-bottom: var(--freistil-border);
    transition: background 0.15s, color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
}

.freistil-row__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--freistil-blue);
    gap: 24px;
    width: 100%;
}

.freistil-row:hover {
    background: var(--freistil-blue);
}

.freistil-row:hover .freistil-row__inner {
    color: var(--freistil-white);
}

.freistil-row--blue {
    background: var(--freistil-blue);
}

.freistil-row--blue .freistil-row__inner {
    color: var(--freistil-white);
}

.freistil-row--blue:hover {
    background: var(--freistil-dark);
}

.freistil-row__date {
    font-family: monospace, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Kategorien: erscheinen erst beim Hover bzw. bei Tastatur-Fokus.
   Der Platz bleibt immer reserviert, damit die Zeile nicht springt.
   Mehrere Kategorien stehen als eigene Badges nebeneinander. */
.freistil-row__kats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.freistil-row__kat {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 3px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.freistil-row:hover .freistil-row__kats,
.freistil-row__inner:focus-visible .freistil-row__kats {
    opacity: 1;
}

/* Ohne Hover (Touch) dauerhaft sichtbar, sonst wäre die Info dort nie erreichbar. */
@media (hover: none) {
    .freistil-row__kats {
        opacity: 1;
    }
}

.freistil-row__title {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: right;
    flex: 1;
}

.freistil-row__title small {
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    margin-left: 12px;
    opacity: 0.85;
}

/* Auf dem Handy passen Datum und Titel nicht nebeneinander – das Datum
   allein braucht mit "05.09.2026 / 15:00 H" schon über 200px. Deshalb
   untereinander, alles linksbündig. */
@media (max-width: 767px) {
    .freistil-row {
        padding: 18px 20px;
    }

    .freistil-row__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .freistil-row__date {
        font-size: 0.95rem;
        /* darf umbrechen statt die Zeile aufzuspannen */
        white-space: normal;
    }

    .freistil-row__kats {
        justify-content: flex-start;
        width: 100%;
    }

    .freistil-row__title {
        font-size: 1.1rem;
        letter-spacing: 0.06em;
        text-align: left;
        /* in der Spalte würde flex: 1 den Titel vertikal strecken */
        flex: 0 1 auto;
        width: 100%;
    }

    /* Das Genre steht eine Zeile unter dem Titel statt dahinter. */
    .freistil-row__title small {
        display: block;
        margin-left: 0;
        margin-top: 6px;
    }
}

/* ---------------------------------------------------------------
   PROGRAMM – FILTERLEISTE
--------------------------------------------------------------- */
.freistil-programm {
    width: 100%;
}

.freistil-filter-bar {
    margin-bottom: 32px;
}

.freistil-filter-tabs {
    display: flex;
    gap: 0;

}

.freistil-filter-tab-wrap {
    position: relative;
}

.freistil-filter-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--freistil-blue);
    cursor: pointer;
    margin-bottom: -2px;
    transition: border-color 0.15s;
}

.freistil-filter-tab.active,
.freistil-filter-tab:hover {
    border-bottom-color: var(--freistil-blue);
}

.freistil-tab-arrow {
    font-size: 0.7rem;
    margin-left: 4px;
}

.freistil-filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--freistil-white);
    border: var(--freistil-border);
    border-top: none;
    z-index: 100;
    min-width: 200px;
    flex-direction: column;
}

.freistil-filter-dropdown.is-open {
    display: flex;
}

.freistil-dropdown-item {
    background: none;
    border: none;
    border-bottom: 1px solid rgba(45, 0, 247, 0.15);
    padding: 10px 16px;
    text-align: left;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--freistil-blue);
    cursor: pointer;
}

.freistil-dropdown-item:last-child {
    border-bottom: none;
}

.freistil-dropdown-item:hover,
.freistil-dropdown-item.active {
    background: var(--freistil-blue);
    color: var(--freistil-white);
}

/* ---------------------------------------------------------------
   PROGRAMM – KARTEN-GRID
--------------------------------------------------------------- */
.freistil-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1023px) {
    .freistil-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 599px) {
    .freistil-grid { grid-template-columns: 1fr; }
}

.freistil-card {
    display: flex;
    flex-direction: column;
    background: var(--freistil-white);
    overflow: hidden;
    border: var(--freistil-border);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.freistil-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.freistil-card__header {
    background: var(--freistil-blue);
    color: var(--freistil-white);
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 250px;
    hyphens: auto;
}

.freistil-card__meta {
    font-family: monospace, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    opacity: 0.9;
}

.freistil-card__img {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.freistil-card__img-tag {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.freistil-card__img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 160px;
    background: color-mix(in srgb, var(--freistil-blue) 15%, white);
}

.freistil-card__img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
}

.freistil-card__overlay-langs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.freistil-card__img-overlay .freistil-lang-badge {
    background: var(--freistil-white);
    color: var(--freistil-blue);
}

.freistil-card__img-badge {
    background: var(--freistil-white);
    color: var(--freistil-blue);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.freistil-card__title {
    font-family: monospace, monospace;
    font-size: clamp(1.25rem, 2.5vw, 1.7rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 4px 0 0 0;
    color: var(--freistil-white);
    line-height: 1.2;
}

.freistil-card__performers {
    font-family: monospace, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--freistil-white);
    margin: 0;
    opacity: 0.85;
}

/* ---------------------------------------------------------------
   BADGES & TAGS
--------------------------------------------------------------- */
.freistil-lang-badge {
    background: var(--freistil-blue);
    color: var(--freistil-white);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* "Ohne Sprache" passt nicht in den runden Kreis */
.freistil-lang-badge--wide {
    width: auto;
    height: auto;
    min-height: 26px;
    border-radius: 13px;
    padding: 4px 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.freistil-extra-tag {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--freistil-blue);
    border: 1px solid var(--freistil-blue);
    padding: 2px 6px;
    display: inline-block;
}

/* ---------------------------------------------------------------
   BUTTON
--------------------------------------------------------------- */
.freistil-btn {
    background: var(--freistil-blue);
    color: var(--freistil-white);
    border: var(--freistil-border);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.freistil-btn:hover {
    background: var(--freistil-dark);
    color: var(--freistil-white);
}

.freistil-btn--outline {
    background: transparent;
    color: var(--freistil-blue);
}

.freistil-btn--outline:hover {
    background: var(--freistil-blue);
    color: var(--freistil-white);
}

.freistil-no-results {
    text-align: center;
    padding: 40px;
    color: var(--freistil-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.freistil-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.freistil-pagination-btn {
    background: var(--freistil-white);
    color: var(--freistil-blue);
    border: var(--freistil-border);
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    min-width: 40px;
    text-align: center;
}

.freistil-pagination-btn:hover {
    background: var(--freistil-blue);
    color: var(--freistil-white);
}

.freistil-pagination-btn.active {
    background: var(--freistil-blue);
    color: var(--freistil-white);
}

/* ---------------------------------------------------------------
   DETAILSEITE
--------------------------------------------------------------- */
.freistil-detail {
    margin-bottom: 60px;
}

/* ── Titel ── */
.freistil-detail__title {
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--freistil-blue);
    margin: 0 0 12px 0;
    line-height: 1.05;
}

/* ── Meta-Zeile (Chips + Badges) ── */
.freistil-detail__meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 0;
}

.freistil-detail__meta-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.freistil-detail__chip {
   
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    white-space: nowrap;
}

/* Abwechselnd weiß und blau */
.freistil-detail__chip:nth-child(odd) {
    color: var(--freistil-blue);
    background: var(--freistil-white);
    border: 2px solid var(--freistil-blue);
}

.freistil-detail__chip:nth-child(even) {
    color: var(--freistil-white);
    background: var(--freistil-blue);
    border: 2px solid var(--freistil-blue);
}

/* Nur das Datum (erste Chip) mit Wellenrand statt gestrickeltem Rahmen */
.freistil-detail__chip:first-child {
    background-image: url('Wellenrand_2px.svg');
    background-repeat: no-repeat;
    background-position: bottom center -5px;
    background-size: contain;
    border: none !important;
    padding-bottom: 20px;
    position: relative;
    top: 8px;
}

/* Sprach-Badges rund */
.freistil-detail__chip--lang {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* "Ohne Sprache" passt nicht in den runden Chip */
.freistil-detail__chip--lang-wide {
    width: auto;
    height: auto;
    min-height: 32px;
    border-radius: 16px;
    padding: 4px 14px;
}

.freistil-detail__meta-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.freistil-detail__art-badge {
    background: var(--freistil-blue);
    color: var(--freistil-white);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 9px;
    text-transform: uppercase;
}

.freistil-lang-badge--lg {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
}

.freistil-detail__performers {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--freistil-blue);
    opacity: 0.7;
    margin: 0 0 32px 0;
}

/* ── Body: Bild + Info darunter ── */
.freistil-detail__body {
    display: block;
}

/* ── Bild-Spalte (volle Breite) ── */
.freistil-detail__img-col {
    margin-bottom: 32px;
}

.freistil-detail__img-col img,
.freistil-detail__img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
}

.freistil-detail__img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: color-mix(in srgb, var(--freistil-blue) 12%, white);
}

/* Buchungs-Button direkt unter dem Bild */
.freistil-detail__img-actions {
    margin-top: 12px;
}

/* Copyright rechts unter Bild */
.freistil-detail__foto-copyright {
    font-size: 0.7rem;
    color: #aaa;
    letter-spacing: 0.03em;
    margin: 4px 0 0 0;
    line-height: 1.4;
    text-align: right;
}

/* ── Info-Spalte ── */
.freistil-detail__price {
    display: inline-block;
    background: var(--freistil-blue);
    color: var(--freistil-white);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    margin: 0 0 20px 0;
}

.freistil-detail__info-list {
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border: var(--freistil-border);
}

.freistil-detail__meta-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.freistil-detail__meta-row:last-child {
    border-bottom: none;
}

.freistil-detail__meta-row dt {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--freistil-blue);
    white-space: nowrap;
    min-width: 110px;
    flex-shrink: 0;
}

.freistil-detail__meta-row dd {
    font-size: 0.86rem;
    color: #333;
    margin: 0;
}

.freistil-detail__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.freistil-detail__description {
    font-size: 0.94rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 28px;
}

.freistil-detail__description p:first-child { margin-top: 0; }

.freistil-detail__actions {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.freistil-detail__back {
    margin-top: 28px;
}

/* ---------------------------------------------------------------
   KALENDER
--------------------------------------------------------------- */
.freistil-kalender {
    width: 100%;
}

.freistil-kal-month {
    margin-bottom: 48px;
}

.freistil-kal-header {
    background: var(--freistil-blue);
    color: var(--freistil-white);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 20px;
}

.freistil-kal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: var(--freistil-border);
    border-top: var(--freistil-border);
}

.freistil-kal-dayname {
    background: color-mix(in srgb, var(--freistil-blue) 20%, white);
    color: var(--freistil-blue);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    padding: 8px 4px;
    border-right: var(--freistil-border);
    border-bottom: var(--freistil-border);
}

.freistil-kal-day {
    border-right: var(--freistil-border);
    border-bottom: var(--freistil-border);
    padding: 6px 8px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--freistil-white);
}

.freistil-kal-day--empty {
    background: color-mix(in srgb, var(--freistil-blue) 4%, white);
}

.freistil-kal-daynumber {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--freistil-blue);
    opacity: 0.3;
    text-align: right;
    display: block;
    line-height: 1;
}

.freistil-kal-day--has-events .freistil-kal-daynumber {
    opacity: 1;
}

.freistil-kal-event {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--freistil-blue);
    color: var(--freistil-white);
    text-decoration: none;
    padding: 4px 6px;
    transition: background 0.15s;
}

.freistil-kal-event:hover {
    background: var(--freistil-dark);
    color: var(--freistil-white);
}

.freistil-kal-time {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    opacity: 0.85;
    display: block;
}

.freistil-kal-title {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-transform: uppercase;
    display: block;
}

@media (max-width: 767px) {
    .freistil-kal-day {
        min-height: 70px;
        padding: 4px 5px;
    }
    .freistil-kal-event {
        padding: 3px 4px;
    }
    .freistil-kal-title { font-size: 0.55rem; }
    .freistil-kal-time  { font-size: 0.52rem; }
}

@media (max-width: 479px) {
    .freistil-kal-dayname { font-size: 0.55rem; padding: 6px 2px; }
    .freistil-kal-day { min-height: 56px; padding: 3px; gap: 2px; }
    .freistil-kal-daynumber { font-size: 0.62rem; }
    .freistil-kal-title { display: none; }
    .freistil-kal-time  { font-size: 0.5rem; }
    .freistil-kal-event { padding: 2px 3px; }
}
