@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --primary-color: #3a7bd5;
    --secondary-color: #00d2ff;
    --dark-color: #121212;
    --light-color: #1e1e1e;
    --text-color: #f5f5f5;
    --text-light: #b0b0b0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #002142;
    --light-color: #ecf0f1;
    --text-color: #333;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    /*font-family: "Amiri", serif;*/
    font-family: "Amiri", serif;
    color: var(--text-color);
    background-color: var(--light-color);
    transition: var(--transition);
    line-height: 1.6;
    text-align: right;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    font-size: 1.8rem;
}

.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 15px auto;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Header Styles */
header {
    background-color: var(--dark-color);
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    width: 50px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 5px;
    justify-content: space-between;
}

.theme-toggle i {
    font-size: 12px;
    color: white;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    right: 2px;
    transition: var(--transition);
}

[data-theme="dark"] .theme-toggle::after {
    right: calc(100% - 23px);
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-top: 15px;
}

nav ul li a {
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

nav ul li a i {
    font-size: 0.9rem;
}

.hero {
    height: 500px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/lycee.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: white;
    margin-top: 90px;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

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

/* About Section */
.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-image {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.03);
}

.image-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.about-image:hover .image-overlay {
    opacity: 1;
}

.zoom-btn {
    background-color: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.zoom-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.about-text {
    flex: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
}

/* Departments Section */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.department-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.department-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.department-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.grade-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

/* Results Section */
.results-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.grades-chart {
    width: 100%;
    height: 300px;
    margin: 30px 0;
    position: relative;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.results-cta {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-date {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.news-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.news-date .month {
    font-size: 0.9rem;
    text-transform: uppercase;
}

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

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.news-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more i {
    font-size: 0.8rem;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col p, .footer-col a {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    display: block;
}

.footer-col a:hover {
    color: white;
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.map-link {
    margin-top: 20px;
}

.map-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 90px);
        background-color: var(--dark-color);
        transition: var(--transition);
        padding: 20px;
        overflow-y: auto;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero {
        margin-top: 80px;
        height: 400px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .tagline {
        font-size: 0.8rem;
    }
    
    .hero {
        height: 350px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}