/* ============================================================
   NaturErlebnis Termine — Stylesheet
   nabu-bonn.de
   ============================================================ */


/* ── Terminliste: Karte (horizontales Layout) ────────────── */

section.ne_terminblock {
    display: flex;
    background: var(--main-background);
    border-radius: 0.5rem;
    box-shadow: 0 2px 3px color-mix(in srgb, var(--normal-text-color) 20%, transparent);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* Bild-Bereich links */
.ne_terminblock__bild {
    width: 110px;
    flex-shrink: 0;
    background: var(--lichtgrau);
    position: relative;
    min-height: 130px;
}
.ne_terminblock__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Datum-Badge auf dem Bild */
.ne_terminblock__datum_badge {
    position: absolute;
    top: 8px; left: 8px; right: 8px;
    background: var(--main-background);
    border-radius: 6px;
    text-align: center;
    padding: 4px 0;
}
.ne_datum_badge__wt  { display: block; font-size: 9px;  color: #888; font-weight: 600; text-transform: uppercase; }
.ne_datum_badge__tag { display: block; font-size: 22px; color: var(--dunkelgruen); font-weight: 700; line-height: 1; }
.ne_datum_badge__mon { display: block; font-size: 9px;  color: #888; }

/* Inhaltsbereich rechts */
.ne_terminblock__body {
    padding: 12px 14px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

/* Badges-Zeile: Typ-Badge links, Piktogramme rechts */
.ne_terminblock__badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

/* Typ-Badge */
.ne_terminblock__typ {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px 2px 4px;
    border-radius: 10px;
    background: var(--dunkelgruen);
    color: var(--invert-text-color);
}
.ne_terminblock__typ_icon {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) invert(1);
}
@media (prefers-color-scheme: dark) {
    .ne_terminblock__typ_icon { filter: brightness(0); }
}

/* Auszeichnungs-Piktogramme */
.ne_terminblock__piktos {
    display: flex;
    gap: 4px;
}
.ne_terminblock__pikto img {
    width: 2rem;
    height: 2rem;
    border: 0.15rem solid var(--text-highlight);
    box-sizing: border-box;
    border-radius: 0.5rem;
    background-color: var(--main-background);
}

/* Titel */
.ne_termintitel {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Kurztext */
.ne_infotext {
    color: var(--text-headline-sub);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer: Meta + Aktionen */
.ne_terminblock__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
    font-size: 0.8rem;
}
.ne_terminblock__meta    { display: flex; gap: 10px; color: var(--text-headline-sub); }
.ne_terminblock__actions { display: flex; align-items: center; gap: 1rem; }

/* Favorit-Button */
.ne_favorit {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--hellgrau);
    padding: 0;
    transition: color .15s;
}
.ne_favorit--aktiv { color: var(--nabu-blau); }
.ne_favorit:hover  { color: var(--nabu-blau-deckkraft-60); }

/* iCal-Link */
.ne_ical_link {
    font-size: 1rem;
    text-decoration: none;
    opacity: .4;
    transition: opacity .15s;
}
.ne_ical_link:hover { opacity: 1; }

/* Detail-Button */
.ne_detail_link {
    background: var(--dunkelgrau);
    color: var(--invert-text-color);
    border-radius: 14px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* iCal Favoriten-Export */
.ne_ical_export {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--nabu-blau);
    font-size: 13px;
    text-decoration: none;
}
.ne_ical_export:hover { text-decoration: underline; }


/* ── Monats-Trenner ──────────────────────────────────────── */

.ne_monat_trenner {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dunkelgrau);
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--dunkelgrau);
}
.ne_monat_trenner:first-child { margin-top: 0; }


/* ── Typ-Farben (NABU-Palette, weißer Text, WCAG AA) ─────── */

.ne_typ--Veranstaltung_Exkursion        { background: var(--dunkelgruen); }
.ne_typ--Veranstaltung_NaturschutzAktiv { background: var(--hellgruen-dunkel-60); }
.ne_typ--Veranstaltung_Vortrag          { background: var(--nabu-blau); }
.ne_typ--Veranstaltung_Versammlung      { background: var(--nabu-blau-dunkel-30); }
.ne_typ--Veranstaltung_Infostand        { background: var(--nabu-blau-dunkel-30); }
.ne_typ--Veranstaltung_Online           { background: var(--nabu-blau); }
.ne_typ--Veranstaltung_Familie          { background: var(--gelb-dunkel-60); }
.ne_typ--Veranstaltung_Ferien           { background: var(--gelb-dunkel-60); }
.ne_typ--Veranstaltung_Kursangebot      { background: var(--nabu-blau-dunkel-30); }
.ne_typ--Veranstaltung_VorOrt           { background: var(--dunkelgruen-dunkel-30); }
.ne_typ--Veranstaltung_Lesung           { background: var(--orange-dunkel-60); }
.ne_typ--Veranstaltung_Ausstellung      { background: var(--orange-dunkel-60); }
.ne_typ--Veranstaltung_Dialog           { background: var(--orange-dunkel-60); }
.ne_typ--Veranstaltung_Demonstration    { background: var(--rot); }
.ne_typ--Veranstaltung_Reise            { background: var(--dunkelgruen-dunkel-60); }
.ne_typ--Veranstaltung_ohne             { background: var(--dunkelgruen-dunkel-30); }


/* ── Karten-Marker ───────────────────────────────────────── */

.ne_karte_marker__dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}
.ne_karte_marker__icon {
    width: 20px;
    height: 20px;
    background: white;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Marker-Farben pro Typ */
.ne_typ--Veranstaltung_Exkursion        .ne_karte_marker__dot { background: var(--dunkelgruen); }
.ne_typ--Veranstaltung_NaturschutzAktiv .ne_karte_marker__dot { background: var(--hellgruen-dunkel-60); }
.ne_typ--Veranstaltung_Vortrag          .ne_karte_marker__dot { background: var(--nabu-blau); }
.ne_typ--Veranstaltung_Versammlung      .ne_karte_marker__dot { background: var(--nabu-blau-dunkel-30); }
.ne_typ--Veranstaltung_Infostand        .ne_karte_marker__dot { background: var(--nabu-blau-dunkel-30); }
.ne_typ--Veranstaltung_Online           .ne_karte_marker__dot { background: var(--nabu-blau); }
.ne_typ--Veranstaltung_Familie          .ne_karte_marker__dot { background: var(--gelb-dunkel-60); }
.ne_typ--Veranstaltung_Ferien           .ne_karte_marker__dot { background: var(--gelb-dunkel-60); }
.ne_typ--Veranstaltung_Kursangebot      .ne_karte_marker__dot { background: var(--nabu-blau-dunkel-30); }
.ne_typ--Veranstaltung_VorOrt           .ne_karte_marker__dot { background: var(--dunkelgruen-dunkel-30); }
.ne_typ--Veranstaltung_Lesung           .ne_karte_marker__dot { background: var(--orange-dunkel-60); }
.ne_typ--Veranstaltung_Ausstellung      .ne_karte_marker__dot { background: var(--orange-dunkel-60); }
.ne_typ--Veranstaltung_Dialog           .ne_karte_marker__dot { background: var(--orange-dunkel-60); }
.ne_typ--Veranstaltung_Demonstration    .ne_karte_marker__dot { background: var(--rot); }
.ne_typ--Veranstaltung_Reise            .ne_karte_marker__dot { background: var(--dunkelgruen-dunkel-60); }
.ne_typ--Veranstaltung_ohne             .ne_karte_marker__dot { background: var(--dunkelgruen-dunkel-30); }

/* Karten-Popup */
.ne_karte { height: 450px; margin-bottom: 16px; }
.ne_karte_popup__datum { font-size: 12px; color: #666; }
.ne_karte_popup__titel { font-weight: bold; margin: 4px 0; }
.ne_karte_popup__link  { display: block; margin-top: 6px; }


/* ── Marker-Cluster ──────────────────────────────────────── */

.marker-cluster { background: rgba(0,104,180,.6); border-radius: 50%; }
.marker-cluster div {
    background: var(--nabu-blau);
    border-radius: 50%;
    color: #fff;
    font-family: sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
}
.marker-cluster-small  { width: 30px; height: 30px; }
.marker-cluster-medium { width: 40px; height: 40px; }
.marker-cluster-large  { width: 50px; height: 50px; }
.marker-cluster-small  div { font-size: 11px; }
.marker-cluster-medium div { font-size: 13px; }
.marker-cluster-large  div { font-size: 15px; }


/* ── Toolbar: Tabs + Filter-Toggle ──────────────────────── */

.ne_toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
}
.ne_tabs { display: flex; gap: 4px; flex-wrap: wrap; }

.ne_tab,
.ne_filter_toggle {
    background: none;
    border: 1px solid var(--hellgrau);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--dunkelgrau);
    transition: border-color .15s, color .15s;
}
.ne_tab:hover,
.ne_filter_toggle:hover,
.ne_filter_toggle--offen {
    border-color: var(--nabu-blau);
    color: var(--nabu-blau);
}
.ne_tab--aktiv {
    background: var(--nabu-blau);
    border-color: var(--nabu-blau);
    color: #fff;
}


