
/* ==========================================================
   NEXUS COLLEGE — MEDIA GALLERY
========================================================== */

.nmg-page {
    --nmg-navy: #172a48;
    --nmg-gold: #bd8a48;
    --nmg-cream: #f7f5f0;
    --nmg-text: #25354b;
    --nmg-muted: #697687;

    background: var(--nmg-cream);
    color: var(--nmg-text);
}

.nmg-page *,
.nmg-page *::before,
.nmg-page *::after {
    box-sizing: border-box;
}

.nmg-page a {
    text-decoration: none;
}

/* HERO */

.nmg-hero {
    padding: 35px 0 95px;
    background: #f7f5f0;
}

.nmg-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 80px;
    font-size: 12px;
}

.nmg-breadcrumb a {
    color: #738092;
}

.nmg-breadcrumb a:hover {
    color: var(--nmg-navy);
}

.nmg-breadcrumb i {
    font-size: 10px;
    color: #a3acb6;
}

.nmg-breadcrumb span {
    color: var(--nmg-gold);
    font-weight: 650;
}

.nmg-hero-layout {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 70px;
    align-items: end;
}

.nmg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 27px;
    color: #a8783a;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 2px;
}

.nmg-eyebrow-line {
    width: 32px;
    height: 2px;
    background: #c59556;
}

.nmg-hero h1 {
    font-size: clamp(46px, 6vw, 90px);
    line-height: 1.07;
    letter-spacing: -3.5px;
    font-weight: 750;
    margin: 0;
    color: var(--nmg-navy);
}

.nmg-hero h1 span {
    display: block;
    color: var(--nmg-gold);
    font-style: italic;
    font-weight: 500;
}

.nmg-hero-aside {
    padding-bottom: 9px;
}

.nmg-hero-symbol {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9d9bf;
    color: var(--nmg-navy);
    font-size: 26px;
    margin-bottom: 25px;
}

.nmg-hero-aside p {
    color: var(--nmg-muted);
    font-size: 15px;
    line-height: 1.9;
    margin: 0;
}

/* GALLERY SECTION */

.nmg-gallery-section {
    padding: 80px 0 115px;
    background: #ffffff;
}

.nmg-gallery-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 45px;
    margin-bottom: 45px;
}

.nmg-small-label {
    color: #a57839;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 750;
}

.nmg-gallery-heading h2 {
    margin: 15px 0 0;
    color: var(--nmg-navy);
    font-size: clamp(31px, 4vw, 54px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    font-weight: 750;
}

.nmg-gallery-heading h2 em {
    color: var(--nmg-gold);
    font-weight: 500;
}

.nmg-gallery-heading > p {
    max-width: 340px;
    margin: 0;
    color: var(--nmg-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* FILTERS */

.nmg-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 30px;
}

.nmg-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.nmg-filter {
    appearance: none;
    border: 1px solid #e0e4e9;
    border-radius: 50px;
    background: #fff;
    padding: 12px 20px;
    color: #4f5c70;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    transition: .2s ease;
}

.nmg-filter:hover {
    border-color: #b88a4a;
    color: var(--nmg-navy);
}

.nmg-filter.is-active {
    background: var(--nmg-navy);
    color: #ffffff;
    border-color: var(--nmg-navy);
}

.nmg-gallery-count {
    flex-shrink: 0;
    color: #7a8695;
    font-size: 12px;
}

/* ASYMMETRIC GALLERY */

.nmg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 17px;
}

.nmg-photo-card {
    position: relative;
    min-width: 0;
    margin: 0;
    height: 275px;
    overflow: hidden;
    border-radius: 14px;
    background: #e4e8ed;
}

.nmg-photo-card:nth-child(7n + 1) {
    grid-column: span 2;
    grid-row: span 2;
    height: auto;
    min-height: 567px;
}

.nmg-photo-card:nth-child(7n + 4) {
    grid-column: span 2;
}

.nmg-photo-card[hidden],
.nmg-empty[hidden] {
    display: none !important;
}

.nmg-photo-open {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    background: transparent;
    text-align: left;
}

.nmg-photo-open img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}

.nmg-photo-open:hover img {
    transform: scale(1.055);
}

.nmg-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    padding: 25px;
    background: linear-gradient(
        180deg,
        transparent 38%,
        rgba(12, 25, 43, .8) 100%
    );
    transition: background .2s ease;
}

.nmg-photo-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nmg-photo-info small {
    color: #f1c486;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 750;
    letter-spacing: 1.6px;
}

.nmg-photo-info strong {
    color: #ffffff;
    font-size: clamp(15px, 1.6vw, 21px);
    line-height: 1.35;
    font-weight: 700;
}

.nmg-photo-arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    background: #ffffff;
    border-radius: 50%;
    color: #172a48;
    font-size: 17px;
    transition: transform .2s ease;
}

.nmg-photo-open:hover .nmg-photo-arrow {
    transform: rotate(45deg);
}

.nmg-empty {
    color: #687789;
    font-size: 15px;
    line-height: 1.8;
    padding: 35px 0;
}

/* VISIT CTA */

.nmg-visit-section {
    padding: 100px 0;
    background: var(--nmg-cream);
}

