/* Instagram Reels Section */
.insta-reels-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    overflow: hidden;
}

.insta-reels-header {
    text-align: center;
    margin-bottom: 3rem;
}

.insta-reels-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.insta-reels-title i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #833AB4, #E4405F, #F56040);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.insta-reels-title h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #1a1a2e;
}

.insta-reels-header p {
    color: #666;
    font-size: 1rem;
}

/* Slider Container */
.insta-reels-slider-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 40px;
}

.insta-reels-slider {
    overflow: hidden;
    border-radius: 20px;
}

.insta-reels-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

/* Reel Card */
.insta-reel-card {
    flex-shrink: 0;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8ecf2;
}

.insta-reel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #03b9c8;
}

.reel-thumbnail {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #1a1a2e;
}

.reel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.insta-reel-card:hover .reel-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.insta-reel-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.reel-info {
    padding: 1rem;
}

.reel-info h4 {
    font-family: var(--font-nav);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #1a1a2e;
}

.reel-info span {
    font-size: 0.7rem;
    color: #888;
}

/* Slider Navigation Buttons */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    border: 1px solid #e8ecf2;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.slider-nav-btn:hover {
    background: #03b9c8;
    color: white;
    border-color: #03b9c8;
}

.slider-nav-btn.prev {
    left: 0;
}

.slider-nav-btn.next {
    right: 0;
}

.slider-nav-btn i {
    font-size: 1.2rem;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    width: 30px;
    border-radius: 10px;
    background: #03b9c8;
}

/* Desktop: 3 cards per view */
@media (min-width: 1024px) {
    .insta-reel-card {
        width: calc((100% - 40px) / 3);
    }
}

/* Tablet: 2 cards per view */
@media (min-width: 768px) and (max-width: 1023px) {
    .insta-reels-slider-container {
        padding: 0 35px;
    }
    
    .insta-reel-card {
        width: calc((100% - 20px) / 2);
    }
}

/* Mobile: 1 card per view */
@media (max-width: 767px) {
    .insta-reels-section {
        padding: 3rem 1rem;
    }
    
    .insta-reels-slider-container {
        padding: 0 30px;
    }
    
    .insta-reel-card {
        width: 100%;
    }
    
    .slider-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .slider-nav-btn i {
        font-size: 0.9rem;
    }
    
    .insta-reels-title h2 {
        font-size: 1.5rem;
    }
    
    .insta-reels-title i {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .insta-reels-slider-container {
        padding: 0 25px;
    }
    
    .reel-info h4 {
        font-size: 0.75rem;
    }
    
    .reel-info span {
        font-size: 0.65rem;
    }
}

/* ========== FULLSCREEN MODAL STYLES ========== */
.reels-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 20000;
}

.reels-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

/* Exit Fullscreen Button */
.exit-fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.exit-fullscreen-btn:hover {
    background: #ff4757;
    transform: scale(1.05);
}

