/* Reset and basic styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f4f4f4;
}

/* General heading style */
h2 {
    margin-top: 40px;
    font-size: 24px;
    color: #333;
}

/* Gallery container */
.gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

/* Individual gallery item */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Caption on hover */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .caption {
    opacity: 1;
}

/* Slider container */
.slider {
    width: 90%;
    max-width: 1200px;
    overflow: hidden;
    margin: 20px auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    position: relative;
    width: 100%;
}

.slider-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    position: relative;
}

.slider-item img {
    width: 300px; /* Adjust width as needed */
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.slider-item:hover img {
    transform: scale(1.1);
}

/* Slider controls positioned at the middle edges of the slider */
.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none; /* Allow clicks to pass through */
}

.prev-btn, .next-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    pointer-events: auto; /* Enable pointer events for buttons */
}

/* Thumbnails positioned at the bottom of the slider */
.thumbnails {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 0px;
    position: relative;
}

.thumbnail {
    width: 60px; /* Adjust width as needed */
    height: 40px; /* Adjust height as needed */
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: border-color 0.3s ease;
}

.thumbnail:hover {
    border-color: #333;
}

.thumbnail.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid green; /* Adjust border styling as needed */
    box-sizing: border-box;
}

/* Thumbnail preview */
.thumbnail-preview {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 14px;
    padding: 10px;
    overflow: auto;
}

.thumbnail:hover .thumbnail-preview {
    display: block;
}

/* Additional styling for photo slider items */
.photo-slider-item img {
    width: 100%;
    height: auto;
}
