/* ═══════════════════════════════════════════
   AMPF — MEDIA PAGE
   File: public/assets/css/media.css
═══════════════════════════════════════════ */

/* ─── SECTION ────────────────────────────── */
.media-section { background: var(--gray-light); }

/* ─── TABS ───────────────────────────────── */
.media-tabs {
    display: flex;
    gap: 6px;
    background: white;
    padding: 6px;
    border-radius: 14px;
    width: fit-content;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.media-tab {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
}

.media-tab:hover { background: var(--gray-light); color: var(--navy); }

.media-tab.active {
    background: var(--navy);
    color: white;
}

.media-tab i { font-size: 15px; }

/* ─── PANELS ─────────────────────────────── */
.media-panel { display: none; }
.media-panel.active { display: block; }

/* ─── PHOTOS GRID ────────────────────────── */
.media-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.media-photo-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--navy);
}

.media-photo-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.media-photo-wrap:hover img { transform: scale(1.06); }

.media-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,22,40,0.85) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.media-photo-wrap:hover .media-photo-overlay { opacity: 1; }

.media-photo-zoom {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
    backdrop-filter: blur(6px);
    margin-top: auto;
    margin-bottom: auto;
    transition: all 0.2s;
}

.media-photo-wrap:hover .media-photo-zoom {
    background: var(--ampf-blue);
    border-color: var(--ampf-blue);
    transform: scale(1.1);
}

.media-photo-caption {
    position: absolute;
    bottom: 14px;
    left: 14px; right: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; font-weight: 500;
    color: white;
    line-height: 1.4;
}

/* ─── VIDEOS GRID ────────────────────────── */
.media-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.media-video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.media-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.1);
    border-color: transparent;
}

.media-video-wrap {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    aspect-ratio: 16/9;
    cursor: pointer;
}

/* Play overlay */
.media-video-wrap::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: rgba(255,255,255,0.9);
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.1));
    opacity: 0;
    transition: opacity 0.25s;
}

.media-video-wrap:hover::after { opacity: 1; }

.media-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.media-video-body {
    padding: 16px 18px;
}

.media-video-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.media-video-meta {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--gray);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.media-video-meta i { color: var(--ampf-blue); font-size: 11px; }

/* ─── LIGHTBOX ───────────────────────────── */
.ampf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ampf-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.lb-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.92);
    transition: transform 0.3s;
}

.ampf-lightbox.open .lb-content { transform: scale(1); }

/* Photo in lightbox */
.lb-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    display: block;
    object-fit: contain;
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

/* Video in lightbox */
.lb-content video {
    width: min(90vw, 1100px);
    max-height: 80vh;
    border-radius: 12px;
    display: block;
    background: #000;
    outline: none;
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

/* Nav buttons */
.lb-prev,
.lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white; font-size: 15px;
    cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(6px);
}
.lb-prev { left: -60px; }
.lb-next { right: -60px; }
.lb-prev:hover, .lb-next:hover { background: var(--ampf-blue); border-color: var(--ampf-blue); }

.lb-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px; height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    color: var(--navy);
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.lb-close:hover {
    background: var(--ampf-blue);
    color: white;
    transform: rotate(90deg);
}

.lb-caption {
    font-family: 'DM Sans', sans-serif;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-align: center;
    margin-top: 14px;
    line-height: 1.5;
}

.lb-counter {
    font-family: 'DM Sans', sans-serif;
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    text-align: center;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 1100px) {
    .media-photos-grid  { grid-template-columns: repeat(2, 1fr); }
    .media-videos-grid  { grid-template-columns: repeat(2, 1fr); }
    .lb-prev { left: -48px; }
    .lb-next { right: -48px; }
}

@media (max-width: 640px) {
    .media-photos-grid  { grid-template-columns: 1fr 1fr; gap: 12px; }
    .media-videos-grid  { grid-template-columns: 1fr; }
    .media-tabs         { width: 100%; overflow-x: auto; }
    .media-tab          { padding: 10px 16px; font-size: 13px; white-space: nowrap; }
    .lb-prev, .lb-next  { display: none; }
}

@media (max-width: 400px) {
    .media-photos-grid { grid-template-columns: 1fr; }
}