/* ==========================================================================
   Customer Video Stories / Reel Testimonials Section Styles
   ========================================================================== */

.video-stories-section {
    padding: 70px 0 60px;
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 50%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

/* Background Ambient Glows */
.video-stories-section::before,
.video-stories-section::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.video-stories-section::before {
    background: #f2a900;
    top: 5%;
    left: -100px;
}

.video-stories-section::after {
    background: #0a1c3a;
    bottom: 5%;
    right: -100px;
}

.video-stories-header {
    text-align: center !important;
    margin-bottom: 45px;
    position: relative;
    z-index: 2;
}

.video-stories-section .section-title,
.video-stories-section .section-title.text-center {
    text-align: center !important;
    margin: 0 auto 45px auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.video-stories-section .section-title h2 {
    text-align: center !important;
    display: inline-block !important;
    position: relative !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.video-stories-section .section-title h2::after {
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.video-stories-section .section-title p {
    text-align: center !important;
    max-width: 680px !important;
    margin: 22px auto 0 !important;
}

.section-badge-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(242, 169, 0, 0.12);
    border: 1px solid rgba(242, 169, 0, 0.35);
    color: #d97706;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 50px;
    margin: 0 auto 16px auto !important;
}

.section-badge-pill i {
    color: #f2a900;
    font-size: 12px;
    animation: iconBlink 1.6s ease-in-out infinite;
}

@keyframes iconBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Stories Carousel Container */
.stories-carousel-container {
    position: relative;
    z-index: 2;
}

/* Slider Controls (Placed neatly below cards with zero overlap) */
.stories-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 25px;
    position: relative;
    z-index: 5;
}

.stories-slider-controls .story-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0a1c3a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stories-slider-controls .story-nav-btn:hover {
    background: #f2a900;
    color: #ffffff;
    border-color: #f2a900;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 8px 22px rgba(242, 169, 0, 0.35);
}

.stories-slider-controls .story-nav-btn:active {
    transform: scale(0.94);
}

.stories-swipe-hint {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stories-swipe-hint i {
    color: #f2a900;
    font-size: 13px;
}

/* Scroll Container */
.stories-scroll-wrapper {
    position: relative;
    z-index: 2;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 15px 5px 25px;
    scrollbar-width: none; /* Firefox */
    scroll-snap-type: x mandatory;
}

.stories-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.stories-track {
    display: flex;
    gap: 22px;
    width: max-content;
}

/* Story Card */
.story-card {
    flex: 0 0 250px;
    width: 250px;
    height: 440px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #0f172a;
    box-shadow: 0 10px 30px rgba(10, 28, 58, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    scroll-snap-align: start;
}

.story-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(10, 28, 58, 0.22), 0 0 0 2px #f2a900;
}

/* Story Media Box */
.story-media-box {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.story-media-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card:hover .story-media-box video {
    transform: scale(1.06);
}

/* Overlays: Top Gradient & Bottom Gradient */
.story-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

.story-bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(0deg, rgba(10, 28, 58, 0.96) 0%, rgba(10, 28, 58, 0.8) 45%, rgba(10, 28, 58, 0) 100%);
    pointer-events: none;
    z-index: 2;
    transition: height 0.3s ease;
}

.story-card:hover .story-bottom-gradient {
    height: 72%;
}

/* Top Badges */
.story-badge-top {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.badge-loan {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(10, 28, 58, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 11px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
}

.badge-loan i {
    color: #f2a900;
    font-size: 10px;
}

.badge-verified {
    font-size: 10px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: 30px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Center Play Button Overlay */
.story-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
}

.story-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(242, 169, 0, 0.95);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 4px;
    box-shadow: 0 8px 25px rgba(242, 169, 0, 0.45);
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-play-btn::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid rgba(242, 169, 0, 0.7);
    animation: storyPulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes storyPulseRing {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}

.story-card:hover .story-play-btn {
    transform: scale(1.15);
    background: #ff9900;
}

/* Story Bottom Content */
.story-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 16px 16px;
    z-index: 3;
    color: #ffffff;
}

.story-stars {
    color: #f2a900;
    font-size: 11px;
    margin-bottom: 6px;
    display: flex;
    gap: 3px;
}

.story-client-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-client-name i {
    color: #38bdf8;
    font-size: 13px;
}

.story-loan-desc {
    font-size: 12px;
    color: #cbd5e1;
    margin: 0 0 10px;
    line-height: 1.4;
    font-weight: 500;
}

.story-watch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.story-watch-text {
    font-size: 11px;
    font-weight: 600;
    color: #f2a900;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-city {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Bottom Hint / Trust Banner */
.stories-trust-footer {
    margin-top: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 16px 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.stories-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stories-trust-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(242, 169, 0, 0.12);
    color: #f2a900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stories-trust-text h5 {
    font-size: 14px;
    font-weight: 700;
    color: #0a1c3a;
    margin: 0 0 2px;
}

.stories-trust-text p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.stories-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #0a1c3a 0%, #1e3a8a 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(10, 28, 58, 0.2);
}

.stories-cta-btn:hover {
    background: linear-gradient(135deg, #f2a900 0%, #e65100 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(242, 169, 0, 0.35);
}

/* ==========================================================================
   VIDEO MODAL POPUP (Reels Player Lightbox)
   ========================================================================== */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 14, 28, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.story-modal-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 90vh;
    max-height: 750px;
    background: #000000;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    animation: modalPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Modal Header */
.story-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.story-modal-client {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-modal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f2a900;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.story-modal-meta h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-modal-meta p {
    font-size: 11px;
    color: #f2a900;
    margin: 0;
    font-weight: 600;
}

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

.story-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

/* Modal Video Player Container */
.story-modal-video-wrap {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    background: #000000;
}

.story-modal-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Modal Navigation (Prev / Next floating arrows) */
.story-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    z-index: 100000;
}

.story-modal-nav:hover {
    background: #f2a900;
    border-color: #f2a900;
    transform: translateY(-50%) scale(1.1);
}

.story-modal-nav.prev {
    left: -70px;
}

.story-modal-nav.next {
    right: -70px;
}

/* Modal Footer Overlay */
.story-modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 20px 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.story-modal-info {
    color: #ffffff;
}

.story-modal-info .verified-tag {
    font-size: 11px;
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
}

.story-modal-info .loan-amount {
    font-size: 13px;
    color: #f1f5f9;
    font-weight: 500;
    margin: 0;
}

.story-modal-cta {
    padding: 8px 16px;
    background: #f2a900;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(242, 169, 0, 0.4);
    transition: transform 0.2s ease;
}

.story-modal-cta:hover {
    transform: scale(1.05);
    color: #ffffff;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
    .video-stories-section {
        padding: 50px 0;
    }
    .video-stories-header {
        margin-bottom: 30px;
    }
    .story-card {
        flex: 0 0 210px;
        width: 210px;
        height: 370px;
    }
    .story-modal-nav.prev {
        left: 10px;
    }
    .story-modal-nav.next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .video-stories-section {
        padding: 40px 0;
    }

    .video-stories-header {
        margin-bottom: 25px !important;
        text-align: left !important;
    }

    /* Left-align & reduce size on mobile view */
    .video-stories-section .section-title,
    .video-stories-section .section-title.text-center {
        text-align: left !important;
        align-items: flex-start !important;
        margin: 0 0 25px 0 !important;
    }

    .section-badge-pill {
        margin: 0 0 10px 0 !important;
        font-size: 11px !important;
        padding: 4px 14px !important;
        gap: 6px !important;
    }

    .video-stories-section .section-title h2 {
        font-size: 24px !important;
        text-align: left !important;
        margin-bottom: 16px !important;
        display: inline-block !important;
        letter-spacing: -0.5px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .video-stories-section .section-title h2::after {
        left: 0 !important;
        transform: none !important;
        width: 45px !important;
        height: 3px !important;
        bottom: -8px !important;
    }

    .video-stories-section .section-title p {
        font-size: 13.5px !important;
        line-height: 1.5 !important;
        text-align: left !important;
        margin: 14px 0 0 0 !important;
        color: #64748b !important;
        max-width: 100% !important;
    }

    /* Single 1 Card in Front on Mobile */
    .stories-scroll-wrapper {
        scroll-snap-type: x mandatory !important;
        padding: 10px 0 20px !important;
    }

    .stories-track {
        gap: 20px !important;
        width: max-content !important;
    }

    .story-card {
        flex: 0 0 calc(100vw - 40px) !important;
        width: calc(100vw - 40px) !important;
        max-width: 340px !important;
        height: 520px !important;
        margin: 0 auto !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
        border-radius: 20px !important;
    }

    .story-play-btn {
        width: 56px !important;
        height: 56px !important;
        font-size: 20px !important;
    }

    /* Controls on Mobile */
    .stories-slider-controls {
        gap: 14px !important;
        margin-top: 20px !important;
        margin-bottom: 30px !important;
    }

    .stories-slider-controls .story-nav-btn {
        width: 44px !important;
        height: 44px !important;
        font-size: 15px !important;
    }

    .stories-swipe-hint {
        font-size: 12px !important;
        padding: 9px 18px !important;
    }

    .stories-trust-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }

    .stories-cta-btn {
        width: 100%;
        justify-content: center;
    }

    .story-modal-inner {
        height: 85vh;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .video-stories-section .section-title h2 {
        font-size: 21px !important;
    }

    .video-stories-section .section-title p {
        font-size: 12.5px !important;
    }

    .story-card {
        flex: 0 0 calc(100vw - 36px) !important;
        width: calc(100vw - 36px) !important;
        max-width: 310px !important;
        height: 480px !important;
        border-radius: 18px !important;
    }

    .story-play-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 18px !important;
    }
}

