/**
 * Módulo reclutamiento — estilo premium (Stripe/Linear-like)
 * Depende de: empleo-page.css (hero + variables base)
 * No modifica nombres de campos; estiliza .empleo-field .form-control / .form-select
 */

.page-solicitud-empleo {
    --recruit-ink: #0c1a2e;
    --recruit-ink-soft: #1e3a5f;
    --recruit-muted: #64748b;
    --recruit-line: rgba(12, 26, 46, 0.1);
    --recruit-surface: #f8fafc;
    --recruit-card: #ffffff;
    --recruit-green: #006837;
    --recruit-green-hover: #00522c;
    --recruit-green-glow: rgba(0, 104, 55, 0.22);
    --recruit-radius: 0.875rem;
    --recruit-radius-lg: 1.125rem;
    --recruit-shadow: 0 1px 2px rgba(12, 26, 46, 0.04), 0 12px 40px rgba(12, 26, 46, 0.06);
    --recruit-shadow-focus: 0 0 0 3px var(--recruit-green-glow), 0 1px 2px rgba(12, 26, 46, 0.06);
    --recruit-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* —— Fondo página —— */
.empleo-page {
    background:
        radial-gradient(120% 80% at 50% -20%, rgba(0, 104, 55, 0.06), transparent 50%),
        linear-gradient(180deg, #f1f5f9 0%, #eef2f6 45%, #e8edf2 100%);
}

/* —— Main: layout + entrada —— */
.empleo-main {
    position: relative;
}

.empleo-main__container {
    max-width: 1180px;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

@media (min-width: 1200px) {
    .empleo-main__container {
        padding-top: 0.5rem;
        padding-bottom: 2.5rem;
    }
}

.empleo-main__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.75rem, 4vw, 2.75rem);
    align-items: start;
}

@media (min-width: 992px) {
    .empleo-main__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
        gap: clamp(2rem, 4.5vw, 3.5rem);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .empleo-main__col--intro {
        animation: recruitFadeUp 0.7s var(--recruit-ease) 0.05s both;
    }

    .empleo-main__col--form {
        animation: recruitFadeUp 0.75s var(--recruit-ease) 0.18s both;
    }
}

@keyframes recruitFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Cards tipo footer ICASA: degradado verde + halos (misma línea que .footer-icasa) —— */
.empleo-intro-panel,
.empleo-form-shell {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--recruit-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(160deg, #005a2e 0%, #006837 38%, #004d28 100%);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.08),
        0 18px 48px rgba(0, 0, 0, 0.2);
}

.empleo-form-shell {
    padding: clamp(1.5rem, 3.2vw, 2.25rem);
}

.empleo-intro-panel::before,
.empleo-form-shell::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(100%, 28rem);
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 95% 75% at -8% 22%, rgba(255, 255, 255, 0.2) 0%, transparent 58%),
        radial-gradient(ellipse 72% 55% at 18% 92%, rgba(255, 255, 255, 0.1) 0%, transparent 62%),
        linear-gradient(100deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 40%, transparent 78%);
}

.empleo-intro-panel > *,
.empleo-form-shell > * {
    position: relative;
    z-index: 1;
}

.empleo-intro__kicker {
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.16em;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.empleo-intro__title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.5rem, 3.5vw, 2.125rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    text-wrap: balance;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.empleo-intro__lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 38rem;
}

.empleo-highlights {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.empleo-highlights__item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.empleo-highlights__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.empleo-highlights__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.875rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    transition: transform 0.28s var(--recruit-ease), background 0.28s ease, border-color 0.28s ease;
}

.empleo-highlights__item:hover .empleo-highlights__icon {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.empleo-form-shell__head {
    margin-bottom: 1.75rem;
}

.empleo-form-shell__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.025em;
    margin: 0 0 0.4rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.empleo-form-shell__hint {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
    margin: 0;
}

.empleo-form-shell__hint .empleo-field__req {
    color: rgba(200, 255, 220, 0.95);
}

/* —— Formulario —— */
.empleo-form {
    position: relative;
    z-index: 1;
}

.empleo-form .row {
    --bs-gutter-y: 1.15rem;
}

.empleo-field {
    position: relative;
}

.empleo-field__label {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0.45rem;
    letter-spacing: 0.01em;
}

.empleo-field__req {
    color: rgba(200, 255, 220, 0.95);
    font-weight: 700;
}

.empleo-field .form-control.empleo-input,
.empleo-field .form-select.empleo-input {
    width: 100%;
    min-height: 2.875rem;
    padding: 0.65rem 0.95rem;
    font-size: 0.9375rem;
    color: var(--recruit-ink);
    background-color: #fafbfc;
    border: 1px solid var(--recruit-line);
    border-radius: var(--recruit-radius);
    box-shadow: inset 0 1px 2px rgba(12, 26, 46, 0.03);
    transition:
        border-color 0.25s var(--recruit-ease),
        box-shadow 0.25s var(--recruit-ease),
        background-color 0.25s ease,
        transform 0.2s var(--recruit-ease);
}

.empleo-field .form-control.empleo-input::placeholder,
.empleo-field .form-select.empleo-input {
    color: #94a3b8;
}

.empleo-field .form-select.empleo-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23006837' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 12px;
    appearance: none;
}

