/* =====================================================
   MEDIA COMPONENTS
   Images, videos, galleries, lightbox
===================================================== */

/* ===============================
   MEDIA GRID
================================ */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.media-card {
    background: rgba(20,10,10,0.85);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,26,26,0.2);
}

.media-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(255,26,26,0.4);
}

.media-card-body {
    position: relative;
    width: 100%;
    height: 220px;
}

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

.media-card-body h3 {
    margin-bottom: 12px;
    font-size: 16px;
    color: #fff;
}

.media-card-meta {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.media-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px 16px;
    background: rgba(0,0,0,0.4);
}

.media-card.agb-edit-card {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 26, 26, 0.35);
    border-radius: 14px;

    padding: 18px;
    margin-bottom: 24px;

    box-shadow: none;
    transform: none;
    transition: none;
}

.media-card.agb-edit-card:hover {
    transform: none;
    box-shadow: 0 0 12px rgba(255, 26, 26, 0.35);
}

/* ===============================
   IMAGES
================================ */

.media-grid.images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.image-card {
    padding: 12px;
}

.image-card img {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.image-card img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 26, 26, 0.5);
}

.image-delete-form {
    margin-top: 6px;
}

/* ===============================
   VIDEOS
================================ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.video-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.video-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(255,26,26,0.4);
}

.video-card img {
    width: 100%;
    display: block;
}

.video-card h3 {
    padding: 18px;
    font-size: 16px;
}

.video-embed {
    position: relative;
    padding-top: 56.25%;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin-top: 10px;
    border: none;
}

.video-delete-form {
    display: inline-block;
}

/* ===============================
   LIGHTBOX
================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-trigger {
    cursor: zoom-in;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100000;

    width: 52px;
    height: 52px;

    border-radius: 50%;
    border: none;

    background: rgba(0,0,0,0.6);
    color: #fff;

    font-size: 36px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
    user-select: none;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(255,45,85,0.9);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-report {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(20,20,20,0.9);
    padding: 12px;
    border-radius: 8px;
}

.lightbox-report textarea {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lightbox-report textarea.is-visible {
    display: block;
    opacity: 1;
}

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

/* ===============================
   CATEGORY FILTER
================================ */

.category-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px auto 35px;
    flex-wrap: wrap;
}

.category-filter a {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(255, 26, 26, 0.4);
    color: #ccc;
    transition: all 0.2s ease;
}

.category-filter a:hover,
.category-filter a.active {
    background: rgba(255, 26, 26, 0.2);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(255,26,26,0.3);
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
    .lightbox-nav {
        width: 60px;
        height: 60px;
        font-size: 40px;
    }
}
