/* ===================================================================
   INSTAGRAM REELS SLIDER - CINEMATIC SHOWCASE (MONTRA STYLE)
   =================================================================== */

.ig-reels-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 80px 0 60px;
    background: radial-gradient(circle at 50% 40%, #7e1216 0%, #46090c 50%, #150204 95%);
    overflow: hidden;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-saira, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    z-index: 10;
}

/* Cinematic Background Backdrop */
.ig-reels-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ig-reels-bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1);
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: blur(28px) saturate(180%);
    transition: opacity 0.8s ease, filter 0.8s ease;
}

.ig-reels-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(136, 18, 22, 0.45) 0%, rgba(20, 3, 5, 0.85) 75%, #0d0102 100%);
    mix-blend-mode: multiply;
}

.ig-reels-bg-silhouette {
    position: absolute;
    bottom: -5%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90vw;
    height: 75vh;
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 0.28;
    filter: contrast(160%) brightness(50%);
    pointer-events: none;
    transition: background-image 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}

.ig-reels-bg-noise {
    position: absolute;
    inset: 0;
    background: radial-gradient(transparent 60%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
}

/* Header Bar */
.ig-reels-header {
    position: relative;
    z-index: 5;
    padding: 0 80px 0 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ig-reels-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: #f1f1f1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    text-decoration: none;
}

.ig-reels-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.ig-reels-brand {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-align: center;
}

/* Hero Typography Strip */
.ig-reels-hero {
    position: relative;
    z-index: 4;
    padding: 30px 80px 10px 90px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.ig-reels-title-wrap {
    max-width: 550px;
}

.ig-reels-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ff6b6b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-reels-kicker::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #ff4757;
}

.ig-reels-main-title {
    font-size: clamp(24px, 2.8vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-transform: capitalize;
    color: #ffffff;
    margin: 0 0 10px;
    transition: opacity 0.4s ease;
}

.ig-reels-meta-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.ig-reels-meta-bar span.active-author {
    color: #fff;
    font-weight: 700;
}

.ig-reels-meta-bar .dot-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

/* Slider Container */
.ig-reels-slider-wrap {
    position: relative;
    z-index: 5;
    width: 100%;
    padding: 30px 0 20px;
    overflow: hidden;
}

.ig-reels-swiper {
    width: 100%;
    padding: 40px 0 60px !important;
    overflow: visible !important;
}

.ig-reels-swiper .swiper-wrapper {
    align-items: center;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Slide Cards */
.ig-reels-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    background: #1e0508;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
    -webkit-user-drag: none;
}

/* Non-active slides */
.ig-reels-swiper .swiper-slide {
    width: 200px !important;
    height: 160px;
    opacity: 0.6;
    transform: scale(0.92);
    filter: brightness(0.7) contrast(1.1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active Center Slide */
.ig-reels-swiper .swiper-slide-active {
    width: 270px !important;
    height: 440px !important;
    opacity: 1 !important;
    transform: scale(1) translateY(-15px) !important;
    filter: brightness(1.05) contrast(1) !important;
    z-index: 20 !important;
}

.ig-reels-swiper .swiper-slide-active .ig-reels-card {
    border: 1.5px solid rgba(255, 80, 80, 0.55);
    box-shadow: 0 25px 60px rgba(160, 20, 28, 0.5), 0 0 40px rgba(255, 45, 60, 0.25);
}

/* Card Visual & Media */
.ig-card-media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #140305;
}

.ig-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.ig-reels-card:hover .ig-card-img {
    transform: scale(1.06);
}

.ig-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(20,2,4,0.1) 40%, rgba(15,1,3,0.92) 100%);
    pointer-events: none;
}

/* Badges & Icons on Card */
.ig-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
    z-index: 3;
}

.ig-card-badge i {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Play Button on Card */
.ig-card-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(230, 20, 40, 0.85);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 10px 25px rgba(220, 20, 40, 0.6);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    z-index: 4;
}

.ig-reels-swiper .swiper-slide-active .ig-card-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ig-reels-swiper .swiper-slide-active:hover .ig-card-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: #ff2a4b;
    box-shadow: 0 12px 32px rgba(255, 42, 75, 0.8);
}

.ig-card-play-btn i {
    margin-left: 3px;
}

/* Card Content / Caption */
.ig-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px 16px;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ig-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ig-card-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
}

/* Bottom Controls */
.ig-reels-footer {
    position: relative;
    z-index: 5;
    padding: 10px 80px 20px 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Progress counter like "02 —————— 09" */
.ig-reels-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: monospace, var(--font-saira);
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.ig-reels-current-num {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.ig-reels-progress-line {
    width: 160px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.ig-reels-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: #ff4757;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px #ff4757;
}

.ig-reels-total-num {
    color: rgba(255, 255, 255, 0.5);
}

/* Nav arrows */
.ig-reels-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ig-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.ig-nav-btn:hover {
    background: #ff2a4b;
    border-color: #ff2a4b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 42, 75, 0.5);
}

.ig-reels-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #e1306c 0%, #c13584 50%, #833ab4 100%);
    color: #ffffff !important;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 12px;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.4);
    transition: all 0.3s ease;
}

.ig-reels-action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 30px rgba(225, 48, 108, 0.6);
    color: #ffffff !important;
}

/* ===================================================================
   MODAL / POPUP PLAYER FOR REELS
   =================================================================== */

.ig-reel-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 1, 2, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ig-reel-modal.active {
    display: flex;
    opacity: 1;
}

.ig-modal-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.ig-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    height: 85vh;
    max-height: 820px;
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(225, 48, 108, 0.3);
    display: flex;
    flex-direction: column;
    animation: igModalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes igModalSlideUp {
    from {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.ig-modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ig-modal-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-modal-info img.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #ff2a4b;
}

.ig-modal-info h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.ig-modal-info span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.ig-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.ig-modal-close:hover {
    background: #ff2a4b;
    transform: rotate(90deg);
}

.ig-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ig-modal-body iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    background: #000000;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.ig-modal-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0b0103;
    gap: 15px;
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.ig-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ff2a4b;
    border-radius: 50%;
    animation: igSpin 0.8s linear infinite;
}

@keyframes igSpin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .ig-reels-header {
        padding: 0 25px;
    }
    .ig-reels-hero {
        padding: 20px 25px 10px;
    }
    .ig-reels-footer {
        padding: 10px 25px 20px;
    }
    .ig-reels-swiper .swiper-slide {
        width: 170px !important;
        height: 140px;
    }
    .ig-reels-swiper .swiper-slide-active {
        width: 230px !important;
        height: 380px !important;
    }
}

@media (max-width: 576px) {
    .ig-reels-section {
        padding: 50px 0 40px;
    }
    .ig-reels-header {
        padding: 0 15px;
    }
    .ig-reels-hero {
        padding: 15px 15px 5px;
    }
    .ig-reels-footer {
        padding: 10px 15px 15px;
    }
    .ig-reels-main-title {
        font-size: 24px;
    }
    .ig-reels-meta-bar {
        font-size: 10px;
        gap: 12px;
    }
    .ig-reels-swiper .swiper-slide {
        width: 130px !important;
        height: 110px;
    }
    .ig-reels-swiper .swiper-slide-active {
        width: 200px !important;
        height: 320px !important;
    }
    .ig-reels-progress-line {
        width: 90px;
    }
}
