/* ----------------------------------------------------
   STUDENT EXCHANGE PROGRAM - DEDICATED STYLESHEET
   ---------------------------------------------------- */

:root {
    /* Color Palette */
    --primary-color: #1e3a8a;       /* Deep Sapphire Navy */
    --primary-hover: #2563eb;       /* Electric Royal Blue */
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
    --accent-teal: #0d9488;         /* Emerald Teal */
    --accent-emerald: #10b981;
    --accent-amber: #d97706;
    --accent-sky: #0284c7;
    --bg-main: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 35px -4px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 45px -8px rgba(0, 0, 0, 0.18);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --danger-color: #ef4444;
    --success-color: #10b981;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    padding: 0 0 40px 0;
    position: relative;
}

/* Dedicated Global Exchange Background */
.background-decor {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: url('exchange_bg.jpg') center/cover no-repeat fixed;
}

/* Sticky Completion Progress Bar */
.sticky-progress-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.progress-bar-wrapper {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #0d9488, #10b981);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.progress-percentage {
    background: #eff6ff;
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

/* Layout Container */
.container {
    max-width: 1050px;
    width: 100%;
    margin: 25px auto 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Glassmorphism Header Banner */
.form-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    color: var(--text-main);
    border-radius: var(--radius-lg);
    padding: 35px 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    width: 100%;
}

.header-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Logo (Clean & Large) */
.logo-wrapper-centered {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    margin-bottom: 14px;
    border: none;
    max-width: 100%;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-badge-wrapper {
    margin-bottom: 10px;
}

.badge-glow {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #bfdbfe;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.subtitle.centered {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 650px;
    margin: 0 auto 18px auto;
}

.header-meta.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    width: 100%;
    max-width: 550px;
}

.meta-pill {
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

/* Form Card Sections */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
    width: 100%;
}

.step-num {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    flex: 0 0 38px !important;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 1.05rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0 !important;
}

.section-title > div {
    min-width: 0;
    flex: 1 1 auto;
}

.section-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -0.3px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3px;
}

/* Form Grid & Inputs */
.form-grid {
    display: grid;
    gap: 18px;
    width: 100%;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.span-2 { grid-column: span 2; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

label {
    font-weight: 600;
    font-size: 0.91rem;
    color: #1e293b;
}

label.required::after {
    content: " *";
    color: var(--danger-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 11px 14px;
    font-size: 0.94rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.input-icon-wrapper input {
    padding-left: 38px;
    width: 100%;
    box-sizing: border-box;
}

/* Custom Pill Option Cards */
.option-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.pill-option-card {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pill-option-card:hover {
    border-color: var(--primary-hover);
    background: #f8fafc;
}

.pill-option-card input[type="radio"],
.pill-option-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.pill-option-card span {
    font-size: 0.93rem;
    font-weight: 600;
    color: #334155;
}

.pill-option-card input:checked + span {
    color: var(--primary-color);
    font-weight: 800;
}

.pill-option-cardHasChecked {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Submit Action Bar */
.submit-action-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    width: 100%;
}

.btn-submit {
    position: relative;
    background: var(--primary-gradient);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 16px 44px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.35);
    transition: all 0.25s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.45);
}

.btn-submit:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.form-status-msg {
    width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: 0.94rem;
    border-radius: var(--radius-sm);
}

.form-status-msg.success {
    color: #15803d;
    background: #dcfce7;
    padding: 12px 18px;
    border: 1px solid #86efac;
}

.form-status-msg.error {
    color: #b91c1c;
    background: #fee2e2;
    padding: 12px 18px;
    border: 1px solid #fca5a5;
}

/* Footer */
.form-footer {
    text-align: center;
    color: #ffffff;
    font-size: 0.88rem;
    margin-top: 40px;
    padding-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.form-footer a {
    color: #bfdbfe;
    text-decoration: underline;
    font-weight: 700;
}

/* Utilities */
.text-orange { color: #ea580c; }
.text-red { color: #dc2626; }
.text-blue { color: #2563eb; }
.text-sky { color: #0284c7; }
.text-emerald { color: #059669; }
.text-amber { color: #d97706; }
.text-indigo { color: #4f46e5; }
.text-xs { font-size: 0.76rem; }
.text-sm { font-size: 0.84rem; }
.text-gray { color: var(--text-muted); }
.mt-3 { margin-top: 10px; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
        margin-top: 15px;
    }

    .form-header {
        padding: 24px 16px;
        border-radius: 16px;
        margin-bottom: 18px;
    }

    .logo-wrapper-centered {
        width: 130px;
        height: 130px;
        margin-bottom: 10px;
    }

    .form-header h1 {
        font-size: 1.6rem;
    }

    .subtitle.centered {
        font-size: 0.92rem;
        margin-bottom: 14px;
    }

    .header-meta.centered {
        flex-direction: column;
        gap: 8px;
        padding-top: 12px;
    }

    .meta-pill {
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
    }

    .card {
        padding: 20px 14px;
        border-radius: 14px;
        margin-bottom: 18px;
    }

    .cols-2 {
        grid-template-columns: 100%;
    }

    .span-2 {
        grid-column: span 1;
    }

    .btn-submit {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
        font-size: 1.05rem;
        border-radius: 30px;
    }

    .option-group-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .option-group-grid {
        grid-template-columns: 100%;
    }
}