/* ── Aktive Filter-Chips ─────────────────────────────────── */

.ne_filter_summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
}
.ne_filter_chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--nabu-blau-deckkraft-30);
    color: var(--nabu-blau-dunkel-60);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}
.ne_filter_chip__remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--nabu-blau-dunkel-30);
    padding: 0;
    line-height: 1;
}
.ne_filter_chip--clear {
    background: var(--lichtgrau);
    color: var(--dunkelgrau);
    cursor: pointer;
    border: none;
}


/* ── Filter-Panel ────────────────────────────────────────── */

.ne_filter_panel {
    background: var(--lichtgrau);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}


/* ── Choices.js Multi-Select ─────────────────────────────── */

.ne_choices .choices__inner {
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 40px;
}
.ne_choices .choices__list--multiple .choices__item {
    background-color: var(--nabu-blau);
    border-color: var(--nabu-blau-dunkel-30);
    color: var(--invert-text-color);
}


/* ── Responsive: Mobil ───────────────────────────────────── */

@media (max-width: 33rem) {

    .ne_terminblock__bild {
        width: 80px;
        min-height: 120px;
    }
    .ne_datum_badge__tag { font-size: 18px; }

    .ne_terminblock__body {
        padding: 8px 10px;
        gap: 4px;
    }
    .ne_termintitel  { font-size: 0.85rem; }
    .ne_infotext     { display: none; }

    .ne_terminblock__meta  { gap: 6px; font-size: 10px; }
    .ne_detail_link        { padding: 4px 10px; font-size: 10px; }

    .ne_terminblock__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 22rem) {

    .ne_terminblock__bild { display: none; }

    .ne_datum_badge__wt,
    .ne_datum_badge__tag,
    .ne_datum_badge__mon { display: inline; }
}


