/* Estilos generales */
.navbar-custom {
    background-color: #c90000;; /* Rojo intenso */
    padding: 0.5rem 1rem; /* Espaciado interno del navbar */
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link,
.navbar-custom .navbar-text,
.navbar-custom .navbar-text a {
    color: #FFFFFF !important; /* Letras blancas */
}

.navbar-custom .navbar-text a {
    text-decoration: underline; /* Subrayado para el enlace */
}

/* Estilos para el menú del header */
.header-nav {
    flex-direction: row; /* Por defecto, en fila */
}

/* Ajustes para móviles */
@media (max-width: 991.98px) {
    .navbar-brand {
        display: none; /* Ocultar "UECFT Araure" en móviles */
    }
    .navbar-text {
        font-size: 12px; /* Reducir tamaño del texto en móviles */
        margin-right: auto; /* Mover el texto a la izquierda */
        white-space: nowrap; /* Evitar que el texto se divida en varias líneas */
        padding-right: 1rem; /* Espacio entre el texto y los íconos */
    }
    .header-nav {
        flex-direction: column; /* Cambiar a columna en móviles */
        width: 100%; /* Ocupar todo el ancho */
    }
    .header-nav .nav-link {
        font-size: 14px; /* Reducir tamaño de los íconos en móviles */
        padding: 0.5rem 1rem; /* Espaciado entre opciones */
        text-align: left; /* Alinear texto a la izquierda */
    }
    .header-nav .dropdown-menu {
        position: static; /* Mostrar sub-menús en línea con el menú principal */
        float: none; /* Evitar que los sub-menús floten */
        width: 100%; /* Ocupar todo el ancho disponible */
        background-color: transparent; /* Fondo transparente */
        border: none; /* Sin bordes */
    }
    .header-nav .dropdown-item {
        padding: 0.5rem 1rem; /* Espaciado entre opciones */
        color: #FFFFFF !important; /* Letras blancas */
    }
    .header-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1); /* Fondo claro al pasar el mouse */
    }
    .btn-login {
        background-color: #c90000; /* Fondo rojo */
        color: #FFFFFF !important; /* Texto blanco */
        font-weight: bold; /* Texto en negrita */
        border-radius: 5px; /* Bordes redondeados */
        padding: 0.5rem 1rem; /* Espaciado interno */
        text-align: center; /* Centrar texto */
        margin: 0.5rem 0; /* Margen superior e inferior */
    }

    .btn-login:hover {
        background-color: #a80000; /* Cambio de color al pasar el mouse */
    }

    .sign_btn {
        display: none; /* Ocultar el botón de Iniciar Sesión fuera del menú en móviles */
    }
}
/* Ajustes para móviles */
@media (max-width: 767.98px) {
    .section-container {
        padding-top: 20px !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .btn-registro, .btn-requisitos {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn-registro i, .btn-requisitos i {
        margin-right: 0.3rem !important;
    }
}

/* Estilos para las tarjetas de nivel */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    border-bottom: 2px solid #f0f0f0;
}

.nivel-title {
    font-size: 1.2rem;
    color: #c90000;
}

.text-muted strong {
    color: #c90000;
}

/* Ajustes para pantallas grandes */
@media (min-width: 992px) {
    .navbar-text {
        margin-right: auto; /* Mover el texto a la izquierda */
    }
    .header-nav {
        flex-direction: row; /* Mostrar íconos en línea */
        margin-left: auto; /* Mover los íconos a la derecha */
    }
    .btn-login {
        display: none; /* Ocultar el botón de Iniciar Sesión dentro del menú en desktop */
    }

    .sign_btn {
        display: block; /* Mostrar el botón de Iniciar Sesión fuera del menú en desktop */
    }
}

/* Estilos para el menú del footer (no cambian) */
.navbar-custom .navbar-nav {
    flex-direction: row; /* Siempre en fila */
}

/* Estilos para la tabla de cursos */
.table-cursos {
    width: 100%;
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.table-cursos th {
    background-color: #c90000;
    color: white;
    font-weight: bold;
    padding: 1rem;
    text-align: left;
}

.table-cursos td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.table-cursos tr:last-child td {
    border-bottom: none;
}

.table-cursos tr:hover {
    background-color: #f9f9f9;
}

.btn-registro {
    background-color: #c90000;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-registro:hover {
    background-color: #a80000;
}

.btn-requisitos {
    background-color: #f8f9fa;
    color: #c90000;
    border: 1px solid #c90000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-requisitos:hover {
    background-color: #c90000;
    color: white;
}

.nivel-title {
    color: #c90000;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.section-container {
    padding: 3rem 0;
    background-color: #f8f9fa;
}
/* Estilos para el modal de requisitos */
.modal-requisitos .modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-requisitos .modal-header {
    background-color: #c90000;
    color: white;
    border-radius: 9px 9px 0 0;
    padding: 15px 20px;
    border-bottom: none;
}

.modal-requisitos .modal-header .close {
    color: white;
    text-shadow: none;
    opacity: 0.8;
    font-size: 1.5rem;
}

.modal-requisitos .modal-header .close:hover {
    opacity: 1;
}

.modal-requisitos .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-requisitos .modal-body {
    padding: 25px;
}

.tabla-requisitos {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tabla-requisitos thead th {
    background-color: #f8f9fa;
    color: #c90000;
    font-weight: 600;
    padding: 12px 15px;
    border-bottom: 2px solid #e9ecef;
}

.tabla-requisitos tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.tabla-requisitos tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.tabla-requisitos tbody tr:last-child td {
    border-bottom: none;
}

.requisito-obligatorio {
    color: #c90000;
    font-weight: bold;
}

.requisito-opcional {
    color: #6c757d;
}

.badge-requisito {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-obligatorio {
    background-color: #ffebee;
    color: #c90000;
}

.badge-opcional {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.modal-requisitos .modal-footer {
    border-top: none;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 0 0 9px 9px;
}

/* Agrega esto a tus estilos existentes */
.modal-requisitos .modal-header .modal-title,
.modal-requisitos .modal-header .modal-title i,
.modal-formulario .modal-header .modal-title,
.modal-formulario .modal-header .modal-title i,
.modal-formulario .card-header h5,
.modal-formulario .card-header h5 i {
    color: white !important;
}

/* Opcional: Asegurar que el hover del botón close también sea blanco */
.modal-requisitos .modal-header .close:hover,
.modal-formulario .modal-header .close:hover {
    color: white !important;
    opacity: 1;
}

.btn-cerrar-modal {
    background-color: #c90000;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-cerrar-modal:hover {
    background-color: #a80000;
    color: white;
}

.modal-lg {
    max-width: 90%;
}

.card {
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

.form-check {
    position: relative;
    display: block;
    padding-left: 1.25rem;
}

.form-check-input {
    position: absolute;
    margin-top: 0.3rem;
    margin-left: -1.25rem;
}

.form-check-label {
    margin-bottom: 0;
}

/* Estilo para etiquetas de campos obligatorios */
.required-field label:after {
    content: " *";
    color: #c90000;
    font-weight: normal;
}

.required-field label {
    font-weight: 500;
    position: relative;
}

/* Estilo para campos obligatorios */
.required-field .form-control,
.required-field .form-select {
    border-left: 3px solid #c90000;
    padding-left: 10px;
}

/* Leyenda de campos obligatorios */
.form-legend {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.form-legend i {
    color: #c90000;
    margin-right: 5px;
}

/* Estilos para los radios personalizados */
.custom-radio .custom-control-label::before {
    position: absolute;
    left: -1.75rem;
    border: 2px solid #c90000;
    background-color: #ffffff;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    top: 0.125rem;
    content: '';
}

.custom-radio .custom-control-label::after {
    position: absolute;
    left: -1.75rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    top: 0.125rem;
    background-color: transparent;
    content: '';
}

.custom-radio .custom-control-input:checked~.custom-control-label::before {
    background-color: #c90000;
    border-color: #c90000;
    box-shadow: 0 0 0 2px rgba(201, 0, 0, 0.1);
}

.custom-radio .custom-control-input:checked~.custom-control-label::after {
    background-color: white;
    width: 0.5rem;
    height: 0.5rem;
    left: -1.375rem;
    top: 0.5rem;
}

.custom-radio .custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(201, 0, 0, 0.25);
}

.custom-radio .custom-control-input:not(:checked)~.custom-control-label::before {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

.custom-radio .custom-control-input:not(:checked)~.custom-control-label:hover::before {
    border-color: #c90000;
    background-color: #fff0f0;
}

.custom-control-label {
    position: relative;
    cursor: pointer;
    padding-left: 0.25rem;
    display: inline-block;
    line-height: 1.5;
    font-size: 0.95rem;
    user-select: none;
    margin-bottom: 0;
}

.custom-control {
    position: relative;
    min-height: 1.5rem;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    width: 1.25rem;
    height: 1.25rem;
    top: 0.125rem;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

#seccionRepresentante[style*="display: none"] {
    opacity: 0.5;
    pointer-events: none;
}

/* Estilo para indicar representante automático */
.representante-auto {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 3px solid #c90000;
}

/* Estilos para la tabla de discapacidades */
#discapacidadesTable {
    margin-bottom: 0;
}

#discapacidadesTable th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.discapacidad-row td {
    vertical-align: middle;
}

.btn-eliminar-discapacidad {
    width: 100%;
}

.btn-eliminar-discapacidad:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.is-invalid {
    border-color: #dc3545;
}

/* Estilo para el botón de agregar */
#btn-agregar-discapacidad {
    transition: all 0.3s;
}

#btn-agregar-discapacidad:hover {
    transform: translateY(-2px);
}

/* Estilos para el acordeón de formularios */
.card-header.form-title {
    cursor: pointer;
    position: relative;
    padding-right: 40px;
    transition: background-color 0.3s ease;
}

.card-header.form-title:hover {
    background-color: #a80000 !important;
}

.card-header.form-title::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    color: white;
}

.card-header.form-title.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

.card-body.collapse:not(.show) {
    display: none;
}

.card-body.collapse.show {
    display: block;
}

/* Suavizar la animación de apertura/cierre */
.collapsing {
    transition: height 0.3s ease;
}

.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Estilos para el modal informativo */
.modal-informacion .modal-header .modal-title i,
.modal-informacion .modal-footer .btn-primary i {
    color: white;
}

.modal-informacion .btn-secondary {
    background-color: #f1f1f1;
    color: #555;
    border: 1px solid #ddd;
}

.modal-informacion .btn-secondary:hover {
    background-color: #e9e9e9;
}

/* Mejorar la lista de instrucciones */
.instrucciones-lista li {
    margin-bottom: 0.8rem;
}

.instrucciones-lista li strong {
    color: #c90000;
}

/* Estilo para el botón de descargar planilla */
.btn-descargar-planilla {
    background-color: #ffffff;
    color: #c90000;
    border: 1px solid #c90000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-descargar-planilla:hover {
    background-color: #c90000;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(201, 0, 0, 0.2);
}

.btn-descargar-planilla i {
    margin-right: 6px;
    font-size: 1.1rem;
}

/* Estilos para el modal de imprimir planilla */
.modal-imprimir-planilla .modal-header {
    background-color: #c90000;
    color: white;
}

.modal-imprimir-planilla .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-imprimir-planilla .modal-body label {
    font-weight: 500;
}

.modal-imprimir-planilla .modal-footer button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.modal-imprimir-planilla .modal-footer button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(201, 0, 0, 0.2);
}

.modal-imprimir-planilla .required-field label::after {
    content: " *";
    color: #c90000;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 767.98px) {
    .btn-descargar-planilla {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    .btn-descargar-planilla i {
        margin-right: 4px;
    }
}

@media (max-width: 767.98px) {
    .card-header.form-title {
        padding: 0.75rem 1rem 0.75rem 0.75rem;
    }
    
    .card-header.form-title::after {
        right: 10px;
        font-size: 0.9rem;
    }
    
    .card-header.form-title h5 {
        font-size: 1rem;
    }
}

/* En pantallas pequeñas: apilar y uniformar botones */
@media (max-width: 767.98px) {
  

    .btn-registro,
    .btn-requisitos,
    .btn-descargar-planilla {
        width: 100%;
        max-width: 220px;
        text-align: center;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
        border-radius: 6px;
    }

    .btn-descargar-planilla i {
        margin-right: 6px;
    }
}

/* En pantallas medianas y grandes: mantenerlos en línea pero del mismo tamaño */
@media (min-width: 768px) {
    .btn-registro,
    .btn-requisitos,
    .btn-descargar-planilla {
        min-width: 150px;
        text-align: center;
    }
}

/* ========================================= */
/* ESTILOS MEJORADOS PARA BUSCADOR GENÉRICO */
/* ========================================= */

.autocomplete-results {
    position: absolute;
    z-index: 9999 !important;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #c90000;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(201, 0, 0, 0.15);
    margin-top: -1px;
}

/* Asegurar que el contenedor position-relative tenga overflow visible */
.form-group .position-relative,
.position-relative {
    overflow: visible !important;
}

/* Asegurar que los card-body tengan overflow visible para los buscadores */
.card .card-body,
.modal-body,
.card-body {
    overflow: visible !important;
}

/* Asegurar que los collapse y cards no corten el contenido */
.collapse,
.card,
.modal-content {
    overflow: visible !important;
}

.autocomplete-header {
    padding: 10px 14px;
    background: linear-gradient(135deg, #c90000, #a00000);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.autocomplete-header i {
    color: rgba(255, 255, 255, 0.9);
}

.autocomplete-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: linear-gradient(90deg, #fff0f0, #ffffff);
    border-left: 3px solid #c90000;
    padding-left: 11px;
}

.autocomplete-item strong {
    color: #c90000;
    font-weight: 600;
}

.autocomplete-item i {
    color: #666;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.autocomplete-item-nuevo {
    background: linear-gradient(90deg, #f0fff4, #ffffff);
    border-left: 3px solid #28a745;
    padding-left: 11px;
}

.autocomplete-item-nuevo:hover {
    background: linear-gradient(90deg, #e6ffe9, #f9fff9);
}

.autocomplete-item-nuevo i {
    color: #28a745;
}

.autocomplete-item-nuevo strong {
    color: #28a745;
}

.autocomplete-no-results {
    padding: 16px 14px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: #fafafa;
}

/* Estilo para el input cuando está activo */
.buscador-input:focus {
    border-color: #c90000;
    box-shadow: 0 0 0 0.2rem rgba(201, 0, 0, 0.15);
}

/* Scroll bar personalizado para resultados */
.autocomplete-results::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 6px 0;
}

.autocomplete-results::-webkit-scrollbar-thumb {
    background: #c90000;
    border-radius: 4px;
}

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #a00000;
}

/* Animación sutil al mostrar resultados */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-results:not(.d-none) {
    animation: slideDown 0.2s ease-out;
}

/* Responsive: ajustes para móviles */
@media (max-width: 768px) {
    .autocomplete-results {
        max-height: 220px;
        font-size: 0.85rem;
    }

    .autocomplete-item {
        padding: 10px 12px;
    }

    .autocomplete-header {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ========================================= */
/* ESTILOS MEJORADOS PARA VALIDACIONES */
/* ========================================= */

/* Estilo para campos válidos */
.is-valid {
    border-color: #28a745 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Mensajes de feedback */
.invalid-feedback,
.valid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    font-weight: 500;
}

.invalid-feedback {
    color: #dc3545;
}

.valid-feedback {
    color: #28a745;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

.is-valid ~ .valid-feedback {
    display: block;
}

/* Iconos en los mensajes de feedback */
.invalid-feedback::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 5px;
}

.valid-feedback::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 5px;
}

/* Animación sutil para campos inválidos */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.is-invalid {
    animation: shake 0.3s ease-in-out;
}

/* Estilo para campos con errores en inputs de grupo */
.input-group .is-invalid {
    z-index: 3;
}

.input-group .is-valid {
    z-index: 3;
}

/* Mejorar la visibilidad de campos requeridos pendientes */
.required-field .form-control:not(.is-valid):not(.is-invalid):focus {
    border-color: #c90000;
    box-shadow: 0 0 0 0.25rem rgba(201, 0, 0, 0.15);
}

/* Tooltip de ayuda para campos */
.form-text {
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #6c757d;
}

.form-text i {
    margin-right: 4px;
}

/* Indicador de carga para validaciones asíncronas */
.validating {
    position: relative;
}

.validating::after {
    content: '';
    position: absolute;
    right: calc(0.375em + 0.1875rem);
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #c90000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Mejorar el diseño de select con validaciones */
.form-select.is-invalid {
    background-position: right 0.75rem center, right 2.25rem center;
}

.form-select.is-valid {
    background-position: right 0.75rem center, right 2.25rem center;
}

/* Estilos para mensajes de confirmación */
.swal-wide {
    width: 600px !important;
}

@media (max-width: 768px) {
    .swal-wide {
        width: 95% !important;
    }
}

/* Resaltar secciones colapsadas con errores */
.card-header.has-errors {
    border-left: 4px solid #dc3545;
    background-color: #f8d7da !important;
}

.card-header.has-errors h5 {
    color: #721c24 !important;
}

/* Contador de errores en sección */
.error-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: bold;
}

/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    .invalid-feedback,
    .valid-feedback {
        font-size: 0.8em;
    }

    .form-text {
        font-size: 0.8em;
    }
}
