/**
 * baguetteBox.css - Modern version without legacy prefixes
 * Optimized for modern browsers
 */

#baguetteBox-overlay {
    display: none;
    opacity: 0;
    position: fixed;
    overflow: hidden;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    background-color: rgba(0, 0, 0, .8);
    transition: opacity .5s ease;
}

#baguetteBox-overlay.visible {
    opacity: 1;
}

#baguetteBox-overlay .full-image {
    display: inline-block;
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
}

#baguetteBox-overlay .full-image figure {
    display: inline;
    margin: 0;
    height: 100%;
}

#baguetteBox-overlay .full-image img {
    display: inline-block;
    width: auto;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(0, 0, 0, .6);
}

#baguetteBox-overlay .full-image figcaption {
    display: block;
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    line-height: 1.8;
    white-space: normal;
    color: #ccc;
    background-color: rgba(0, 0, 0, .6);
    font-family: sans-serif;
}

#baguetteBox-overlay .full-image:before {
    content: "";
    display: inline-block;
    height: 50%;
    width: 1px;
    margin-right: -1px;
}

#baguetteBox-slider {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    white-space: nowrap;
    transition: transform .4s ease;
}

#baguetteBox-slider.bounce-from-right {
    animation: bounceFromRight .4s ease-out;
}

#baguetteBox-slider.bounce-from-left {
    animation: bounceFromLeft .4s ease-out;
}

@keyframes bounceFromRight {
    0%, 100% {
        margin-left: 0;
    }
    50% {
        margin-left: -30px;
    }
}

@keyframes bounceFromLeft {
    0%, 100% {
        margin-left: 0;
    }
    50% {
        margin-left: 30px;
    }
}

.baguetteBox-button#next-button,
.baguetteBox-button#previous-button {
    top: calc(50% - 30px);
    width: 44px;
    height: 60px;
}

.baguetteBox-button {
    position: absolute;
    cursor: pointer;
    outline: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 15%;
    background-color: rgba(50, 50, 50, .5);
    color: #ddd;
    font: 1.6em sans-serif;
    transition: background-color .4s ease;
}

.baguetteBox-button:focus,
.baguetteBox-button:hover {
    background-color: rgba(50, 50, 50, .9);
}

.baguetteBox-button#next-button {
    right: 2%;
}

.baguetteBox-button#previous-button {
    left: 2%;
}

.baguetteBox-button#close-button {
    top: 20px;
    right: calc(2% + 6px);
    width: 30px;
    height: 30px;
}

.baguetteBox-button svg {
    position: absolute;
    left: 0;
    top: 0;
}

.baguetteBox-spinner {
    width: 40px;
    height: 40px;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
}

.baguetteBox-double-bounce1,
.baguetteBox-double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #fff;
    opacity: .6;
    position: absolute;
    top: 0;
    left: 0;
    animation: bounce 2s infinite ease-in-out;
}

.baguetteBox-double-bounce2 {
    animation-delay: -1s;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(0);
    }
    50% {
        transform: scale(1);
    }
}

/* Gallery styles */
.tz-gallery {
    z-index: -1;
}

.lightbox {
    z-index: 1;
}

.tz-gallery .lightbox img {
    width: 100%;
    height: auto;
    border-radius: 0;
    position: relative;
    padding: .5rem;
    transition: transform 0.3s ease;
}

.tz-gallery .lightbox:hover img {
    transform: scale(1.05);
}

.tz-gallery .lightbox:before {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tz-gallery .lightbox:hover:before {
    opacity: 1;
}

/* Asegurar que las imágenes de la galería se muestren correctamente */
.tz-gallery .row {
    margin: 0;
}

.tz-gallery .col-xs-12,
.tz-gallery .col-sm-12,
.tz-gallery .col-md-4 {
    padding: 0.5rem;
}

.tz-gallery .lightbox {
    display: block;
    text-decoration: none;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.tz-gallery .lightbox:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .baguetteBox-button {
        font-size: 1.2em;
    }
    
    .baguetteBox-button#next-button,
    .baguetteBox-button#previous-button {
        width: 40px;
        height: 60px;
        top: calc(50% - 30px); /* Centrar correctamente con la nueva altura */
        border-radius: 20%; /* Bordes más redondeados para móviles */
    }
    
    .baguetteBox-button#next-button {
        right: 3%; /* Un poco más separado del borde */
    }
    
    .baguetteBox-button#previous-button {
        left: 3%; /* Un poco más separado del borde */
    }
    
    .baguetteBox-button#close-button {
        width: 30px;
        height: 30px;
        top: 15px; /* Un poco más arriba */
        right: calc(3% + 6px);
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 480px) {
    .baguetteBox-button#next-button,
    .baguetteBox-button#previous-button {
        width: 45px;
        height: 70px;
        top: calc(50% - 35px); /* Centrar correctamente con la nueva altura */
        border-radius: 25%; /* Bordes aún más redondeados */
    }
    
    .baguetteBox-button#next-button {
        right: 5%; /* Más separado del borde en pantallas pequeñas */
    }
    
    .baguetteBox-button#previous-button {
        left: 5%; /* Más separado del borde en pantallas pequeñas */
    }
    
    .baguetteBox-button#close-button {
        width: 35px;
        height: 35px;
        top: 10px;
        right: calc(5% + 6px);
    }
}
