/**
 * CPP Hero Slider - Front-Office Styles
 *
 * @author    Costume Privé Paris
 * @copyright 2024 Costume Privé Paris
 */

/* ========================================
   FORCE FULL WIDTH - BREAK OUT OF CONTAINER
   ======================================== */

.cpp-hero-slider {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    overflow: hidden;
}

.cpp-hero-slider *,
.cpp-hero-slider *::before,
.cpp-hero-slider *::after {
    box-sizing: border-box;
}

/* ========================================
   SLIDES CONTAINER
   ======================================== */

.cpp-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 800px;
    min-height: 400px;
}

.cpp-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0c1219;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cpp-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* ========================================
   OVERLAY
   ======================================== */

.cpp-slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cpp-overlay-color, rgba(0,0,0,0.35));
    z-index: 1;
}

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

.cpp-hero-content {
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    z-index: 2;
    position: relative;
}

.cpp-hero-title {
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 58px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    color: var(--cpp-text-color, #ffffff) !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.35) !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
}

.cpp-hero-subtitle {
    font-family: Georgia, serif !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: 0.08em !important;
    color: var(--cpp-text-color, #ffffff) !important;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3) !important;
    margin: 0 0 0.6rem 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.cpp-hero-tagline {
    font-family: Georgia, serif !important;
    font-size: 18px !important;
    font-style: italic !important;
    font-weight: 400 !important;
    color: var(--cpp-text-color, rgba(255,255,255,0.95)) !important;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3) !important;
    margin: 0 0 3rem 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.cpp-hero-cta {
    display: inline-block !important;
    padding: 16px 40px !important;
    background-color: var(--cpp-btn-bg, #1a2a3a) !important;
    color: var(--cpp-btn-text, #ffffff) !important;
    text-decoration: none !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25) !important;
    margin: 0 !important;
}

.cpp-hero-cta:hover,
.cpp-hero-cta:focus {
    background-color: var(--cpp-btn-hover-bg, #c9a962) !important;
    color: var(--cpp-btn-hover-text, #1a2a3a) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
    text-decoration: none !important;
}

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

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

.cpp-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.cpp-slider-dot:hover {
    background: rgba(255,255,255,0.6);
}

.cpp-slider-dot.active {
    background: #ffffff;
    border-color: #ffffff;
    transform: scale(1.2);
}

/* ========================================
   NAVIGATION ARROWS
   ======================================== */

.cpp-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 20px;
}

.cpp-slider-arrow:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.cpp-slider-arrow.prev {
    left: 30px;
}

.cpp-slider-arrow.next {
    right: 30px;
}

.cpp-slider-arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ========================================
   TABLET STYLES (768px - 1024px)
   ======================================== */

@media screen and (max-width: 1024px) {
    .cpp-hero-slider {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        left: 50%;
        right: 50%;
    }

    .cpp-slides-wrapper {
        height: 75vh;
        min-height: 500px;
        max-height: 700px;
    }

    .cpp-hero-content {
        padding: 2rem;
        max-width: 90%;
    }

    .cpp-hero-title {
        font-size: clamp(36px, 6vw, 48px) !important;
        letter-spacing: 0.08em !important;
    }

    .cpp-hero-subtitle {
        font-size: clamp(16px, 2.5vw, 20px) !important;
    }

    .cpp-hero-tagline {
        font-size: clamp(14px, 2vw, 18px) !important;
        margin-bottom: 2.5rem !important;
    }

    .cpp-hero-cta {
        padding: 14px 35px !important;
        font-size: 13px !important;
    }

    .cpp-slider-arrow {
        width: 44px;
        height: 44px;
    }

    .cpp-slider-arrow.prev {
        left: 15px;
    }

    .cpp-slider-arrow.next {
        right: 15px;
    }
}

/* ========================================
   MOBILE STYLES (< 768px)
   ======================================== */

@media screen and (max-width: 767px) {
    .cpp-hero-slider {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        left: 50%;
        right: 50%;
    }

    .cpp-slides-wrapper {
        height: 100svh;
        min-height: 100svh;
        max-height: none;
    }

    .cpp-slide {
        background-position: center center;
        background-size: cover;
    }

    .cpp-hero-content {
        padding: 1.5rem;
        max-width: 100%;
        width: 100%;
    }

    .cpp-hero-title {
        font-size: clamp(24px, 8vw, 36px) !important;
        letter-spacing: 0.06em !important;
        margin-bottom: 1rem !important;
        word-break: break-word;
    }

    .cpp-hero-subtitle {
        font-size: clamp(14px, 4vw, 18px) !important;
        letter-spacing: 0.04em !important;
    }

    .cpp-hero-tagline {
        font-size: clamp(12px, 3.5vw, 16px) !important;
        margin-bottom: 2rem !important;
    }

    .cpp-hero-cta {
        padding: 14px 28px !important;
        font-size: clamp(11px, 3vw, 13px) !important;
        letter-spacing: 0.1em !important;
        width: auto;
        max-width: 90%;
    }

    .cpp-slider-arrow {
        display: none !important;
    }

    .cpp-slider-dots {
        bottom: 25px;
        gap: 12px;
    }

    .cpp-slider-dot {
        width: 12px;
        height: 12px;
    }
}

/* ========================================
   SMALL MOBILE (< 480px)
   ======================================== */

@media screen and (max-width: 479px) {
    .cpp-slides-wrapper {
        height: 100svh;
        min-height: 100svh;
    }

    .cpp-hero-content {
        padding: 1rem;
    }

    .cpp-hero-title {
        font-size: clamp(22px, 7vw, 30px) !important;
    }

    .cpp-hero-subtitle {
        font-size: clamp(13px, 3.5vw, 16px) !important;
    }

    .cpp-hero-tagline {
        font-size: clamp(11px, 3vw, 14px) !important;
    }

    .cpp-hero-cta {
        padding: 12px 24px !important;
        font-size: 11px !important;
    }
}

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

.cpp-slider-arrow:focus,
.cpp-slider-dot:focus,
.cpp-hero-cta:focus {
    outline: 2px solid #c9a962;
    outline-offset: 2px;
}

.cpp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes cpp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpp-slide.active .cpp-hero-content {
    animation: cpp-fadeIn 0.8s ease 0.2s both;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .cpp-slide,
    .cpp-hero-cta,
    .cpp-slider-arrow,
    .cpp-slider-dot {
        transition: none !important;
    }

    .cpp-slide.active .cpp-hero-content {
        animation: none !important;
    }
}

/* ========================================
   DEVICE VISIBILITY
   ======================================== */

/* Desktop: > 1024px */
@media screen and (min-width: 1025px) {
    .cpp-slide.cpp-hide-desktop {
        display: none !important;
    }
    /* Hide navigation if only desktop slides exist and there's only one */
    .cpp-hero-slider.cpp-single-slide-desktop .cpp-slider-arrow,
    .cpp-hero-slider.cpp-single-slide-desktop .cpp-slider-dots {
        display: none !important;
    }
}

/* Tablet: 768px - 1024px */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .cpp-slide.cpp-hide-tablet {
        display: none !important;
    }
    .cpp-hero-slider.cpp-single-slide-tablet .cpp-slider-arrow,
    .cpp-hero-slider.cpp-single-slide-tablet .cpp-slider-dots {
        display: none !important;
    }
}

/* Mobile: < 768px */
@media screen and (max-width: 767px) {
    .cpp-slide.cpp-hide-mobile {
        display: none !important;
    }
    .cpp-hero-slider.cpp-single-slide-mobile .cpp-slider-arrow,
    .cpp-hero-slider.cpp-single-slide-mobile .cpp-slider-dots {
        display: none !important;
    }
}

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

@media print {
    .cpp-hero-slider {
        height: auto !important;
        page-break-inside: avoid;
    }

    .cpp-slides-wrapper {
        height: auto !important;
    }

    .cpp-slide {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .cpp-slider-arrow,
    .cpp-slider-dots {
        display: none !important;
    }
}
