/* ================================================
   COVERFLOW BANNER SLIDER
   ================================================ */

.cf-wrap {
    position: relative;
    width: 100%;
    padding: 8px 0 42px;
    margin-top: 48px;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Stage: 3D perspective container ── */
.cf-stage {
    position: relative;
    height: 340px;
    perspective: 1400px;
    perspective-origin: 50% 50%;
}

/* ── Slide base ── */
.cf-slide {
    position: absolute;
    top: 0;
    left: 12%;
    width: 76%;
    height: 100%;
    /* overflow: visible so character can poke above the frame */
    overflow: visible;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity  0.65s ease,
                filter   0.65s ease;
    will-change: transform, opacity;
    cursor: pointer;
}

/* ── Inner frame clips bg + overlay, character is outside ── */
.cf-frame {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    overflow: hidden;
    z-index: 0;
}

/* ── Desktop positions via data-pos ── */
@media (min-width: 768px) {
    .cf-slide[data-pos="0"] {
        transform: translateX(0) rotateY(0deg) scale(1);
        z-index: 10;
        opacity: 1;
        filter: none;
        pointer-events: auto;
    }
    .cf-slide[data-pos="1"] {
        transform: translateX(73%) rotateY(-50deg) scale(0.78);
        z-index: 5;
        opacity: 0.6;
        filter: brightness(0.68) saturate(0.7);
        pointer-events: auto;
    }
    .cf-slide[data-pos="-1"] {
        transform: translateX(-73%) rotateY(50deg) scale(0.78);
        z-index: 5;
        opacity: 0.6;
        filter: brightness(0.68) saturate(0.7);
        pointer-events: auto;
    }
    .cf-slide[data-pos="2"] {
        transform: translateX(145%) rotateY(-62deg) scale(0.52);
        z-index: 1;
        opacity: 0;
        pointer-events: none;
    }
    .cf-slide[data-pos="-2"] {
        transform: translateX(-145%) rotateY(62deg) scale(0.52);
        z-index: 1;
        opacity: 0;
        pointer-events: none;
    }
}

/* ── Mobile: crossfade ── */
@media (max-width: 767px) {
    .cf-stage {
        height: 265px;
        perspective: none;
    }
    .cf-slide {
        left: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
        opacity: 0 !important;
        transform: none !important;
        filter: none !important;
        pointer-events: none !important;
        transition: opacity 0.5s ease !important;
    }
    .cf-frame {
        border-radius: 0 !important;
    }
    .cf-slide[data-pos="0"] {
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 10 !important;
    }
}

/* ── Slide background ── */
.cf-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    z-index: 0;
}

/* ── Dark gradient overlay ── */
.cf-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        108deg,
        rgba(5, 5, 20, 0.82) 0%,
        rgba(5, 5, 20, 0.52) 45%,
        rgba(5, 5, 20, 0.08) 100%
    );
    z-index: 1;
}

/* ── Character image (outside cf-frame, can overflow above) ── */
.cf-char {
    position: absolute;
    right: 0%;
    bottom: 0;
    height: 115%;
    width: auto;
    object-fit: contain;
    object-position: bottom right;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(-14px 0 28px rgba(0, 0, 0, 0.55));
}

/* ── Text content ── */
.cf-content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 56%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 30px;
    box-sizing: border-box;
}

.cf-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 5px 13px;
    margin-bottom: 13px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    width: fit-content;
}

.cf-title {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    margin: 0 0 10px;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.5px;
}

.cf-sub {
    font-size: 13.5px;
    color: rgba(255,255,255,0.82);
    line-height: 1.55;
    margin: 0 0 22px;
}

.cf-sub strong {
    color: #ffd700;
    font-weight: 700;
}

.cf-btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 50px;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #1a1000;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: fit-content;
    box-shadow: 0 5px 22px rgba(255, 160, 0, 0.45);
    white-space: nowrap;
}

.cf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 32px rgba(255, 160, 0, 0.6);
    color: #1a1000;
    text-decoration: none;
}

/* ── Navigation arrows ── */
.cf-nav {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 20px));
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(10, 10, 30, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.cf-nav:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.35);
}

.cf-nav svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.cf-nav--prev { left: 6px; }
.cf-nav--next { right: 6px; }

/* ── Dots ── */
.cf-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    align-items: center;
    z-index: 20;
    padding: 6px 0;
}

.cf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.28);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.cf-dot--on {
    width: 26px;
    border-radius: 4px;
    background: #ffd700;
}

/* ── Mobile adjustments ── */
@media (max-width: 767px) {
    .cf-wrap { padding: 0 0 34px; }

    .cf-char { height: 88%; right: 0; max-height: 100%; }

    .cf-content {
        padding: 16px 14px 14px 16px;
        width: 60%;
        justify-content: flex-end;
        padding-bottom: 22px;
    }

    .cf-badge {
        font-size: 9px;
        padding: 4px 10px;
        margin-bottom: 8px;
        letter-spacing: 1.2px;
    }

    .cf-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .cf-sub {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .cf-btn {
        font-size: 11px;
        padding: 9px 18px;
    }

    .cf-nav {
        width: 32px;
        height: 32px;
        transform: translateY(calc(-50% - 16px));
    }
    .cf-nav svg { width: 16px; height: 16px; }
    .cf-nav--prev { left: 3px; }
    .cf-nav--next { right: 3px; }
}

@media (max-width: 400px) {
    .cf-stage { height: 230px; }
    .cf-title { font-size: 17px; }
    .cf-content { width: 62%; }
}
