/* Estilos para la Galería y el Nuevo Hero Banner */
body {
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
    font-family: sans-serif;
}

/* --- Nuevo Hero Banner (con selectores específicos) --- */
.gallery-hero {
    min-height: 70vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Clases para estilos en línea refactorizados --- */
.gallery-hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-hero-logo {
    max-width: 250px;
    margin-bottom: 80px;
}

.gallery-hero-title {
    font-size: 2.8rem;
    color: #fff;
    text-align: center;
}

.gallery-hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin-top: 15px;
    color: #eee;
    text-align: center;
}

.no-images-message {
    text-align: center;
    width: 100%;
    padding: 20px;
}

.gallery-hero .hero-background-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gallery-hero .hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Transición más suave */
}

.gallery-hero .hero-bg-slide.active {
    opacity: 1;
}

.gallery-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 80% de transparencia */
    z-index: 2;
}

/* El contenido del hero usará .content-wrapper, por lo que no necesita estilos aquí */

/* --- Galería Principal (80% de ancho) --- */
.gallery-container {
    width: 80%;
    margin: 40px auto;
}

.grid {
    column-count: 6;
    column-gap: 20px;
}

.grid-item {
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    display: inline-block;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* --- Media queries --- */
@media (max-width: 1600px) {
    .gallery-container { width: 90%; }
    .grid { column-count: 5; }
    .gallery-hero-logo {
    width: 200px;
}

.gallery-hero-title {
    font-size: 1.8rem;
}
}
@media (max-width: 1200px) {
    .grid { column-count: 4; }
}
@media (max-width: 992px) {
    .gallery-container { width: 95%; }
    .grid { column-count: 3; }
}
@media (max-width: 900px) {
    .grid { column-count: 3; }
}
@media (max-width: 480px) {
    .grid { column-count: 2; }
    h1 {
    font-size: 1.8rem;
}
}

/* --- Botón de volver --- */
.back-to-home-container{text-align:center;margin:40px 0;padding:20px}.back-to-home-btn{display:inline-block;background-color:#333;color:#fff;padding:15px 40px;font-weight:700;text-decoration:none;border-radius:4px;transition:background-color .3s ease,transform .3s ease}.back-to-home-btn:hover{background-color:#000;transform:translateY(-3px)}

/* --- Nuevos Estilos para el Lightbox --- */
.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-backdrop.is-visible {
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-backdrop.is-visible .lightbox-content {
    transform: scale(1);
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    cursor: pointer;
    font-size: 2rem;
    transition: background-color 0.2s ease;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-close {
    top: 15px;
    right: 20px;
    padding: 0 12px;
    border-radius: 50%;
}

.lightbox-prev, .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 15px;
    border-radius: 5px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

body.lightbox-open {
    overflow: hidden;
}

