/*
 * Reise-Filter – Gestaltung entsprechend dem bisherigen Search-&-Filter-CSS.
 * Desktop: Außenbreite und Position wie beim bisherigen Elementor-Filter, innen 40 % / 40 % / 10 %, Tablet mit schmaleren Feldern,
 * Mobil untereinander und mittig ausgerichteter Button.
 */

.rsv-rf {
    display: grid;
    grid-template-columns: 40% 40% 10%;
    justify-content: start;
    align-items: end;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    overflow: visible;
}

.rsv-rf__field,
.rsv-rf__submit-wrap {
    min-width: 0;
    overflow: visible;
    padding-right: 20px;
    padding-left: 20px;
    box-sizing: border-box;
}

.rsv-rf__label {
    display: block;
    margin: 0 0 7px;
    color: #ffed00;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rsv-rf-combobox {
    position: relative;
    width: 100%;
    border-radius: 0 !important;
    font-family: 'Nunito', sans-serif !important;
}

.rsv-rf-combobox__control {
    display: flex;
    align-items: center;
    width: 100%;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
}

/* Beim Öffnen bleibt der Rahmen wie beim bisherigen Filter weiß. */
.rsv-rf-combobox.is-open .rsv-rf-combobox__control,
.rsv-rf-combobox__control:focus-within {
    border-color: rgba(255, 255, 255, .65);
    box-shadow: none;
}

.rsv-rf-combobox__input {
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 1px !important;
    box-sizing: border-box;
}

/* Ausgewählte Begriffe wie beim bisherigen Selection-Span in 600. */
.rsv-rf-combobox.has-value .rsv-rf-combobox__input {
    font-weight: 600 !important;
}

.rsv-rf-combobox__input::placeholder {
    color: rgba(255, 255, 255, .65);
    font-family: 'Nunito', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
    opacity: 1;
}

.rsv-rf-combobox__clear,
.rsv-rf-combobox__toggle {
    flex: 0 0 34px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer;
}

.rsv-rf-combobox__clear[hidden],
.rsv-rf-combobox__popup[hidden],
.rsv-rf-combobox__empty[hidden] {
    display: none !important;
}

.rsv-rf-combobox__clear svg,
.rsv-rf-combobox__toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rsv-rf-combobox__toggle svg {
    transition: transform .18s ease;
}

.rsv-rf-combobox.is-open .rsv-rf-combobox__toggle svg {
    transform: rotate(180deg);
}

.rsv-rf-combobox__divider {
    flex: 0 0 1px;
    height: 16px;
    background: rgba(255, 255, 255, .35);
}

/* Dunkle, direkt angedockte Dropdownliste wie im bisherigen Filter. */
.rsv-rf-combobox__popup {
    position: absolute;
    z-index: 2 !important;
    top: 100%;
    left: 0;
    width: 100%;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, .65);
    border-top: 0;
    border-radius: 0 !important;
    background: #034257;
    box-shadow: none;
    box-sizing: border-box;
}

