
/* Gallery */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 16px;
}

#gallery-gold .gallery-item,
#gallery-silver .gallery-item,
#gallery-bronze .gallery-item,
#gallery-full .gallery-item {
    text-align: center;
    width: calc(32% - 16px);
}

#gallery-half .gallery-item,
#gallery-quarter .gallery-item,
#gallery-friend .gallery-item {
    text-align: center;
    width: calc(15% - 16px);
}

.gallery-image {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.gallery-item a {
    display: block;
    margin-top: 8px;
    text-decoration: none;
    color: blue;
}

#gallery-half img,
#gallery-quarter img,
#gallery-friend img {
    max-height: 200px;
    width: auto;
}

#gallery-half .gallery-item p,
#gallery-quarter .gallery-item p,
#gallery-friend .gallery-item p {
    font-size: 14px;
    min-width: 200px;
    padding: 0 30px;
    margin: 0 auto 0 -50px;
}

@media (max-width: 768px) {
    .gallery-item {
        width: calc(50% - 16px);
    }
}

@media (max-width: 480px) {
    .gallery-container {
        flex-direction: column;
        align-items: center;
    }
    .gallery-item {
        min-width: 100%;
    }
    .image-modal {
        display: none !important;
    }
    .thumbnail-grid {
        flex-direction: column;
        align-items: center;
    }
    .thumbnail {
        width: 100%;
        margin: 10px 0;
        border-radius: 8px;
        box-shadow: 1px 1px 7px 1px #ddd;
    }
    .thumbnail img {
        width: 100%;
        height: auto;
    }
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: calc(100% - 30px);
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1000;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.modal-image-container {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s;
}

.modal-image-container img {
    max-height: 400px;
    width: auto;
    border-radius: 8px;
    display: block;
    margin: 60px 10% 0 40%;
}

.image-modal.show .modal-image-container {
    opacity: 1;
}

.modal-close, .modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    cursor: pointer;
    padding: 2px 12px 4px 14px;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close {
    top: 16px;
    right: 16px;
    transform: none;
}

.modal-prev {
    left: 16px;
}

.modal-next {
    right: 16px;
}

.modal-close:hover, .modal-prev:hover, .modal-next:hover {
    background: rgba(255, 255, 255, 0.8);
    color: black;
}

@media (max-width: 768px) {
    .image-modal {
        display: none !important;
    }
}

/* Thumbnail Grid */
.thumbnail-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.thumbnail {
    position: relative;
    margin: 10px;
    cursor: pointer;
    flex-basis: calc(25% - 20px);
    box-sizing: border-box;
    border: solid 1px #ccc;
    background: #fff;
    box-shadow: 1px 1px 7px 1px #ddd;
}

.thumbnail h3 {
    font-size: 20px;
}

.thumbnail-text {
    margin-top: 10px;
    font-size: 16px;
    color: #333 !important;
    text-align: center;
}

.thumbnail img {
    width: 100%;
    height: auto;
}

.hover-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.thumbnail:hover .hover-text {
    opacity: 1;
    visibility: visible;
}

.thumbnail p {
    color: #fff;
}

/* Modal */
.modal {
    display: block;
    opacity: 0;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: opacity 0.5s ease;
    visibility: hidden;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    width: 60%;
    max-width: 800px;
    max-height: 800px;
    overflow-y: scroll;
    z-index: 2;
    pointer-events: auto;
    border-top: solid 3px #D03E00;
}

.modal-body {
    text-align: left;
    opacity: 1;
    transition: opacity 0.5s ease;
    max-height: 800px;
    overflow-y: scroll;
    padding: 30px;
}

.modal-body.fade-out {
    opacity: 0;
}

.modal-body.fade-in {
    opacity: 1;
}

#modalImage {
    width: 20%;
    max-width: 500px;
    height: auto;
    margin: 0 40% 10px 40%;
}

#modalHeading {
    font-size: 24px;
    margin-top: 10px;
    color: #333;
    text-align: center;
}

#modalText {
    font-size: 16px;
    color: #555;
    margin-top: 10px;
}

.closeModal {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #000;
    cursor: pointer;
    border: 2px solid #D03E00;
    height: 25px;
    width: 30px;
    text-align: center;
}

.closeModal p {
    padding: 0 5px 11px 5px;
    margin-top: -7px;
    font-size: 25px;
    font-weight: bold;
}

.closeModal p:hover {
    color: #fff;
}

.closeModal:hover {
    background-color: #D03E00;
}

#prevButton, #nextButton {
    position: fixed;
    transform: translateY(-50%);
    color: #000;
    font-size: 18px;
    margin-top: 20px;
    border: 2px solid #D03E00;
    background-color: #ccc;
    cursor: pointer;
    padding: 5px 9px;
    z-index: 3;
}

