html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

/*--------------------------------content-----------------------------*/
.split-container {
    display: flex;
    margin: 20px;
    height: auto;
}

.left-column {
    flex: 1;
    margin-right: 20px;
    height: auto;
}

.right-column {
    width: 50%;
    position: sticky;
    top: 0px;
    /* Adjust as needed */
    /*height: calc(100vh - 100px);*/
    height: 100vh;
    display: flex;
    flex-direction: column;
}


/*--------------------info container---------------------*/
.info-container {
    text-align: left;
    height: auto;
    margin-bottom: 2%;
    padding: 5px;
}

.info-container h1 {
    font-family: "Jost";
    font-size: 32px;
    font-weight: 300;
    color: #FFB719;
    height: auto;
    text-align: left;
}

#section-buttons-container {
    height: auto;
}

#rank-branch {
    display: flex;
    justify-content: left;
    align-items: left;
    height: auto;
}

#rank-branch h2 {
    font-family: "Jost";
    font-size: 18px;
    font-weight: 300;
    color: #d2d2d2;
    text-align: center;
}

#rank {
    margin: 0;
    margin-right: 5px;
}

#branch {
    margin: 0;
    margin-left: 5px;
}

/*-----------------------------------------------------------------buttons-------------------------------------*/

.section-button {
    background-color: #333333;
    color: #FFB719;
    border: none;
    padding: 20px 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 18px;
    font-family: "Jost";
}

/* Style for section buttons on hover */
.section-button:hover {
    background-color: white;
    color: #FFB719;
    transform: scale(1.05);
    transition: transform .2s;
}

.active-section-button {
    background-color: white;
    color: #FFB719;
}

/*-------------------------------------------narrative--------------------------*/

.narrative-content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centers content */
    justify-content: flex-start;
    font-family: Garamond, serif;
    font-size: 18px;
    color: #d2d2d2;
    white-space: pre-line;
    text-align: justify;
    line-height: 1.4;
    padding: 5px;
    width: auto;
    margin: 0 auto;
    flex-grow: 1;
    height: auto;
}

.narrative-content-container h1 {
    font-family: "Jost";
    font-size: 24px;
    font-weight: 300;
    color: white;
    text-align: center;
    line-height: 1.2;
    /*margin-top: 20px;
    margin-bottom: 5px;*/
}

/*---------------------------------------------------images--------------------------------*/
.gallery-container {
    text-align: center;
    height: 70%;
    margin: 0;
    margin-block: 2%;
}

.main-gallery-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.main-gallery-image:hover {
    cursor: pointer;
}

.image-desc {
    display: none;
    height: auto;
    width: 90%;
    margin: 0 auto;
    margin-bottom: 2%;
}

.image-desc p {
    font-size: 14px;
}

/*--------------------------------------------thumbnails--------------------------------------*/

.thumbnail-scroll-container {
    height: auto;
    width: 100%;
    overflow-y: hidden;
    overflow-x: auto;
    justify-content: center;
    white-space: nowrap;
    scroll-behavior: auto;
    /*position: absolute;
    bottom: 0;*/
}

.thumbnail-container {
    height: 145px;
    text-align: center;
}

.thumbnail-item {
    display: inline-block;
    width: 75px;
    height: 125px;
    margin-right: 5px;
    padding: 1%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.thumbnail-item img {
    width: 100%;
    height: 125px;
    object-fit: cover;
    object-position: center center;
}

.thumbnail-item.active {
    border: 1px solid white;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Define the track and thumb styles */
.thumbnail-scroll-container::-webkit-scrollbar {
    height: .5em;
}

.thumbnail-scroll-container::-webkit-scrollbar-thumb {
    background-color: darkgray;
    border-radius: 2px;
}

.thumbnail-scroll-container::-webkit-scrollbar-track {
    border-radius: 2px;
    background-color: rgba(169, 169, 169, 0.2);
}


.thumbnail-scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}


/*--------------------------------------------------------lightbox-----------------------------------------------------------*/
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
    text-align: center;
}

#enlarged-image {
    max-width: 90%;
    max-height: 100%;
    display: block;
    margin-inline: auto;
    margin-top: 1%;
    margin-bottom: 1%;
    object-fit: contain;
}

#close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    cursor: pointer;
    color: #fff;
}

/*-----------------------sources------------------------*/

.sources {
    margin-top: 2%;
    margin: 0 auto;
    margin-left: 5%;
    width: 80%;
    font-family: Garamond, serif;
    font-size: 12px;
    color: #d2d2d2;
    white-space: pre-line;
    text-align: left;
    line-height: 1.2;
    height: auto;
}

/* Adjust styles for small screens */
/* Adjust styles for small screens */
@media (max-width: 1024px) {

    .left-column,
    .right-column {
        margin-left: 2%;
        margin-right: 2%;
        max-width: 100%;
        /* Adjust for tablets or smaller screens */
    }
}

@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        /* Stack columns for mobile */
        height: auto;
    }

    .left-column,
    .right-column {
        width: 100%;
        margin: 0;
    }

    .narrative-scroll-container {
        display: block !important;
        max-height: 400px;
        /* Adjust as needed */
        overflow-y: auto;
    }

    .narrative-content-container {
        height: auto;
        min-height: 150px;
        /* Ensures it doesn’t collapse */
    }

    #section-buttons-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        /* Center section buttons */
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .thumbnail-item {
        width: 50px;
        height: 80px;
    }
}