﻿body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

.gallery-container {
    max-width: 800px; /* Limit the overall size of the gallery */
    margin: 0 auto;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- Hero Image Styling --- */
.hero2-image {
    width: 100%;
    margin-bottom: 15px;
}

#main-display {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* --- Thumbnails Styling --- */
.thumbnails {
    display: flex; /* Arranges thumbnails in a row */
    gap: 10px;    /* Space between thumbnails */
    justify-content: space-between;
}

.thumb {
    width: calc(25% - 7.5px); /* Ensures 4 images fit, accounting for gap */
    height: auto;
    cursor: pointer; /* Indicates they are clickable */
    opacity: 0.7; /* Dim non-selected images slightly */
    transition: opacity 0.3s, transform 0.3s, border 0.3s;
    border-radius: 4px;
    border: 2px solid transparent; /* Placeholder for active border */
}

.thumb:hover {
    opacity: 1;
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Class added by JavaScript to the currently selected thumbnail */
.thumb.active {
    opacity: 1;
    border: 2px solid #007bff; /* Blue border for the active image */
}

/* --- Caption Styling --- */
.caption-display {
    padding: 10px 0;
    margin-bottom: 15px;
    text-align: center;
    background-color: #eee; /* Light background for contrast */
    border-radius: 4px;
}

#caption-text {
    margin: 0;
    font-size: 1.1em;
    color: #333;
    font-style: italic;
}