/* 🔵 Single Galeria */
/* 🎨 NUEVO ESTILO SINGLE-GALLERY CON SEMITRANSPARENCIA */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Banner */
.gallery-banner {
    width: 100%;
    height: 480px; /* Altura visible del banner */
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.gallery-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* 👈 Esto muestra la parte superior de la imagen */
    display: block;
}

/* Fondo general de la galería */
.gallery-content {
    flex: 1;
    min-height: 100vh;
    padding: 40px 20px 80px;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.85), rgba(0, 0, 0, 0.85));
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 12px;
}

/* Título principal */
.gallery-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 15px 20px;
    border-radius: 10px;
}

/* Imagen previa de la galería */
.gallery-circle img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 15px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Contenedor de las galerías */
.gallery-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

/* Caja individual de galería */
.gallery-preview {
    background-color: rgba(31, 31, 31, 0.85);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    width: 260px;
    text-align: center;
    transition: transform 0.3s ease;
}

.gallery-preview:hover {
    transform: translateY(-5px);
}

/* Subtítulo */
.gallery-subtitle {
    font-size: 25px;
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Botón principal */
.open-gallery {
    background-color: #25b939;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin: 10px 0;
    transition: background-color 0.3s ease;
}

.open-gallery:hover {
    background-color: #1e9a2e;
}

/* Enlaces de descarga */
.download-links h5 {
    margin: 15px 0 5px;
}

.download-button {
    background-color: #007bff !important;
    color: white !important;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: #0056b3 !important;
    color: white !important;
}

/* MODAL de galería */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.7);
    padding: 40px 20px;
    overflow-y: auto;
}

/* Carrusel */
.gallery-carousel {
    display: flex; /* ✅ Activa Flexbox */
    flex-direction: column; /* ✅ Fuerza orden vertical: imagen → miniaturas → botones */
    max-width: 90%;
    margin: 0 auto;
    position: relative;
    text-align: center;
    background-color: rgba(34, 34, 34, 0.9);
    padding: 20px;
    border-radius: 12px;
    gap: 20px; /* opcional: espacio entre imagen, miniaturas y botones */
}

/* 🔁 Flechas: ubicadas dentro del .carousel-item */
.carousel-item {
    display: none;
    text-align: center;
    position: relative;
    height: 70vh;
    justify-content: center;
    align-items: center;
}

.carousel-item.active-slide {
    display: flex;
}

.carousel-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}

/* Flechas de navegación centradas verticalmente a los costados */
.carousel-control {
    font-size: 60px;
    color: #ffffff;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    z-index: 10;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

/* Miniaturas */
.carousel-thumbnails {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: #333 #111;
}

.carousel-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 4px;
}

/* Miniatura */
.carousel-thumbnails .thumbnail {
    flex: 0 0 auto;
    width: 70px;       /* Ancho más estrecho */
    height: 100px;     /* Alto más alto, para forma vertical */
    object-fit: cover;
    object-position: top;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    scroll-snap-align: start;
}

.carousel-thumbnails .thumbnail.active {
    border-color: #25b939;
    opacity: 1;
}

.carousel-thumbnails .thumbnail:hover {
    opacity: 1;
}

@media (max-width: 600px) {
  .carousel-thumbnails .thumbnail {
    width: 60px;
    height: 90px;
  }
}

/* Responsive: tablet */
@media (max-width: 1024px) {
    .carousel-thumbnails .thumbnail {
        flex: 0 0 calc((100% - 20px) / 3);
        max-width: calc((100% - 20px) / 3);
    }
}

/* Responsive: móvil */
@media (max-width: 600px) {
    .carousel-thumbnails .thumbnail {
        flex: 0 0 calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }

    .carousel-control {
        font-size: 40px;
        padding: 6px;
    }
}

/* Animación de brillo */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0px rgba(37, 185, 57, 0.6);
    }
    50% {
        box-shadow: 0 0 10px rgba(37, 185, 57, 0.9);
    }
    100% {
        box-shadow: 0 0 0px rgba(37, 185, 57, 0.6);
    }
}

/* Botón cerrar */
.close-gallery {
    background-color: rgba(255, 0, 0, 0.7);
    color: #fff;
    padding: 8px 18px;
    border: none;
    border-radius: 5px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
}

.close-gallery:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* Otros ajustes responsivos */
@media (max-width: 768px) {
    .gallery-preview {
        width: 90%;
    }

    .close-gallery {
        font-size: 14px;
        padding: 6px 14px;
    }
}

/* Footer seguro */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 40px;
}
