* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
/*    max-width: 1400px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
	*/
    padding: 30px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
/*    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    margin: 10px auto;
    border-radius: 2px;
}

/* Categorías */
.categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

.category-btn.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

/* Galería - Grilla de 4-5 columnas */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas por defecto */
    gap: 20px;
    margin-top: 20px;
}

/* Para pantallas grandes: 5 columnas */
@media (min-width: 1400px) {
    .gallery {
        grid-template-columns: repeat(5, 1fr); /* 5 columnas en pantallas grandes */
    }
}

/* Para tablets: 3 columnas */
@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Para móviles: 2 columnas */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2em;
    }
}

/* Para móviles pequeños: 1 columna */
@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

.gallery-titulo{
	text-align: center;
	margin-top: 40px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 1; /* Mantiene las imágenes cuadradas */
/*    opacity: 0; */
    animation: fadeIn 0.5s ease forwards;
}

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

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
	border: 5px solid white;
    box-sizing: border-box;
    border-radius: 10px;
}

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

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

.gallery-item .overlay h3 {
    font-size: 1em;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item .overlay p {
    font-size: 0.8em;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}





/* AGREGAR estos estilos al final de tu archivo styles.css */

/* Descripción de la galería */
.descripcion {
    text-align: center;
    color: #666;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Contador de imágenes */
.image-count {
    text-align: center;
    color: #666;
    margin: 10px auto 20px;
    font-size: 0.95em;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    padding: 8px 20px;
    border-radius: 30px;
    display: inline-block;
}

.image-count span {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

/* Contador en los enlaces */
.photo-count {
    font-size: 0.8em;
    opacity: 0.9;
    margin-left: 5px;
}

/* Estilos para la grilla adaptativa */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px auto;
}

.gallery-item {
    flex: 0 0 auto;
    width: calc(25% - 20px);
    min-width: 250px;
    max-width: 300px;
}

/* Media queries para diferentes tamaños */
@media (max-width: 1200px) {
    .gallery-item {
        width: calc(33.333% - 20px);
    }
}

@media (max-width: 900px) {
    .gallery-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .gallery-item {
        width: calc(50% - 20px);
        max-width: 400px;
		min-width: 140px;
   }
}

/* Para cuando hay pocas imágenes */
.gallery.few-items {
    justify-content: center;
}

.gallery.few-items .gallery-item {
    flex-grow: 0;
}

/* Para cuando hay muchas imágenes */
.gallery.many-items {
    justify-content: flex-start;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    cursor: pointer;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255,255,255,0.2);
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 1.2em;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
    transform: rotate(90deg);
}

/* Ajustes para el modal en móviles */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .modal-caption {
        font-size: 1em;
        padding: 15px;
    }
}