

/* ====== Miga de pan ====== */
.heading-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #F1F1F1 !important;
    padding: 10px 20px;
    border-radius: 6px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.heading-wrapper h3 {
    margin: 0;
    font-size: 14px;
    padding-left: 20px;
    font-weight: normal;
}

.heading-wrapper a {
    color: #3EB447;
    text-decoration: none;
    font-size: 23px;
}

.heading-wrapper li {
    list-style: none;
    color: #606060;
    font-size: 23px;
}

.heading-wrapper li::before {
    content: "›";
    margin: 0 8px;
    color: #888;
}

/* ====== Barra de categorías ====== */
.category-bar {
    background: #606060;
    border-radius: 0 0 90px 90px;
    display: flex;
    justify-content: center;
    height: 5px;
}

.category-item {
    flex: 1 1 0;
    text-align: center;
    padding: 1.25rem .5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.category-item:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 25%;
    width: 1px;
    height: 50%;
    background: #fff;
    opacity: .75;
}

/* ====== Filtros ====== */
.filter-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.filter-header {
    border-bottom: 2px solid #3EB447;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-filter {
    flex: 1;
    background-color: #3EB447;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-reset {
    flex: 1;
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-item {
    margin: 0 4px;
}

.page-link {
    color: #3EB447;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
}

.page-item.active .page-link {
    background-color: #3EB447;
    border-color: #3EB447;
    color: white;
}
/* Forzar columnas iguales */
[class*="col-"].d-flex {
    display: flex;
}


/* Tarjeta */
.card {
    border-radius: 12px;
    background-color: #fff;
    padding: 12px;
    /* This is the padding you're referring to */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    /* sombra gris suave */
    cursor: pointer !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid #e0e0e0;
    /* borde gris claro */
}

/* Hover: sombra verde */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
    /* sombra verde */
}

/* Encabezado */
.card-header {
   
    border: none;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    
    cursor: pointer !important;
}

.card-body {
    padding: 0 !important;
    display: flex !important; /* Añadimos !important por si acaso */
    flex-direction: column !important; /* Añadimos !important por si acaso */

    flex-grow: 1 !important; /* Esto es CLAVE para la altura */
    
    /* CAMBIO AQUÍ: Centra el contenido verticalmente */
    justify-content: center !important; 
    
    cursor: pointer !important;
    align-items: center !important; /* Para centrar horizontalmente */
}

/* Botón ícono */
.btn-icon {
    background: none;
    border: none;
    margin-left: 8px;
    padding: 0;
    font-size: 18px;
    color: #3EB447;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-icon i.rotate {
    transform: rotate(180deg);
}



/* Imagen */
.card-img-fixed {
    width: 100%;
    height: 250px;
    /* altura fija para uniformidad */
    object-fit: contain; /* Cambiado a contain para evitar cortes */
    background-color: #f8f9fa; /* Fondo claro para rellenar espacios en blanco */
    border-radius: 8px; /* Bordes redondeados sutiles */
    cursor: pointer !important;
    padding: 5px; /* Pequeño margen interno para enmarcar la foto */
    border: 1px solid #e0e0e0;
}


/* Contenido expandible */
.content-row {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 16px;
    margin-top: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-title {
    color: #6a11cb;
    margin-bottom: 10px;
    font-weight: 600;
}

.content-text {
    color: #555;
    line-height: 1.5;
}
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;

    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-family: sans-serif;
}

.detail-title {
    font-weight: bold;
    color: #222;
    font-size: 1rem;
}

.detail-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3EB447;
    margin-bottom: 0.3rem;
}

