/* Media page — extends gallery styles (load includes/gallery.css before this file) */
.media-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 56px;
}

.media-hero {
    text-align: center;
    margin-bottom: 24px;
    padding: 38px 24px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--clan-navy, #1E3C72), var(--clan-blue, #2A5298));
    box-shadow: 0 10px 28px rgba(20, 35, 63, 0.14);
    position: relative;
    overflow: hidden;
}

.media-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pattern-stars, none);
    opacity: 0.28;
    pointer-events: none;
}

.media-hero h1 {
    position: relative;
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    color: var(--clan-gold, #FFD700);
}

.media-hero p {
    position: relative;
    margin: 0 auto;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.6;
}

.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: 72px;
    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% - 20px);
    }

    .media-nav {
        top: 60px;
    }

    .video-grid,
    .media-page .gallery-grid {
        grid-template-columns: 1fr;
    }
}
