/* =========================================================
   MEDIA PAGE
========================================================= */

.media-page {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
}

.media-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}


/* =========================================================
   HERO
========================================================= */

.media-hero {
    position: relative;

    min-height: 470px;

    display: flex;

    align-items: center;

    background-image: url("../images/bg.png");

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;
}

.media-hero-overlay {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(5, 15, 35, 0.86),
            rgba(5, 15, 35, 0.58),
            rgba(5, 15, 35, 0.35)
        );
}

.media-hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.media-small-title {
    display: inline-block;

    margin-bottom: 12px;

    color: #d69b2c;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.media-hero h1 {
    max-width: 700px;

    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 55px;
    line-height: 1.15;
}

.media-hero p {
    max-width: 650px;

    margin:
        20px 0 0;

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================================
   TABS
========================================================= */

.media-navigation-section {
    background: #ffffff;

    border-bottom:
        1px solid #e7e9ee;

    position: sticky;
    top: 0;

    z-index: 50;
}

.media-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;

    padding: 12px 0;
}

.media-tab {
    border: 0;
    background: transparent;

    padding:
        13px 28px;

    border-radius: 6px;

    color: #162b50;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.media-tab span {
    margin-right: 7px;
}

.media-tab:hover {
    color: #1648c1;
}

.media-tab.active {
    background: #1648c1;
    color: #ffffff;
}


/* =========================================================
   CONTENT
========================================================= */

.media-content-section {
    display: none;

    padding:
        75px 0;
}

.media-content-section.active {
    display: block;
}

.media-section-heading {
    margin-bottom: 40px;
}

.section-kicker {
    display: block;

    margin-bottom: 8px;

    color: #c58a25;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.media-section-heading h2 {
    margin: 0;

    color: #122b55;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 38px;
}

.media-section-heading p {
    max-width: 650px;

    margin:
        12px 0 0;

    color: #626978;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   EVENT
========================================================= */

.media-event {
    margin-bottom: 55px;
}

.media-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.event-dates {
    color: #c58a25;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.media-event-header h3 {
    margin:
        5px 0;

    color: #162b50;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;
}

.media-event-header p {
    margin: 0;

    color: #686f7c;

    font-size: 14px;
}

.view-gallery-button {
    border: 1px solid #1648c1;

    background: #ffffff;

    color: #1648c1;

    padding:
        11px 18px;

    border-radius: 5px;

    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.view-gallery-button:hover {
    background: #1648c1;
    color: #ffffff;
}


/* =========================================================
   PHOTO GRID
========================================================= */

.photo-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;
}

.photo-item {
    position: relative;

    width: 100%;
    height: 220px;

    padding: 0;

    border: 0;

    border-radius: 8px;

    overflow: hidden;

    background: #eeeeee;

    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform 0.35s ease;
}

.photo-item:hover img {
    transform: scale(1.06);
}

.photo-overlay {
    position: absolute;

    inset: auto 0 0 0;

    padding: 14px;

    background:
        linear-gradient(
            transparent,
            rgba(0,0,0,0.75)
        );

    color: #ffffff;

    text-align: left;

    font-size: 13px;
    font-weight: 600;

    opacity: 0;

    transition:
        opacity 0.25s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}


/* =========================================================
   VIDEO GRID
========================================================= */

.video-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 28px;
}

.video-card {
    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 8px 25px
        rgba(20,35,65,0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.video-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 35px
        rgba(20,35,65,0.13);
}

.video-thumbnail {
    position: relative;

    display: block;

    width: 100%;
    height: 270px;

    border: 0;

    padding: 0;

    overflow: hidden;

    cursor: pointer;

    background: #111827;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.35s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-play {
    position: absolute;

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -50%);

    width: 65px;
    height: 65px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #1648c1;

    color: #ffffff;

    font-size: 23px;

    padding-left: 4px;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,0.3);
}

.video-content {
    padding: 24px;
}

.video-category {
    color: #c58a25;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1px;
}

.video-content h3 {
    margin:
        8px 0;

    color: #162b50;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 21px;
}

.video-content p {
    margin:
        0 0 17px;

    color: #656c79;

    font-size: 14px;

    line-height: 1.6;
}

