/* ===== Base Styles ===== */
:root {
    --primary-color: #1E40AF;
    --primary-light: #3B82F6;
    --primary-dark: #1E3A8A;
    --accent-color: #D97706;
    --accent-light: #F59E0B;
    --success-color: #059669;
    --warning-color: #D97706;
    --error-color: #DC2626;
    --light-color: #F3F4F6;
    --dark-color: #1F2937;
    --gray-100: #F9FAFB;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-100);
    direction: rtl;
}

/* ===== Layout Styles ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-header {
    margin-bottom: 2rem;
}

/* School Info Styles */
.school-info {
    text-align: center;
    padding: 1rem 0;
    background-color: white;
}

.school-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
}

.school-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.school-info h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--gray-600);
}

.school-info p {
    font-size: 1rem;
    color: var(--gray-600);
}

/* Logo Styles */
.logo-container {
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    background-color: white;
}

.school-logo {
    height: 200px;
    object-fit: contain;
}

/* Cover Styles */
.cover-container {
    height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== Search Results Styles ===== */
.search-results {
    margin-top: 1.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.student-result {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.student-result:last-child {
    border-bottom: none;
}

.student-result:hover {
    background-color: var(--gray-100);
}

.student-name {
    font-weight: 500;
    color: var(--gray-800);
}

.student-class {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--gray-600);
}

/* ===== Form Styles ===== */
.search-section {
    margin-bottom: 2rem;
}

.search-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.search-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ===== Loading Indicator ===== */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Error Message ===== */
.error-message {
    color: var(--error-color);
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    display: none;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    color: var(--gray-600);
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .school-info h1 {
        font-size: 1.5rem;
    }
    
    .school-info h2 {
        font-size: 1.2rem;
    }
    
    .school-info h3 {
        font-size: 1rem;
    }
    
    .cover-container {
        height: 300px;
    }
    
    .search-card {
        padding: 1.5rem;
    }
    
    .student-result {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .student-class {
        margin-top: 0.25rem;
    }
}

@media (max-width: 480px) {
    .school-logo {
        height: 60px;
    }
    
    .school-info h1 {
        font-size: 1.2rem;
    }
    
    .school-info h2 {
        font-size: 1rem;
    }
    
    .school-info h3 {
        font-size: 0.9rem;
    }
    
    .cover-container {
        height: 200px;
    }
    
    .search-card {
        padding: 1rem;
    }
}