
/* Estilos mínimos para la galería - solo lo que no se puede hacer con clases de Bootstrap */

/* Miniaturas */
.gallery-item {
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gallery-item img {
    object-fit: cover;
    height: 100%;
}

/* Contenedor del carrusel y elementos de la imagen */
.carousel-container {
    min-height: 60vh;
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    display: flex !important; /* Forzar display flex */
}

.carousel-image {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    display: block !important; /* Forzar display block */
}

/* Contenedores para protección de imágenes */
.real-image-container {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.fake-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Botones de navegación personalizados */
.custom-nav-btn {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 20;
}

.custom-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.carousel-controls button {
    pointer-events: auto;
}

/* Ajustes específicos para móvil */
@media (max-width: 576px) {
    .carousel-container {
        min-height: 35vh;
    }

    .carousel-image {
        max-height: 35vh;
    }

    .custom-nav-btn {
        width: 32px;
        height: 32px;
    }
}

/* Estilos para miniaturas en grid de Bootstrap dentro del contenido del artículo */
/* CRÍTICO: ui-kit.css fuerza width: 100% en .single-post-content .col-* */
/* Necesitamos sobrescribir esto con mayor especificidad y !important */

/* Restaurar el comportamiento del grid de Bootstrap para las filas de miniaturas */
.single-post-content .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: calc(var(--bs-gutter-x, 0.75rem) * -0.5) !important;
    margin-left: calc(var(--bs-gutter-x, 0.75rem) * -0.5) !important;
}

/* NOTA: Las reglas críticas para el grid de Bootstrap están en custom.css */
/* para asegurar que se carguen después de ui-kit.css */

/* Solo estilos para los enlaces de miniaturas */
.single-post-content .row .article-gallery-link {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.single-post-content .row .article-gallery-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Estilos para las imágenes de miniaturas - respetar estilos inline pero asegurar que se vean como miniaturas */
.single-post-content .row .article-gallery-link img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
    object-fit: cover;
}

.single-post-content .row .article-gallery-link:hover img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