/* ── Detailansicht ───────────────────────────────────────── */

/* Foto-Galerie */
.ne_detail_galerie {
    display: grid;
    gap: 0.25rem;
    overflow: hidden;
    margin-bottom: 1rem;
}
.ne_detail_galerie--1 { grid-template-columns: 1fr; grid-template-rows: 280px; }
.ne_detail_galerie--2 { grid-template-columns: 2fr 1fr; grid-template-rows: 240px; }
.ne_detail_galerie--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 140px 140px; }

.ne_detail_galerie__main {
    grid-row: 1 / -1;
    position: relative;
    overflow: hidden;
}
.ne_detail_galerie--2 .ne_detail_galerie__main,
.ne_detail_galerie--3 .ne_detail_galerie__main { grid-column: 1; }

.ne_detail_galerie__main img,
.ne_detail_galerie__thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.ne_detail_galerie__thumb { overflow: hidden; }
.ne_detail_galerie__count {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,.55); color: white;
    font-size: 11px; padding: 3px 8px; border-radius: 10px;
}

/* Kopf */
.ne_detail_kopf { margin-bottom: 16px; }
.ne_detail_badges {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 10px;
    justify-content: space-between;
}
.ne_detail_typ {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.8rem; font-weight: 600;
    padding: 4px 12px 4px 6px; border-radius: 20px;
    background: var(--dunkelgruen); color: #fff;
}
.ne_detail_pikto {
    width: 32px; height: 32px;
    border: 2px solid var(--text-highlight);
    border-radius: 7px; background: var(--main-background);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.ne_detail_pikto img { width: 26px; height: 26px; }
.ne_detail_datum { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--text-headline-sub); }
h1.ne_detail_titel { font-size: 1.4rem; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.ne_detail_meta { display: flex; gap: 16px; font-size: 0.85rem; color: var(--text-headline-sub); flex-wrap: wrap; margin-bottom: 12px; }
.ne_detail_actions {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 0; border-top: 1px solid var(--lichtgrau);
    margin-bottom: 20px;
}
.ne_detail_back {
    margin-left: auto;
    background: var(--dunkelgrau); color: var(--invert-text-color);
    border-radius: 20px; padding: 6px 16px;
    font-size: 0.8rem; font-weight: 600; text-decoration: none;
}

/* Zweispaltiges Layout */
.ne_detail_grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 16px;
    align-items: start;
}
.ne_detail_infotext {
    font-size: 0.9rem; line-height: 1.75; color: var(--normal-text-color);
}
.ne_detail_infotext p + p { margin-top: 12px; }
.ne_detail_sidebar { display: flex; flex-direction: column; gap: 12px; }

