/* ÖVKT Termine – Shortcode [oevkt_termine], Kacheln nach ÖVKT-Styleguide */

.oevkt-ev {
    --ev-teal: #009f96;
    --ev-teal-dark: #00857d;
    --ev-teal-pale: #e6f5f4;
    --ev-red: #ee242b;
    --ev-red-dark: #c81c22;
    --ev-line: #c6d0d6;
    --ev-text: #3a4550;
    font-family: 'Lexend', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 300;
    color: var(--ev-text);
    margin: 0 0 24px;
}
.oevkt-ev *, .oevkt-ev *::before, .oevkt-ev *::after { box-sizing: border-box; }

/* ── Filter-Buttons ───────────────────────────────────────────────────────── */
.oevkt-ev-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.oevkt-ev .oevkt-ev-fbtn {
    appearance: none;
    margin: 0;
    padding: 8px 20px;
    border: 1px solid var(--ev-teal);
    border-radius: 0;
    background: #fff;
    color: var(--ev-teal);
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: none;
    transition: background .15s, color .15s;
}
.oevkt-ev .oevkt-ev-fbtn:hover { background: var(--ev-teal-pale); color: var(--ev-teal); }
.oevkt-ev .oevkt-ev-fbtn.active { background: var(--ev-teal); color: #fff; font-weight: 500; }

/* ── Kachel-Raster ────────────────────────────────────────────────────────── */
.oevkt-ev-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}
/* Variante "reihe": eine Zeile, seitlich wischbar */
.oevkt-ev--row .oevkt-ev-tiles {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.oevkt-ev--row .oevkt-ev-tile { flex: 0 0 240px; scroll-snap-align: start; }

.oevkt-ev .oevkt-ev-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 290px;
    padding: 26px 20px 22px;
    background: var(--ev-teal);
    border: 1px solid var(--ev-teal);
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: background .15s, transform .15s;
}
.oevkt-ev .oevkt-ev-tile:not(.oevkt-ev-tile--empty):hover { background: var(--ev-teal-dark); color: #fff; transform: translateY(-3px); }
/* Ganze Kachel klickbar (Link auf dem Titel, über die Kachel gestreckt) */
.oevkt-ev .oevkt-ev-link { color: inherit; text-decoration: none; }
.oevkt-ev .oevkt-ev-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.oevkt-ev .oevkt-ev-link:focus-visible { outline: none; }
.oevkt-ev .oevkt-ev-link:focus-visible::after { outline: 2px solid #fff; outline-offset: -5px; }
.oevkt-ev .oevkt-ev-tile[hidden] { display: none !important; }

.oevkt-ev-date { font-size: 26px; font-weight: 300; line-height: 1.15; }
.oevkt-ev-time { font-size: 13px; font-weight: 300; margin-top: 4px; }
.oevkt-ev-rule { display: block; width: 100%; height: 1px; margin: 12px 0 14px; background: currentColor; opacity: .6; }
.oevkt-ev-title {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.12;
    text-transform: uppercase;
    hyphens: auto;
    overflow-wrap: anywhere;
    margin-bottom: 14px;
}
.oevkt-ev-meta { font-size: 13px; margin-top: 2px; opacity: .9; }
.oevkt-ev-cat  { font-size: 12px; font-weight: 400; margin-top: 6px; opacity: .85; }
.oevkt-ev-cat,
.oevkt-ev-meta:nth-last-child(2) { margin-bottom: 16px; }

/* Buttons unten in der Kachel */
.oevkt-ev-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-top: auto; }
.oevkt-ev-btn {
    display: block;
    width: 82%;
    padding: 5px 10px;
    background: var(--ev-red);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s;
}
.oevkt-ev .oevkt-ev-tile:hover .oevkt-ev-btn { background: var(--ev-red-dark); }
/* „Hier anmelden“: eigener Link über dem Kachel-Link, öffnet extern */
.oevkt-ev a.oevkt-ev-btn--reg { position: relative; z-index: 2; color: #fff; text-decoration: none; }
.oevkt-ev a.oevkt-ev-btn--reg:hover,
.oevkt-ev a.oevkt-ev-btn--reg:focus-visible { background: #a8161b; color: #fff; outline: 2px solid #fff; outline-offset: 1px; }
/* „Mehr Informationen“ neben „Hier anmelden“: dezent als Umriss */
.oevkt-ev .oevkt-ev-btn--more,
.oevkt-ev .oevkt-ev-tile:hover .oevkt-ev-btn--more { background: transparent; border: 1px solid rgba(255,255,255,.75); padding: 4px 10px; }
.oevkt-ev .oevkt-ev-tile:hover .oevkt-ev-btn--more { background: rgba(255,255,255,.12); }
.oevkt-ev .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Leer-Zustand: weiße Kachel mit Rahmen ("Aktuell sind keine Veranstaltungen geplant") */
.oevkt-ev .oevkt-ev-tile--empty {
    justify-content: center;
    background: #fff;
    color: var(--ev-teal);
}
.oevkt-ev-empty { font-size: 20px; font-weight: 400; line-height: 1.25; }

@media (max-width: 600px) {
    .oevkt-ev-tiles { grid-template-columns: 1fr; gap: 12px; }
    .oevkt-ev .oevkt-ev-tile { min-height: 0; padding: 20px 14px 16px; }
    .oevkt-ev-date { font-size: 22px; }
    .oevkt-ev-title { font-size: 18px; }
    .oevkt-ev--row .oevkt-ev-tile { flex-basis: 78%; }
}
.oevkt-ev a.oevkt-ev-title { display: block; }