.nmg-visit-box {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 35px;
    align-items: center;
    overflow: hidden;
    min-height: 400px;
    padding: 65px;
    background: var(--nmg-navy);
    border-radius: 22px;
}

.nmg-visit-eyebrow {
    display: block;
    color: #efbb76;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 21px;
}

.nmg-visit-content h2 {
    color: #ffffff;
    font-size: clamp(36px, 4vw, 57px);
    line-height: 1.12;
    font-weight: 750;
    letter-spacing: -1.8px;
    margin-bottom: 22px;
}

.nmg-visit-content h2 em {
    display: block;
    color: #e9b36a;
    font-weight: 500;
}

.nmg-visit-content p {
    color: #c9d5e5;
    max-width: 510px;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 28px;
}

.nmg-visit-button {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    padding: 16px 24px;
    background: #e9b36a;
    color: #172a48 !important;
    font-size: 13px;
    font-weight: 750;
    border-radius: 7px;
    transition: transform .2s ease;
}

.nmg-visit-button:hover {
    transform: translateY(-3px);
}

.nmg-visit-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.nmg-visit-ring {
    display: grid;
    place-items: center;
    width: min(260px, 100%);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px dashed #a2b0c5;
}

.nmg-visit-ring span {
    display: grid;
    place-items: center;
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: #e8b36b;
    color: #172a48;
    font-size: 80px;
    letter-spacing: -8px;
    font-weight: 800;
}

.nmg-visit-small {
    color: #cbd6e5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* FULLSCREEN LIGHTBOX */

.nmg-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 18px;
    border: 0;
    background: #0c1423;
    color: #ffffff;
}

.nmg-lightbox::backdrop {
    background: rgba(0, 0, 0, .9);
}

.nmg-lightbox-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.nmg-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 55px;
    font-size: 13px;
    color: #c2d0e2;
}

.nmg-lightbox-close,
.nmg-lightbox-nav {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.1);
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
}

.nmg-lightbox-close {
    width: 42px;
    height: 42px;
    font-size: 17px;
}

.nmg-lightbox-stage {
    display: grid;
    grid-template-columns: 55px minmax(0,1fr) 55px;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.nmg-lightbox-stage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nmg-lightbox-nav {
    width: 48px;
    height: 48px;
    font-size: 19px;
}

.nmg-lightbox-nav:hover,
.nmg-lightbox-close:hover {
    background: rgba(255,255,255,.22);
}

.nmg-lightbox-caption {
    text-align: center;
    padding: 20px 0 10px;
}

.nmg-lightbox-caption span {
    color: #e9ba78;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nmg-lightbox-caption h2 {
    margin: 9px 0 0;
    font-size: 20px;
    color: #ffffff;
}

/* ACCESSIBILITY */

.nmg-page button:focus-visible,
.nmg-page a:focus-visible,
.nmg-lightbox button:focus-visible {
    outline: 3px solid #e9b36a;
    outline-offset: 3px;
}

/* RESPONSIVE */

@media (max-width: 991px) {
    .nmg-hero-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .nmg-breadcrumb {
        margin-bottom: 50px;
    }

    .nmg-hero {
        padding-bottom: 65px;
    }

    .nmg-gallery-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .nmg-photo-card:nth-child(7n + 1),
    .nmg-photo-card:nth-child(7n + 4) {
        grid-column: auto;
        grid-row: auto;
        min-height: 0;
        height: 290px;
    }

    .nmg-visit-box {
        padding: 45px;
    }
}

@media (max-width: 767px) {
    .nmg-hero {
        padding: 24px 0 55px;
    }

    .nmg-hero h1 {
        font-size: 47px;
        letter-spacing: -1.6px;
    }

    .nmg-gallery-section {
        padding: 55px 0 70px;
    }

    .nmg-gallery-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nmg-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nmg-filters {
        gap: 8px;
    }

    .nmg-filter {
        padding: 10px 14px;
        font-size: 11px;
    }

    .nmg-gallery-grid {
        gap: 12px;
    }

    .nmg-photo-card,
    .nmg-photo-card:nth-child(7n + 1),
    .nmg-photo-card:nth-child(7n + 4) {
        height: 230px;
    }

    .nmg-photo-overlay {
        padding: 14px;
    }

    .nmg-photo-info strong {
        font-size: 14px;
    }

    .nmg-photo-arrow {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        font-size: 14px;
    }

    .nmg-visit-section {
        padding: 55px 0;
    }

    .nmg-visit-box {
        grid-template-columns: 1fr;
        padding: 35px 25px;
    }

    .nmg-visit-art {
        display: none;
    }

    .nmg-lightbox {
        padding: 10px;
    }

    .nmg-lightbox-stage {
        grid-template-columns: 35px minmax(0,1fr) 35px;
        gap: 5px;
    }

    .nmg-lightbox-nav {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nmg-hero h1 {
        font-size: 38px;
    }

    .nmg-gallery-grid {
        grid-template-columns: 1fr;
    }

    .nmg-photo-card,
    .nmg-photo-card:nth-child(7n + 1),
    .nmg-photo-card:nth-child(7n + 4) {
        height: 270px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nmg-page *,
    .nmg-page *::before,
    .nmg-page *::after {
        transition: none !important;
        animation: none !important;
    }
}
