:root {
    --primary-color: #00953A;
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --azul-color: #12284C;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #00A499;
    --hover-color: #f0f7ff;
    --card-shadow: 0 4px 6px rgba(0, 97, 255, 0.1);
    --card-shadow-hover: 0 10px 15px rgba(0, 97, 255, 0.15);
    --transition: all 0.4s ease;
    /*Colores Nuevos*/
    --verde-primario: #00c800;
    --violeta-secundario: #230046;
    --naranja-secundario: #ffa01e;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* NAVBAR*/
.navbar-brand {
    color: var(--primary-color);
}

.navbar-custom {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 1rem;
}

.navbar-brand img {
    height: 40px;
}

.nav-link-custom {
    color: black;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.enlaces-nav:hover{
    color: var(--violeta-secundario) !important;
}

.nav-link-custom {
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

/* Línea animada */
.nav-link-custom::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: var(--naranja-secundario);
    transition: width 0.3s ease, left 0.3s ease;
}

/* Hover: mostrar línea centrada */
.nav-link-custom:hover::after {
    width: 40%;
    left: 35%;
}


.nav-link-custom:hover {
    color: #12284C;
}
                    
.enlaces-nav.active {
    position: relative;
    color: var(--violeta-secundario) !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 14px;
    transition: all 0.3s ease-in-out;
}

.enlaces-nav.active::after {
    content: "";
    position: absolute;
    left: 55%;
    bottom: 4px;
    width: 40%;
    height: 2px;
    background-color: var(--violeta-secundario);
    border-radius: 2px;
    transform: translateX(-50%);
}

.nav-link-custom.active::after {
    background-color: var(--naranja-secundario);
}

/************* CARRUSEL ***********/

.custom-carousel {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
}

.custom-carousel .carousel-inner,
.custom-carousel .carousel-item {
    height: 100%;
}

.custom-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(59, 59, 59, 0.38);
    padding: 15px;
    border-radius: 4px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
}

.carousel-caption h5 {
    font-size: 1.2rem;
    font-weight: 600;
}

.carousel-caption p {
    font-size: 0.9rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-indicators {
    bottom: 10px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-caption{
    background: transparent;
    color: green;
}

.carousel-control-next,.carousel-control-prev{
    background: rgba(98, 98, 98, 0.3);
}

#customCarousel a,
#customCarousel img {
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 720px) {
    .custom-carousel {
        height: 100vh;
    }

    .custom-carousel .carousel-inner,
    .custom-carousel .carousel-item {
        height: 100%;
    }

    .custom-carousel .carousel-item img {
        height: 100%;
        object-fit: cover;
    }

    .carousel-caption {
        bottom: 10%;
        width: 90%;
    }
}


/********************* Buacador intranet **********************/
.buscador-intranet .espaciador-secciones {
    height: 140px;
}

.buscador-intranet h3{
    font-size: 2.4rem;
}

.buscador-intranet .search-container {
    border: none;
}

.buscador-intranet .search-background {
    z-index: 0;
}

.buscador-intranet .input-custom i{
    color: var(--azul-color);
}

.buscador-intranet .boton-buscar{
    background-color: var(--primary-color);
    color: white;
}

.buscador-intranet .boton-buscar:hover{
    background-color: var(--verde-primario);
    color: white;
}

.buscador-intranet .search-input {
    font-size: 1rem;
    height: auto;
    min-height: 10px;
}

.buscador-intranet .search-input:focus {
    box-shadow: none;
}

.buscador-intranet .input-custom-height {
    height: 58px;
}

.buscador-intranet .botones-busqueda {
    white-space: nowrap;
}

/******** Tarjeta deslizante Buscador **********/

.tarjeta-deslizante {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 999;
}

.tarjeta-deslizante .slide-card {
    position: relative;
    background-color: #f8f9fa;
    width: 100%;
    max-width: 650px;
    overflow: hidden;
    max-height: 60px;
    transition: max-height 0.6s ease-out;
    pointer-events: none;
}

.tarjeta-deslizante .slide-card.expanded {
    max-height: 1000px;
    transition: max-height 0.8s ease-in-out;
    pointer-events: auto;
}

.tarjeta-deslizante .slide-toggle {
    background-color: var(--naranja-secundario);
    text-align: center;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.slide-inner-wrapper b {
    font-weight: 500;
}

.slide-card-inner {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.slide-card.expanded .slide-card-inner {
    opacity: 1;
    transform: translateY(0);
}

/************* Cartas archvios mostrados dinamicamente*************/

.file-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: var(--card-shadow);
}

.file-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
}
.file-card .card-body{
    padding: 14px;
}
.file-card .card-body .nombre-archivo {
    padding: 1rem !important;
    flex: 1;
}

.file-card .card-footer {
    background-color: rgba(0, 97, 255, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    padding: 0.75rem 1.5rem;
}

.file-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.file-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.file-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.file-size {
    font-size: 0.85rem;
    color: #666;
}

.file-date {
    font-size: 0.85rem;
    color: #666;
}

.filename-highlight {
    background-color: #fff9c4;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
}

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.empty-state-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.modal-preview-image {
    max-height: 600px;
    max-width: 100%;
    border-radius: 8px;
}

.preview-container {
    height: 600px;
    max-width: 100%;
    border-radius: 8px;
    /* fondo gris claro */
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

#modalSpinner {
    width: 3rem;
    height: 3rem;
}

.pagination-btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
}

@media (max-width: 1399.98px) {
    .row-cols-xxl-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #666;
}

.alert-info{
    background: transparent;
    border: transparent;
}

.fondo-files {
    background: var(--violeta-secundario) !important;
}

a.folder-link {
    text-decoration: none;
}


/**************** Hover Imagenes Preview********************/
.thumbnail-link {
    color: black;
    text-decoration: none;
}


#file-area {
    position: relative;
}

#loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    z-index: 9999;
}


.spinner {
    border: 8px solid #ddd;
    border-top: 8px solid var(--azul-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Sugerencias Buscador*/

@media (max-width: 990px) {
    .search-suggestions {
        margin-top: 120px!important;
    }
    .fondo-files{
        height: 120px!important;
    }
}