/* ─────────────────────────────────────────────────────────
   Aktuelles (News) Slider — mirrors social-slider-classic
   ───────────────────────────────────────────────────────── */

.aktuelles-slider {
    container-type: inline-size;
    container-name: aktuelles-slider;
}

/* Header */
.aktuelles-slider__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-l);
    margin-bottom: var(--space-2xl);
}

.aktuelles-slider__title-group {
    max-width: 600px;
}

.aktuelles-slider__label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.aktuelles-slider__title {
    font-size: var(--text-2xl);
    font-weight: 400;
    color: var(--text-title);
    margin-bottom: var(--space-s);
}

.aktuelles-slider__title em {
    font-style: normal;
    font-weight: 500;
}

.aktuelles-slider__subtitle {
    font-size: var(--text-m);
    color: var(--text-body);
    line-height: 1.6;
}

/* Slider Container */
.aktuelles-slider__slider-wrapper {
    position: relative;
}

.aktuelles-slider__slider {
    overflow: hidden;
    width: 100%;
}

.aktuelles-slider__track {
    display: flex;
    gap: var(--space-m);
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Card Item */
.aktuelles-slider__item {
    flex: 0 0 calc(33.333% - var(--space-m) * 2 / 3);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-radius: var(--radius-m);
    overflow: hidden;
    background: var(--bg-card, var(--surface-primary));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aktuelles-slider__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Image Area — 4:3 aspect ratio */
.aktuelles-slider__image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.aktuelles-slider__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.aktuelles-slider__item:hover .aktuelles-slider__image {
    transform: scale(1.05);
}

/* Overlay */
.aktuelles-slider__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-m);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aktuelles-slider__item:hover .aktuelles-slider__overlay {
    opacity: 1;
}

.aktuelles-slider__expand-icon,
.aktuelles-slider__expand-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.aktuelles-slider__image-count {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    color: white;
    font-size: var(--text-s);
    font-weight: 500;
}

.aktuelles-slider__image-count .lucide,
.aktuelles-slider__image-count svg {
    width: 18px;
    height: 18px;
}

/* Badge */
.aktuelles-slider__badge {
    position: absolute;
    top: var(--space-s);
    left: var(--space-s);
    padding: var(--space-3xs) var(--space-xs);
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-s);
    z-index: 2;
}

/* Content Area */
.aktuelles-slider__content {
    padding: var(--space-m);
}

.aktuelles-slider__date {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted, var(--text-body));
    margin-bottom: var(--space-2xs);
    opacity: 0.7;
}

.aktuelles-slider__card-title {
    font-size: var(--text-m);
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: var(--space-2xs);
    line-height: 1.3;
}

.aktuelles-slider__excerpt {
    font-size: var(--text-s);
    color: var(--text-body);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Navigation Arrows */
.aktuelles-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease;
    color: var(--text-body);
}

.aktuelles-slider__nav--prev {
    left: calc(-1 * var(--space-3xl));
}

.aktuelles-slider__nav--next {
    right: calc(-1 * var(--space-3xl));
}

.aktuelles-slider__nav:hover {
    color: var(--primary);
}

.aktuelles-slider__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.aktuelles-slider__nav:disabled:hover {
    color: var(--text-body);
}

.aktuelles-slider__nav .lucide,
.aktuelles-slider__nav svg {
    width: 28px;
    height: 28px;
}

/* Progress Dots */
.aktuelles-slider__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-xl);
}

.aktuelles-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--border-primary);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.aktuelles-slider__dot:hover {
    background: var(--primary-50);
}

.aktuelles-slider__dot--active {
    background: var(--primary);
    width: 28px;
}

/* ─────────────────────────────────────────────────────────
   Detail Modal
   ───────────────────────────────────────────────────────── */

.aktuelles-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aktuelles-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.aktuelles-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.aktuelles-lightbox__content {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface, #fff);
    border-radius: var(--radius-m);
    overflow: hidden;
    overflow-y: auto;
}