.empleo-field .form-control.empleo-input:hover,
.empleo-field .form-select.empleo-input:hover {
    border-color: rgba(12, 26, 46, 0.16);
    background-color: #fff;
}

.empleo-field .form-control.empleo-input:focus,
.empleo-field .form-select.empleo-input:focus {
    outline: none;
    border-color: rgba(0, 104, 55, 0.45);
    background-color: #fff;
    box-shadow: var(--recruit-shadow-focus);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .empleo-field .form-control.empleo-input:focus,
    .empleo-field .form-select.empleo-input:focus {
        transform: none;
    }
}

.empleo-field textarea.empleo-input {
    min-height: 6.5rem;
    resize: vertical;
    line-height: 1.55;
}

/* Errores Django */
.empleo-form .errorlist,
.empleo-field ul.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #b91c1c;
}

.empleo-field--error .form-control.empleo-input,
.empleo-field--error .form-select.empleo-input {
    border-color: rgba(185, 28, 28, 0.45);
    background-color: #fff5f5;
}

.empleo-field--error .form-control.empleo-input:focus,
.empleo-field--error .form-select.empleo-input:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.empleo-field__hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.68);
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.empleo-field__error {
    font-size: 0.8125rem;
    color: #fecaca;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    margin: 0.35rem 0 0;
    min-height: 0;
}

.empleo-field__error:empty {
    display: none;
}

/* —— Zona CV drag & drop —— */
.empleo-cv-zone {
    margin-top: 0.15rem;
}

.empleo-cv-zone__inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.empleo-cv-zone__drop {
    position: relative;
    min-height: 8.5rem;
    border-radius: var(--recruit-radius);
    border: 1.5px dashed rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    transition:
        border-color 0.3s var(--recruit-ease),
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.empleo-cv-zone__inner:hover .empleo-cv-zone__drop {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}

.empleo-cv-zone--drag .empleo-cv-zone__drop {
    border-color: rgba(255, 255, 255, 0.75);
    border-style: solid;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.empleo-cv-zone--has-file .empleo-cv-zone__drop {
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.14);
}

.empleo-cv-zone--error .empleo-cv-zone__drop {
    border-color: rgba(254, 202, 202, 0.85);
    background: rgba(127, 29, 29, 0.25);
}

.empleo-cv-zone__surface {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.35rem 1rem;
    pointer-events: none;
    gap: 0.35rem;
}

.empleo-cv-zone__surface i {
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
}

.empleo-cv-zone__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
}

.empleo-cv-zone__meta {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}

.empleo-cv-zone__drop > input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    font-size: 0;
}

.empleo-cv-zone__native {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.78);
}

.empleo-cv-zone__native p {
    margin: 0 0 0.35rem;
}

.empleo-cv-zone__native a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.empleo-cv-zone__native input[type="checkbox"] {
    margin-right: 0.35rem;
    accent-color: #fff;
}

.empleo-cv-zone__file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding: 0 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    word-break: break-word;
}

.empleo-cv-zone__file[hidden] {
    display: none !important;
}

.empleo-cv-zone__clear {
    pointer-events: auto;
    margin-top: 0.5rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.empleo-cv-zone__clear:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.22);
}

/* Botón enviar —— */
.btn-empleo-submit {
    position: relative;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.95rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #006837 !important;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    background: #fff;
    background-size: auto;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 6px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 0.25s var(--recruit-ease),
        box-shadow 0.25s ease,
        filter 0.2s ease,
        background 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .btn-empleo-submit:hover {
        transform: translateY(-2px);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.65) inset,
            0 12px 36px rgba(0, 0, 0, 0.22);
        filter: brightness(1.02);
        background: rgba(255, 255, 255, 0.98);
    }
}

.btn-empleo-submit:active {
    transform: translateY(0);
}

.btn-empleo-submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.85),
        0 0 0 5px #006837;
}

@media (prefers-reduced-motion: reduce) {
    .empleo-main__col--intro,
    .empleo-main__col--form {
        animation: none;
    }

    .btn-empleo-submit:hover {
        animation: none;
    }
}

/* —— Errores de validación (servidor) —— */
.empleo-form-alert {
    border-radius: var(--recruit-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(185, 28, 28, 0.22);
    color: #7f1d1d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.empleo-form-alert ul {
    margin: 0.35rem 0 0 1.1rem;
    padding: 0;
}
