.header-formulario {
    position: relative;
    border-radius: 2rem;
    background: #fff;
    min-width: 340px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.formulario-preloader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2rem;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.formulario-preloader--visible {
    opacity: 1;
    visibility: visible;
}

.formulario-preloader__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
}

.formulario-preloader__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.formulario-preloader__spinner {
    display: block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-celeste, #0ea5e9);
    border-top-color: transparent;
    border-radius: 50%;
    animation: formulario-preloader-spin 0.8s linear infinite;
}

.formulario-preloader__text {
    font-size: 1.4rem;
    color: var(--color-principal, #333);
}

@keyframes formulario-preloader-spin {
    to { transform: rotate(360deg); }
}

.formulario-errores {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 1.35rem;
    line-height: 1.4;
}

.formulario-errores:empty {
    display: none;
}

.formulario-errores__item {
    margin: 0 0 0.4rem 0;
}

.formulario-errores__item:last-child {
    margin-bottom: 0;
}

/* Título y subtítulo */
.header-formulario h2 {
    color: var(--color-principal);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.header-formulario__subtitulo {
    font-size: 1.4rem;
    color: var(--color-parrafo, #5a5a5a);
    text-align: center;
    margin: 0 0 1.75rem 0;
    line-height: 1.45;
    font-weight: 400;
}

/* Labels de campos */
.header-formulario label:not(.header-formulario__checkbox) span {
    font-size: 1.35rem;
    font-weight: 500;
    display: block;
    color: #333;
    margin-top: 1.15rem;
    margin-bottom: 0.45rem;
}

.header-formulario label:first-of-type span {
    margin-top: 0;
}

/* Inputs y select */
.header-formulario input[type="text"],
.header-formulario input[type="tel"],
.header-formulario input[type="email"],
.header-formulario select {
    font-size: 1.55rem;
    font-family: inherit;
    display: block;
    height: 4rem;
    padding: 0.75rem 1rem;
    width: 100%;
    border-radius: 0.65rem;
    border: 1px solid #ddd;
    color: #222;
    background: #fafafa;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.header-formulario input::placeholder {
    color: #888;
}

.header-formulario input:focus,
.header-formulario select:focus {
    outline: none;
    border-color: var(--color-principal, #2B6AA8);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 106, 168, 0.15);
}

.header-formulario select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Checkbox */
.header-formulario__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-top: 1.1rem;
    cursor: pointer;
}

.header-formulario__checkbox input[type="checkbox"] {
    width: 1.65rem;
    height: 1.65rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--color-principal, #2B6AA8);
    cursor: pointer;
}

.header-formulario__checkbox span {
    margin: 0;
    font-size: 1.3rem;
    color: #555;
    line-height: 1.45;
}

/* Botón */
.contenedor-boton {
    display: flex;
    justify-content: stretch;
    margin-top: 1.5rem;
}

.header-formulario .boton {
    width: 100%;
    justify-content: center;
    background: linear-gradient(180deg, var(--color-principal, #2B6AA8) 0%, #235a90 100%);
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-radius: 3rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(43, 106, 168, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.header-formulario .boton:hover {
    box-shadow: 0 4px 14px rgba(43, 106, 168, 0.4);
}

.header-formulario .boton:active {
    transform: scale(0.99);
}

/* Excluir animación de palpitar en botones de formularios y servicios */
.header-formulario .boton,
.formulario-seccion .boton,
.servicios .boton {
    animation: none !important;
}

.header-formulario .boton span {
    margin: 0;
    color: #fff;
    font-size: 1.45rem;
}
@media (min-width: 768px) {
    .header-formulario {
        padding: 2.75rem 2.25rem;
    }
    .header-formulario h2 {
        font-size: 2.15rem;
        margin-bottom: 0.5rem;
    }
    .header-formulario__subtitulo {
        margin-bottom: 2rem;
        font-size: 1.45rem;
    }
    .header-formulario label:not(.header-formulario__checkbox) span {
        margin-top: 1.2rem;
    }
    .contenedor-boton {
        margin-top: 1.75rem;
    }
}
  