/* Media page — navy hero band, clean light gallery */

.media-hero {
    position: relative;
    min-height: 38vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 130px 0 70px;
    overflow: hidden;
}

.media-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35);
    z-index: 1;
}

.media-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.media-title {
    font-size: clamp(2.8rem, 6vw, 4.6rem);
    color: #ffffff;
}

.media-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.media-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 1;
    background: var(--wash);
    transition: border-color 0.2s;
}

.gallery-item:hover {
    border-color: var(--blue);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item img,
    .gallery-item:hover img {
        transition: none;
        transform: none;
    }
}

/* ------------------------------------------------------------
   Lightbox — click-through viewer for the gallery
   ------------------------------------------------------------ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 30, 58, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: min(88vw, 1400px);
    max-height: 90vh;
    padding: 0 4.5rem;
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    display: block;
    border: 1px solid var(--navy-line);
}

.lightbox-counter {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--blue-hi);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: transparent;
    border: 1px solid rgba(154, 183, 220, 0.4);
    color: #ffffff;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    border-color: var(--blue-hi);
    color: var(--blue-hi);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.6rem;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

@media (max-width: 640px) {
    .lightbox-stage {
        padding: 0 3rem;
    }

    .lightbox-nav {
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.5rem;
    }
}
