/**
 * Only on LAFZ - Reels Section
 */

.reels-section {
    padding: 10px 0;
    background-color: var(--color-bg);
}

.reels-section .section-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 25px 0;
    padding-left: 10px;
    border-left: 3px solid #FF5722;
    display: inline-block;
}

/* Slider Wrapper */
.reels-slider-wrapper {
    position: relative;
}

/* Navigation Buttons */
.reels-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #FF5722;
    border: none;
    border-radius: 10%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
    color: #fff;
}

.reels-nav-button:hover {
    transform: translateY(-50%) scale(1.1);
}

.reels-nav-left {
    left: -20px;
}

.reels-nav-right {
    right: -20px;
}

/* Slider Container */
.reels-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.reels-slider::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

/* Reel Card */
.reel-card {
    flex: 0 0 200px;
    height: 350px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reel-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.reel-card .reel-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-card .reel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.reel-card .reel-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Play Button - Only on Hover */
.reel-card .reel-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #FF5722;
    border-radius: 50%;
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reel-card:hover .reel-play-button {
    opacity: 1;
}

.reel-card .reel-play-button svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    margin-left: 4px;
}

/* Loading Skeleton */
.reels-skeleton {
    height: 350px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==================== REELS MODAL ==================== */

/* Modal Reel Loader */
.modal-reel-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FF5722;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.reels-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9999;
    overflow: hidden;
}

.reels-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background 0.3s ease;
}

.reels-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.reels-modal-content {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.reels-modal-content::-webkit-scrollbar {
    display: none;
}

/* Modal Reel Item */
.modal-reel-item {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.modal-reel-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-reel-item .modal-reel-info {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 10;
}

.modal-reel-item .modal-reel-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.modal-reel-item .modal-reel-description {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .reels-section {
        padding: 30px 0;
    }

    .reel-card {
        flex: 0 0 160px;
        height: 280px;
    }

    .reels-nav-button {
        width: 35px;
        height: 35px;
    }

    .reels-nav-left {
        left: 5px;
    }

    .reels-nav-right {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .reels-section .section-title {
        font-size: 20px;
    }

    .reel-card {
        flex: 0 0 140px;
        height: 245px;
    }

    .reel-card .reel-title {
        font-size: 13px;
    }

    .reels-nav-button {
        display: none;
    }
}