/* =========================================================================
   Application form styles (shared by hero card and standalone page).
   ========================================================================= */

.apply-form { display: grid; gap: 16px; }

.apply-form__head { margin-bottom: 4px; }
.apply-form__title { font-size: 1.5rem; letter-spacing: -0.01em; }
.apply-form__subtitle { color: var(--text-muted); font-size: 0.94rem; margin-top: 6px; }

.apply-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.apply-form__field { display: flex; flex-direction: column; gap: 7px; }
.apply-form__field label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}
.apply-form__optional { color: var(--text-dim); font-weight: 400; }

.apply-form input,
.apply-form select,
.apply-form textarea {
    width: 100%;
    padding: 13px 15px;
    background: rgba(18, 24, 38, 0.03);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.96rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.apply-form textarea { resize: vertical; min-height: 84px; }

.apply-form input::placeholder,
.apply-form textarea::placeholder { color: var(--text-dim); }

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.15);
}

.apply-form select option { color: #111; }

.apply-form input.is-invalid,
.apply-form select.is-invalid,
.apply-form textarea.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.2);
}

.apply-form__error {
    color: var(--accent);
    font-size: 0.8rem;
    min-height: 0;
    display: none;
}
.apply-form__error.is-shown { display: block; }

.apply-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.78rem;
    line-height: 1.4;
    cursor: pointer;
}
.apply-form__consent input {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--red);
    flex: none;
}

/* Honeypot stays visually hidden but present in DOM. */
.apply-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.apply-form__submit { position: relative; margin-top: 4px; }
.apply-form__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: applySpin 0.7s linear infinite;
}
.apply-form.is-loading .apply-form__spinner { display: inline-block; }
.apply-form.is-loading .apply-form__submit { opacity: 0.85; pointer-events: none; }
@keyframes applySpin { to { transform: rotate(360deg); } }

.apply-form__note {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.apply-form__status {
    display: none;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    border: 1px solid transparent;
}
.apply-form__status.is-success {
    display: block;
    background: rgba(22, 163, 106, 0.12);
    border-color: rgba(22, 163, 106, 0.45);
    color: #0f7a4d;
}
.apply-form__status.is-error {
    display: block;
    background: rgba(227, 6, 19, 0.10);
    border-color: rgba(227, 6, 19, 0.4);
    color: var(--accent);
}

/* ---------- Standalone apply page layout ---------- */
.apply-page__grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(30px, 5vw, 64px);
    align-items: start;
}
.apply-page__steps-title { font-size: 1.4rem; margin-bottom: 24px; }

.steps { display: grid; gap: 22px; counter-reset: step; }
.steps__item { display: flex; gap: 18px; align-items: flex-start; }
.steps__num {
    flex: none;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.9), var(--red-600));
    font-family: var(--font-head);
    font-weight: 800;
    color: #fff;
}
.steps__title { font-size: 1.1rem; margin-bottom: 4px; }
.steps__text { color: var(--text-muted); font-size: 0.94rem; }

.apply-page__card {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 3vw, 38px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: calc(var(--header-h) + 20px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .apply-page__grid { grid-template-columns: 1fr; }
    .apply-page__card { position: static; }
}
@media (max-width: 520px) {
    .apply-form__row { grid-template-columns: 1fr; }
}
