/* ==========================================================================
   Mediathek Styles – matching Figma screendesign
   ========================================================================== */

/* Teaser Card
   ========================================================================== */

.mediathek-teaser {
    height: 100%;
}

.mediathek-teaser__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: var(--c-fond-light, #f5f5f5);
    border-radius: 4rem 0 4rem 0;
}

.mediathek-teaser__link:hover .mediathek-teaser__image img {
    transform: scale(1.03);
}

/* Image area with format icon overlay */
.mediathek-teaser__media {
    position: relative;
}

.mediathek-teaser__image {
    margin: 0;
    border-radius: 4rem 0 0 0;
    overflow: hidden;
}

.mediathek-teaser__image img {
    transition: transform 0.3s ease;
    object-fit: cover;
}

/* Format icon badge – bottom right of image, straddling boundary */
.mediathek-teaser__format-icon {
    position: absolute;
    bottom: 0;
    right: 1.6rem;
    transform: translateY(50%);
    z-index: 1;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    color: var(--c-brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mediathek-teaser__format-icon svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

/* Text body below image */
.mediathek-teaser__body {
    padding: 2rem 2.5rem 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category label – Figma: Americane 700, 17px/100%, uppercase, purple */
.mediathek-teaser__label {
    color: var(--c-brand);
    font-size: var(--fs-small, 1.7rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

/* Title – Figma: Americane 700, 30px/45px */
.mediathek-teaser__title {
    font-size: var(--fs-large, 3rem);
    line-height: 1.5;
    margin: 0 0 auto;
}

/* Excerpt – Figma: Americane 400, 20px/30px, #000 */
.mediathek-teaser__excerpt {
    color: var(--c-text, #000);
    font-size: var(--fs-base, 2rem);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Archive List
   ========================================================================== */

.mediathek-list__items {
    align-items: stretch;
}

.mediathek-list__empty {
    padding: 2rem 0;
}

.mediathek-list__footer {
    margin-top: 2.5rem;
    text-align: center;
}

/* Single Detail Page
   ========================================================================== */

.mediathek-single__video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.mediathek-single__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mediathek-single__image {
    margin: 0 0 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.mediathek-single__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mediathek-single__tag {
    display: inline-block;
    background-color: var(--c-brand);
    color: var(--c-text-light);
    padding: 0.2em 0.75em;
    border-radius: 4px;
    font-size: var(--fs-small, 1.7rem);
}

.mediathek-single__content {
    margin-bottom: 2rem;
}

.mediathek-single__indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: var(--fs-small, 1.7rem);
}

.mediathek-single__indicator {
    color: var(--c-brand);
    font-weight: 600;
}

.mediathek-single__link {
    margin-bottom: 2rem;
}

/* Featured Block (Homepage – violet background)
   ========================================================================== */

.block--bg-violet {
    background-color: var(--c-brand);
    color: var(--c-text-light);
    padding: 4rem 0 3rem;
}

/* Header: title/text left, search right */
.mediathek-featured__header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .mediathek-featured__header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 3rem;
    }
}

.mediathek-featured__header-text {
    flex: 1;
    min-width: 0;
}

.mediathek-featured__title {
    margin: 0 0 0.25em;
}

.mediathek-featured__text {
    margin: 0;
    opacity: 0.8;
    max-width: 40em;
    line-height: 1.5;
}

/* Search link styled as search bar */
.mediathek-featured__search {
    flex-shrink: 0;
}

.mediathek-featured__search-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.6em 1.2em;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 2em;
    color: var(--c-text-light);
    text-decoration: none;
    font-size: var(--fs-small, 1.7rem);
    white-space: nowrap;
    transition: background 0.2s ease;
}

.mediathek-featured__search-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mediathek-featured__search-icon {
    display: flex;
    width: 1em;
    height: 1em;
}

.mediathek-featured__search-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Horizontal card slider */
.mediathek-featured__slider {
    display: flex;
    gap: var(--gutter-inside, 4rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.mediathek-featured__slider::-webkit-scrollbar {
    height: 3px;
}

.mediathek-featured__slider::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.mediathek-featured__slider::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
}

.mediathek-featured__item {
    flex: 0 0 calc(25% - var(--gutter-inside, 4rem) * 3 / 4);
    min-width: 220px;
    scroll-snap-align: start;
}

@media (max-width: 979px) {
    .mediathek-featured__item {
        flex: 0 0 calc(33.333% - var(--gutter-inside, 4rem) * 2 / 3);
    }
}

@media (max-width: 767px) {
    .mediathek-featured__item {
        flex: 0 0 calc(50% - var(--gutter-inside, 2rem) / 2);
        min-width: 200px;
    }
}

@media (max-width: 479px) {
    .mediathek-featured__item {
        flex: 0 0 80%;
    }
}

/* Cards on violet background */
.block--bg-violet .mediathek-teaser__link {
    background: rgba(255, 255, 255, 0.1);
}

.block--bg-violet .mediathek-teaser__label {
    color: var(--c-text-light);
    opacity: 0.85;
}

.block--bg-violet .mediathek-teaser__title {
    color: var(--c-text-light);
}

.block--bg-violet .mediathek-teaser__excerpt {
    color: rgba(255, 255, 255, 0.7);
}

.block--bg-violet .mediathek-teaser__format-icon {
    background: #fff;
    color: var(--c-brand);
}

/* CTA arrow link */
.mediathek-featured__cta {
    text-align: center;
    padding-top: 0.5rem;
}
