/**
 * Post Slider Carousel v2.0 – Luxury Bottom Ribbon Layout
 *
 * CSS Custom Properties (set on .psc-slider):
 *   --psc-ribbon-bg       Ribbon background colour
 *   --psc-ribbon-text     Ribbon text colour
 *   --psc-accent          Gold / accent colour
 *   --psc-ribbon-opacity  Ribbon opacity (0.5 – 1)
 *   --psc-height          Slider total height
 *
 * @package PostSliderCarousel
 */

/* ═══════════════════════════════════════════
   GOOGLE FONTS IMPORT
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,500&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Outfit:wght@300;400;500;600&display=swap');


/* ═══════════════════════════════════════════
   RESET & CONTAINER
   ═══════════════════════════════════════════ */

.psc-slider,
.psc-slider *,
.psc-slider *::before,
.psc-slider *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.psc-slider {
    --_ribbon-bg: var(--psc-ribbon-bg, #0a1628);
    --_ribbon-text: var(--psc-ribbon-text, #f0e6d3);
    --_accent: var(--psc-accent, #c9a84c);
    --_ribbon-opacity: var(--psc-ribbon-opacity, 0.95);
    --_height: var(--psc-height, 560px);

    position: relative;
    width: 100%;
    max-width: 100%;
    height: var(--_height);
    overflow: hidden;
    background: #0a0e1a;
    font-family: 'Outfit', sans-serif;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}


/* ═══════════════════════════════════════════
   TRACK & SLIDES
   ═══════════════════════════════════════════ */

.psc-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.psc-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

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


/* ═══════════════════════════════════════════
   FEATURED IMAGE – FULL & CLEAN
   ═══════════════════════════════════════════ */

.psc-slide-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 8s ease-out;
}

/* Subtle slow zoom on active */
.psc-slide.psc-active .psc-slide-image {
    transform: scale(1.06);
}

/* Placeholder when no featured image */
.psc-slide-placeholder {
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 40%, #0d1b30 100%);
}


/* ═══════════════════════════════════════════
   GOLD ACCENT LINE (above ribbon)
   ═══════════════════════════════════════════ */

.psc-ribbon-accent {
    position: absolute;
    bottom: 170px;   /* Will sit right above the ribbon */
    left: 0;
    right: 0;
    height: 2px;
    z-index: 8;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--_accent) 15%,
        var(--_accent) 85%,
        transparent 100%
    );
    opacity: 0.7;
}


/* ═══════════════════════════════════════════
   BOTTOM RIBBON – THE MAIN TEXT AREA
   ═══════════════════════════════════════════ */

.psc-ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    min-height: 170px;
    background: rgba(
        from var(--_ribbon-bg) r g b / var(--_ribbon-opacity)
    );
    /* Fallback for browsers that don't support relative color syntax */
    background: var(--_ribbon-bg);
    opacity: var(--_ribbon-opacity);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}

/* Subtle inner glow at top of ribbon */
.psc-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.3) 20%,
        rgba(201, 168, 76, 0.5) 50%,
        rgba(201, 168, 76, 0.3) 80%,
        transparent 100%
    );
}

.psc-ribbon-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 28px 56px;
    max-width: 1400px;
    margin: 0 auto;
}


/* ═══════════════════════════════════════════
   RIBBON CONTENT – TITLE, EXCERPT, META
   ═══════════════════════════════════════════ */

.psc-ribbon-content {
    flex: 1;
    min-width: 0;
    color: var(--_ribbon-text);
}

.psc-ribbon-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.psc-ribbon-title a {
    color: var(--_ribbon-text);
    text-decoration: none;
    transition: color 0.3s ease;
    background-image: linear-gradient(var(--_accent), var(--_accent));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 2px;
    transition: background-size 0.4s ease, color 0.3s ease;
}

.psc-ribbon-title a:hover,
.psc-ribbon-title a:focus-visible {
    color: var(--_accent);
    background-size: 100% 2px;
}

.psc-ribbon-excerpt {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.05rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 12px;
    max-width: 600px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--_ribbon-text);
}

.psc-ribbon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--_accent);
}

.psc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.psc-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}


/* ═══════════════════════════════════════════
   READ MORE BUTTON – LUXURY CTA
   ═══════════════════════════════════════════ */

