body {
    box-sizing: border-box;
    background: #ffffff;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.enrollment-wrapper {
    min-height: 100%;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    margin: 20px auto;
}

.form-header {
    background: linear-gradient(135deg, #800000 0%, #a00000 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative;
}

.header-logo {
    width: 40%;
    height: auto;
}

.form-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.form-header p {
    margin: 10px 0 0;
    opacity: 0.95;
    font-size: 1rem;
}

.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    position: relative;
    padding: 0 20px;
}

.step-progress::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 0;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 20px;
    height: 3px;
    background: white;
    z-index: 1;
    transition: width 0.4s ease;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-item.active .step-circle {
    background: white;
    color: #800000;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.step-item.completed .step-circle {
    background: #4caf50;
    color: white;
    border-color: white;
}

.step-item.completed .step-circle::before {
    content: "✓";
}

.step-title {
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.step-item.active .step-title {
    color: white;
    font-weight: 600;
}

.form-content {
    padding: 50px 40px;
}

.section-step {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.section-step.active {
    display: block;
}

.arabic-text {
    font-size: 1.2rem;
    text-align: right;
    direction: rtl;
    margin-bottom: 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: #800000;
    font-size: 1.5rem;
}

.section-subtitle {
    color: #718096;
    margin-bottom: 35px;
    font-size: 1rem;
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required-asterisk {
    color: #e53e3e;
    margin-left: 3px;
}

.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #800000;
    box-shadow: 0 0 0 4px rgba(128, 0, 0, 0.1);
    outline: none;
}

.form-control.is-invalid {
    border-color: #e53e3e;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.form-check {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f7fafc;
}

.form-check:hover {
    border-color: #800000;
    background: #f8f0f0;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0;
    cursor: pointer;
    border: 2px solid #cbd5e0;
}

.form-check-input:checked {
    background-color: #800000;
    border-color: #800000;
}

.form-check-label {
    cursor: pointer;
    margin-left: 10px;
    font-weight: 500;
    color: #4a5568;
}

.select2-container--bootstrap-5 .select2-selection {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    min-height: 48px;
    padding: 4px 8px;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #800000;
    box-shadow: 0 0 0 4px rgba(128, 0, 0, 0.1);
}

.code-input-wrapper {
    margin-top: 25px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 200px;
    }
}

.social-media-field {
    animation: slideDown 0.4s ease;
}

.info-box {
    background: #ebf4ff;
    border-left: 4px solid #4299e1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-box p {
    margin: 0;
    color: #2c5282;
    line-height: 1.6;
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.btn-custom {
    padding: 14px 35px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-prev {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-prev:hover {
    background: #cbd5e0;
    transform: translateX(-3px);
}

.btn-next {
    background: linear-gradient(135deg, #800000 0%, #a00000 100%);
    color: white;
    margin-left: auto;
}

.btn-next:hover {
    transform: translateX(3px);
    box-shadow: 0 10px 25px rgba(128, 0, 0, 0.4);
}

.btn-submit {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-submit:hover {
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.4);
    transform: translateY(-2px);
}

.success-message {
    text-align: center;
    padding: 60px 30px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: white;
    font-size: 3.5rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h2 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 15px;
}

.success-message p {
    color: #718096;
    font-size: 1.1rem;
}

.alert-validation {
    animation: shake 0.5s ease;
    margin-top: 20px;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@media (max-width: 768px) {
    .form-content {
        padding: 30px 20px;
    }

    .form-header {
        padding: 30px 20px;
    }

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

    .step-progress {
        padding: 0 5px;
        gap: 8px;
    }

    .step-progress::before {
        display: none;
    }

    .progress-line {
        display: none;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .step-title {
        font-size: 0.65rem;
        margin-top: 5px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .button-group {
        flex-direction: row;
    }

    .btn-custom {
        flex: 1;
        justify-content: center;
    }

    .header-logo {
        width: 80%;
        height: auto;
    }
}