#prevButton:hover, #nextButton:hover {
    background-color: #D03E00;
    color: #fff;
}

#prevButton {
    rotate: 180deg;
    left: 15%;
    top: 200px;
}

#nextButton {
    right: 15%;
    top: 240px;
}

@media (max-width: 768px) {
    .thumbnail {
        flex-basis: 100%;
        margin: 15px 0;
    }
    .thumbnail-grid {
        flex-direction: column;
        align-items: center;
    }
    .modal-content {
        width: 90%;
        max-height: 550px;
        margin-top: 110px;
    }
    .modal-body {
        max-height: 550px;
    }
    #modalText p {
        font-size: 14px;
    }
    #modalImage {
        min-width: 100px;
        margin: 0px 30%;
    }
    #modalHeading {
        line-height: 26px;
    }
    #prevButton, #nextButton {
        font-size: 12px;
        background-color: #f7f8fa;
        padding: 1px 5px;
    }
    #prevButton {
        left: 6%;
        top: 250px;
    }
    #nextButton {
        right: 6%;
        top: 275px;
    }
}

/* ================================
   THUMBNAIL GRIDS
   ================================ */
.thumbnail-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.thumbnail {
    position: relative;
    margin: 10px;
    cursor: pointer;
    flex-basis: calc(25% - 20px);
    box-sizing: border-box;
    border: solid 1px #ccc;
    background: #fff;
    box-shadow: 1px 1px 7px 1px #ddd;
}

.thumbnail h3 {
    font-size: 20px;
}

.thumbnail-text-top {
    margin-top: 10px;
    font-size: 16px;
    color: #333 !important;
    text-align: center;
    font-family: 'Bree Serif', serif;
}

.thumbnail-text {
    margin-top: 10px;
    font-size: 16px;
    color: #333 !important;
    text-align: center;
}

.thumbnail img {
    width: 100%;
    height: auto;
}

.thumbnail:hover .hover-text {
    opacity: 1;
    visibility: visible;
}

.thumbnail p {
    color: #fff;
}

.thumb-nail {
    position: relative;
    margin: 10px;
    cursor: pointer;
    flex-basis: calc(25% - 20px);
    box-sizing: border-box;
    border: solid 1px #ccc;
    background: #fff;
    box-shadow: 1px 1px 7px 1px #ddd;
}

.thumb-nail h3 {
    font-size: 20px;
}

.thumb-nail img {
    width: 100%;
    height: auto;
}

.thumb-nail:hover .hover-text {
    opacity: 1;
    visibility: visible;
}

.thumbnails p {
    color: #fff;
}

/* ================================
   HOVER TEXT
   ================================ */
.hover-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.5s ease;
    visibility: hidden;
}

/* ================================
   HONOREE MODAL (.modal1)
   ================================ */
.modal1 {
    display: block;
    opacity: 0;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: opacity 0.5s ease;
    visibility: hidden;
}

.modal1.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: rgb(255, 255, 255, 0.9);
    width: 60%;
    max-width: 800px;
    max-height: 800px;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.5s ease;
    z-index: 2;
    pointer-events: auto;
    border-top: solid 3px #D03E00;
    margin-top: 20px;
}

.modal-body1 {
    text-align: left;
    opacity: 1;
    transition: opacity 0.5s ease;
    max-height: 800px;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 30px;
}

.modal-body1::-webkit-scrollbar {
    display: none;
}

.modal-body1.fade-out { opacity: 0; }
.modal-body1.fade-in  { opacity: 1; }

#modalImage1 {
    width: 20%;
    max-width: 500px;
    height: auto;
    margin: 0 40% 10px 40%;
}

#modalHeading {
    font-size: 24px;
    margin-top: 10px;
    color: #333;
    text-align: center;
}

#modalText {
    font-size: 16px;
    color: #555;
    margin-top: 10px;
}

.closeModal {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #000;
    cursor: pointer;
    border: 2px solid #D03E00;
    height: 25px;
    width: 30px;
    text-align: center;
}

.closeModal p {
    padding: 0 5px 11px 5px;
    margin-top: -7px;
    font-size: 25px;
    font-weight: bold;
}

.closeModal p:hover { color: #fff; }
.closeModal:hover { background-color: #D03E00; }

#prevButtonH, #nextButtonH {
    position: fixed;
    transform: translateY(-50%);
    color: #000;
    font-size: 18px;
    margin-top: 20px;
    border: 2px solid #D03E00;
    background-color: #ccc;
    cursor: pointer;
    padding: 5px 9px;
    z-index: 3;
    pointer-events: auto;
}

#prevButtonH:hover, #nextButtonH:hover {
    background-color: #D03E00;
    color: #fff;
}

