#galeria {
    text-align: center;
    padding: 0.1rem 0;
    max-width: 100%;
    background-color: #f9fafb;
    border: none;
    padding-bottom: 2rem;
}

.galeria-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
}

.galeria-card {
    min-width: 250px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.galeria-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.galeria-card p {
    padding: 0.5rem;
    font-size: 0.95rem;
    color: #374151;
}

.galeria-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 80%;
    max-height: 70vh;
    object-fit: contain;
    animation: fadeIn 0.3s;
    border-radius: 10px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

#modal-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #f1f1f1;
    text-align: center;
    padding: 10px 20px;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    width: auto;
    max-width: 80%;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.prev, .next {
    cursor: pointer;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    transition: 0.3s;
    z-index: 10000;
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Dark mode styles */
.dark #galeria {
    background-color: #1b1e1f;
    color: #eee5d7;
}

.dark #galeria p {
    color: #eee5d7;
}

.dark .galeria-card {
    background-color: #1b1e1f;
    color: #f8f9fa;
}