.a5-photoGalleryBlock-container {
    display: flex;
    max-width: 1248px;
    width: 100%;
    padding: 80px var(--spacing-06, 16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    background-color: #090C10; /* Fondo oscuro Nova */
    color: #FFFFFF;
    box-sizing: border-box;
}

.a5-photoGalleryBlock-container strong {
    font-weight: 700;
}

.a5-photoGalleryBlock-container .a5-photoGalleryBlock-header {
    text-align: center;
    max-width: 880px;
    margin-bottom: var(--spacing-12, 64px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.a5-photoGalleryBlock-container .a5-photoGalleryBlock-header .a5-photoGalleryBlock-header-subtitle {
    text-align: center;
    max-width: 750px;
}

.a5-photoGalleryBlock-container .a5-photoGalleryBlock-header h5 {
    text-transform: uppercase;
    font-size: 20px;
    line-height: 28px;
}

/* Carrusel y Máscara de degradado */
.a5-photoGalleryBlock-container .carousel-gallery-container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.a5-photoGalleryBlock-container .slick-list {
    overflow: visible;
}

/* Estilos base de las tarjetas/slides */
.a5-photoGalleryBlock-container .slide-content {
    outline: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin: 0 auto;
}

.a5-photoGalleryBlock-container .slick-slide {
    opacity: 0.4;
    filter: brightness(0.7);
}

.a5-photoGalleryBlock-container .slick-center,
.a5-photoGalleryBlock-container .slick-active {
    opacity: 1;
    filter: brightness(1);
}

.a5-photoGalleryBlock-container .slide-content-image {
    border-radius: 24px;
    overflow: hidden;
    background-color: #161B22;
    margin: 0 auto;
}

.a5-photoGalleryBlock-container .slide-content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 24px;
}

/* Píldora de Navegación Flotante (< | >) */
.a5-photoGalleryBlock-container .carousel-controls-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin: 24px auto 0 auto;
}

.a5-photoGalleryBlock-container .nav-pill-metas {
    display: inline-flex;
    align-items: center;
    background: rgba(22, 27, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 6px 16px;
    gap: 12px;
    backdrop-filter: blur(8px);
}

.a5-photoGalleryBlock-container .nav-btn-metas {
    background: transparent;
    border: none;
    color: #6C7D93;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.a5-photoGalleryBlock-container .nav-btn-metas:hover {
    color: #FFFFFF;
}

.a5-photoGalleryBlock-container .nav-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.15);
}

.a5-photoGalleryBlock-container .carousel-controls-wrapper .hero-navigation {
    display: flex;
    padding: 21px var(--spacing-07, 24px);
    align-items: center;
    gap: var(--spacing-5, 16px);
    border-radius: var(--border-radius-m, 32px);
    border: 0.5px solid rgba(255, 255, 255, 0.50);
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transform: translateZ(0);
}

.a5-photoGalleryBlock-container .carousel-controls-wrapper .hero-navigation .hero-nav-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.a5-photoGalleryBlock-container .carousel-controls-wrapper .hero-navigation .hero-nav-separator {
    width: 0.5px;
    height: 19.914px;
    background: rgba(255, 255, 255, 0.50);
}

/* Modal de expansión de imagen*/
.a5-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.a5-gallery-modal.is-active {
    opacity: 1;
    pointer-events: auto;
}

.a5-gallery-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 14, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.a5-gallery-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    z-index: 100000;
}

.a5-gallery-modal.is-active .a5-gallery-modal-content {
    transform: scale(1);
}

.a5-gallery-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: block;
}

.a5-gallery-modal-close {
    position: absolute;
    top: -16px;
    left: -16px;
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);*/
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 100001;
}

.a5-gallery-modal-close:hover {
    transform: scale(1.1);
}

.a5-gallery-modal-close svg {
    width: 28px;
    height: 28px;
}

/* -------------------------------------------------------------
   RESPONSIVO POR BREAKPOINTS ESPECÍFICOS
------------------------------------------------------------- */

/* 1. Móvil (0px a 767px): Ancho 343px, sin previews */
@media (max-width: 767px) {
    .a5-photoGalleryBlock-container .carousel-gallery-container {
        max-width: 343px;
    }
    
    .a5-photoGalleryBlock-container .slide-content {
        width: 100%;
        max-width: 343px;
        margin: 0 auto;
    }

    .a5-photoGalleryBlock-container .slide-content-image {
        width: 100%;
        max-width: 343px;
        height: 480px;
    }

    .a5-photoGalleryBlock-container .carousel-controls-wrapper {
        max-width: 343px;
    }

    .a5-gallery-modal-close {
        top: 12px;
        left: 12px;
    }

}

/* 2. Tablet (768px a 1088px): Ancho 720px, sin previews */
@media (min-width: 768px) and (max-width: 1088px) {
    .a5-photoGalleryBlock-container .carousel-gallery-container {
        max-width: 720px;
    }

    .a5-photoGalleryBlock-container .slide-content {
        width: 720px;
        margin: 0 auto;
    }

    .a5-photoGalleryBlock-container .slide-content-image {
        width: 720px;
        height: 480px;
    }

    .a5-photoGalleryBlock-container .carousel-controls-wrapper {
        max-width: 720px;
    }

    .a5-photoGalleryBlock-container {
        padding: 88px var(--spacing-07, 24px);
    }

    .a5-photoGalleryBlock-container .a5-photoGalleryBlock-header h5 {
        font-size: 36px;
        line-height: 44px;
    }
}

