:root {
    --primary-color: #0f172a; /* Slate 900 */
    --secondary-color: #334155; /* Slate 700 */
    --accent-color: #3b82f6; /* Blue 500 */
    --accent-hover: #2563eb; /* Blue 600 */
    --background-color: #f8fafc; /* Slate 50 */
    --surface-color: #ffffff;
    --text-color: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --success-color: #10b981; /* Emerald 500 */
    --danger-color: #ef4444; /* Red 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 40px 0;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5em;
}

/* Form Container */
.form-container {
    background-color: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Header Section */
.university-logo {
    max-height: 90px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.university-logo:hover {
    transform: scale(1.05);
}

.header-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section Titles */
.section-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; /* Will be adjusted by dir="rtl" automatically or handled by CSS logic */
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}

[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

/* Form Controls */
.form-label {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.required:after {
    content: " *";
    color: var(--danger-color);
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: rgba(59, 130, 246, 0.05);
    color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -50%;
    width: 100%;
    height: 3px;
    background-color: var(--border-color);
    z-index: -1;
}

.step:first-child::before {
    display: none;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active .step-circle {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.step.completed .step-circle {
    border-color: var(--success-color);
    background-color: var(--success-color);
    color: white;
}

.step-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.step.active .step-title {
    color: var(--accent-color);
    font-weight: 700;
}

/* College & Specialization Selection */
.college-specialization {
    background-color: #f1f5f9;
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.college-option {
    cursor: pointer;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.college-option:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

[dir="rtl"] .college-option:hover {
    transform: translateX(-5px);
}

.college-option.selected {
    border-color: var(--accent-color);
    background-color: #eff6ff;
}

.college-option h6 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.specialization-options {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.specialization-option {
    display: block;
    margin-bottom: 8px;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: var(--secondary-color);
    border: 1px solid transparent;
}

.specialization-option:hover {
    background-color: #f8fafc;
    color: var(--accent-color);
}

.specialization-option.selected {
    background-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Language Toggle */
.lang-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

[dir="rtl"] .lang-toggle {
    left: 20px;
    right: auto;
}

[dir="ltr"] .lang-toggle {
    right: 20px;
    left: auto;
}

/* Utilities */
.hidden-section {
    display: none;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-custom {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        padding: 25px;
        border-radius: var(--radius-lg);
    }

    .step-title {
        font-size: 0.75rem;
        display: none; /* Hide titles on very small screens if needed, or keep */
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .step::before {
        top: 16px;
    }
}
