/* header */
header.site-header{
    z-index: 21;

    & img{
        width: 200px;
        height: 60px;
    }

    & h1{
        color: wheat;
    }
}

/* mascara oscura del fondo*/
div.mask{
    z-index: 10;
    background-image: linear-gradient(90deg, #000000ad, #00000038);
}

div.container-primary{
    z-index: 20;
    
}


/* Estilos para botones y secciones */

div#navegate-general, div#options-search,
div#search-advanced, div#gallery-search,
div#biblio-search{
    background-color: #212529bd;
    border-radius: 15px;
    height: 90%;
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
    visibility: hidden;
    transition: all 0.5s ease-in;
    overflow: auto;
    
    

    &:is(.active){
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
        visibility: visible;
    }


    & .menu-navegate-container{
        overflow-y: auto;
        overflow-x: visible;
    }

}

@media (min-width:992px){
    div#navegate-general, div#options-search,
    div#search-advanced{
        height: 100%;
        max-height: 800px;
        overflow: hidden;

        & div#col-directorio{
            height: 100%;
        }
    }
}

div#options-search{
    max-height: min-content;
    overflow: auto;

    & .op-srch-btns-section{
        border-left: none;
        height: auto;
    }
}

@media (min-width:992px){
    div#options-search{
        overflow: hidden;

    & .op-srch-btns-section{
        border-left: 1px solid var(--third-color);

    }
}
}

.section-content {
    gap: 10px;
}
.folder-btn, .btn-opt-nav {
    padding: 15px 25px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: whitesmoke;
    border: 1px solid transparent;
    border-top: 4px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-size: 15px;
    min-height: 78px;
    
    
}
@media (min-width:992px){
    .folder-btn, .btn-opt-nav {
        min-height: 55px;
        border-top: none;
        border-left: 4px solid var(--primary-color);
        transition: all 0.3s ease;

        &:hover{
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateX(10px);
            color:aliceblue;
            border-color: #f5f5f536;
            border-left: 4px solid var(--third-color);
        }

        &::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transition: all 0.5s ease;
        }

        &:hover::after{
            left: 100%;
        }

    }
}


div#file-container{
    min-height: 0;
    border-radius: 15px;

    & .image-album, .pdf-container{    
        background-color: #ffffff36;
        backdrop-filter: blur(5px);
        border: 1px solid gray;
        border-radius: 15px;
        color: whitesmoke;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-template-rows: repeat(auto-fill, minmax(50px, 1fr));
        gap: 10px;
    }
}

div#file-container.bg-container{
    background-color: #ffffff36;
    backdrop-filter: blur(5px);
}

div#container-breadcrumbs{
    border: 2px solid var(--bs-gray-600);
    background-color: #376080ba;
    border-radius: .35rem;

    & .btn{
        background-color: var(--primary-color);
        color: whitesmoke;
        box-shadow: 1px 1px 3px darkslategray;
        border: 1px solid #6c757d;
        border-radius: 6px;

        &:hover{
            background-color: var(--secondary-color);
            border: 1px solid whitesmoke;
        }
    }

    & .breadcrumbs{
        color: white;
        cursor: pointer;

        & a.link-breadcrumbs:hover{
            color: var(--third-color);
        }
    }
}


.image-thumb {
    width: 100%;
    height: auto;
    
}
/* Lightbox Modal */
.lightbox.modal {
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox .modal-content {
    background-color: transparent;
    border: none;
}

.lightbox .carousel-inner {
    border-radius: 5px;
    overflow: hidden;
}

.lightbox .carousel-control-prev,
.lightbox .carousel-control-next {
    width: 5%;
}

.lightbox .carousel-control-prev-icon,
.lightbox .carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-size: 100% 100%;
}

.lightbox .carousel-inner {
    height: 70vh;
}

.btn-downloader{
    color: whitesmoke;
    background-color: var(--primary-color);

    &:hover {
        color: whitesmoke;
        background-color: var(--third-color);
    }
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .lightbox .modal-dialog {
        margin: 0.5rem auto;
    }
    
    .lightbox .carousel-inner {
        height: 60vh;
    }
}

#lightboxTitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

@media (max-width: 768px) {
    #lightboxTitle {
        font-size: 1rem;
        max-width: 60%;
    }
}

/* Estilos para galeria de fotos historicas*/

.gallery-container{
    background-color: #6f6f6136;
    backdrop-filter: blur(5px);
    border-radius: 5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.gallery-item::before {
    content: '';
    display: block;
    padding-top: 100%; /* Cuadrado por defecto */
}

.gallery-item.ratio-16-9::before {
    padding-top: 56.25%; /* 16:9 */
}

.gallery-item.ratio-9-16::before {
    padding-top: 177.78%; /* 9:16 */
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