.close-reels-modal {
    position: absolute;
    top: 20px;
    right: 70px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-reels-modal:hover {
    background: #ff4757;
    transform: scale(1.05);
}

/* Reels Container */
.reels-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.reels-container::-webkit-scrollbar {
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.reels-container::-webkit-scrollbar-thumb {
    background: #03b9c8;
    border-radius: 4px;
}

.reel-item {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.reel-video::-webkit-media-controls {
    display: none !important;
}

.reel-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.reel-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 15;
}

.reel-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #03b9c8, #84cc16);
    transition: width linear;
}

.reel-controls {
    position: absolute;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 15;
}

.reel-control-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.reel-control-btn:hover {
    background: #03b9c8;
    transform: scale(1.05);
}

.reel-info-overlay {
    position: absolute;
    bottom: 30px;
    left: 20px;
    color: white;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    z-index: 15;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.reel-info-overlay h3 {
    font-family: var(--font-nav);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.reel-info-overlay p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Swipe/Scroll Indicator Styles */
.swipe-indicator {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20020;
    animation: bounce 2s infinite;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.swipe-indicator span {
    color: white;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
    opacity: 0.9;
}

.swipe-indicator i {
    color: white;
    font-size: 1.2rem;
    opacity: 0.9;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}


/* Mobile Video & Overlay Fixes */
@media (max-width: 768px) {
    /* Fix reel item height for mobile */
    .reel-item {
        height: 100vh;
        width: 100%;
        position: relative;
    }
    
    /* Fix video sizing - cover instead of contain for mobile */
    .reel-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Reposition controls - move up to avoid bottom cut-off */
    .reel-controls {
        position: absolute;
        bottom: 100px;
        right: 15px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        z-index: 15;
    }
    
    /* Smaller buttons for mobile but still visible */
    .reel-control-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        background: rgba(0, 0, 0, 0.65);
    }
    
    /* Fix info overlay position - move up */
    .reel-info-overlay {
        position: absolute;
        bottom: 80px;
        left: 15px;
        right: 70px;
        color: white;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
        z-index: 15;
        background: rgba(0, 0, 0, 0.5);
        padding: 10px 15px;
        border-radius: 20px;
        backdrop-filter: blur(5px);
        max-width: 70%;
    }
    
    /* Better text sizing for mobile */
    .reel-info-overlay h3 {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .reel-info-overlay p {
        font-size: 0.7rem;
        opacity: 0.8;
    }
    
    /* Progress bar - keep at top */
    .reel-progress {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: rgba(255, 255, 255, 0.3);
        z-index: 20;
    }
    
    /* Close and exit buttons */
    .close-reels-modal, .exit-fullscreen-btn {
        top: 15px;
        width: 38px;
        height: 38px;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(5px);
    }
    
    .close-reels-modal {
        right: 15px;
    }
    
    .exit-fullscreen-btn {
        right: 65px;
    }
    
    /* Swipe indicator position */
     .swipe-indicator {
        bottom: 100px;
        padding: 8px 16px;
    }
    
    .swipe-indicator span {
        font-size: 0.7rem;
    }
    
    .swipe-indicator i {
        font-size: 1rem;
    }
    
    /* Fix for notched phones */
    @supports (padding: max(0px)) {
        .reel-info-overlay {
            bottom: max(80px, env(safe-area-inset-bottom));
            left: max(15px, env(safe-area-inset-left));
        }
        
        .reel-controls {
            bottom: max(100px, env(safe-area-inset-bottom));
            right: max(15px, env(safe-area-inset-right));
        }
    }
}

/* Extra small phones (under 400px) */
@media (max-width: 480px) {
    .reel-controls {
        bottom: 90px;
        gap: 12px;
    }
    
    .reel-control-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .reel-info-overlay {
        bottom: 70px;
        padding: 8px 12px;
        max-width: 75%;
    }
    
    .reel-info-overlay h3 {
        font-size: 0.8rem;
    }
    
    .reel-info-overlay p {
        font-size: 0.65rem;
    }
    
    .close-reels-modal, .exit-fullscreen-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
}

/* Landscape mode fix */
@media (max-width: 896px) and (orientation: landscape) {
    .reel-video {
        object-fit: contain;
    }
    
    .reel-info-overlay {
        bottom: 50px;
        max-width: 60%;
        padding: 6px 12px;
    }
    
    .reel-info-overlay h3 {
        font-size: 0.75rem;
    }
    
    .reel-controls {
        bottom: 50px;
        gap: 10px;
    }
    
    .reel-control-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

/* Desktop styles (unchanged) */
@media (min-width: 769px) {
    .reel-video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .reel-info-overlay {
        bottom: 30px;
        left: 20px;
    }
    
    .reel-controls {
        bottom: 80px;
        right: 20px;
    }
}

/* Fullscreen specific fixes */
.reel-video:-webkit-full-screen {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.reel-video:fullscreen {
    object-fit: contain;
    width: 100%;
    height: 100%;
}