#prevButtonH {
    rotate: 180deg;
    left: 15%;
    top: 200px;
}

#nextButtonH {
    right: 15%;
    top: 240px;
}

/* ================================
   SCHOLAR MODAL (.modal1s)
   ================================ */
.modal1s {
    display: block;
    opacity: 0;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: opacity 0.5s ease;
    visibility: hidden;
}

.modal1s.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-contents {
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: rgb(255, 255, 255, 0.9);
    width: 60%;
    max-width: 800px;
    max-height: 800px;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.5s ease;
    z-index: 2;
    pointer-events: auto;
    border-top: solid 3px #D03E00;
    margin-top: 20px;
}

.modal-body1s {
    text-align: left;
    opacity: 1;
    transition: opacity 0.5s ease;
    max-height: 800px;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 30px;
}

.modal-body1s::-webkit-scrollbar {
    display: none;
}

.modal-body1s.fade-out { opacity: 0; }
.modal-body1s.fade-in  { opacity: 1; }

#modalImage1s {
    width: 20%;
    max-width: 500px;
    height: auto;
    margin: 0 40% 10px 40%;
}

#modalHeadings {
    font-size: 24px;
    margin-top: 10px;
    color: #333;
    text-align: center;
}

#modalTexts {
    font-size: 16px;
    color: #555;
    margin-top: 10px;
}

.closeModals {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #000;
    cursor: pointer;
    border: 2px solid #D03E00;
    height: 25px;
    width: 30px;
    text-align: center;
}

.closeModals p {
    padding: 0 5px 11px 5px;
    margin-top: -7px;
    font-size: 25px;
    font-weight: bold;
}

.closeModals p:hover { color: #fff; }
.closeModals:hover { background-color: #D03E00; }

#prevButtons, #nextButtons {
    position: fixed;
    transform: translateY(-50%);
    color: #000;
    font-size: 18px;
    margin-top: 20px;
    border: 2px solid #D03E00;
    background-color: #ccc;
    cursor: pointer;
    padding: 5px 9px;
    z-index: 3;
    pointer-events: auto;
}

#prevButtons:hover, #nextButtons:hover {
    background-color: #D03E00;
    color: #fff;
}

#prevButtons {
    rotate: 180deg;
    left: 15%;
    top: 200px;
}

#nextButtons {
    right: 15%;
    top: 240px;
}

/* ================================
   VIDEO EMBED
   ================================ */
.videoEmbedWrapper {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 25px;
    height: 0;
}

.videoEmbedWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ================================
   MISC
   ================================ */
.head5050 {
    text-align: center;
    font-size: 45px;
    margin: 0;
    padding: 0;
}

/* ================================
   MOBILE
   ================================ */
@media (max-width: 768px) {
    .thumbnail {
        flex-basis: calc(100% - 20px);
        max-width: 250px;
    }
    .thumbnail h3 {
        font-size: 18px;
        margin-top: -5px;
    }
    .hover-text p {
        margin-top: -10px;
    }
    .thumb-nail {
        flex-basis: calc(100% - 20px);
        max-width: 250px;
    }
    .thumbnails h3 {
        font-size: 18px;
        margin-top: -5px;
    }
    .modal-content {
        width: 90%;
        padding: 20px 0;
        max-height: 550px;
        margin-top: 110px;
    }
    .modal-body1 {
        max-height: 550px;
    }
    #modalText p { font-size: 14px; }
    #modalImage1 {
        min-width: 100px;
        margin: 0px 40%;
    }
    #modalHeading { line-height: 26px; }
    #prevButtonH, #nextButtonH {
        font-size: 12px;
        background-color: #f7f8fa;
        padding: 1px 5px;
    }
    #prevButtonH {
        left: 6%;
        top: 250px;
    }
    #nextButtonH {
        right: 6%;
        top: 275px;
    }
    .modal-contents {
        width: 90%;
        padding: 20px 0;
        max-height: 550px;
        margin-top: 110px;
    }
    .modal-body1s {
        max-height: 550px;
    }
    #modalTexts p { font-size: 14px; }
    #modalImage1s {
        min-width: 100px;
        margin: 0px 30%;
    }
    #modalHeadings { line-height: 26px; }
    #prevButtons, #nextButtons {
        font-size: 12px;
        background-color: #f7f8fa;
        padding: 1px 5px;
    }
    #prevButtons {
        left: 6%;
        top: 250px;
    }
    #nextButtons {
        right: 6%;
        top: 275px;
    }
}
