.directorio-container {
    width: 95%;
    max-width: 1200px;
    margin: 60px auto;
}

.directorio-header {
    text-align: center;
    margin-bottom: 50px;
}

.directorio-header h1,
.registro-title h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #0d2f4f;
    margin-bottom: 20px;
}

.directorio-header p {
    color: #555;
    max-width: 700px;
    margin: auto;
    line-height: 1.7;
}

.directorio-card,
.directorio-results {
    border: 1px solid #d9d9d9;
    background: #fff;
    margin-bottom: 50px;
}

.card-header-custom {
    background: #f4f4f4;
    padding: 18px 30px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.directorio-card form,
.directorio-results {
    padding: 30px;
}

.form-label {
    font-weight: 500;
    color: #444;
}

.form-control,
.form-select {
    height: 45px;
    border-radius: 4px;
}

.directorio-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-primary {
    background: #0d2f4f;
    border: none;
}

.btn-primary:hover {
    background: #15466f;
}

.directorio-table thead {
    background: #f4f4f4;
}

.directorio-results .table-responsive {
    overflow-x: auto;
}

.directorio-table {
    min-width: 1200px;
}

.directorio-table th,
.directorio-table td {
    padding: 15px 20px;
    vertical-align: middle;
    min-width: 140px;
}

.directorio-table th {
    white-space: nowrap;
}

.download-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.directorio-banner {
    background: #1f4d7a;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* mantener un padding compacto para evitar grandes franjas azules */
    padding: 20px 50px 20px;
    margin-bottom: 40px;
    overflow: visible;
    position: relative;
    /* extender el banner a todo el ancho de la ventana */
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.directorio-banner .banner-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.directorio-banner .banner-link:hover {
    text-decoration: none;
}

.banner-content h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.banner-imageDir {
    position: absolute;
    right: 30px;
    /* colocar la imagen justo encima del banner (alineada al borde superior) */
    /* bottom: 100%; */
    transform: translateY(0);
    z-index: 2;
}

.banner-imageDir img {
    width: 260px;
    max-width: none;
    display: block;
    max-height: none;
}

/* Ajustes responsivos: que la imagen vuelva a su flujo en pantallas pequeñas */
@media (max-width: 991px) {
    .directorio-banner {
        min-height: 110px;
        padding: 18px 30px;
        width: 100vw;
        left: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        margin-bottom: 20px;
    }

    /* ocultar la imagen en pantallas pequeñas para evitar solapamientos */
    .banner-imageDir {
        display: none;
    }

    .banner-imageDir img {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .directorio-banner {
        /* móvil: mantener el banner compacto */
        min-height: 70px;
        padding: 12px 18px;
        margin-bottom: 12px;
    }

    /* ocultar la imagen en móviles */
    .banner-imageDir {
        display: none;
    }

    .banner-imageDir img {
        width: 120px;
        display: block;
        max-width: 100%;
        height: auto;
    }
}

.registro-title {
    text-align: center;
    margin-bottom: 40px;
}

.registro-description {
    background: #f4f4f4;
    padding: 20px 30px;
    margin: -30px -30px 30px;
    border-bottom: 1px solid #ddd;
    color: #444;
}

.registro-btn {
    min-width: 200px;
    height: 45px;
    font-weight: 600;
}

.registro-modal {
    border-radius: 18px;
    overflow: hidden;
}

.modal-body {
    padding: 40px;
}

.modal-flex {
    display: flex;
    align-items: center;
    gap: 30px;
}

.modal-image img {
    width: 180px;
}

.modal-text h3 {
    color: #0d2f4f;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-text p {
    color: #444;
    line-height: 1.7;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

@media (max-width: 991px) {

    .directorio-header h1,
    .registro-title h1 {
        font-size: 2.8rem;
    }

    .directorio-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .modal-flex {
        flex-direction: column;
        text-align: center;
    }

    .modal-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {

    .directorio-header h1,
    .registro-title h1 {
        font-size: 2rem;
    }

    .banner-content h2 {
        font-size: 1.3rem;
    }

    .directorio-card form,
    .directorio-results {
        padding: 20px;
    }
}