/* =========================================================
   MEDYABİR PRO - VİDEO GALERİ MODÜLÜ
   Dosya: modules/video_galeri/style.css
   Amaç:
   - Eski tasarım korunur
   - Tam ekran siyah bant görüntüsü kaldırılır
   - Haber.php / son dakika / diğer modüllerle birebir 1240px ölçüde ortalanır
   - İç container çakışması engellenir
   - Mobilde taşma yapmaz
========================================================= */

/* =========================================================
   ANA VİDEO ALANI
========================================================= */

.video-section {
    width: 100% !important;
    max-width: 1240px !important;
    margin: 40px auto !important;
    padding: 34px 16px !important;
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: block;
}

/* Eğer video-section başka bir .container içinde çağrılıyorsa:
   16px container paddingini telafi eder, diğer 1240px modüllerle birebir hizalar.
   transform yok, sınır aşması yok. */
.container .video-section,
.container > .video-section {
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    transform: none !important;
}

/* Aynı elemanda hem container hem video-section varsa */
.container.video-section {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    transform: none !important;
}

/* PHP içinde video-section altında gelen .container alanını sıfırla */
.video-section > .container,
.video-section .container,
.video-section-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Tüm iç elemanlarda taşma engeli */
.video-section *,
.video-section *::before,
.video-section *::after {
    box-sizing: border-box !important;
}

/* =========================================================
   BAŞLIK ALANI
========================================================= */

.video-section-header {
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-color: rgba(255,255,255,0.1);
}

.video-section-header h2 {
    color: #ffffff;
}

.video-section-link {
    color: #94a3b8;
}

.video-section-link:hover {
    color: #ffffff;
}

/* =========================================================
   VİDEO GRID
========================================================= */

.video-container {
    width: 100% !important;
    max-width: 100% !important;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
    overflow: hidden !important;
}

/* =========================================================
   ANA VİDEO
========================================================= */

.main-video {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

#video-frame {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
    overflow: hidden !important;
    border-radius: var(--radius-md);
    background: #000000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.main-video iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border-radius: var(--radius-md);
    background: #000000;
    display: block;
    border: none;
}

#video-title {
    margin-top: 15px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    max-width: 100%;
}

/* =========================================================
   SAĞ VİDEO LİSTESİ
========================================================= */

.side-videos {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden !important;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scroll görünümü */
.side-videos::-webkit-scrollbar {
    width: 5px;
}

.side-videos::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
}

.side-videos::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* =========================================================
   SAĞ VİDEO KARTI
========================================================= */

.side-video-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: 1px solid transparent;
    text-align: left;
    color: inherit;
    font-family: inherit;
    overflow: hidden !important;
}

.side-video-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(4px);
    border-color: rgba(255,255,255,0.1);
}

.side-video-item img {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.side-video-item h4 {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
    color: #ffffff;
    min-width: 0;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {
    .video-section,
    .container .video-section,
    .container > .video-section,
    .container.video-section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 34px auto !important;
        padding: 30px 14px !important;
        border-radius: 8px;
        transform: none !important;
        overflow: hidden !important;
    }

    .video-section > .container,
    .video-section .container,
    .video-section-inner {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .video-container {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .side-videos {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

/* =========================================================
   MOBİL
========================================================= */

@media (max-width: 768px) {
    .video-section,
    .container .video-section,
    .container > .video-section,
    .container.video-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 26px 12px !important;
        margin: 28px auto !important;
        border-radius: 8px;
        overflow: hidden !important;
        transform: none !important;
    }

    .video-section > .container,
    .video-section .container,
    .video-section-inner {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .video-container {
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #video-frame {
        border-radius: 6px;
    }

    .main-video iframe {
        border-radius: 6px;
    }

    #video-title {
        font-size: 1.05rem;
        line-height: 1.35;
        margin-top: 12px;
    }

    .side-videos {
        width: 100% !important;
        max-width: 100% !important;
        max-height: none;
        overflow-y: visible;
        overflow-x: hidden !important;
        padding-right: 0;
        gap: 10px;
    }

    .side-video-item {
        transform: none !important;
        padding: 9px;
        gap: 10px;
    }

    .side-video-item img {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        height: 60px;
    }

    .side-video-item h4 {
        font-size: 0.86rem;
        line-height: 1.35;
    }
}

/* =========================================================
   KÜÇÜK MOBİL
========================================================= */

@media (max-width: 420px) {
    .video-section,
    .container .video-section,
    .container > .video-section,
    .container.video-section {
        padding: 22px 10px !important;
        margin: 24px auto !important;
    }

    .side-video-item img {
        width: 92px;
        min-width: 92px;
        max-width: 92px;
        height: 56px;
    }

    .side-video-item h4 {
        font-size: 0.8rem;
    }
}