/**
 * Modern Travel Video Showcase & Lightbox Modal
 * Nature Holiday Trip — Clean, Responsive & Luxury Aesthetics
 */

.nh-video-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    position: relative;
}

.nh-video-head {
    text-align: center;
    margin-bottom: 2.2rem;
}

.nh-video-head .jw-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    color: #0b4d3c;
    background: #e8f5f1;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.nh-video-head .jw-center-title {
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0 0 0.55rem;
}

.nh-video-sub {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Slider Shell & Track */
.nh-video-slider-shell {
    position: relative;
    width: 100%;
}

.nh-video-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 8px 4px 20px;
}

/* When 3 or 4 cards, enforce beautiful balanced grid on desktop */
.nh-video-slider-shell[data-count="1"] .nh-video-track {
    grid-template-columns: minmax(320px, 640px);
    justify-content: center;
}

.nh-video-slider-shell[data-count="2"] .nh-video-track {
    grid-template-columns: repeat(2, minmax(300px, 520px));
    justify-content: center;
}

.nh-video-slider-shell[data-count="3"] .nh-video-track {
    grid-template-columns: repeat(3, 1fr);
}

.nh-video-slider-shell[data-count="4"] .nh-video-track {
    grid-template-columns: repeat(4, 1fr);
}

/* If more than 4 cards, switch to smooth carousel on desktop */
@media (min-width: 1024px) {
    .nh-video-slider-shell.has-carousel .nh-video-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 14px;
        scroll-behavior: smooth;
    }
    .nh-video-slider-shell.has-carousel .nh-video-track::-webkit-scrollbar {
        display: none;
    }
    .nh-video-slider-shell.has-carousel .nh-video-card {
        flex: 0 0 calc((100% - 3rem) / 3);
        scroll-snap-align: start;
    }
}

/* Video Card */
.nh-video-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.nh-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(11, 77, 60, 0.16), 0 0 0 1px rgba(11, 77, 60, 0.15);
}

/* Media Wrap (16:9 widescreen) */
.nh-video-media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

.nh-video-card:hover .nh-video-thumb {
    transform: scale(1.07);
}

.nh-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.05) 45%, rgba(15, 23, 42, 0.8) 100%);
    pointer-events: none;
    transition: background 0.3s ease;
}

.nh-video-card:hover .nh-video-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 45%, rgba(11, 77, 60, 0.85) 100%);
}

/* Tag / Badge */
.nh-video-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(11, 77, 60, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Center Play Button */
.nh-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #0b4d3c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.nh-video-play i {
    font-size: 1.3rem;
    margin-left: 3px;
    transition: transform 0.25s ease;
}

.nh-video-play-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    animation: nhVideoPulse 2.2s infinite ease-out;
    pointer-events: none;
}

@keyframes nhVideoPulse {
    0% { transform: scale(0.92); opacity: 0.85; }
    50% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(0.92); opacity: 0; }
}

.nh-video-card:hover .nh-video-play {
    transform: translate(-50%, -50%) scale(1.12);
    background: #0b4d3c;
    color: #ffffff;
    box-shadow: 0 0 0 8px rgba(11, 77, 60, 0.25), 0 15px 35px rgba(0, 0, 0, 0.4);
}

.nh-video-card:hover .nh-video-play i {
    transform: scale(1.08);
}

/* Card Caption */
.nh-video-caption {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    background: #ffffff;
}

.nh-video-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.42;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.nh-video-card:hover .nh-video-title {
    color: #0b4d3c;
}

/* Watch button inside card */
.nh-video-watch-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nh-video-watch-link span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nh-video-watch-link i.fa-youtube {
    color: #ef4444;
    font-size: 1.05rem;
}

.nh-video-watch-link i.fa-arrow-right {
    font-size: 0.82rem;
    transition: transform 0.25s ease;
}

.nh-video-card:hover .nh-video-watch-link {
    background: #0b4d3c;
    color: #ffffff;
}

.nh-video-card:hover .nh-video-watch-link i.fa-youtube {
    color: #ffffff;
}

.nh-video-card:hover .nh-video-watch-link i.fa-arrow-right {
    transform: translateX(4px);
}

/* Navigation bar (when carousel enabled) */
.nh-video-nav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 1.8rem;
}

.nh-video-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: all 0.25s ease;
}

.nh-video-arrow:hover {
    background: #0b4d3c;
    color: #ffffff;
    border-color: #0b4d3c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 77, 60, 0.2);
}

.nh-video-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nh-video-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nh-video-dot.is-active {
    width: 24px;
    background: #0b4d3c;
}

/* =========================================================================
   Cinema Lightbox Video Modal
   ========================================================================= */
.nh-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nh-video-modal.is-open {
    display: flex;
    opacity: 1;
}

.nh-video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nh-video-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(960px, 100%);
    background: #0b1120;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.94);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.nh-video-modal.is-open .nh-video-modal-dialog {
    transform: scale(1);
}

.nh-video-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nh-video-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.nh-video-modal-player-wrap {
    position: relative;
    width: 100%;
    background: #000;
}

.nh-video-modal-ratio {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
}

.nh-video-modal-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.nh-video-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: #0b1120;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nh-video-modal-heading {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nh-video-modal-yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.nh-video-modal-yt-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* =========================================================================
   Responsive Breakpoints
   ========================================================================= */
@media (max-width: 900px) {
    .nh-video-slider-shell[data-count="4"] .nh-video-track,
    .nh-video-slider-shell[data-count="3"] .nh-video-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .nh-video-section {
        padding-top: 1.75rem;
        padding-bottom: 2rem;
    }

    .nh-video-head {
        margin-bottom: 1.6rem;
    }

    .nh-video-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-left: 2px;
        padding-right: 16px;
        margin-right: -1rem;
    }

    .nh-video-track::-webkit-scrollbar {
        display: none;
    }

    .nh-video-card {
        flex: 0 0 84vw;
        max-width: 340px;
        scroll-snap-align: center;
        border-radius: 16px;
    }

    .nh-video-play {
        width: 52px;
        height: 52px;
    }

    .nh-video-play i {
        font-size: 1.15rem;
    }

    .nh-video-caption {
        padding: 14px 16px 16px;
    }

    .nh-video-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .nh-video-modal {
        padding: 10px;
    }

    .nh-video-modal-dialog {
        border-radius: 16px;
    }

    .nh-video-modal-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 10px;
    }

    .nh-video-modal-heading {
        white-space: normal;
        font-size: 1rem;
    }

    .nh-video-modal-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
}