/* Nur die lange Reiseziel-Liste auf 200 px begrenzen. */
.rsv-rf__field--reiseziel .rsv-rf-combobox__popup,
.rsv-rf__field--reiseziel .rsv-rf-combobox__list {
    max-height: 200px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.rsv-rf-combobox__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rsv-rf-combobox__list li {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
}

.rsv-rf-combobox__option {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: 1px !important;
    text-align: left !important;
    cursor: pointer;
}

.rsv-rf-combobox__option:hover,
.rsv-rf-combobox__option:focus {
    outline: 0;
    background: rgba(255, 255, 255, .08) !important;
}

.rsv-rf-combobox__option[aria-selected='true'] {
    background: rgba(255, 255, 255, .10) !important;
}

/* Hierarchie der Reiseziele. */
.rsv-rf-combobox__option--depth-1 {
    padding-left: 32px !important;
}

.rsv-rf-combobox__option--depth-2 {
    padding-left: 52px !important;
}

.rsv-rf-combobox__option--depth-3 {
    padding-left: 72px !important;
}

.rsv-rf-combobox__empty {
    padding: 12px;
    color: rgba(255, 255, 255, .75);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.rsv-rf__submit-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    width: 100%;
}

.rsv-rf__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-height: 38px;
    margin: 0 !important;
    padding: 0 65px !important;
    border: 2px solid #ffed00 !important;
    border-radius: 30px !important;
    background: transparent !important;
    color: #ffed00 !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 22px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

.rsv-rf__submit:hover,
.rsv-rf__submit:focus-visible {
    background-color: #ffed00 !important;
    color: #034257 !important;
    outline: 0;
}

/* Tablet: wie der bisherige untere Filter mittig im Inhaltsbereich. */
@media (max-width: 1024px) and (min-width: 768px) {
    .rsv-rf {
        width: 100% !important;
        max-width: 864px !important;
        margin-right: auto !important;
        margin-left: auto !important;
        padding: 20px 75px 20px 45px !important;
        box-sizing: border-box;
    }

    .rsv-rf-combobox__input {
        padding-left: 8px !important;
        padding-right: 8px !important;
        width: 100%;
        box-sizing: border-box;
    }

    .rsv-rf__submit {
        padding-left: 45px !important;
        padding-right: 45px !important;
    }
}

/* Mobil: gleiche seitliche Einzüge und Proportionen wie beim bisherigen Filter. */
@media (max-width: 767px) {
    .rsv-rf {
        display: block !important;
        width: calc(100% - clamp(48px, 15.4vw, 64px)) !important;
        max-width: none !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .rsv-rf__field,
    .rsv-rf__submit-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        box-sizing: border-box;
    }

    .rsv-rf__label {
        margin-bottom: 10px;
    }

    .rsv-rf-combobox__control {
        height: 38px;
    }

    .rsv-rf__field + .rsv-rf__field {
        margin-top: 26px;
    }

    .rsv-rf__submit-wrap {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 32px !important;
        margin-right: auto !important;
        margin-left: auto !important;
        padding: 0 !important;
    }

    .rsv-rf__submit {
        display: inline-flex !important;
        width: 218px;
        height: 42px;
        min-height: 42px;
        justify-content: center;
        align-items: center;
        margin: 0 auto !important;
        padding-right: 24px !important;
        padding-left: 24px !important;
        float: none !important;
    }
}

/* Sprungziel nach dem Absenden; Abstand für einen möglichen fixierten Header. */
.reisebeispiele {
    scroll-margin-top: 100px;
}

/* Eigene Meldung, wenn das Elementor Loop Grid keine Reisebeispiele findet. */
.qodef-m-posts-not-found-custom {
    grid-column: 1 / -1 !important;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: #034257;
    color: #ffffff;
    padding: 40px 30px;
    border-radius: 0 0 30px 30px;
    font-family: "Nunito", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.qodef-m-posts-not-found-custom .no-posts-headline {
    font-family: "Merriweather", serif;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 0 0 14px 0;
    color: #ffffff;
}

.qodef-m-posts-not-found-custom .no-posts-text {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    color: #ffffff;
}

.qodef-m-posts-not-found-custom .no-posts-button {
    display: inline-block;
    margin-top: 22px;
    padding: 12px 26px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffed00;
    border: 2px solid #ffed00;
    border-radius: 30px;
    text-decoration: none;
    transition: all .25s ease;
}

.qodef-m-posts-not-found-custom .no-posts-button:hover,
.qodef-m-posts-not-found-custom .no-posts-button:focus-visible {
    color: #034257;
    background-color: #ffed00;
    outline: 0;
}

.qodef-m-posts-not-found-custom .no-posts-icon {
    width: 45px;
    height: auto;
    margin-bottom: 10px;
}

@media (max-width: 1024px) {
    .qodef-m-posts-not-found-custom .no-posts-text br {
        display: none;
    }
}

@media (max-width: 768px) {
    .reisebeispiele {
        scroll-margin-top: 75px;
    }

    .qodef-m-posts-not-found-custom {
        padding: 28px 18px;
        font-size: 17px;
        min-height: 150px;
    }

    .qodef-m-posts-not-found-custom .no-posts-headline {
        font-size: 24px;
    }

    .qodef-m-posts-not-found-custom .no-posts-text {
        font-size: 17px;
    }

    .qodef-m-posts-not-found-custom .no-posts-button {
        font-size: 12px;
        padding: 10px 20px;
    }

    .qodef-m-posts-not-found-custom .no-posts-icon {
        width: 36px;
    }
}

/*
 * Version 1.0.8 – Tablet und Mobile wie beim bisherigen unteren Filter.
 * Die Regeln stehen bewusst am Dateiende und überschreiben die früheren
 * responsiven Einstellungen, ohne das Desktop-Layout anzutasten.
 */

/* Tablet: Inhalt auf die Breite des bisherigen Elementor-Filters begrenzen. */
@media (max-width: 1024px) and (min-width: 768px) {
    .rsv-rf {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        column-gap: clamp(24px, 4.7vw, 48px);
        width: calc(100% - 80px);
        max-width: 864px;
        margin-right: auto;
        margin-left: auto;
    }

    .rsv-rf__field,
    .rsv-rf__submit-wrap {
        padding-right: 0;
        padding-left: 0;
    }

    .rsv-rf-combobox {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .rsv-rf__submit {
        min-width: 150px;
        padding-right: 36px !important;
        padding-left: 36px !important;
    }
}

/* Mobile: 24–32 px Seitenabstand, mehr Luft oben und kompaktere Abstände. */
@media (max-width: 767px) {
    .rsv-rf {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin-right: clamp(24px, 7.7vw, 32px) !important;
        margin-left: clamp(24px, 7.7vw, 32px) !important;
        padding-top: 50px;
        box-sizing: border-box;
    }

    .rsv-rf__field,
    .rsv-rf__submit-wrap {
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .rsv-rf__label {
        margin-bottom: 9px;
    }

    .rsv-rf__field + .rsv-rf__field {
        margin-top: 29px;
    }

    .rsv-rf__submit-wrap {
        margin-top: 31px;
    }

    .rsv-rf__submit {
        width: 218px;
        max-width: 100%;
        height: 41px;
        min-height: 41px;
        padding-right: 28px !important;
        padding-left: 28px !important;
    }
}

/* =========================================================
 * Reisegeschichten & Neuigkeiten – Kategorienfilter
 * Entspricht optisch dem bisherigen Search-&-Filter-Buttonfeld:
 * Weiß/Blau im Normalzustand, Gelb im ausgewählten Zustand.
 * ========================================================= */

.rsv-stories-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.rsv-stories-filter__row {
    display: contents;
}

.rsv-stories-filter__button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin: 0;
    padding: 13px 42px;
    border: 2px solid #009FE3;
    border-radius: 30px;
    background: #ffffff;
    color: #009FE3;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.rsv-stories-filter__button:hover,
.rsv-stories-filter__button:focus-visible {
    border-color: #FFED00;
    background: #FFED00;
    color: #009FE3;
    outline: 0;
    text-decoration: none !important;
}

.rsv-stories-filter__button.is-active,
.rsv-stories-filter__button.is-active:hover,
.rsv-stories-filter__button.is-active:focus-visible {
    border-color: #FFED00;
    background: #FFED00;
    color: #009FE3;
}

/* Tablet: weniger Innenabstand links/rechts, damit alle vier Buttons in einer Reihe bleiben. */
@media (max-width: 1024px) and (min-width: 768px) {
    .rsv-stories-filter {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .rsv-stories-filter__button {
        flex: 0 0 auto;
        padding: 12px 30px;
    }
}

/* Mobile: zwei voneinander unabhängige, zentrierte Zeilen.
 * Oben: Alles + Neuigkeiten. Unten: Reiseberichte + Reiseinfos.
 * Dadurch ist der Abstand zwischen den Buttons in beiden Zeilen identisch,
 * ohne starre Spalten über beide Reihen hinweg. */
@media (max-width: 767px) {
    .rsv-stories-filter {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        margin: 0 auto;
    }

    .rsv-stories-filter__row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .rsv-stories-filter__button {
        flex: 0 0 auto;
        width: auto;
        max-width: calc(50vw - 24px);
        min-height: 50px;
        padding: 16px 18px;
        font-size: 13px;
        line-height: 1;
        letter-spacing: 1.5px;
    }
}


/* =========================================================
 * Reisegeschichten – AJAX-Zustand
 * ========================================================= */
.rsv-stories-filter.is-loading,
.rsv-stories-ajax-loading {
    cursor: progress;
}

.rsv-stories-filter.is-loading .rsv-stories-filter__button {
    pointer-events: none;
}

.elementor-widget-loop-grid.rsv-stories-ajax-loading {
    position: relative;
    min-height: 120px;
    opacity: .45;
    pointer-events: none;
    transition: opacity .18s ease;
}

.elementor-widget-loop-grid.rsv-stories-ajax-loading::after {
    content: '';
    position: absolute;
    z-index: 20;
    top: 42px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border: 3px solid rgba(0, 159, 227, .25);
    border-top-color: #009FE3;
    border-radius: 50%;
    box-sizing: border-box;
    animation: rsv-stories-spin .7s linear infinite;
}

@keyframes rsv-stories-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .elementor-widget-loop-grid.rsv-stories-ajax-loading::after {
        animation-duration: 1.4s;
    }
}

/* =========================================================
 * Reisegeschichten – Grid-Trennlinien + Mobile Beitragsbilder
 * Unabhängig von Search & Filter und AJAX-fest.
 * ========================================================= */
:is(.rsv-stories-grid, .elementor-element-0e78cf9) .elementor-loop-container {
    position: relative;
}

:is(.rsv-stories-grid, .elementor-element-0e78cf9) .rsv-column-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    height: 100%;
    background-color: #e0e0e0;
    z-index: 10;
    pointer-events: none;
}

@media only screen and (max-width: 767px) {
    :is(.rsv-stories-grid, .elementor-element-0e78cf9) .rsv-column-divider {
        display: none !important;
    }

    :is(.rsv-stories-grid, .elementor-element-0e78cf9) .elementor-widget-theme-post-featured-image,
    :is(.rsv-stories-grid, .elementor-element-0e78cf9) .elementor-widget-theme-post-featured-image .elementor-widget-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    :is(.rsv-stories-grid, .elementor-element-0e78cf9) .elementor-widget-theme-post-featured-image img {
        display: block !important;
        width: 355px !important;
        max-width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }
}