/* Close Button — top-right corner */
.aktuelles-lightbox__close {
    position: absolute;
    top: var(--space-s);
    right: var(--space-s);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.aktuelles-lightbox__close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.aktuelles-lightbox__close .lucide,
.aktuelles-lightbox__close svg {
    width: 20px;
    height: 20px;
}

/* Image Carousel Area */
.aktuelles-lightbox__media {
    position: relative;
    background: var(--bg-dark, #1a1a1a);
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.aktuelles-lightbox__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
}

.aktuelles-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.aktuelles-lightbox__nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.aktuelles-lightbox__nav .lucide,
.aktuelles-lightbox__nav svg {
    width: 22px;
    height: 22px;
}

.aktuelles-lightbox__nav--prev {
    left: var(--space-s);
}

.aktuelles-lightbox__nav--next {
    right: var(--space-s);
}

.aktuelles-lightbox__counter {
    position: absolute;
    bottom: var(--space-s);
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: var(--space-3xs) var(--space-s);
    border-radius: var(--radius-s);
    white-space: nowrap;
}

/* Hide nav/counter when only one image */
.aktuelles-lightbox[data-single-image] .aktuelles-lightbox__nav,
.aktuelles-lightbox[data-single-image] .aktuelles-lightbox__counter {
    display: none;
}

/* Info Section */
.aktuelles-lightbox__info {
    padding: var(--space-l) var(--space-xl);
}

.aktuelles-lightbox__title {
    font-family: var(--font-primary);
    font-size: var(--text-l);
    font-weight: 600;
    color: var(--text-title);
    margin: 0 0 var(--space-2xs);
    line-height: 1.3;
}

.aktuelles-lightbox__date {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted, var(--text-body));
    opacity: 0.6;
    margin-bottom: var(--space-s);
}

.aktuelles-lightbox__text {
    font-family: var(--font-secondary);
    font-size: var(--text-m);
    line-height: 1.7;
    color: var(--text-body);
    margin: 0;
}

/* ─────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────── */

/* Tablet Large — hide arrows, native scroll */
@container aktuelles-slider (max-width: 968px) {
    .aktuelles-slider__nav {
        display: none;
    }

    .aktuelles-slider__slider {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .aktuelles-slider__slider::-webkit-scrollbar {
        display: none;
    }

    .aktuelles-slider__track {
        transition: none;
    }

    .aktuelles-slider__item {
        scroll-snap-align: start;
    }
}

/* Tablet */
@container aktuelles-slider (max-width: 768px) {
    .aktuelles-slider__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-m);
    }

    .aktuelles-slider__slider-wrapper {
        margin: 0 calc(var(--section-padding-x) * -1);
        padding: 0 var(--section-padding-x);
    }

    .aktuelles-slider__item {
        flex: 0 0 calc(50% - var(--space-m) / 2);
    }
}

/* Mobile */
@container aktuelles-slider (max-width: 480px) {
    .aktuelles-slider__title {
        font-size: var(--text-xl);
    }

    .aktuelles-slider__subtitle {
        font-size: var(--text-s);
    }

    .aktuelles-slider__item {
        flex: 0 0 calc(85% - var(--space-m) / 2);
    }

    .aktuelles-slider__dots {
        margin-top: var(--space-l);
    }
}

/* Modal responsive — outside container query since modal is fixed */
@media (max-width: 768px) {
    .aktuelles-lightbox__content {
        width: 95vw;
        max-height: 85vh;
    }

    .aktuelles-lightbox__media {
        aspect-ratio: 4 / 3;
    }

    .aktuelles-lightbox__info {
        padding: var(--space-m);
    }

    .aktuelles-lightbox__title {
        font-size: var(--text-m);
    }
}

@media (max-width: 480px) {
    .aktuelles-lightbox__content {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .aktuelles-lightbox__nav {
        width: 36px;
        height: 36px;
    }

    .aktuelles-lightbox__nav--prev {
        left: var(--space-2xs);
    }

    .aktuelles-lightbox__nav--next {
        right: var(--space-2xs);
    }

    .aktuelles-lightbox__info {
        padding: var(--space-s) var(--space-m);
    }
}
