/* ==========================================================================
   ANASAYFA ÖNE ÇIKAN VİDEOLAR BÖLÜMÜ
   ========================================================================== */

.school-video-section {
    position: relative;
    width: 100%;
    margin-top: -100px;
    padding: 150px 0 120px 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    overflow: hidden;
    z-index: 12;
}

.school-video-section *,
.school-video-section *::before,
.school-video-section *::after {
    box-sizing: border-box;
}

.school-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

.school-video-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 5;
}

/* 🌿 Üst Başlık Stilleri */
.school-video-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 50px auto;
}

.video-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #2e5927;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.video-tag .tag-line {
    width: 24px;
    height: 2px;
    background-color: #7ba668;
    border-radius: 2px;
}

.video-title {
    font-size: 44px;
    font-weight: 900;
    color: #1b3e1a;
    margin: 0 0 16px 0;
    letter-spacing: -1px;
    line-height: 1.15;
}

.video-title .highlight-green {
    color: #488b33;
}

.video-subtitle {
    font-size: 15.5px;
    line-height: 1.65;
    color: #3d523a;
    margin: 0;
}

/* ==========================================================================
   🎠 KLASİK KAYDIRAKLI SLIDER
   ========================================================================== */
.video-slider-wrapper {
    position: relative;
    width: 100%;
}

.video-slider-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 0 25px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.video-slider-viewport::-webkit-scrollbar {
    display: none;
}

.video-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
}

/* Navigasyon Okları */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid #ffffff;
    color: #1b3e1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(27, 62, 26, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.slider-nav-btn.prev {
    left: -24px;
}

.slider-nav-btn.next {
    right: -24px;
}

.slider-nav-btn svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.slider-nav-btn:hover:not(.disabled) {
    background: #488b33;
    color: #ffffff;
    border-color: #a3e635;
    box-shadow: 0 14px 30px rgba(27, 62, 26, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav-btn:focus-visible {
    outline: 3px solid #a3e635;
    outline-offset: 2px;
}

.slider-nav-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* 🎬 Video Kartları */
.video-card {
    /* Masaüstünde 4 Kart Sıralanır */
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: calc((100% - 60px) / 4);
    max-width: calc((100% - 60px) / 4);
    background: #ffffff;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(27, 62, 26, 0.08);
    border: 3px solid #ffffff;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    scroll-snap-align: start;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.video-card:hover {
    transform: translateY(-8px);
    border-color: #7ba668;
    box-shadow: 0 22px 45px rgba(27, 62, 26, 0.2);
}

.video-card:focus-visible {
    outline: 3px solid #a3e635;
    outline-offset: 3px;
}

.video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 14;
    border-radius: 18px;
    overflow: hidden;
    background-color: #1b3e1a;
}

.video-thumb-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    -webkit-user-drag: none;
}

.video-card:hover .video-thumb-wrap img {
    transform: scale(1.08);
}

.video-live-preview {
    position: absolute;
    left: 0;
    top: 0;
    border: 0;
    transform-origin: 0 0;
    pointer-events: none;
    background: #000000;
}

.video-live-preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(27, 62, 26, 0.15) 0%, rgba(15, 35, 14, 0.7) 100%);
}

.video-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(27, 62, 26, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 2;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #a3e635;
}

.video-duration {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(15, 35, 14, 0.8);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.video-duration svg {
    width: 12px;
    height: 12px;
}

.play-btn-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-pulse {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(163, 230, 53, 0.45);
    animation: pulseWave 2s infinite ease-out;
}

@keyframes pulseWave {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.play-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #488b33 0%, #2e5927 100%);
    border: 3px solid #ffffff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(27, 62, 26, 0.35);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-btn svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}

.video-card:hover .play-btn {
    transform: scale(1.12);
    background: linear-gradient(135deg, #a3e635 0%, #488b33 100%);
    color: #1b3e1a;
}

.video-info {
    padding: 14px 6px 6px 6px;
}

.video-info h3 {
    font-size: 15px;
    font-weight: 800;
    color: #1b3e1a;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   🎬 VIDEO MODAL POPUP
   ========================================================================== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 35, 14, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 850px;
    background: #1b3e1a;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
    transform: scale(0.92);
    transition: all 0.3s ease;
}

.video-modal-content.is-instagram {
    max-width: 440px;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.video-modal-close:hover {
    background: #ef4444;
}

.video-modal-close svg {
    width: 20px;
    height: 20px;
}

.video-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-modal-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding-right: 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000000;
}

.video-modal-content.is-instagram .video-iframe-container {
    padding-top: 130%;
}

.video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   📱 RESPONSİVE UYARLAMALARI
   ========================================================================== */
@media (max-width: 1024px) {
    .video-card {
        flex: 0 0 calc((100% - 40px) / 3);
        min-width: calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 768px) {
    .school-video-section {
        margin-top: -50px;
        padding: 90px 0 70px 0;
    }

    .school-video-container {
        padding: 0 16px;
    }

    .video-title { font-size: 28px; }
    .video-subtitle { font-size: 14px; }

    .video-slider-track {
        gap: 15px;
    }

    .slider-nav-btn {
        width: 42px;
        height: 42px;
    }

    .slider-nav-btn.prev { left: -10px; }
    .slider-nav-btn.next { right: -10px; }

    .slider-nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .video-card {
        flex: 0 0 calc((100% - 15px) / 2);
        min-width: calc((100% - 15px) / 2);
        max-width: calc((100% - 15px) / 2);
        padding: 8px;
        border-radius: 18px;
    }

    .video-thumb-wrap {
        border-radius: 14px;
    }

    .video-badge, .video-duration {
        font-size: 9.5px;
        padding: 3px 6px;
    }

    .play-btn {
        width: 44px;
        height: 44px;
    }

    .play-btn svg {
        width: 16px;
        height: 16px;
    }

    .play-pulse {
        width: 48px;
        height: 48px;
    }

    .video-info h3 {
        font-size: 12.5px;
        line-height: 1.35;
    }
}