/**
 * Medya Modülü Stilleri - Resim Galerisi
 * ResimGaleri.html uyumlu - metro grid + lightbox, 1600px
 */

#mainContent:has(.medya-page) {
    min-height: auto;
}

.medya-page {
    padding-top: 130px;
    min-height: 0;
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 12%, #fafbff 100%);
}

.medya-container {
    max-width: 1600px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.medya-header {
    text-align: center;
    margin-bottom: 3rem;
}

.medya-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.medya-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1a237e;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    background: linear-gradient(120deg, #1a237e, #3949ab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.medya-subtitle {
    font-size: 1.1rem;
    color: #5c6bc0;
    margin: 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.medya-section {
    margin-bottom: 3rem;
}

.medya-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a237e;
}

.medya-section-title i {
    color: #fecb15;
    font-size: 1.2rem;
}

/* Metro grid */
.medya-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 220px;
    gap: 1rem;
}

.medya-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(26, 35, 126, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.medya-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(26, 35, 126, 0.15);
}

.medya-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.medya-link {
    display: block;
    width: 100%;
    height: 100%;
}

.medya-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.medya-item:hover .medya-image {
    transform: scale(1.08);
}

.medya-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 35, 126, 0.75), transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.medya-item:hover .medya-overlay {
    opacity: 1;
}

.medya-overlay i {
    color: #fff;
    font-size: 2.5rem;
}

.medya-no-data {
    text-align: center;
    color: #6b7280;
    padding: 3rem;
    margin: 0;
}

/* Lightbox */
.medya-lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.medya-lightbox[aria-hidden="false"] {
    display: flex;
}

.medya-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.medya-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.medya-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.medya-lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
}

.medya-lightbox-prev,
.medya-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.medya-lightbox-prev:hover,
.medya-lightbox-next:hover {
    background: rgba(254, 203, 21, 0.9);
    color: #1a237e;
}

.medya-lightbox-prev {
    left: 1.5rem;
}

.medya-lightbox-next {
    right: 1.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .medya-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        grid-auto-rows: 180px;
    }
}

@media (max-width: 768px) {
    .medya-page {
        padding-top: 90px;
    }

    .medya-container {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .medya-header {
        margin-bottom: 2rem;
    }

    .medya-title {
        font-size: 1.75rem;
    }

    .medya-subtitle {
        font-size: 1rem;
    }

    .medya-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
        gap: 0.75rem;
    }

    .medya-item-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .medya-lightbox-prev,
    .medya-lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        left: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 576px) {
    .medya-section-title {
        font-size: 1.1rem;
    }
}
