﻿/* 1. Base y Estructura Principal */
.main-container {
    margin-top: 60px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

.header-seccion {
    padding: 6rem 0 8rem 0;
    background: linear-gradient(135deg, #004a99 0%, #0066cc 100%);
    position: relative;
}

    .header-seccion h1 {
        font-weight: 700;
        letter-spacing: -1px;
        font-size: 3rem;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

/* 2. Toolbar y Controles */
.toolbar-container {
    background: #ffffff;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.select2-container--default .select2-selection--single,
.search input {
    height: 48px !important;
    border: 1px solid #ced4da !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    /* Centrado para el Input de búsqueda */
    line-height: 48px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

    /* Centrado específico para el texto dentro de Select2 */
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 48px !important; /* Alinea el texto al centro de los 48px */
        padding-left: 15px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Centrado de la flechita de Select2 */
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
    }

#cmdDepartamento {
    display: none !important;
}

.btn-imprimir {
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #2c3e50;
    color: #2c3e50;
}

/* 3. Modo Tarjeta (Card View) */
.bootstrap-table .fixed-table-container,
.bootstrap-table .fixed-table-container .table {
    border: none !important;
    background: transparent !important;
}

.bootstrap-table .card-view {
    transition: all 0.3s ease;
    border: 1px solid #eee !important;
}

    .bootstrap-table .card-view:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
        border-color: #004a99 !important; /* El azul de El Colef */
    }

#tablaInventario thead {
    display: none !important;
}

#tablaInventario tbody {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
}

    #tablaInventario tbody tr {
        display: block !important;
        background: #fff !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
        width: 310px;
        height: 390px;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        overflow: hidden;
        position: relative;
        margin-bottom: 10px;
        border: 1px solid #e0e6ed !important;
    }

        #tablaInventario tbody tr:hover {
            transform: translateY(-12px) scale(1.01);
            box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 0 15px rgba(52, 58, 64, 0.15) !important;
            border-color: #343a40 !important;
        }

        #tablaInventario tbody tr td {
            display: block;
            padding: 0;
            border: none !important;
            text-align: center;
        }

/* Secciones Internas de la Card */
#tablaInventario td:nth-child(1) {
    background: #fbfcfd;
    padding: 25px 15px;
    height: 185px;
    border-bottom: 1px solid #f0f0f0 !important;
}

#tablaInventario td:nth-child(2) {
    padding: 15px;
    color: #555;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tablaInventario td:nth-child(3) {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0 !important;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
}

/* Clases de Utilidad Card */
.card-email {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.2s;
}

    .card-email:hover {
        color: #e5883a;
        text-decoration: underline;
    }

.card-avatar {
    width: 65px;
    height: 65px;
    background-color: #e5883a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 auto 12px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-name {
    font-weight: 600;
    font-size: 1.15rem;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 6px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 7px;
    font-size: 0.88rem;
    color: #333;
}

    .contact-item i {
        color: #e5883a;
        margin-right: 9px;
        width: 18px;
        text-align: center;
    }

/* 4. Paginación y UI */
.fixed-table-pagination {
    margin-top: 15px !important;
    padding-bottom: 20px;
    justify-content: center !important;
    display: flex !important;
    border-top: 1px solid #eee;
}

.pagination .page-link {
    padding: 8px 16px;
    border-radius: 8px !important;
    margin: 0 3px;
    border: 1px solid #e0e6ed;
    color: #343a40;
}

.pagination .page-item.active .page-link {
    background-color: #004a99;
    border-color: #004a99;
    color: #fff;
}

/* 5. Banner y Alertas */
.alert-resultados {
    background: #f8fff9; /* Un verde casi blanco, muy limpio */
    border-left: 5px solid #28a745;
    padding: 14px 22px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
    margin: 15px 0 30px 0;
    font-size: 0.95rem;
    color: #155724;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(40, 167, 69, 0.2);
    transition: all 0.3s ease;
}

    /* Estilo para los iconos dentro del banner */
    .alert-resultados i {
        color: #28a745;
        font-size: 1.1rem;
    }

    /* Estilo para el texto de énfasis (nombres buscados) */
    .alert-resultados .font-italic {
        color: #1e7e34;
        font-weight: 600;
        background: rgba(40, 167, 69, 0.05);
        padding: 2px 6px;
        border-radius: 4px;
    }

    /* Botón de limpiar dentro del banner */
    .alert-resultados .btn-link {
        color: #6c757d !important;
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: color 0.2s;
    }

        .alert-resultados .btn-link:hover {
            color: #dc3545 !important; /* Rojo al pasar el mouse para indicar "borrar" */
        }

/*  Mensaje de Carga (Loader) */
.fixed-table-loading .loading-icon,
.fixed-table-loading .loading-text,
.fixed-table-loading .loader {
    display: none !important;
}

    .fixed-table-loading.open {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(8px) !important;
        border: none !important;
        z-index: 1000;
    }

.loader-content {
    text-align: center !important;
}

    .loader-content i {
        color: #e5883a !important;
        margin-bottom: 20px !important;
        text-shadow: 0 0 10px rgba(229, 136, 58, 0.2);
    }

    .loader-content p {
        font-weight: 700 !important;
        color: #343a40 !important;
        font-size: 1.15rem !important;
        margin: 0 !important;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estilo para el pie de contacto (Abajo) */
.footer-contacto {
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #495057;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    transition: all 0.3s ease;
}

    .footer-contacto:hover {
        background: #fff;
        border-color: #004a99;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }

    .footer-contacto i {
        color: #e5883a; /* Tu naranja de acento */
        font-size: 1.2rem;
    }

    .footer-contacto a {
        color: #004a99;
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: all 0.2s;
    }

        .footer-contacto a:hover {
            border-bottom: 1px solid #004a99;
        }

    .footer-contacto .badge {
        padding: 5px 10px;
        font-size: 0.85rem;
        color: #495057;
        border: 1px solid #dee2e6;
    }

.directorio-intro-container {
    padding: 30px 15px;
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.directorio-intro-text {
    font-size: 1.3rem;
    font-weight: 300;
    color: #4a5568;
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin-bottom: 15px;
    text-justify: none;
    word-spacing: normal;
    text-align: center;
}

    .directorio-intro-text .highlight {
        color: #e5883a;
        font-weight: 600;
        display: inline-block;
    }


.elegant-line {
    height: 2px;
    width: 50px;
    background: linear-gradient(to right, transparent, #e5883a, transparent); /* Naranja de acento */
    margin: 0 auto;
    opacity: 0.6;
}

@media (max-width: 768px) {
    /* 1. Ajuste del Texto de Bienvenida */
    .directorio-intro-text {
        font-size: 1.05rem !important;
        padding: 0 10px;
    }

    /* 2. Tarjetas más compactas */
    .card-view {
        margin-bottom: 15px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }

    /* 3. Reducir tamaño del Avatar en móvil */
    .card-avatar {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.1rem !important;
    }

    /* 4. Banner de resultados fijo o más visible */
    .alert-resultados {
        font-size: 0.85rem !important;
        padding: 10px 15px !important;
    }

    /* 5. Ajuste de botones para dedos (Touch targets) */
    .btn, .select2-selection--single, .search input {
        height: 52px !important; /* Ligeramente más alto para facilitar el toque */
    }
}