/* Gallery styles */
#gallery {
    position: relative;
    padding: 2rem 0;
}

#gallery h2 {
    color: #8b5a2b; /* Match color from main styles */
    margin-bottom: 1rem;
    font-size: 2rem;
    padding: 0 5%; /* Match padding from section style */
}

#gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 1em 5%; /* Match section padding */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.9em;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Gallery message for developers */
.gallery-message {
    background: #f8f8f8;
    border-left: 4px solid #8fa998;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

/* Gallery loading message */
.gallery-loading-message {
    text-align: center;
    padding: 20px;
    margin: 15px 0;
    color: #666;
    display: none;
}

/* Gallery actions */
.gallery-actions {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.gallery-button {
    background-color: #8fa998;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.gallery-button:hover {
    background-color: #7a9283;
}

.gallery-message pre {
    background: #f1f1f1;
    padding: 10px;
    overflow-x: auto;
    border-radius: 4px;
}

/* Mobile styles for gallery */
@media (max-width: 768px) {
    #gallery-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: 15px;
        padding: 15px;
    }
    
    .gallery-item {
        margin-bottom: 15px;
    }
}

/* Lightbox styles */
.lightbox {
    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;
    z-index: 2000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

/* Mobile adjustments for gallery */
@media (max-width: 600px) {
    #gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-item img {
        height: 150px;
    }
}
