html, body {
    height: 100%; /* Ensure html and body take full viewport height */
    width: 100vw; /* Use viewport width for width */
    overflow-x: hidden; /* Prevent horizontal scroll on html/body */
}

body {
    background-color: #f0f0f0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: sans-serif;
    text-align: center;
    overflow-anchor: none;
    padding-top: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

a {
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

a:hover {
    color: #0195fb;
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 10px 0;
    font-size: 10px;
    background: #222;
    color: #fff;
    width: 100%;
    margin-top: auto;
}

header {
    background-color: #f0f0f0;
    padding: 20px 0;
}

.mini-nav-mobile {
    font-size: 0.95em;
    margin-top: 15px;
    margin-left: 24%;
    margin-right: auto;
    display: block;
}

#main-container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch; /* Ensure main-container stretches vertically */
    flex: 1; /* Allow main-container to grow and take available vertical space */
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    max-width: 1200px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch; /* Ensure main stretches its children */
}


.pack-container {
    margin: 10px;
    width: 20%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pack-image { /* For the pack front in the overview */
    max-width: 100%;
    height: auto;
    cursor: pointer;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto 10px;
}

.pack-series-name {
    text-align: center;
    font-size: 1.5em; /* Set the desired larger size */
    font-weight: bold;
    color: #333;
    margin-top: 8px;
    margin-bottom: 0px;
    display: block; /* Ensure it's on its own line */
}

.image-info {
    color: #000;
    font-size: 14px; /* Set the desired size */
    text-align: center;
}

.image-info i {
    color: #fe7d00;
}

.pack-link:hover img {
    filter: brightness(1.1);
}

.checklist-container {
    max-width: 90%;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    text-align: center;
}
.checklist-header {
    color: #333;
    margin-bottom: 15px;
}
.series-info {
    margin-bottom: 15px;
    text-align: left;
}
.series-info p {
    margin: 5px 0;
}
.checklist-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.checklist-thumbnail {
    max-width: 100px; /* Adjust thumbnail size as needed */
    height: auto;
    border: 1px solid #eee;
    box-shadow: 2px 2px 5px #ccc;
    cursor: pointer;
    margin: 5px;
}
.checklist-thumbnail:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
    opacity: 1;
}
 .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.lightbox-content {
    max-width: 90%;
    max-height: 90%; /* Keep the existing max-height for the container */
    position: relative;
    display: flex; /* Center the image within the content */
    justify-content: center;
    align-items: center;
}
.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 90vh; /* Set the maximum height to 90% of the viewport height */
    height: auto; /* Maintain aspect ratio */
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.lightbox-close:hover {
    opacity: 1;
}

.card-image {
    display: none;
}

.checklist-detail-container {
    max-width: 50%;
    margin: 5px auto;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.image-column {
    flex: 0 1 320px; /* Don't grow much, shrink if needed, initial width */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the main image and thumbnails */
}

.main-image-container {
    margin-bottom: 10px;
}

.pack-breakdown-container {
    margin-left: 7px;
    margin-top: -5px;
}

.pack-breakdown-container h3 {
/* border-bottom: 1px solid #ccc;*/
    padding-bottom: 5px;
    margin-top: 5px;
    margin-bottom: 2px; /* Even smaller margin below heading */
    font-size: 1em;
}

.pack-breakdown-container ul {
    list-style-type: disc;
    padding-left: 35px;
    margin-top: 2px; /* Smaller margin above the list */
    margin-bottom: 10px;
}

.thumbnail-gallery {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping to force horizontal layout */
    overflow-x: auto; /* Enable horizontal scrolling when content overflows */
    gap: 5px; /* Keep the gap between thumbnails */
    padding: 5px 0; /* Add some padding at the top and bottom for visual spacing */
}

.checklist-detail-container .image-column .thumbnail-gallery .checklist-thumbnail {
    height: auto;
    margin: 5px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.2s ease-in-out;
    border: 1px solid #ddd;
    box-sizing: border-box;
    max-width: 60px;
}

.checklist-detail-container .image-column .thumbnail-gallery .checklist-thumbnail:hover {
    transform: scale(1.05); /* Keep the scale on hover */
    opacity: 1; /* Set opacity to 1 on hover */
}

.checklist-detail-container .image-column .thumbnail-gallery .checklist-thumbnail.active {
    opacity: 1;
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.info-column {
    flex: 1 1 400px;
    text-align: left;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 0 20px 60px 20px;
    height: auto;
    min-width: 35vw;
    margin-bottom: 20px;
}

.info-column p {
    margin: 5px 0 5px 16px;
    font-size: 0.8em;
}

.info-column h2 {
    margin-top: 15px;
    margin-bottom: 5px;
}

.info-column h3 {
    margin: 10px;
    margin-bottom: -5px;
    font-size: 0.8em;
}

.info-column li {
    margin: 5px;
    font-size: 0.8em;
}

@media (min-width: 768px) {
    .pack-container {
        width: 20%;
    }

    .thumbnail-gallery {
        max-width: 300px; /* Adjust this value as needed */
    }

    .thumbnail {
        width: calc(25% - 10px); /* Calculate width for 4 items with gap */
        height: auto;
        margin: 5px; /* Adjust margin to control spacing */
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.3s ease;
        border: 1px solid #ddd;
        box-sizing: border-box; /* Important to include padding and border in the width */
    }
}

@media (max-width: 767px) {
    .checklist-detail-container {
        flex-direction: column;
        align-items: stretch; /* Keep stretch to allow full width for children */
        min-width: auto;
        max-width: 95%;
        margin: 10px auto;
        gap: 15px;
        overflow-x: auto;
    }

    .image-column {
        width: 100%; /* Keep full width */
        flex: 0 0 auto;
        align-items: center; /* Keep align-items: center for centering content within */
        overflow-x: auto;
        display: flex; /* Enable flexbox for centering children */
        flex-direction: column; /* Stack children vertically */
    }

    .main-image-container {
        width: 80%; /* Control width */
        margin-bottom: 15px;
        margin-left: auto; /* Center horizontally */
        margin-right: auto; /* Center horizontally */
    }

    #mainChecklistImage {
        max-width: 100%;
        height: auto;
        display: block; /* Ensure it's a block-level element for margin auto to work */
        margin-left: auto; /* Center horizontally */
        margin-right: auto; /* Center horizontally */
    }

    .thumbnail-gallery {
        display: flex;
        flex-wrap: nowrap;
        gap: 5px;
        padding: 5px 0;
        justify-content: flex-start; /* Keep left alignment for scrolling */
        overflow-x: auto;
        width: auto;
        max-width: 60vw; /* Control width */
        margin-left: auto; /* Center horizontally */
        margin-right: auto; /* Center horizontally */
    }

    .info-column {
        width: 85vw;
        flex: 1 1 auto;
        padding: 15px;
        padding-bottom: 60px;
        margin-bottom: 10px;
        margin-left: auto; 
        margin-right: auto;
        display: block;
    }

    .info-column p {
        margin-left: 0; /* Reset paragraph left margin */
    }
        .pack-container {
        width: 50%; /* Make each container take up half the width */
        box-sizing: border-box; /* Ensure padding and border are included in the width */
        margin: 0; /* Reset default margins */
        padding: 8px; /* Add some padding around each pack */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main {
        padding: 10px; /* Adjust main padding for better mobile spacing */
    }

    /* You might need to adjust the margin on .pack-series-name and .image-info */
    .pack-series-name {
        font-size: 1.2em; /* Slightly smaller font for two-column layout */
        margin-top: 5px;
        margin-bottom: 0px;
    }

    .image-info {
        font-size: 12px; /* Slightly smaller font for two-column layout */
    }
    .pack-breakdown-container,
    .pack-breakdown-container h3 {
        margin-left: 0px;
    }

    /* Mobile specific for thumbnails (2 in a row) */
    .thumbnail {
        width: calc(50% - 10px); /* Two thumbnails with gap on mobile */
    }
}

.pack-link {
 display: inline-block; /* Or block, depending on desired layout */
 text-align: center; /* Center the name below the image */
}

/*DELETE THIS*/

.image-name {
 display: block; /* Force the name to appear on a new line below the image */
 font-size: 1.5em;
 font-weight: bold;
 color: #333;
 margin-top: 8px;
}

.pack-container > .pack-link:nth-child(n+2) { /* Hide .pack-link elements after the first 3 */
 display: none;
}

.image-info {
    color: #000;
    font-size: 14px;
    text-align: center;
}

.bi-star,
.bi-star-fill,
.bi-star-half {
 color: #fe7d00;
}

/*DELETE TO THIS*/

.pack-link img {
    display: block;
    max-width: 100%; /* Ensure image doesn't overflow its container */
    height: auto;
}

/* New styles for thumbnails */
.thumbnail-container {
    display: flex;
    justify-content: center; /* Center thumbnails horizontally */
    margin-top: 10px; /* Add some space between image and thumbnails */
    flex-wrap: wrap; /* Allow thumbnails to wrap to the next line if needed */
    max-width: 100%; /* Ensure thumbnails container doesn't exceed lightbox width */
}

.thumbnail {
    width: calc(25% - 10px); /* Adjust as needed for 4 in a row */
    height: auto;
    margin: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border: 1px solid #ddd; /* Optional border */
    box-sizing: border-box; /* Ensure padding and border are included in the width */
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.active {
    opacity: 1;
    border-color: #007bff; /* Highlight active thumbnail */
}