html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background-image: url("/nc_assets/img/NMDBackground.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: white;
    font-family: Arial, sans-serif;
}

.banner {
    display: block;
    width: 100%;
    height: auto;
}

.navbar {
    position: relative;
    z-index: 1000;

    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid white;
    border-bottom: 1px solid white;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;

    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    display: block;
    padding: 16px 24px;

    color: white;
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: white;
    color: black;
}

.dropdown-menu {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;

    min-width: 190px;
    list-style: none;
    margin: 0;
    padding: 0;

    background: black;
    border: 1px solid white;
    z-index: 2000;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    padding: 12px 18px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    background: transparent;
}

@media (max-width: 700px) {
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-menu a {
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        border-left: 0;
        border-right: 0;
    }
}
.post-preview {
    margin-bottom: 60px;
    padding-bottom: 40px;

    border-bottom: 1px solid rgba(255,255,255,0.4);
}

.post-preview h2 {
    margin-bottom: 10px;

    font-size: 32px;
}

.post-preview h2 a {
    color: white;
    text-decoration: none;
}

.post-preview h2 a:hover {
    text-decoration: underline;
}

.post-thumbnail {
    display: block;

    width: 100%;
    max-height: 500px;

    object-fit: cover;

    margin-bottom: 20px;
}

.post-excerpt {
    line-height: 1.6;
}

.read-more {
    display: inline-block;

    margin-top: 10px;

    color: white;
}
.article-page {
    max-width: 900px;

    margin: 0 auto;

    padding: 60px 40px;
}

.article-title {
    margin-bottom: 10px;

    font-size: 48px;
}

.article-date {
    margin-bottom: 30px;

    opacity: 0.7;
}

.article-featured-image {
    width: 100%;
    height: auto;

    margin-bottom: 40px;
}

.article-body {
    font-size: 18px;
    line-height: 1.7;
}

.article-body img {
    max-width: 100%;
    height: auto;
}

.article-body figure {
    margin-left: 0;
    margin-right: 0;
}

.article-body a {
    color: white;
}
.post-date {
    margin-top: -5px;
    margin-bottom: 20px;
    opacity: 0.65;
    font-size: 14px;
}
.gallery-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: 30px;
    width: 100%;
}

.gallery-card {
    overflow: hidden;

    background: rgba(0, 0, 0, 0.75);

    border: 1px solid rgba(255, 255, 255, 0.4);
}

.gallery-image {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    object-fit: cover;
}

.gallery-info {
    padding: 18px;
}

.gallery-info h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.gallery-description {
    line-height: 1.5;
}

.gallery-description p:last-child {
    margin-bottom: 0;
}
.gallery-image {
    cursor: pointer;
}


/* ===== Upgraded Gallery Lightbox ===== */

.lightbox {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 9999;

    background: rgba(0, 0, 0, 0.95);

    align-items: center;
    justify-content: center;

    padding: 40px 80px;
    box-sizing: border-box;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 95vw;
    max-height: 95vh;
}

.lightbox-image {
    display: block;

    max-width: 90vw;
    max-height: 75vh;

    width: auto;
    height: auto;

    object-fit: contain;
}

.lightbox-caption {
    width: min(900px, 90vw);

    margin-top: 18px;

    color: white;
    text-align: center;
    line-height: 1.5;
}

.lightbox-caption h2 {
    margin: 0 0 8px;
}

.lightbox-caption p {
    margin-top: 0;
}

.lightbox-close,
.lightbox-nav {
    border: 0;
    background: transparent;

    color: white;

    cursor: pointer;

    user-select: none;
}

.lightbox-close {
    position: absolute;

    top: 20px;
    right: 30px;

    z-index: 10002;

    font-size: 48px;
    line-height: 1;
}

.lightbox-nav {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    z-index: 10001;

    padding: 20px;

    font-size: 56px;
    line-height: 1;
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    opacity: 0.7;
}

.lightbox-nav[hidden] {
    display: none;
}

@media (max-width: 700px) {

    .lightbox {
        padding: 55px 45px 30px;
    }

    .lightbox-image {
        max-width: 88vw;
        max-height: 68vh;
    }

    .lightbox-nav {
        padding: 10px;
        font-size: 42px;
    }

    .lightbox-prev {
        left: 2px;
    }

    .lightbox-next {
        right: 2px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 42px;
    }
}


/* ============================= */
/* Homepage                      */
/* ============================= */

.homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 40px 80px;
}

/* Featured / newest article */

.featured-post {
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(300px, 1fr);

    gap: 40px;
    align-items: center;

    margin-bottom: 80px;

    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.featured-post-image {
    display: block;
    width: 100%;
    height: 100%;

    min-height: 420px;
    max-height: 600px;

    object-fit: cover;
}

.featured-image-link {
    height: 100%;
}

.featured-post-content {
    padding: 40px 40px 40px 0;
}

.featured-label {
    margin-top: 0;
    margin-bottom: 12px;

    opacity: 0.65;

    text-transform: uppercase;
    letter-spacing: 2px;

    font-size: 13px;
}

.featured-post h1 {
    margin-top: 0;
    margin-bottom: 12px;

    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
}

.featured-post h1 a {
    color: white;
    text-decoration: none;
}

.featured-post h1 a:hover {
    text-decoration: underline;
}

.featured-excerpt {
    margin-top: 24px;

    font-size: 18px;
    line-height: 1.6;
}

/* Recent posts */

.section-heading {
    margin-bottom: 30px;
    padding-bottom: 12px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.5);

    font-size: 32px;
}

.recent-posts {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 30px;
}

.home-post-card {
    overflow: hidden;

    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.home-post-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;

    object-fit: cover;
}

.home-post-info {
    padding: 24px;
}

.home-post-info h3 {
    margin-top: 0;
    margin-bottom: 8px;

    font-size: 26px;
}

.home-post-info h3 a {
    color: white;
    text-decoration: none;
}

.home-post-info h3 a:hover {
    text-decoration: underline;
}

.home-post-excerpt {
    line-height: 1.6;
}

/* Homepage mobile layout */

@media (max-width: 800px) {

    .homepage {
        padding: 30px 20px 60px;
    }

    .featured-post {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .featured-post-image {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .featured-post-content {
        padding: 30px;
    }

    .recent-posts {
        grid-template-columns: 1fr;
    }
}

.invert-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;

    padding: 10px 16px;

    background: black;
    color: white;

    border: 1px solid white;

    cursor: pointer;
}

body.inverted .banner {
    filter: invert(1);
}

body.inverted {
    background-image: none;
}

body.inverted::before {
    content: "";

    position: fixed;
    inset: 0;

    z-index: -1;

    background-image: url("/nc_assets/img/NMDBackground.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    filter: invert(1);
}