/* ============================================================
   Apply Now Page — SCHOLARiQ Premium Design
   ============================================================ */

/* FOUC Prevention */
.apply-now-wrapper {
    opacity: 0;
    animation: applyPageFadeIn 0.25s ease-out forwards;
    animation-delay: 0.02s;
}

@keyframes applyPageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.apply-now-wrapper {
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    padding: 48px 16px;
}

.apply-now-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.13);
    min-height: 640px;
}

/* ── Hero Panel ── */
.apply-hero-panel {
    background: linear-gradient(155deg, #1d2330 0%, #2b3245 55%, #1a1f2d 100%);
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.apply-hero-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(184, 134, 11, 0.14) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.apply-hero-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.09) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.apply-hero-content {
    position: relative;
    z-index: 1;
}

.apply-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #D4AF37;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 22px;
}

.apply-hero-title {
    font-family: 'Cardo', serif;
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 16px;
}

.apply-gold {
    color: #D4AF37;
}

.apply-hero-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.75;
    margin-bottom: 32px;
}

/* ── Feature Items ── */
.apply-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.apply-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.apply-feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4AF37;
    font-size: 15px;
}

.apply-feature-item h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}

.apply-feature-item p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.58);
    margin: 0;
    line-height: 1.55;
}

.apply-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(184, 134, 11, 0.38);
}

.apply-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(184, 134, 11, 0.48);
}

/* ── Form Panel ── */
.apply-form-panel {
    background: #ffffff;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apply-form-header {
    margin-bottom: 28px;
}

.apply-form-header h2 {
    font-family: 'Cardo', serif;
    font-size: 28px;
    font-weight: 700;
    color: #1d2330;
    margin-bottom: 6px;
}

.apply-form-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Course Badge Pill for pre-filled course */
.course-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.08) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    padding: 10px 20px;
    margin-top: 16px;
    font-size: 13px;
    color: #1d2330;
}

.course-badge-pill i {
    color: #B8860B;
    font-size: 14px;
}

.course-badge-pill strong {
    color: #1d2330;
    font-weight: 700;
}

/* ── Field Groups ── */
.apply-field-group {
    margin-bottom: 20px;
}

.apply-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.apply-input,
.apply-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1d2330;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.apply-input:focus,
.apply-select:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.13);
    background: #fff;
}

/* Disabled state for inputs */
.apply-input:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #d1d5db;
}

/* ── Phone Row ── */
.apply-phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.apply-select-cc {
    width: 110px;
    flex-shrink: 0;
}

.apply-input-phone {
    flex: 1;
}

/* ── Validation ── */
.apply-validation {
    display: block;
    font-size: 12px;
    color: #e53935;
    margin-top: 5px;
}

/* ── Error Alert ── */
.apply-alert-error {
    background: #fff2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Submit Button ── */
.apply-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.32);
    margin-top: 8px;
    text-decoration: none;
}

.apply-submit-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(184, 134, 11, 0.42);
}

.apply-submit-btn:disabled {
    opacity: 0.60;
    cursor: not-allowed;
}

/* ── Success Card ── */
.apply-success-card {
    text-align: center;
    padding: 16px 0;
}

.apply-success-icon {
    font-size: 60px;
    color: #22c55e;
    margin-bottom: 18px;
    line-height: 1;
}

.apply-success-card h2 {
    font-family: 'Cardo', serif;
    font-size: 26px;
    font-weight: 700;
    color: #1d2330;
    margin-bottom: 10px;
}

.apply-success-card p {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* ── Security Features (Honeypot & reCAPTCHA) ── */

/* Honeypot field - hidden from real users */
.apply-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    display: none !important;
    height: 0;
    width: 0;
    overflow: hidden;
}

.apply-honeypot input {
    display: none !important;
    visibility: hidden !important;
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* reCAPTCHA Notice */
.apply-recaptcha-notice {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
    background: rgba(15, 23, 42, 0.03);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.apply-recaptcha-notice i {
    margin-right: 4px;
    color: #10b981;
}

.apply-recaptcha-notice a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.apply-recaptcha-notice a:hover {
    text-decoration: underline;
}

/* ── Form Validation & Hints ── */

/* Required field indicator */
.apply-required {
    color: #ef4444;
    font-weight: 600;
    margin-left: 2px;
}

/* Validation hint messages */
.apply-hint {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.4;
}

.apply-hint {
    color: #059669;
    background: rgba(16, 185, 129, 0.08);
    border-left: 2px solid #10b981;
}

.apply-input:focus,
.apply-input:valid {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.02);
}

.apply-input.invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.02);
}

/* Validation error messages */
.apply-validation {
    display: block;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 3px;
    border-left: 2px solid #dc2626;
}

/* ── CAPTCHA Security Question ── */
.apply-captcha-box {
    border: 2px solid #10b981;
    padding: 16px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.01) 100%);
    margin-top: 8px;
}

.apply-captcha-box:focus-within {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.apply-captcha-question {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 12px;
    padding: 6px 0;
}

.apply-captcha-question i {
    font-size: 16px;
}

.apply-captcha-box input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.apply-captcha-box input[type="number"]:focus {
    outline: none;
    border-color: #10b981;
    background: #f0fdf4;
}

.apply-captcha-hint {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 400;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .apply-now-container {
        grid-template-columns: 1fr;
    }

    .apply-hero-panel {
        padding: 40px 28px;
    }

    .apply-form-panel {
        padding: 40px 28px;
    }
}

@media (max-width: 480px) {
    .apply-now-wrapper {
        padding: 0;
        background: #fff;
    }

    .apply-now-container {
        border-radius: 0;
        box-shadow: none;
    }

    .apply-hero-panel,
    .apply-form-panel {
        padding: 32px 20px;
    }

    .apply-hero-title {
        font-size: 24px;
    }
}