.psc-ribbon-cta {
    flex-shrink: 0;
}

.psc-btn-read {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: transparent;
    color: var(--_accent);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1.5px solid var(--_accent);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.35s ease, border-color 0.35s ease;
}

/* Gold fill on hover */
.psc-btn-read::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--_accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}

.psc-btn-read:hover::before,
.psc-btn-read:focus-visible::before {
    transform: scaleX(1);
}

.psc-btn-read:hover,
.psc-btn-read:focus-visible {
    color: var(--_ribbon-bg);
    border-color: var(--_accent);
}

.psc-btn-text,
.psc-btn-arrow {
    position: relative;
    z-index: 1;
}

.psc-btn-arrow {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.psc-btn-read:hover .psc-btn-arrow {
    transform: translateX(4px);
}


/* ═══════════════════════════════════════════
   NAVIGATION ARROWS (in image area)
   ═══════════════════════════════════════════ */

.psc-nav {
    position: absolute;
    top: calc((var(--_height) - 170px) / 2);
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 0;
    background: rgba(10, 22, 40, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.psc-nav:hover,
.psc-nav:focus-visible {
    background: var(--_accent);
    border-color: var(--_accent);
    color: var(--_ribbon-bg);
    transform: translateY(-50%) scale(1.05);
}

.psc-nav-prev { left: 24px; }
.psc-nav-next { right: 24px; }


/* ═══════════════════════════════════════════
   DOT INDICATORS (above ribbon, right-aligned)
   ═══════════════════════════════════════════ */

.psc-dots {
    position: absolute;
    bottom: 185px;
    right: 56px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.psc-dot {
    width: 28px;
    height: 3px;
    border-radius: 0;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: all 0.4s ease;
}

.psc-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.psc-dot-active {
    background: var(--_accent);
    width: 48px;
}


/* ═══════════════════════════════════════════
   SLIDE COUNTER (top-right)
   ═══════════════════════════════════════════ */

.psc-counter {
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 10;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
    background: rgba(10, 22, 40, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 8px 16px;
    border: 1px solid rgba(201, 168, 76, 0.15);
}

.psc-counter-current {
    color: var(--_accent);
    font-weight: 700;
    font-size: 1.15rem;
}

.psc-counter-sep {
    margin: 0 4px;
    opacity: 0.4;
}


/* ═══════════════════════════════════════════
   PROGRESS BAR (bottom edge of slider)
   ═══════════════════════════════════════════ */

.psc-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 12;
    overflow: hidden;
}

.psc-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--_accent), #e8d5a3);
    will-change: width;
}


/* ═══════════════════════════════════════════
   FADE TRANSITION
   ═══════════════════════════════════════════ */

.psc-transition-fade .psc-slide {
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.psc-transition-fade .psc-slide.psc-fade-in {
    opacity: 1;
    visibility: visible;
    z-index: 3;
}

.psc-transition-fade .psc-slide.psc-fade-out {
    opacity: 0;
    visibility: hidden;
    z-index: 2;
}


/* ═══════════════════════════════════════════
   SLIDE TRANSITION (keyframes)
   ═══════════════════════════════════════════ */

@keyframes psc-slide-in-from-right {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes psc-slide-in-from-left {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes psc-slide-out-to-left {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(-100%); opacity: 0; }
}
@keyframes psc-slide-out-to-right {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

.psc-transition-slide .psc-slide.psc-slide-in-right {
    animation: psc-slide-in-from-right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 3;
}
.psc-transition-slide .psc-slide.psc-slide-in-left {
    animation: psc-slide-in-from-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 3;
}
.psc-transition-slide .psc-slide.psc-slide-out-left {
    animation: psc-slide-out-to-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 2;
}
.psc-transition-slide .psc-slide.psc-slide-out-right {
    animation: psc-slide-out-to-right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 2;
}


/* ═══════════════════════════════════════════
   RIBBON CONTENT ENTER ANIMATION
   ═══════════════════════════════════════════ */

@keyframes psc-ribbon-content-in {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.psc-slide.psc-active .psc-ribbon-title {
    animation: psc-ribbon-content-in 0.5s 0.2s ease both;
}
.psc-slide.psc-active .psc-ribbon-excerpt {
    animation: psc-ribbon-content-in 0.5s 0.3s ease both;
}
.psc-slide.psc-active .psc-ribbon-meta {
    animation: psc-ribbon-content-in 0.5s 0.4s ease both;
}
.psc-slide.psc-active .psc-btn-read {
    animation: psc-ribbon-content-in 0.5s 0.35s ease both;
}


/* ═══════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════ */

@media ( prefers-reduced-motion: reduce ) {
    .psc-slider .psc-slide,
    .psc-slider .psc-slide *,
    .psc-slider .psc-slide-image {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

.psc-reduced-motion .psc-slide,
.psc-reduced-motion .psc-slide *,
.psc-reduced-motion .psc-slide-image {
    animation: none !important;
    transition-duration: 0.01ms !important;
}


/* ═══════════════════════════════════════════
   NO POSTS FALLBACK
   ═══════════════════════════════════════════ */

.psc-no-posts {
    text-align: center;
    padding: 64px 24px;
    color: #888;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
}


/* ═══════════════════════════════════════════
   RESPONSIVE – TABLET (≤ 960px)
   ═══════════════════════════════════════════ */

@media ( max-width: 960px ) {

    .psc-slider {
        --_height: 500px;
    }

    .psc-ribbon-inner {
        padding: 24px 32px;
        gap: 24px;
    }

    .psc-ribbon-title {
        font-size: 1.35rem;
    }

    .psc-ribbon-excerpt {
        font-size: 0.95rem;
        -webkit-line-clamp: 1;
    }

    .psc-nav {
        width: 42px;
        height: 42px;
    }

    .psc-nav-prev { left: 16px; }
    .psc-nav-next { right: 16px; }

    .psc-dots {
        right: 32px;
        bottom: 182px;
    }

    .psc-counter {
        top: 20px;
        right: 20px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}


/* ═══════════════════════════════════════════
   RESPONSIVE – MOBILE (≤ 680px)
   ═══════════════════════════════════════════ */

@media ( max-width: 680px ) {

    .psc-slider {
        --_height: 480px;
    }

    /* Stack ribbon content vertically */
    .psc-ribbon {
        min-height: 160px;
    }

    .psc-ribbon-accent {
        bottom: 160px;
    }

    .psc-ribbon-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px 24px;
    }

    .psc-ribbon-title {
        font-size: 1.2rem;
    }

    .psc-ribbon-excerpt {
        font-size: 0.88rem;
        margin-bottom: 4px;
    }

    .psc-ribbon-meta {
        gap: 14px;
        font-size: 0.72rem;
    }

    .psc-btn-read {
        padding: 10px 24px;
        font-size: 0.75rem;
        letter-spacing: 0.12em;
    }

    .psc-nav {
        width: 38px;
        height: 38px;
        top: calc((var(--_height) - 160px) / 2);
    }

    .psc-nav-prev { left: 10px; }
    .psc-nav-next { right: 10px; }

    .psc-dots {
        bottom: 172px;
        right: 24px;
        gap: 6px;
    }

    .psc-dot {
        width: 20px;
        height: 2px;
    }

    .psc-dot-active {
        width: 36px;
    }

    .psc-counter {
        top: 14px;
        right: 14px;
        font-size: 0.82rem;
        padding: 5px 10px;
    }
}


/* ═══════════════════════════════════════════
   RESPONSIVE – SMALL MOBILE (≤ 440px)
   ═══════════════════════════════════════════ */

@media ( max-width: 440px ) {

    .psc-slider {
        --_height: 440px;
    }

    .psc-ribbon {
        min-height: 150px;
    }

    .psc-ribbon-accent {
        bottom: 150px;
    }

    .psc-ribbon-inner {
        padding: 16px 18px;
        gap: 10px;
    }

    .psc-ribbon-title {
        font-size: 1.05rem;
    }

    .psc-ribbon-excerpt {
        display: none;  /* Hide excerpt on very small screens */
    }

    /* Hide arrows on tiny screens – swipe only */
    .psc-nav {
        display: none;
    }

    .psc-dots {
        bottom: 162px;
        right: 18px;
    }

    .psc-counter {
        display: none;
    }
}
