/* Importing Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

/* General Body and Typography */
body {
    font-family: 'Cairo', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    transition: background-color 0.4s, color 0.4s;
    direction: rtl; /* Ensure RTL for Arabic content */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    transition: color 0.4s;
}

/* Header Section */
.hero-header {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: #fff;
    padding: 6rem 0;
    border-radius: 0 0 50px 50px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Adjusting H1 size using a media query for smaller screens */
.hero-header h1 {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
}

@media (max-width: 768px) {
    .hero-header h1 {
        font-size: 1.5rem; /* تم تصغير الحجم بشكل أكبر */
    }
}

.hero-header p {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Card and Form Design */
.card {
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.form-label {
    font-weight: 600;
    color: #555;
}

.form-control, .form-select {
    border-radius: 0.75rem;
    border-color: #e0e0e0;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(26, 188, 156, 0.25);
    border-color: #1abc9c;
}

.btn-success {
    background-color: #27ae60;
    border-color: #27ae60;
    font-weight: bold;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    transition: background-color 0.3s ease-in-out, transform 0.2s;
}

.btn-success:hover {
    background-color: #2ecc71;
    border-color: #2ecc71;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* Image Display Section */
.exam-img {
    width: 100%;
    max-width: 900px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
}

.exam-img:hover {
    transform: scale(1.02);
}

/* Footer Section */
.footer {
    background-color: #fff;
    color: #777;
    padding: 2.5rem;
    margin-top: 5rem;
    border-top: 1px solid #eee;
    text-align: center;
    border-radius: 50px 50px 0 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}

/* Dark Mode - Overrides */
.dark-mode {
    background-color: #1a1a2e;
    color: #f4f4f4;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
    color: #e0e0e0;
}

.dark-mode .hero-header {
    background: linear-gradient(135deg, #1f4068, #162447);
}

.dark-mode .card, .dark-mode .footer {
    background-color: #27273d !important;
    color: #ddd !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dark-mode .form-label {
    color: #bbb;
}

.dark-mode .form-control, .dark-mode .form-select {
    background-color: #30304a;
    color: #e0e0e0;
    border-color: #444;
}

.dark-mode .btn-success {
    background-color: #38a3a5;
    border-color: #38a3a5;
}

.dark-mode .btn-success:hover {
    background-color: #57d1d3;
}

.dark-mode .btn-primary {
    background-color: #5585b5;
    border-color: #5585b5;
}

.dark-mode .btn-primary:hover {
    background-color: #6a9bdc;
}

.dark-mode img {
    filter: brightness(0.9) contrast(1.1);
    border-color: #333;
}