.detail-email {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.detail-profile {
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
}

.detail-location,
.detail-phone {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.detail-location i,
.detail-phone i {
    margin-right: 6px;
    color: #666;
}

.detail-location a {
    color: inherit;
    margin-left: 6px;
}


.detail-enlaces {
    font-size: 0.9rem;
    margin-top: 8px;
}

.detail-enlaces a {
    text-decoration: none;
    color: #333;
}

.detail-enlaces a:hover {
    text-decoration: underline;
}

.detail-enlaces i {
    margin-right: 4px;
}




.close-detail {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1rem;
}

.close-detail:hover {
    color: #3EB447;
}

/*

*/


    /* Nuevos estilos para filtros */
    .filter-panel {
        background-color: #f8f9fa;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        margin-bottom: 25px;
    }

    .filter-header {
        border-bottom: 2px solid #3EB447;
        padding-bottom: 10px;
        margin-bottom: 15px;
        font-weight: 600;
        color: #333;
    }

    .filter-group {
        margin-bottom: 20px;
    }

    .filter-group label {
        font-weight: 500;
        margin-bottom: 5px;
        display: block;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: #fff;
    }

    .filter-actions {
        display: flex;
        gap: 10px;
    }

    .btn-filter {
        flex: 1;
        background-color: #3EB447;
        color: white;
        border: none;
        padding: 8px;
        border-radius: 4px;
        cursor: pointer;
    }

    .btn-reset {
        flex: 1;
        background-color: #6c757d;
        color: white;
        border: none;
        padding: 8px;
        border-radius: 4px;
        cursor: pointer;
    }

    /* Paginación */
    .pagination {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .page-item {
        margin: 0 4px;
    }

    .page-link {
        color: #3EB447;
        border: 1px solid #dee2e6;
        padding: 6px 12px;
        border-radius: 4px;
        text-decoration: none;
    }

    .page-item.active .page-link {
        background-color: #3EB447;
        border-color: #3EB447;
        color: white;
    }
    
    /* Forzar columnas iguales */
    [class*="col-"].d-flex {
        display: flex;
    }


 
   

    /* Hover: sombra verde */
    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
        /* sombra verde */
    }

    /* Encabezado */
    .card-header {
        background: none;
        border: none;
        padding: 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #333;
    }

   

    /* Botón ícono */
    .btn-icon {
        background: none;
        border: none;
        margin-left: 8px;
        padding: 0;
        font-size: 18px;
        color: #3EB447;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .btn-icon i.rotate {
        transform: rotate(180deg);
    }

    /* Nombre del responsable */
    

   


    /* Contenido expandible */
    .content-row {
        background-color: #ffffff;
        border-radius: 10px;
        padding: 16px;
        margin-top: 10px;
        margin-bottom: 25px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        animation: fadeIn 0.5s ease-in-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .content-title {
        color: #6a11cb;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .content-text {
        color: #555;
        line-height: 1.5;
    }


    .detail-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        background: #fff;

        padding: 1rem;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        font-family: sans-serif;
    }

    .detail-title {
        font-weight: bold;
        color: #222;
        font-size: 1rem;
    }

    .detail-name {
        font-size: 1.1rem;
        font-weight: 700;
        color: #3EB447;
        margin-bottom: 0.3rem;
    }

    .detail-email {
        color: #999;
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .detail-profile {
        font-size: 0.95rem;
        margin-bottom: 0.7rem;
    }

    .detail-location,
    .detail-phone {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .detail-location i,
    .detail-phone i {
        margin-right: 6px;
        color: #666;
    }

    .detail-location a {
        color: inherit;
        margin-left: 6px;
    }


    .detail-enlaces {
        font-size: 0.9rem;
        margin-top: 8px;
    }

    .detail-enlaces a {
        text-decoration: none;
        color: #333;
    }

    .detail-enlaces a:hover {
        text-decoration: underline;
    }

    .detail-enlaces i {
        margin-right: 4px;
    }




    .close-detail {
        background: none;
        border: none;
        cursor: pointer;
        color: #999;
        font-size: 1rem;
    }

    .close-detail:hover {
        color: #3EB447;


    }

    .info-unidad-direcione {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px 20px;
        background-color: #f9f9f9;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 25px;
    }

    .escudo-unidad {
        width: 50px;
        height: 50px;
        object-fit: contain;
        border-radius: 4px;
        background-color: #fff;
        border: 1px solid #ccc;
        flex-shrink: 0;
    }

    .datos-unidad h1 {
        font-size: 22px;
        margin: 0;
        color: #333;
        font-weight: 600;
        line-height: 1.2;
    }

    .grupos-asignados {
        margin-top: 20px;
        font-family: Arial, sans-serif;
    }

    .grupo-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
        justify-content: flex-start;
    }

    .grupo-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
        justify-content: flex-start;
    }
    
    .grupo-pill {
        background-color: #e0f0ff;
        color: #005a9c;
        padding: 8px 12px; /* un poco más de espacio para varias líneas */
        border-radius: 8px;
        font-size: 14px;
        border: 1px solid #b3d8f5;
        max-width: 100%;
        width: fit-content;
        min-width: 140px; /* ligeramente más ancho para que no se corte el texto */
        box-sizing: border-box;
        white-space: normal; /* permite varias líneas */
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        transition: all 0.2s ease-in-out;
    }
    
    .grupo-pill:hover {
        color: #3EB447;
        background-color: #d9f9e6;
        border-color: #3EB447;
        cursor: pointer;
    }
    
    /* Responsive para pantallas pequeñas */
    @media screen and (max-width: 480px) {
        .grupo-pill {
            font-size: 12px;
            min-width: 120px;
            padding: 6px 8px;
        }
    }
    

    .info-contacto {
        margin-top: 20px !important;
        background-color: #f4f8fb !important;
        border: 1px solid #d0e3f0 !important;
        padding: 20px !important;
        border-radius: 10px !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
    }
    
    .info-contacto h3 {
        margin-top: 0 !important;
        color: #606060 !important;
        font-size: 18px !important;
        margin-bottom: 15px !important;
        border-bottom: 1px solid #bcd3e5 !important;
        padding-bottom: 5px !important;
        flex-basis: 100% !important;
    }
    
    .info-contacto .bloque-item,
    .info-contacto .contacto-bloque {
        flex: 1 1 200px !important;
        background-color: #ffffff !important;
        border-radius: 8px !important;
        padding: 15px !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
    }
    
    .info-contacto h4 {
        margin-top: 0 !important;
        font-size: 16px !important;
        color: #333333 !important;
        margin-bottom: 10px !important;
    }
    
    .info-contacto ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .info-contacto li {
        margin-bottom: 6px !important;
    }
    
    .info-contacto a {
        color: #1d4ed8 !important;
        text-decoration: none !important;
    }
    
    .info-contacto a:hover {
        text-decoration: underline !important;
    }
    
    .info-contacto i {
        margin-right: 5px !important;
        color: #0f172a !important;
    }
    
    
    

    .bloque-item {
        margin-bottom: 15px;
    }

    .bloque-item h4 {
        font-size: 16px;
        margin-bottom: 5px;
        color: #2c3e50;
    }

    .bloque-item ul {
        list-style: none;
        padding-left: 0;
        margin: 0;
    }

    .bloque-item li {
        margin-bottom: 5px;
        font-size: 14px;
    }

    .bloque-item a {
        color: #005a9c;
        text-decoration: none;
    }

    .bloque-item a:hover {
        text-decoration: underline;
        color: #3EB447;
    }


    .sin-grupos {
        font-style: italic;
        color: #888;
    }


    .detalle-header {
        display: flex;
        flex-wrap: wrap;
        gap: 20px; /* Espacio entre info y grupos */
        position: relative;
    }
    
    .detalle-info {
        flex: 1;           /* La información principal ocupa el espacio disponible */
        min-width: 250px;  /* Ajusta según tu diseño */
    }
    
   
     /* ========================================================= */
/* 1. CONTENEDORES DE LA FILA Y LA COLUMNA */
/* ========================================================= */

/* La nueva clase principal: actúa como un contenedor Flex para estirar las columnas. */
.tarjetas-directorio {
   
    width: 100%;

    display: flex; 
    flex-wrap: wrap;
    align-items: stretch; /* Fuerza a las columnas a tomar la altura máxima */
}

/* Asegura que la columna y el contenedor .d-flex ocupen el 100% de la altura estirada */
.tarjetas-directorio > .col-12,
.tarjetas-directorio > .col-12 > .d-flex {
    height: 100%;
}

/* ========================================================= */
/* 2. LA TARJETA (.tarjeta-directorio) */
/* ========================================================= */

/* El estilo base para cada tarjeta en el directorio */
.tarjeta-directorio {
    /* **CLAVE:** Ocupa el 100% de la altura de su contenedor */
    height: 100%; 
    /* Contenedor flexible vertical */
    display: flex;
    flex-direction: column;
  

    
    /* Estilos para anular conflictos y de diseño */
    padding: 0; 
    justify-content: flex-start; /* Evita que se separe el contenido */
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* ========================================================= */
/* 3. COMPONENTES INTERNOS */
/* ========================================================= */

/* Cabecera: */
.tarjeta-directorio .card-header {
    flex-shrink: 0;
    padding: 12px 12px 0 12px;
}

/* Título: */
.tarjeta-directorio .card-title {
    flex-shrink: 0;
    text-align: center;
    font-size: 1rem;
    margin: 5px 0 5px 0;
    padding: 0 12px;
}

/* Cuerpo de la Tarjeta (La clave para rellenar el espacio vacío) */
.tarjeta-directorio .card-body {
    /* **CLAVE:** Crece para absorber todo el espacio restante */
    flex-grow: 1; 
    
    /* Centra el contenido verticalmente y añade el padding inferior */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra el contenido, eliminando el estiramiento visual */
    align-items: center;
    padding: 12px;
    cursor: pointer;
}

/* ========================================================= */
/* 4. IMAGEN (Anulando la altura fija de 250px) */
/* ========================================================= */



.fila-tarjetas {
    width: 100% !important;
}



/* Contenedor horizontal */
.redes-lista {
    display: flex;
    gap: 18px;
    padding: 15px 0;
}

/* Para ocultar el nombre de la red pero mantenerlo accesible */
.red-social-item span {
    display: none;
}

/* Estilo de los círculos */
.red-social-item {
    width: 48px;
    height: 48px;
    background: #707a81;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

/* Ícono blanco */
.red-social-item i {
    color: #ffffff !important;
    font-size: 20px;
}

/* Hover suave */
.red-social-item:hover {
    background: #5f676d;
    transform: scale(1.08);
}
