.custom-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 95%;
    max-width: 1200px;
    position: relative;
    margin: auto;
}
.custom-main-image {
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-repeat: no-repeat;
}
.custom-thumbnails {
    display: flex;
    justify-content: center; 
    flex-wrap: wrap;
} 
.thumbnail {
    width: 120px;             
    height: 450px;             
    overflow: hidden;          
    border-radius: 5px;
    margin: 0 10px;           
    display: flex;             
    align-items: flex-end;   
} 
.thumbnail img {
    width: 100%;               
    height: auto;             
    object-fit: cover;       
    transition: transform 0.2s ease, border 0.2s ease;
    border-radius: 15px;  
}

.thumbnail img:hover,
.thumbnail img.active {
    transform: scale(1.2);    

}
  
.large-thumbnail {
    width: 450px;            
    height: 450px;   
    z-index: 99;    
}
  
.large-thumbnail img {
    object-fit: cover;  
} 

/*flechas de adelante y atras*/
/* Estilos para las flechas */
.custom-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}
.custom-left {
    left: -20px;
    background-image: url('../img/arrow-gallery-left.png');
}
.custom-right {
    right: -20px;
    background-image: url('../img/arrow-gallery-right.png');
}
.custom-arrow:hover {
    transform: translateY(-50%) scale(1.1); 
}

/* Titul principal */
.titGaleria{
    position: absolute;
    top: 20%;
    left: 57%;
}
.titPrincipal {
    background: #8e2c2d;
    color: #fff;
    font-weight: 600;
    padding: 15px;
    width: 70%;
    font-size: 19px;
    position: relative; 
}
.parrCaption{
    margin-left: 25px;
    margin-top: 10px;
}
/* Corner */
.titPrincipal .corner {
    position: absolute;
    top: 0;
    right: -40px;
    width: 0;
    height: 0;
    border-top: 52px solid transparent;
    border-left: 40px solid #8e2c2d;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-right-color 0.3s ease;
}

/* Responsivo */
@media (max-width: 1120px) {
    .titGaleria {
        position: absolute;
        top: 10%;
        left: 58%;
      }
}

@media (max-width: 1100px) {
    .custom-thumbnails .thumbnail:nth-child(5) {
        display: none;
    }
}
  
@media (max-width: 1070px) {
    .custom-thumbnails .thumbnail:nth-child(4) {
        display: none;
    }

    .titGaleria {
        order: -1; /* Coloca .titGaleria al inicio */
        width: 100%; 
        position: static;
        margin-bottom: 10px; 
        margin-top: 20px;
    } 
}
@media (max-width: 950px){
    .custom-thumbnails .thumbnail:nth-child(5) {
        display: none;
    }
}


@media (max-width: 892px) {
    .custom-thumbnails .thumbnail:nth-child(4),
    .custom-thumbnails .thumbnail:nth-child(5) {
        display: none;
    }
    .custom-thumbnails .thumbnail:nth-child(3) {
        display: none;
    }
}

/* Responsivo para pantallas menores a 700px */
@media (max-width: 700px) {
    /* Aplica el borde solo a la imagen activa */
    .custom-thumbnails .thumbnail img.active {
        border: 5px solid #8e2c2d; /* Borde de color #8e2c2d */
    }

    /* Opcional: Ajuste de otras propiedades */
    .custom-thumbnails .thumbnail img {
        transition: border 0.3s ease; /* Agrega una transición suave al borde */
    }

    /* Otras reglas de responsivo (si las tienes) */
    .custom-gallery {
        display: flex;
        flex-direction: column; 
        align-items: center; 
    }

    .custom-main-image {
        order: 0; 
    }

    .custom-thumbnails {
        display: flex; 
        flex-wrap: nowrap; 
        width: 100%; 
        justify-content: center; 
    }

    .custom-thumbnails .thumbnail {
        width: 33.33%; 
        height: auto;
        margin: 0 10px;
    }

    .custom-thumbnails .thumbnail:nth-child(n+4) {
        display: none;
    }
    
    .titPrincipal {
        width: 80%; 
    }

    .titPrincipal .corner {
        right: -40px; 
    }

    .parrCaption {
        font-size: 14px;
    }
}
