/* Estilos generales para la galería */
.gallery-container {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

.gallery-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 2.5rem;
}

.gallery-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Filtros de la galería */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 25px;
    background: #f0f0f0;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.filter-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Grid de la galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.gallery-caption {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    opacity: 0;
}

.gallery-caption h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.gallery-caption p {
    font-size: 0.9rem;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos para el lightbox */
.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover {
    border-color: #3498db;
}

.lg-actions .lg-next, .lg-actions .lg-prev {
    background-color: rgba(52, 152, 219, 0.8);
}

/* Estilos responsivos */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        margin-top: 70px;
        padding: 15px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-container h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .gallery-overlay i {
        font-size: 2rem;
    }
    
    .gallery-caption h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
    }
}
/* Nuevos estilos para álbumes */
.albums-container {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.album {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.album:hover {
    transform: translateY(-5px);
}

.album-title {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.album-description {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.album-preview {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.main-preview {
    flex: 2;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.main-preview img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-preview:hover img {
    transform: scale(1.05);
}

.thumbnails {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.thumbnails img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.thumbnails img:hover {
    opacity: 0.8;
}

.view-album-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.view-album-btn:hover {
    background: #2980b9;
}

/* Lightbox para álbumes */
.album-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.album-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-image-container {
    max-width: 100%;
    max-height: 70vh;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 15px;
}

.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    overflow-x: auto;
    padding: 10px 0;
}

.lightbox-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.lightbox-thumbnails img.active {
    opacity: 1;
    border: 2px solid #3498db;
}

/* Estilos responsivos para álbumes */
@media (max-width: 768px) {
    .album-preview {
        flex-direction: column;
    }
    
    .thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .album {
        padding: 15px;
    }
    
    .thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lightbox-thumbnails img {
        width: 50px;
        height: 50px;
    }
}

/* Centrar imagen principal en vista previa */
.main-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
}

.main-preview img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

/* Centrar imágenes en el lightbox */
.lightbox-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 70vh;
    overflow: hidden;
    background-color: #000;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Ajustar tamaño de miniaturas en vista previa */
.thumbnails img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

/* Mejorar el diseño responsive */
@media (max-width: 768px) {
    .main-preview img {
        max-height: 200px;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
}

@media (max-width: 576px) {
    .main-preview img {
        max-height: 180px;
    }
    
    .lightbox-image {
        max-height: 50vh;
    }
}
/* Mejoras para dispositivos táctiles */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        z-index: 1001;
    }
    
    .lightbox-close {
        top: -50px;
        right: 10px;
        font-size: 2.5rem;
        z-index: 1001;
    }
    
    /* Asegurar que los botones sean fácilmente tocables */
    .view-album-btn {
        min-height: 44px; /* Tamaño mínimo recomendado para elementos táctiles */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 12px 20px;
        min-height: 44px;
    }
}

/* Prevenir zoom en inputs en iOS */
@media screen and (max-width: 768px) {
    select, textarea, input[type="text"] {
        font-size: 16px; /* Previene zoom en iOS */
    }
}