/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fefefe;
}

.navbar {
  background-color: white;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 60px;
}

.nav-links li a {
  text-decoration: none;
  color: #d32f2f;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
}

.nav-links li a:hover {
  color: #b71c1c;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #faf9f7 0%, #f5f4f2 100%);
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid #f0efed;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 600;
    color: #c53030;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.25rem;
    color: #666;
    font-weight: 300;
}

/* Contenido principal */
.main-content {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    color: #c53030;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.01em;
}

.gallery-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 60px;
    line-height: 1.7;
    font-weight: 300;
}

/* Galería */
.gallery-section {
    margin-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f4f2;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.image-title {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    display: block;
}

/* Lightbox CSS puro */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox:target {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-caption {
    color: white;
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 20px;
    padding: 0 20px;
}

.close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #c53030;
}

/* Footer */
.footer {
    background: #faf9f7;
    padding: 40px 0;
    border-top: 1px solid #f0efed;
    text-align: center;
}

.footer-text {
    color: #888;
    font-size: 0.9rem;
    font-weight: 300;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

/* Efectos adicionales */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(197, 48, 48, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 10px;
    }
    
    .gallery-description {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .close {
        top: -40px;
        font-size: 30px;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 60px 0 40px;
    }
    
    .main-content {
        padding: 60px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .close {
        top: -35px;
        right: 10px;
        font-size: 25px;
    }
    
    .lightbox-caption {
        font-size: 1rem;
        margin-top: 15px;
    }
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Mejoras de accesibilidad */
.gallery-link:focus {
    outline: 3px solid #c53030;
    outline-offset: 2px;
}

.close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Estados de hover mejorados */
.gallery-item:focus-within {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.gallery-item:focus-within .image-overlay {
    transform: translateY(0);
}