/* 3. Escritorio (>= 1089px): Ancho 802px, con previews de 152px y máscara */
@media (min-width: 1089px) {
    .a5-photoGalleryBlock-container .carousel-gallery-container {
        max-width: 1198px; /* 802px centro + (152px preview + 46px gap) * 2 */
        --fade-size: 100px;
        -webkit-mask-image: linear-gradient(to right,
                        rgba(0, 0, 0, 0),
                        rgba(0, 0, 0, 1) var(--fade-size),
                        rgba(0, 0, 0, 1) calc(100% - var(--fade-size)),
                        rgba(0, 0, 0, 0));
        mask-image: linear-gradient(to right,
                        rgba(0, 0, 0, 0),
                        rgba(0, 0, 0, 1) var(--fade-size),
                        rgba(0, 0, 0, 1) calc(100% - var(--fade-size)),
                        rgba(0, 0, 0, 0));
    }

    .a5-photoGalleryBlock-container .slide-content {
        width: 802px;
        margin: 0 23px; /* 23px a cada lado = 46px de gap entre slides */
    }

    .a5-photoGalleryBlock-container .slide-content-image {
        width: 802px;
        height: 481px;
    }

    .a5-photoGalleryBlock-container .carousel-controls-wrapper {
        max-width: 802px;
    }

    .a5-photoGalleryBlock-container {
        padding: 96px var(--spacing-07, 24px);
    }

    .a5-photoGalleryBlock-container .a5-photoGalleryBlock-header h5 {
        font-size: 24px;
        line-height: 32px;
    }
}

/* --- Estilos de la Modal según Breakpoints específicos --- */

/* 1. Celulares de hasta 767px (Medidas: 580px de ancho por 347px de alto) */
@media (max-width: 767px) {
    /* Modo horizontal nativo (Landscape) */
    @media (orientation: landscape) {
        .a5-gallery-modal-content {
            width: 480px;
            height: 347px;
            max-width: 90vw;   /* Salvaguarda para evitar desbordes */
            max-height: 85vh;
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }
        .a5-gallery-modal.is-active .a5-gallery-modal-content {
            transform: scale(1);
        }
        .a5-gallery-modal-close {
            transform: scale(1);
            top: -6px;
            right: -40px;
            left: auto;
        }
    }

    /* Modo vertical (Portrait) -> Aplicamos rotación simulada de 270 grados */
    @media (orientation: portrait) {
        .a5-gallery-modal-content {
            transform: rotate(270deg) scale(0.95);
            width: 580px;      /* Se convierte en alto visual de 347px por rotación */
            height: 347px;     /* Se convierte en ancho visual de 580px por rotación */
            max-width: 85vh;   /* Salvaguarda para pantallas pequeñas */
            max-height: 90vw;
            transition: transform 0.3s ease;
        }
        .a5-gallery-modal.is-active .a5-gallery-modal-content {
            transform: rotate(270deg) scale(1);
        }
        .a5-gallery-modal-close {
            /* Contrarrestamos la rotación para mantener la 'X' vertical */
            transform: rotate(-270deg) scale(1);
            top: -8px;
            right: -40px;
            left: auto;
        }
        .a5-gallery-modal-close:hover {
            transform: rotate(-270deg) scale(1.1);
        }
    }
}

/* 2. Dispositivos de 768px hasta 1089px (Medidas: 802px de ancho por 481px de alto) */
@media (min-width: 768px) and (max-width: 1089px) {
    /* Modo horizontal nativo (Landscape) */
    @media (orientation: landscape) {
        .a5-gallery-modal-content {
            width: 802px;
            height: 481px;
            max-width: 90vw;
            max-height: 78vh;
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }
        .a5-gallery-modal.is-active .a5-gallery-modal-content {
            transform: scale(1);
        }
        .a5-gallery-modal-close {
            transform: scale(1);
            /*top: -51px;*/
            top: -39px;
            right: -6px;
            left: auto;
        }
    }

    /* Modo vertical (Portrait) -> Aplicamos rotación simulada de 270 grados */
    @media (orientation: portrait) {
        .a5-gallery-modal-content {
            transform: rotate(270deg) scale(0.95);
            width: 802px;      /* Se convierte en alto visual de 481px por rotación */
            height: 481px;     /* Se convierte en ancho visual de 802px por rotación */
            max-width: 85vh;
            max-height: 90vw;
            transition: transform 0.3s ease;
        }
        .a5-gallery-modal.is-active .a5-gallery-modal-content {
            transform: rotate(270deg) scale(1);
        }
        .a5-gallery-modal-close {
            transform: rotate(-270deg) scale(1);
            top: -51px;
            right: -6px;
            left: auto;
        }
        .a5-gallery-modal-close:hover {
            transform: rotate(-270deg) scale(1.1);
        }
    }
}