* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-color: #334155;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    color: var(--text-color);
    line-height: 1.8;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: rgba(0,0,0,0.2);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.school-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.school-title h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.school-title p {
    font-size: 0.95rem;
    opacity: 0.9;
}

nav {
    padding: 0 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    justify-content: center;
}

nav ul li {
    flex: 1;
}

nav ul li a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 1.2rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-align: center;
}

nav ul li a:hover,
nav ul li a.active {
    background: rgba(255,255,255,0.15);
    border-bottom-color: var(--accent-color);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Page */
.hero {
    background: linear-gradient(135deg, var(--white) 0%, #e0f2fe 100%);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    font-size: 1.8rem;
}

.news-item {
    padding: 1rem;
    border-right: 3px solid var(--secondary-color);
    background: var(--light-bg);
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.news-item:hover {
    background: #fff;
    border-right-color: var(--accent-color);
}

.news-date {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.schedule-table th,
.schedule-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.schedule-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
}

.schedule-table tr:hover {
    background: var(--light-bg);
}

/* Departments Page */
.department-card {
    background: linear-gradient(135deg, var(--white) 0%, #f0f9ff 100%);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-right: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.department-card:hover {
    transform: translateX(-10px);
    border-right-color: var(--accent-color);
}

.department-card h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.subject-tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.subject-tag:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Staff Page */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.staff-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.staff-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.staff-photo {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
    font-weight: 800;
}

.staff-info {
    padding: 1.5rem;
    text-align: center;
}

.staff-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.staff-role {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.staff-subject {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Students Page */
.students-intro {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
}


.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.student-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-top: 3px solid var(--secondary-color);
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.student-id {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.student-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.student-class {
    color: var(--primary-color);
    font-weight: 600;
}

/* Page Titles */
.page-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.page-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer p {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .school-title h1 {
        font-size: 1.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}