/* ==========================================================================
   Home Top Hero Slider — Model 8: 3D Sine-Wave Floating Ribbon
   - Pure box-free floating covers directly on native app background
   - Continuous 60fps 3D sine-wave motion (drag & drop + click-to-glide)
   - Dual 180°-opposed travelling yellow/gold beams around active cover
   - Dark bottom gradient overlay with Kalame 700 English title, play badge & story
   ========================================================================== */

.sine-wave-section {
    position: relative;
    width: 96%;
    margin: 28px auto -15px !important;
    padding: 16px 0 46px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    user-select: none;
    overflow-x: clip;
    overflow-y: visible;
    direction: ltr;
}

.sine-wave-viewport {
    position: relative;
    width: 100%;
    height: 382px;
    perspective: 1250px;
    perspective-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    overflow: visible;
}

.sine-wave-section.is-dragging .sine-wave-viewport {
    cursor: grabbing;
}

.sine-wave-stage {
    position: relative;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}

/* Individual Floating Cover Card */
.sine-wave-card {
    position: absolute;
    top: -158px;
    left: -158px;
    width: 316px;
    height: 316px;
    border-radius: 26px;
    text-decoration: none !important;
    display: block;
    backface-visibility: hidden;
    -webkit-user-drag: none;
    will-change: transform, opacity;
}

/* Outer Dual-Beam Travelling Yellow Rim on Active Cover */
@keyframes sineDualGoldSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.sine-dual-gold-rim {
    position: absolute;
    inset: -2.5px;
    border-radius: 28px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
    z-index: 0;
    box-shadow: 0 0 32px -6px rgba(251, 191, 36, 0.42);
}

.sine-wave-card.is-center .sine-dual-gold-rim {
    opacity: 1;
}

/* Two symmetrical yellow-gold light beams 180 degrees apart */
.sine-dual-gold-rim::before {
    content: "";
    position: absolute;
    inset: -55%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 96deg,
        rgba(251, 191, 36, 0.28) 128deg,
        #fde047 158deg,
        #fbbf24 176deg,
        transparent 180deg,
        transparent 276deg,
        rgba(251, 191, 36, 0.28) 308deg,
        #fde047 338deg,
        #fbbf24 356deg,
        transparent 360deg
    );
    animation: sineDualGoldSpin 4.2s linear infinite;
}

/* Inner Cover Frame */
.sine-card-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    overflow: hidden;
    background: #101218;
    border: 1.5px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.84);
    transition: border-color 0.28s ease, box-shadow 0.32s ease;
}

.sine-wave-card.is-center .sine-card-inner {
    border-color: rgba(251, 191, 36, 0.32);
    box-shadow: 0 28px 60px -10px rgba(0, 0, 0, 0.92);
}

.sine-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: filter 0.22s ease;
}

.sine-wave-card:not(.is-center):hover .sine-card-img {
    filter: brightness(0.94) !important;
}

/* Dark Bottom Overlay with Play Button + English Kalame Title + Story */
.sine-center-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 46px 14px 13px;
    background: linear-gradient(
        180deg,
        rgba(6, 8, 14, 0) 0%,
        rgba(6, 8, 14, 0.76) 34%,
        rgba(5, 7, 12, 0.94) 68%,
        rgba(4, 6, 10, 0.98) 100%
    );
    direction: rtl;
    text-align: right;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.sine-wave-card.is-center .sine-center-overlay {
    opacity: 1;
    transform: translateY(0);
}

.sine-center-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-bottom: 6px;
}

.sine-wave-section .sine-center-title {
    margin: 0 !important;
    flex: 1;
    min-width: 0;
    color: #ffffff !important;
    font-family: 'Kalame', 'IRANYekanX', sans-serif !important;
    font-size: 18.5px !important;
    font-weight: 700 !important;
    line-height: 1.24 !important;
    text-align: left;
    direction: ltr;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.sine-center-play {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #fbbf24;
    color: #090d16;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.48);
}

.sine-center-play svg {
    width: 11px;
    height: 11px;
    display: block;
}

.sine-wave-section .sine-center-desc {
    margin: 0 !important;
    color: rgba(218, 224, 236, 0.95) !important;
    font-family: 'IRANYekanX', 'Vazirmatn', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    direction: rtl;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* Edge Navigation Arrows (Visible on Hover) */
.sine-wave-nav {
    position: absolute;
    top: 47%;
    transform: translateY(-50%);
    z-index: 120;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(18, 20, 28, 0.78);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.24s ease, background 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.sine-wave-section:hover .sine-wave-nav {
    opacity: 1;
}

.sine-wave-nav:hover {
    background: rgba(251, 191, 36, 0.94);
    border-color: #fde047;
    color: #090d16;
}

.sine-wave-nav.is-prev {
    left: 10px;
}

.sine-wave-nav.is-next {
    right: 10px;
}

.sine-wave-nav svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Subtle Floating Dots Indicator Below Wave */
.sine-wave-dots {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: rtl;
}

.sine-wave-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, box-shadow 0.25s ease;
}

.sine-wave-dot:hover {
    background: rgba(251, 191, 36, 0.55);
}

.sine-wave-dot.is-active {
    width: 26px;
    background: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.day .sine-wave-nav {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.14);
    color: #141824;
}

.day .sine-wave-dot {
    background: rgba(15, 23, 42, 0.18);
}

.day .sine-wave-dot.is-active {
    background: #d97706;
}

@media (max-width: 920px) {
    .sine-wave-viewport {
        height: 304px;
    }

    .sine-wave-card {
        top: -132px;
        left: -132px;
        width: 264px;
        height: 264px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sine-dual-gold-rim::before {
        animation: none;
    }
}
