/* ============================================================
   GALERİ — Fotoğraf & Video Kartları (temiz boyutlandırma)
   ============================================================ */

.gallery-subtitle {
    font-family: "Oswald", sans-serif;
    font-size: 22px;
    color: var(--color-text);
    margin: 50px 0 24px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* ---------- FOTOĞRAF KARTI ---------- */
.gallery-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    min-width: 0;
    max-width: 100%;
    transition: transform .35s ease, box-shadow .35s ease;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 22px 40px rgba(0, 0, 0, .12),
        0 0 24px rgba(227, 30, 36, .25);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card .gallery-caption {
    position: absolute;
    bottom: 14px;
    left: 18px;
    right: 18px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
}

.gallery-card:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Kırmızı-siyah hover overlay */
.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(227, 30, 36, .55) 0%, rgba(26, 26, 26, .85) 100%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-card:hover::after {
    opacity: 1;
}

/* ---------- VİDEO KARTI ---------- */
.gallery-video-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    min-width: 0;
    max-width: 100%;
    transition: transform .35s ease, box-shadow .35s ease;
}

.gallery-video-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 22px 40px rgba(0, 0, 0, .12),
        0 0 24px rgba(227, 30, 36, .25);
}

.gallery-video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.gallery-video-card:hover img {
    transform: scale(1.06);
}

.gallery-video-card .gallery-caption {
    padding: 14px 18px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
}

/* Play button (kırmızı) */
.play-button {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 72px;
    color: var(--color-primary);
    text-shadow: 0 8px 18px rgba(0, 0, 0, .6);
    transition: transform .3s ease, color .3s ease;
    background: rgba(0, 0, 0, .15);
    z-index: 2;
}

.gallery-video-card:hover .play-button {
    transform: scale(1.15);
    background: rgba(0, 0, 0, .28);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- GALERİ MODAL ---------- */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: .35s;
    z-index: 999999;
    padding: 40px;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-modal-image {
    display: none;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: zoomIn .3s ease;
}

.gallery-modal-video {
    width: 100%;
    display: flex;
    justify-content: center;
}

.gallery-modal-video iframe,
.gallery-modal-video video {
    width: min(1100px, 95vw);
    max-height: 90vh;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 16px;
    background: black;
    animation: zoomIn .3s ease;
}

.gallery-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    transition: .25s;
    user-select: none;
    z-index: 2;
}

.gallery-close:hover {
    color: var(--color-primary);
    transform: scale(1.15);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(.8); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .gallery-modal { padding: 15px; }
    .gallery-close { top: 10px; right: 18px; font-size: 36px; }
}

/* ---------- ESKİ / GERİYE DÖNÜK UYUMLULUK ---------- */
.gallery-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: var(--color-dark);
}

.gallery-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-empty-note {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
    padding: 20px;
    border: 2px dashed var(--color-border);
    border-radius: 12px;
}