/* ============================================
   VIDEO REEL SECTION — STREAMING CAROUSEL
   Center-anchored fan layout like the reference
   ============================================ */

.reel-section {
    position: relative;
    padding: 100px 0 80px;
    background: #030303;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ambient red glow — always behind center */
.reel-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center,
        rgba(160, 15, 15, 0.45) 0%,
        rgba(100, 8, 8, 0.2) 40%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

/* Section Header */
.reel-section .section-header {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 60px;
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
    z-index: 2;
    width: 100%;
}

.reel-section .section-header .header-title-group {
    align-items: center;
    text-align: center;
}

/* ============================================
   CAROUSEL STAGE — fixed height, overflow hidden
   ============================================ */
.reel-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    /* Left/right edge fades */
    -webkit-mask-image: linear-gradient(to right,
        transparent 0%,
        black 20%,
        black 80%,
        transparent 100%);
    mask-image: linear-gradient(to right,
        transparent 0%,
        black 20%,
        black 80%,
        transparent 100%);
}

/* ============================================
   THE TRACK — absolutely positioned cards
   ============================================ */
.reel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* ============================================
   REEL CARD — all positioned via JS transform
   ============================================ */
.reel-card {
    position: absolute;
    width: 210px;
    height: 315px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    /* JS sets transform + opacity. CSS only handles transition speed */
    transition:
        transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.55s ease,
        filter 0.55s ease,
        box-shadow 0.55s ease;
}

/* Card thumbnail fills the card */
.reel-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Gradient overlay always on */
.reel-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.35) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

/* ============================================
   CARD META — TOP (badge + rating)
   ============================================ */
.reel-card-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 3;
}

.reel-platform-badge {
    background: var(--color-primary);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
}

.reel-card[data-platform="youtube"] .reel-platform-badge {
    background: #ff0000;
    color: #fff;
}

.reel-card[data-platform="instagram"] .reel-platform-badge {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: #fff;
}

.reel-card[data-platform="client"] .reel-platform-badge {
    background: #1a73e8;
    color: #fff;
}

.reel-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 6px;
    padding: 4px 8px;
}

.reel-rating-score {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.reel-rating-star {
    color: var(--color-primary);
    font-size: 0.7rem;
}

/* ============================================
   CARD META — BOTTOM (title + meta)
   ============================================ */
.reel-card-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 14px 16px;
    z-index: 3;
}

.reel-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.reel-card-meta {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    display: flex;
    gap: 6px;
}

.reel-card-meta span + span::before {
    content: '·';
    margin-right: 6px;
    opacity: 0.4;
}

/* ============================================
   PLAY BUTTON — only visible on active card
   ============================================ */
.reel-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 58px;
    height: 58px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.45);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease;
    z-index: 4;
    pointer-events: none;
}

.reel-play-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 3px;
}

/* JS adds .is-active to the center card */
.reel-card.is-active .reel-play-btn {
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.reel-card.is-active:hover .reel-play-btn {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ============================================
   NAVIGATION ARROWS
   ============================================ */
.reel-nav {
    display: flex;
    gap: 16px;
    margin-top: 44px;
    z-index: 2;
    position: relative;
}

.reel-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reel-nav-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #000;
    transform: scale(1.1);
}

.reel-nav-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   DOTS
   ============================================ */
.reel-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    z-index: 2;
    position: relative;
}

.reel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.reel-dot.active {
    width: 22px;
    border-radius: 3px;
    background: var(--color-primary);
}

/* ============================================
   VIDEO MODAL
   ============================================ */
.reel-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.reel-modal.open {
    opacity: 1;
    pointer-events: all;
}

.reel-modal-shell {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.reel-modal-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    transform: scale(0.92);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: #000;
}

.reel-modal.open .reel-modal-inner {
    transform: scale(1);
}

.reel-modal-inner iframe,
.reel-modal-inner video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.reel-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.reel-modal-close:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #000;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .reel-carousel-wrapper { height: 380px; }
    .reel-card { width: 165px; height: 248px; }
}

@media (max-width: 480px) {
    .reel-carousel-wrapper { height: 320px; }
    .reel-card { width: 140px; height: 210px; }
    .reel-play-btn { width: 44px; height: 44px; }
    .reel-play-btn svg { width: 16px; height: 16px; }
}