/* Karte in der Sidebar */
.ne_detail_karte_wrap {
    border-bottom: 1px solid var(--hellgrau);
    overflow: hidden;
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.ne_detail_karte { height: 200px; }
.ne_detail_karte_footer {
    padding: 6px 0;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: var(--text-headline-sub);
}
.ne_detail_karte_toggle { display: flex; gap: 3px; }
.ne_detail_karte_btn {
    background: var(--main-background);
    border: 1px solid var(--hellgrau);
    border-radius: 4px; padding: 3px 7px;
    font-size: 10px; cursor: pointer; color: var(--dunkelgrau);
}
.ne_detail_karte_btn--aktiv {
    background: var(--dunkelgruen); color: #fff; border-color: var(--dunkelgruen);
}

/* Info-Boxen — offen, ohne Rahmen, wie Foto-Elemente auf der Seite */
.ne_detail_info_box {
    border-bottom: 1px solid var(--hellgrau);
    padding-bottom: 12px;
}
.ne_detail_info_box + .ne_detail_info_box { padding-top: 12px; }
.ne_detail_info_box__header {
    font-size: 11px; font-weight: 700; color: var(--dunkelgrau);
    text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 8px;
}
.ne_detail_info_row {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 4px 0; font-size: 0.8rem;
}
.ne_detail_info_row__icon { flex-shrink: 0; }
.ne_detail_info_row__label {
    display: block; font-size: 10px;
    color: var(--text-headline-sub); margin-bottom: 1px;
}

/* Leitung */
.ne_detail_leitung_person {
    display: flex; gap: 8px; align-items: center;
    padding: 4px 0;
}
.ne_detail_avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--lichtgrau); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.ne_detail_leitung_name  { font-size: 0.8rem; font-weight: 600; }
.ne_detail_leitung_kontakt {
    font-size: 0.75rem;
    display: block;
}
.ne_detail_leitung_kontakt:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
    .ne_detail_grid { grid-template-columns: 1fr; }
    .ne_detail_galerie--2,
    .ne_detail_galerie--3 { grid-template-columns: 1fr; grid-template-rows: 220px; }
    .ne_detail_galerie__thumb { display: none; }
    .ne_detail_galerie__main { grid-row: 1; grid-column: 1; }
    .ne_detail_datum { display: none; }
    h1.ne_detail_titel { font-size: 1.1rem; }
}

/* ── Geopunkt-Marker in der Detailkarte ──────────────────── */
.ne_karte_detail_marker {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ne_karte_detail_marker__emoji {
    font-size: 15px;
    line-height: 1;
    filter: grayscale(1) brightness(10); /* Emoji → weiß */
}

/* Karte Footer: Label links, Buttons rechts */
.ne_detail_karte_footer_right {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* Karte vergrößert — überspannt beide Grid-Spalten */
.ne_detail_karte_wrap--gross {
    grid-column: 1 / -1;
}

/* Kurztext fett vor dem langen Infotext */
.ne_detail_infotext__kurz {
    font-weight: 700;
    margin-bottom: 1rem;
}
.ne_detail_infotext__lang {
    font-size: 0.9rem;
    line-height: 1.75;
}
