/**
 * NFB Slider Styles
 * Modern, responsive slider for homepage NFB regions
 *
 * @package epcan-gebietsseiten
 */

/* ============================================================================
   SLIDER CONTAINER
   ============================================================================ */

.epcan-nfb-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background-color: #000;
}

.epcan-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 250px;
}

/* ============================================================================
   INDIVIDUAL SLIDES
   ============================================================================ */

.epcan-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.epcan-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    position: relative;
}

/* Dark Overlay for Text Readability */
.epcan-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

/* ============================================================================
   SLIDE CONTENT
   ============================================================================ */

.epcan-slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 250px;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Speed Badge (Top Right) - Modern Ribbon/Bookmark Style */
.epcan-slide-badge {
    position: absolute;
    top: 0;
    right: 50px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 24px 20px 24px;
    letter-spacing: 0.3px;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
    z-index: 3;
    border-radius: 0 0 2px 2px;
    backdrop-filter: blur(8px);
}

/* Title Styling */
.epcan-slide-title {
    color: #fff;
    font-weight: 700;
    margin: 0 0 30px 0;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.epcan-slide-pretitle {
    font-size: 24px;
    font-weight: 400;
    opacity: 0.9;
}

.epcan-slide-maintitle {
    font-size: 48px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Subtitle (for Verfügbarkeit slide) */
.epcan-slide-subtitle {
    color: #fff;
    font-size: 20px;
    margin: 0 0 30px 0;
    opacity: 0.95;
}

/* CTA Button */
.epcan-slide-button {
    display: inline-block;
    background-color: #f1800e;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 20px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.epcan-slide-button:hover {
    background-color: #d66f0c;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
    text-decoration: none;
}

.epcan-slide-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   DOTS NAVIGATION
   ============================================================================ */

.epcan-slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.epcan-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.epcan-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.epcan-dot.active {
    background-color: #f1800e;
    border-color: #f1800e;
    width: 32px;
    border-radius: 6px;
}

/* ============================================================================
   PREV/NEXT ARROWS
   ============================================================================ */

.epcan-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.epcan-slider-arrow svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    stroke-width: 2.5;
}

.epcan-slider-arrow:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

.epcan-arrow-prev {
    left: 20px;
}

.epcan-arrow-next {
    right: 20px;
}

/* Hide arrows on very small screens */
@media (max-width: 480px) {
    .epcan-slider-arrow {
        display: none;
    }
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.epcan-nfb-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.epcan-nfb-slider.loading .epcan-slide {
    opacity: 0.5;
}

.epcan-nfb-slider.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(241, 128, 14, 0.2);
    border-top-color: #f1800e;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
    z-index: 100;
}

@keyframes spinner {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================================================ */

/* Mobile (< 768px) - DEFAULT */
.epcan-slider-wrapper,
.epcan-slide {
    min-height: 250px;
}

.epcan-slide-content {
    padding: 30px 20px;
    min-height: 250px;
}

.epcan-slide-badge {
    top: 0;
    right: 30px;
    font-size: 12px;
    padding: 10px 18px 14px 18px;
}

.epcan-slide-pretitle {
    font-size: 18px;
}

.epcan-slide-maintitle {
    font-size: 32px;
}

.epcan-slide-subtitle {
    font-size: 16px;
}

.epcan-slide-button {
    font-size: 14px;
    padding: 14px 32px;
}

.epcan-slider-dots {
    bottom: 20px;
    gap: 8px;
}

.epcan-dot {
    width: 10px;
    height: 10px;
}

.epcan-dot.active {
    width: 24px;
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) {
    .epcan-slider-wrapper,
    .epcan-slide {
        min-height: 350px;
    }

    .epcan-slide-content {
        padding: 40px 40px;
        min-height: 350px;
    }

    .epcan-slide-badge {
        top: 0;
        right: 40px;
        font-size: 13px;
        padding: 12px 20px 16px 20px;
    }

    .epcan-slide-pretitle {
        font-size: 22px;
    }

    .epcan-slide-maintitle {
        font-size: 40px;
    }

    .epcan-slide-subtitle {
        font-size: 18px;
    }

    .epcan-slide-button {
        font-size: 15px;
        padding: 15px 36px;
    }
}

/* Desktop (> 1024px) */
@media (min-width: 1024px) {
    .epcan-slider-wrapper,
    .epcan-slide {
        min-height: 380px;
    }

    .epcan-slide-content {
        padding: 50px 60px;
        min-height: 380px;
    }

    .epcan-slide-badge {
        top: 0;
        right: 50px;
        font-size: 14px;
        padding: 14px 24px 20px 24px;
    }

    .epcan-slide-pretitle {
        font-size: 24px;
    }

    .epcan-slide-maintitle {
        font-size: 48px;
    }

    .epcan-slide-subtitle {
        font-size: 20px;
    }

    .epcan-slide-button {
        font-size: 16px;
        padding: 16px 40px;
    }

    .epcan-slider-dots {
        bottom: 30px;
        gap: 12px;
    }

    .epcan-dot {
        width: 12px;
        height: 12px;
    }

    .epcan-dot.active {
        width: 32px;
    }
}

/* Large Desktop (> 1440px) */
@media (min-width: 1440px) {
    .epcan-slider-wrapper,
    .epcan-slide {
        min-height: 420px;
    }

    .epcan-slide-content {
        min-height: 420px;
        padding: 60px 80px;
    }

    .epcan-slide-pretitle {
        font-size: 28px;
    }

    .epcan-slide-maintitle {
        font-size: 56px;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Focus Styles for Keyboard Navigation */
.epcan-dot:focus,
.epcan-slider-arrow:focus,
.epcan-slide-button:focus {
    outline: none;
}

.epcan-dot:focus-visible,
.epcan-slider-arrow:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.epcan-slide-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .epcan-slide,
    .epcan-dot,
    .epcan-slider-arrow,
    .epcan-slide-button {
        transition: none !important;
        animation: none !important;
    }

    .epcan-slide-badge {
        animation: none !important;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .epcan-slider-dots,
    .epcan-slider-arrow {
        display: none;
    }

    .epcan-slide {
        page-break-inside: avoid;
    }
}