.watch-video {
    border: 0;

    padding: 0;

    background: transparent;

    color: #1648c1;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}


/* =========================================================
   AUDIO
========================================================= */

.audio-list {
    display: flex;

    flex-direction: column;

    gap: 16px;
}

.audio-card {
    display: flex;

    align-items: center;

    gap: 20px;

    padding: 20px 24px;

    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 9px;

    box-shadow:
        0 5px 20px
        rgba(20,35,65,0.06);
}

.audio-icon {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #1648c1;

    color: #ffffff;

    font-size: 24px;
}

.audio-information {
    flex: 1;
}

.audio-information span {
    color: #c58a25;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1px;
}

.audio-information h3 {
    margin:
        5px 0;

    color: #162b50;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 20px;
}

.audio-information p {
    margin: 0;

    color: #687080;

    font-size: 13px;
}

.audio-button {
    border: 0;

    padding:
        11px 20px;

    border-radius: 5px;

    background: #1648c1;

    color: #ffffff;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease;
}

.audio-button:hover {
    background: #10358f;
}


/* =========================================================
   VIDEO MODAL
========================================================= */

.media-modal {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 25px;

    z-index: 9999;
}

.media-modal.active {
    display: flex;
}

.media-modal-background {
    position: absolute;

    inset: 0;

    background:
        rgba(0,0,0,0.82);
}

.media-modal-content {
    position: relative;

    width: 100%;
    max-width: 950px;

    z-index: 2;
}

.media-modal-close {
    position: absolute;

    right: -5px;
    top: -50px;

    width: 40px;
    height: 40px;

    border: 0;

    border-radius: 50%;

    background: #ffffff;

    color: #162b50;

    font-size: 28px;

    cursor: pointer;
}

.youtube-container {
    position: relative;

    width: 100%;

    padding-top: 56.25%;

    background: #000;

    border-radius: 8px;

    overflow: hidden;
}

.youtube-container iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.photo-lightbox {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 10000;

    padding: 25px;

    background:
        rgba(0,0,0,0.92);
}

.photo-lightbox.active {
    display: flex;
}

.lightbox-image-wrapper {
    max-width: 1000px;
    max-height: 90vh;

    text-align: center;
}

.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;

    object-fit: contain;
}

.lightbox-caption {
    margin-top: 12px;

    color: #ffffff;

    font-size: 15px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    border: 0;

    background: transparent;

    color: #ffffff;

    cursor: pointer;
}

.lightbox-close {
    top: 20px;
    right: 30px;

    font-size: 42px;
}

.lightbox-prev {
    left: 25px;
    top: 50%;

    font-size: 60px;
}

.lightbox-next {
    right: 25px;
    top: 50%;

    font-size: 60px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 950px) {

    .media-hero {
        min-height: 360px;
    }

    .media-hero h1 {
        font-size: 45px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .media-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .media-hero {
        min-height: 330px;
    }

    .media-hero h1 {
        font-size: 34px;
    }

    .media-hero p {
        font-size: 14px;
    }

    .media-tabs {
        overflow-x: auto;

        justify-content: flex-start;

        white-space: nowrap;
    }

    .media-tab {
        padding:
            11px 18px;
    }

    .media-content-section {
        padding:
            50px 0;
    }

    .media-section-heading h2 {
        font-size: 30px;
    }

    .media-event-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 18px;
    }

    .photo-grid {
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .photo-item {
        height: 160px;
    }

    .video-grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .video-thumbnail {
        height: 220px;
    }

    .audio-card {
        align-items: flex-start;

        flex-wrap: wrap;

        padding: 18px;
    }

    .audio-information {
        min-width: 0;

        width: calc(100% - 75px);
    }

    .audio-button {
        width: 100%;
    }

    .media-modal {
        padding: 15px;
    }

    .media-modal-close {
        top: -48px;
        right: 0;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

}


/* =========================================================
   SMALL PHONE
========================================================= */

@media (max-width: 400px) {

    .media-hero h1 {
        font-size: 29px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .photo-item {
        height: 210px;
    }

}

/* Display only four photos in the gallery */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

/* Keep extra photos in the HTML for the lightbox slider,
   but hide them from the gallery */
.photo-item-hidden {
    display: none !important;
}

/* Facebook-style +N overlay */
.photo-item {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
}

.photo-more-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 700;
    transition: background 0.2s ease;
}

.photo-item:hover .photo-more-overlay {
    background: rgba(0, 0, 0, 0.75);
}

.photo-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Responsive layout */
@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.photo-item.gallery-hidden {
    display: none;
}

#lightboxPrev:disabled,
#lightboxNext:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}