.page-header {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.form-section {
    padding: 0 1.5rem 4rem;
}

.form-container {
    max-width: 850px;
    margin: 0 auto;
}

#candidature-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group-card {
    background: #ffffff;
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease, border-color 0.4s ease;
}

.form-group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 78, 255, 0.08);
    border-color: rgba(0, 78, 255, 0.2);
}

.form-group-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 1rem;
    letter-spacing: -0.5px;
}

.form-group-card h3 .material-icons-outlined {
    color: var(--accent);
    font-size: 2rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.input-wrapper:last-child {
    margin-bottom: 0;
}

.input-wrapper label {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
}

.helper-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 1.2rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.helper-text strong {
    color: var(--accent);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 1.05rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 78, 255, 0.1);
}

textarea {
    resize: vertical;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.8rem;
}

.radio-container {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    cursor: pointer;
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.radio-container:hover {
    background: #ffffff;
    border-color: rgba(0, 78, 255, 0.4);
}

.radio-container input {
    display: none;
}

.radio-mark {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.radio-container input:checked + .radio-mark {
    border-color: var(--accent);
}

.radio-container input:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.radio-container span:last-child {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.radio-container input:checked ~ span:last-child {
    color: var(--text-main);
    font-weight: 500;
}

.radio-container:has(input:checked) {
    border-color: var(--accent);
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 78, 255, 0.06);
}

.program-selection-group .radio-container div strong {
    display: block;
    color: var(--text-main);
    font-size: 1.1rem;
}

.captcha-card {
    border-left: 6px solid var(--accent);
}

.captcha-wrapper {
    max-width: 300px;
}

.math-numbers {
    color: var(--accent);
    font-weight: 800;
    font-size: 1.3rem;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer .btn {
    width: 100%;
    max-width: 400px;
    font-size: 1.1rem;
    padding: 1.2rem 2rem;
}

@media (max-width: 768px) {
    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group-card {
        padding: 2rem 1.5rem;
    }

    .form-group-card h3 {
        font-size: 1.3rem;
    }
}

.honeypot-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}

.captcha-card.has-error {
    border-color: #ff3b30;
    box-shadow: 0 10px 30px rgba(255, 59, 48, 0.1);
}

.captcha-card.has-error input {
    border-color: #ff3b30;
    background-color: #fff9f9;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #ff3b30;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
    animation: fadeInError 0.3s ease;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}