/**
 * Ecovis Posts Filter
 * Optik nach Vorlage "Seminarankündigungen" (Ecovis-Rot #CD1432).
 */

.epf {
    --epf-red: #CD1432;
    --epf-red-hover: #E11838;
    --epf-text: #333;
    --epf-heading: #111;
    --epf-grey: #F3F3F3;
    --epf-stripe: #E9E9E9;
    --epf-border: #DDD;

    position: relative;
    margin: 0 0 3rem;
}

/* --- Überschriften ------------------------------------------------------ */

.epf__title,
.epf__subtitle {
    color: var(--epf-red);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.25rem;
}

.epf__title {
    font-size: 24px;
}

.epf__subtitle {
    font-size: 20px;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

/* --- Suche -------------------------------------------------------------- */

.epf__search {
    background: var(--epf-grey);
    padding: 16px 18px;
    margin: 0 0 1rem;
}

.epf__search-field {
    display: flex;
    align-items: stretch;
    background: transparent;
    border-left: 5px solid var(--epf-red);
}

@media (min-width: 992px) {
    .epf__search-field {
        max-width: 84%;
    }
}

.epf__search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    color: var(--epf-red);
    background: transparent;
}

.epf__search-icon svg {
    display: block;
}

.epf__search-input,
.epf input.epf__search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    background: #FFF;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    color: var(--epf-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    padding: 12px 16px;
    -webkit-appearance: none;
    appearance: none;
}

.epf__search-input::placeholder {
    color: #767676;
    opacity: 1;
}

.epf__search-input:focus-visible {
    outline: 2px solid var(--epf-red);
    outline-offset: -2px;
}

.epf__search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

/* --- Tabelle ------------------------------------------------------------ */

.epf__table-wrap {
    transition: opacity 0.2s ease;
}

.epf__table-wrap.is-loading {
    opacity: 0.45;
}

.epf-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
}

.epf-table__th {
    text-align: left;
    vertical-align: bottom;
    color: var(--epf-heading);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    padding: 10px 14px;
    border-bottom: 2px solid var(--epf-heading);
    background: transparent;
}

.epf-table__th--date {
    width: 16%;
}

/* Der Titel füllt den Rest – egal, wie viele Spalten aktiv sind. */
.epf-table__th--title {
    width: auto;
}

.epf-table__th--location,
.epf-table__th--format {
    width: 15%;
}

.epf-table__row:nth-child(odd) {
    background: var(--epf-stripe);
}

.epf-table__row:last-child {
    border-bottom: 1px solid var(--epf-border);
}

.epf-table__cell {
    vertical-align: top;
    color: var(--epf-text);
    font-size: 16px;
    line-height: 1.45;
    padding: 12px 14px;
    border: none;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.epf-table__cell--empty {
    text-align: left;
    padding: 20px 14px;
}

.epf-table__link,
.epf .epf-table__link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.epf-table__link:hover,
.epf-table__link:focus {
    color: var(--epf-red);
    text-decoration: underline;
}

/* --- "Weitere anzeigen" ------------------------------------------------- */

.epf__footer {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.epf__footer[hidden],
.epf__footer--hidden {
    display: none;
}

.epf__more,
.epf button.epf__more {
    display: inline-block;
    background: var(--epf-red);
    border: none;
    border-radius: 3px;
    color: #FFF;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.2;
    padding: 12px 28px;
    text-align: center;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.epf__more:hover,
.epf__more:focus {
    background: var(--epf-red-hover);
    color: #FFF;
}

.epf__more:focus-visible {
    outline: 2px solid var(--epf-heading);
    outline-offset: 2px;
}

.epf__more[disabled] {
    cursor: default;
    opacity: 0.6;
}

.epf__more.is-loading {
    opacity: 0.7;
}

/* --- Screenreader-Status ------------------------------------------------ */

.epf__status.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.epf .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 991px) {
    .epf__title {
        font-size: 20px;
    }

    .epf__subtitle {
        font-size: 18px;
    }

    .epf__search-input,
    .epf input.epf__search-input {
        font-size: 15px;
        padding: 11px 14px;
    }

    .epf__search-icon {
        width: 40px;
    }

    .epf-table__th {
        font-size: 15px;
        padding: 9px 10px;
    }

    .epf-table__cell {
        font-size: 15px;
        padding: 10px;
    }
}

@media (max-width: 767px) {
    .epf__search {
        padding: 16px;
    }

    /* Tabelle wird zur Kartenliste – Kopfzeile wandert in data-label. */
    .epf-table,
    .epf-table__body,
    .epf-table__row,
    .epf-table__cell {
        display: block;
        width: auto;
    }

    .epf-table__head {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .epf-table__row {
        padding: 12px 14px;
        border-bottom: 1px solid var(--epf-border);
    }

    .epf-table__cell {
        padding: 4px 0;
    }

    .epf-table__cell--title {
        font-weight: 700;
    }

    .epf-table__cell[data-label]::before {
        content: attr(data-label) ": ";
        display: inline;
        font-weight: 700;
        color: var(--epf-heading);
    }

    .epf-table__cell--title[data-label]::before,
    .epf-table__cell--empty[data-label]::before {
        content: none;
    }

    .epf-table__link,
    .epf .epf-table__link {
        display: inline;
    }

    .epf__more,
    .epf button.epf__more {
        font-size: 15px;
        padding: 12px 24px;
        width: 100%;
    }
}
