/* Instagram reels section — homepage */
.insta-reels-section {
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.insta-reels-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(131, 58, 180, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.insta-reels-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(185, 172, 154, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.insta-reels-desc {
    max-width: 560px;
    margin: 12px auto 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.insta-reel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin-top: 40px;
}

.reel-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    cursor: pointer;
    outline: none;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.reel-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    z-index: 0;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.reel-card-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.reel-card-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(160deg, #833ab4 0%, #c13584 35%, #fd1d1d 65%, #fcb045 100%);
    opacity: 0.92;
    transition: opacity 0.3s ease;
}

.reel-card.has-thumb .reel-card-bg {
    background: #111;
    opacity: 1;
}

.reel-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.reel-card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.reel-card.has-thumb .reel-card-bg::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.05) 45%, rgba(0, 0, 0, 0.35) 100%);
}

.reel-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
    text-align: center;
}

.reel-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.reel-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    transition: transform 0.3s ease, background 0.3s ease;
    pointer-events: none;
}

.reel-card-label {
    margin-top: 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.reel-card:hover,
.reel-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(131, 58, 180, 0.2);
}

.reel-card:hover::before,
.reel-card:focus-visible::before {
    opacity: 1;
}

.reel-card:hover .reel-card-bg,
.reel-card:focus-visible .reel-card-bg {
    opacity: 1;
}

.reel-card:hover .reel-card-bg img,
.reel-card:focus-visible .reel-card-bg img {
    transform: scale(1.06);
}

.reel-card:hover .reel-play-btn,
.reel-card:focus-visible .reel-play-btn {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.35);
}

.insta-reels-cta {
    margin-top: 40px;
}

.insta-reels-cta .theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
}

.insta-reels-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    border-radius: 16px;
    background: #fff;
    border: 2px dashed #e0e0e0;
}

.insta-reels-empty i {
    font-size: 48px;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    display: block;
}

.insta-reels-empty p {
    color: #666;
    margin-bottom: 20px;
}

.insta-reel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.insta-reel-overlay.open {
    display: flex;
}

.insta-reel-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 420px;
}

.insta-reel-frame {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 120px);
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.insta-reel-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.insta-reel-open-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.insta-reel-open-link:hover {
    color: #fff;
}

.reel-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.reel-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1200px) {
    .insta-reel-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .insta-reel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .reel-play-btn {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .insta-reel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .reel-card,
    .reel-card-inner {
        border-radius: 12px;
    }

    .reel-card-label {
        font-size: 10px;
    }

    .insta-reel-modal {
        max-width: 100%;
    }

    .insta-reel-frame {
        border-radius: 12px;
        max-height: calc(100vh - 100px);
    }
}
