/* style.css */

/* Reset some basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

header {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: #fff;
}

/* Navigation key for galleries */
.gallery-nav {
    background-color: #fff;
    border-bottom: 1px solid #ccc;
}
.gallery-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 1rem;
    margin: 0;
}
.gallery-nav li {
    /* nothing special */
}
.gallery-nav a {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}
.gallery-nav a:hover {
    text-decoration: underline;
}

main {
    max-width: 1000px;
    margin: 1rem auto;
    padding: 0 1rem;
}

/* Gallery section */
.gallery-section {
    margin-bottom: 2rem;
    scroll-margin-top: 80px; /* so anchored scrolling leaves space for nav/header */
}

.gallery-title {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #ccc;
    padding-bottom: 0.25rem;
}

/* Grid of thumbnails */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.thumb-container {
    overflow: hidden;
    position: relative;
}

.thumb-container img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.thumb-container img:hover {
    transform: scale(1.05);
}

/* Lightbox overlay */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
}

#lightbox-overlay.hidden {
    display: none;
}

#lightbox-img {
    max-width: 90%;
    max-height: 80%;
    margin-bottom: 0.5rem;
}

#lightbox-caption {
    color: #ddd;
    margin-top: 0.5rem;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    padding: 0 10px;
}

#lightbox-prev {
    left: 20px;
}

#lightbox-next {
    right: 20px;
}

.nav-btn:focus {
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
    .nav-btn {
        font-size: 2rem;
        left: 10px;
        right: 10px;
    }
    .gallery-nav ul {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    .gallery-nav a {
        font-size: 0.9rem;
    }
}
