/*
Theme Name: Dilbirîn Boti Tema
Theme URI: https://www.dilbirinboti.com
Template: elitepress
Description: Dilbirîn Boti Alt Tema
Author: Dilbirîn Boti
Author URI: https://www.dilbirinboti.com
Version: 1.0.1
*/

/* Ana Izgara Yapısı */
.youtube-feed-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Video Kutusu */
.youtube-video-item {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    /* 16:9 Oranı İçin Sihirli Kod */
    padding-bottom: 56.25%; 
    height: 0;
}

/* Görüntü ve Iframe Yerleşimi */
.youtube-video-item img,
.youtube-video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

/* Oynat Butonu (CSS ile Çizim) */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0,0,0,0.7);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%; /* Üçgeni ortalamak için hafif sağa */
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px; /* Üçgen şekli */
    border-color: transparent transparent transparent #fff;
}

.youtube-video-item:hover .play-button {
    background-color: #ff0000; /* YouTube Kırmızısı */
}

/* Başlık Alanı */
.video-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 20px 15px 10px;
    font-size: 14px;
    z-index: 2;
    pointer-events: none; /* Tıklamayı engellemesin */
}

/* Video Aktif Olduğunda Başlığı Gizle */
.youtube-video-item.video-active .video-title-overlay {
    display: none;
}



/* --- Profesyonel Video Galeri Tasarımı --- */

.video-gallery-wrapper {
    max_width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', sans-serif;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

/* BÜYÜK PLAYER ALANI */
.main-player-section {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 40px;
}

.iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Oran */
    height: 0;
}

.iframe-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.main-video-info {
    padding: 20px;
    background: #222;
    color: #fff;
}

.main-video-info h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* GRID LİSTE ALANI */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Responsive Izgara */
    gap: 20px;
}

.grid-video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.grid-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Seçili olan videonun kenarlığı renkli olsun */
.grid-video-item.active-item {
    border-color: #ff0000;
    background-color: #f9f9f9;
}

.grid-thumb {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.8;
}

.grid-info {
    padding: 12px;
}

.grid-info h3 {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Başlığı 2 satırla sınırla */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobilde başlık boyutunu ayarla */
@media (max-width: 768px) {
    .main-video-info h2 { font-size: 18px; }
}