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

body {
    background-color: var(--background-color);
    color: var(--heading-h1-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.application-form {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 40px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-content {
    flex: 1;
    padding: 20px;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 
                0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    max-width: 400px;
    width: 90%;
}

.popup.show {
    display: block;
}

.popup-icon {
    font-size: 60px;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: bounce 0.8s ease-in-out;
}

.popup-message {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 30px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
}

.popup-button {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-button:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(3px);
}

@keyframes slideIn {
    0% {
        transform: translate(-50%, -70%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .popup {
        padding: 30px 25px;
        margin: 0 20px;
    }
    
    .popup-message {
        font-size: 22px;
    }
    
    .popup-icon {
        font-size: 50px;
    }
}

@keyframes slideIn {
    0% {
        transform: translate(-50%, -70%);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.childDetails {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
}

.application-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.required::after {
    content: " *";
    color: #dc3545;
}

.application-form input[type="date"] {
    position: relative;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    color: var(--text-color);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 25px;
}

.application-form input[type="date"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 154, 213, 0.15);
    background-color: #fafbfc;
}

.application-form input[type="date"]:hover {
    border-color: #bbb;
    background-color: #f8f9fa;
}

.application-form input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23349ad5'%3e%3cpath fill-rule='evenodd' d='M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-size: 20px 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.application-form input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(52, 154, 213, 0.1);
}

.application-form input[type="date"]:required {
    border-left: 3px solid #ff6b6b;
}

.application-form input[type="date"]:required:valid {
    border-left: 3px solid #51cf66;
}

.application-form input[type="text"],
.application-form input[type="tel"],
.application-form input[type="email"],
.application-form select,
.application-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.application-form input:focus,
.application-form select:focus,
.application-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(52, 154, 213, 0.2);
}

.application-form input[type="radio"] {
    margin-right: 8px;
    margin-bottom: 20px;
}

.application-form input[type="radio"] + label {
    display: inline-block;
    margin-right: 20px;
}

.radio-group {
    margin: 15px 0;
}



.application-form input[type="checkbox"] {
    margin-right: 8px;
}

.application-form button {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.application-form button:hover {
    background-color: #2980b9;
}

.application-form h1 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 10px;
    text-align: center;
}

.application-form h2 {
    color: var(--accent-color);
    font-size: 1.5em;
    margin-bottom: 30px;
    text-align: center;
}

.application-form h3 {
    color: var(--primary-color);
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.course-details {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent-color);
}

.language-proficiency {
    margin: 30px 0;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.language-proficiency table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.language-proficiency th,
.language-proficiency td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.language-proficiency th {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .application-form {
        margin: 40px 20px;
        padding: 20px;
    }

    .application-form h1 {
        font-size: 1.8em;
        padding-top: 80px;
    }

    .application-form h2 {
        font-size: 1.3em;
    }

    .language-proficiency {
        overflow-x: auto;
    }

    .language-proficiency table {
        min-width: 500px;
    }

    .course-details {
        padding: 15px;
    }

    .course-details ul {
        padding-left: 15px;
    }
}
.application-form .payment-method {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.application-form .payment-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.application-form .payment-option {
    position: relative;
}

.application-form .bank-details {
    margin-top: 10px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
}

.application-form .detail {
    display: block;
    margin-bottom: 5px;
}

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

.arabic-knowledge-section {
    margin: 20px 0;
}

.arabic-knowledge-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.knowledge-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.knowledge-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.knowledge-option label {
    margin: 0;
    font-weight: normal;
}


.checkbox-container {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
input:required, select:required, textarea:required {
    border-left: 2px solid #ff0000;
}

input:required:valid, select:required:valid, textarea:required:valid {
    border-left: 2px solid #00ff00;
}

.error-message {
    font-size: 0.9em;
    margin-top: 5px;
}