/* Media page — extends gallery styles (load includes/gallery.css before this file) */
.media-page {
    width: var(--site-content, min(1520px, calc(100% - 16px)));
    margin: 0 auto;
    padding: 8px 0 56px;
}

.media-hero {
    background-image:
        linear-gradient(180deg, rgba(10, 18, 36, 0.28) 0%, rgba(10, 18, 36, 0.78) 100%),
        url('../uploads/gallery/681e73eaa2914_IMG_20240525_105646_710.jpg');
    background-size: cover;
    background-position: center;
}

.media-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(20, 35, 63, 0.06);
    position: sticky;
    top: calc(var(--site-header-h, 118px) + 8px);
    z-index: 10;
}

.media-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #f4f7fc;
    color: var(--clan-navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.media-nav a:hover {
    background: #eaf1fb;
    transform: translateY(-1px);
}

.media-nav a i {
    color: var(--clan-gold);
}

.media-section {
    margin-bottom: 48px;
    scroll-margin-top: 120px;
}

.media-section-title {
    text-align: center;
    color: var(--clan-navy);
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e4ebf5;
}

.media-section-title i {
    color: var(--clan-gold);
    margin-right: 8px;
}

.media-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #5b6b86;
    padding: 40px 24px;
    background: #fff;
    border: 1px dashed #c9d6ea;
    border-radius: 14px;
    font-size: 0.98rem;
    line-height: 1.55;
}

/* Larger gallery tiles on media page */
.media-page .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.media-page .gallery-item {
    height: auto;
    aspect-ratio: 1 / 1;
}

.media-page .gallery-img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}

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

.video-card {
    background: #fff;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(20, 35, 63, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(20, 35, 63, 0.14);
}

.video-card > .video-embed-wrap {
    border-radius: 14px 14px 0 0;
}

.video-embed-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #0f172a;
    overflow: hidden;
}

.video-embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-card-body {
    padding: 16px 18px 20px;
}

.video-card-body h3 {
    margin: 0 0 8px;
    color: var(--clan-navy);
    font-size: 1.05rem;
    line-height: 1.35;
}

.video-card-body p {
    margin: 0;
    color: #5b6b86;
    font-size: 0.9rem;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .media-page {
        width: calc(100% - 12px);
    }

    .media-nav {
        top: calc(var(--site-header-h, 118px) + 6px);
    }

    .video-grid,
    .media-page .gallery-grid {
        grid-template-columns: 1fr;
    }
}
