@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7c3aed;
    --secondary-color: #06b6d4;
    --accent-color: #f97316;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #facc15;
    --dark-color: #0f172a;
    --light-color: #f4f6fb;
    --white: #ffffff;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 35px 80px rgba(15, 23, 42, 0.2);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f8fbff 0%, #edf2ff 50%, #f5f3ff 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(10px);
}

body::before {
    top: -120px;
    left: -80px;
}

body::after {
    bottom: -160px;
    right: -60px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12), transparent 70%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

main, header, section, footer {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-color);
    letter-spacing: 0.02em;
}

.logo i {
    font-size: 2.1rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s, transform 0.3s;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.admin-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white) !important;
    padding: 0.55rem 1.75rem !important;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 12px 25px rgba(124, 58, 237, 0.25);
    transition: transform 0.3s, box-shadow 0.3s;
}

.admin-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 35px rgba(6, 182, 212, 0.25);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(6, 182, 212, 0.9));
    color: var(--white);
    padding: 7rem 2rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 50px 120px rgba(79, 70, 229, 0.35);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
    z-index: 1;
}

.hero::before {
    top: -120px;
    left: -80px;
}

.hero::after {
    bottom: -140px;
    right: -100px;
    background: radial-gradient(circle, rgba(248, 250, 252, 0.2), transparent 65%);
}

.hero h1 {
    font-family: 'Playfair Display', 'Inter', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    animation: fadeInUp 0.8s;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1.2s;
    flex-wrap: wrap;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.hero-wave svg {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.25rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 25px 40px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.75);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* Hero section buttons - make btn-secondary same as btn-primary (white bg, purple text) */
.hero .btn-secondary,
.hero-buttons .btn-secondary,
.hero-content .btn-secondary,
.hero a.btn-secondary {
    background: var(--white) !important;
    color: #7c3aed !important;
    border: none !important;
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.25) !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

.hero .btn-secondary:hover,
.hero-buttons .btn-secondary:hover,
.hero-content .btn-secondary:hover,
.hero a.btn-secondary:hover {
    background: var(--white) !important;
    color: #7c3aed !important;
    transform: translateY(-3px) scale(1.01) !important;
    box-shadow: 0 25px 40px rgba(255, 255, 255, 0.3) !important;
}

/* Fix btn-secondary color on white backgrounds */
.login-box .btn-secondary,
.admin-body .btn-secondary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.login-box .btn-secondary:hover,
.admin-body .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Stats Section */
.stats {
    padding: 3rem 0;
    background: transparent;
}

.stats .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2.2rem;
    background: var(--white);
    border-radius: 20px;
    transition: all 0.35s;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.stat-item:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.stat-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Section Styles */
section {
    padding: 5rem 0;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), 
                box-shadow 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                border-radius 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-radius: 0;
    transform-style: preserve-3d;
    perspective: 1000px;
}

section:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 30px 80px rgba(15, 23, 42, 0.2),
        0 15px 40px rgba(124, 58, 237, 0.15),
        0 0 0 1px rgba(124, 58, 237, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    z-index: 10;
}

/* Removed aggressive section hover effect */

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.section-description {
    color: #64748b;
    max-width: 640px;
    margin: 0.5rem auto 0;
    font-size: 1.05rem;
}

.slider-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    text-align: left;
}

.slider-header-text h2 {
    margin-bottom: 0.75rem;
}

.slider-header-text .section-description {
    max-width: 600px;
}

.slider-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--dark-color);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.slider-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
}

.slider-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.slider-window {
    overflow: hidden;
    width: 100%;
}

.slider-track {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 1.5rem;
    transition: transform 0.45s ease;
    will-change: transform;
}

.slider-track .news-card,
.slider-track .gallery-item,
.slider-track .teacher-card {
    flex: 0 0 calc((100% - 3rem) / 3);
}

@media (max-width: 1024px) {
    .slider-track .news-card,
    .slider-track .gallery-item,
    .slider-track .teacher-card {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }
}

@media (max-width: 640px) {
    .slider-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .slider-nav {
        width: 100%;
        justify-content: flex-end;
    }

    .slider-track .news-card,
    .slider-track .gallery-item,
    .slider-track .teacher-card {
        flex: 0 0 100%;
    }
}

.content-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-section .section-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* About Section */
#about {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(124, 58, 237, 0.1), 
        transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

#about:hover::before {
    left: 100%;
}

#about:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 
        0 35px 90px rgba(15, 23, 42, 0.25),
        0 18px 45px rgba(124, 58, 237, 0.18),
        0 0 0 1px rgba(124, 58, 237, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(6, 182, 212, 0.05));
}

.about {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 1.1rem;
}

.feature-list i {
    color: var(--success-color);
    font-size: 1.25rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    display: block;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(6, 182, 212, 0.05));
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

.image-placeholder i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    font-size: 8rem;
    color: var(--white);
}

/* News Section */
#news {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#news::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(124, 58, 237, 0.1), 
        transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

#news:hover::before {
    left: 100%;
}

#news:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 
        0 35px 90px rgba(15, 23, 42, 0.25),
        0 18px 45px rgba(124, 58, 237, 0.18),
        0 0 0 1px rgba(124, 58, 237, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(6, 182, 212, 0.05));
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.news-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(15, 23, 42, 0.12),
        0 4px 12px rgba(15, 23, 42, 0.08),
        0 2px 6px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(226, 232, 240, 0.5);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s, border 0.4s;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(8px);
    will-change: transform;
    transform-style: preserve-3d;
}

.news-card:hover {
    transform: translateY(-18px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(15, 23, 42, 0.25),
        0 12px 30px rgba(124, 58, 237, 0.18),
        0 6px 15px rgba(6, 182, 212, 0.12),
        0 0 0 1px rgba(124, 58, 237, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(226, 232, 240, 0.6);
    border-color: rgba(124, 58, 237, 0.3);
}

.news-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.4s;
}

.news-card:hover::after {
    opacity: 1;
}

.news-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(6, 182, 212, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 4.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(15, 23, 42, 0.15);
    transform: translateZ(0);
}

.news-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

.news-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.news-category {
    background: rgba(255, 255, 255, 0.98);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 2px 8px rgba(15, 23, 42, 0.15),
        0 1px 3px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transform: translateZ(10px);
}

.news-content {
    padding: 2rem 2.25rem;
    position: relative;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.news-views {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    opacity: 0.7;
}

.news-content h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 1.1rem;
    line-height: 1.4;
    min-height: 60px;
    font-weight: 700;
}

.news-content p {
    color: var(--text-color);
    margin-bottom: 1.25rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.read-more:hover {
    gap: 1rem;
    color: var(--secondary-color);
}

.news-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    opacity: 0.7;
}

.news-pagination {
    text-align: center;
    margin-top: 3rem;
}

.load-more-news {
    padding: 1rem 2.5rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes cardPress {
    0% {
        transform: scale(0.98);
    }
    55% {
        transform: scale(1.015);
    }
    100% {
        transform: scale(1);
    }
}

.card-pressed {
    animation: cardPress 0.6s ease;
}

/* Gallery Section */
.gallery {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(6, 182, 212, 0.05));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(6, 182, 212, 0.1), 
        transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.gallery:hover::before {
    left: 100%;
}

.gallery:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 
        0 35px 90px rgba(15, 23, 42, 0.25),
        0 18px 45px rgba(6, 182, 212, 0.18),
        0 0 0 1px rgba(6, 182, 212, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.08));
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s, box-shadow 0.4s;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 40px 65px rgba(15, 23, 42, 0.18);
}

.gallery-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(6, 182, 212, 0.95));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    gap: 1rem;
}

.gallery-placeholder i {
    font-size: 4rem;
}

.gallery-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
}

.gallery-caption {
    padding: 1.25rem 1.5rem 1.6rem;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.gallery-caption h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.gallery-caption p {
    margin-top: 0.4rem;
    color: #64748b;
    line-height: 1.5;
    font-size: 0.97rem;
}

/* Teachers Section */
#teachers {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#teachers::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(249, 115, 22, 0.1), 
        transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

#teachers:hover::before {
    left: 100%;
}

#teachers:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 
        0 35px 90px rgba(15, 23, 42, 0.25),
        0 18px 45px rgba(249, 115, 22, 0.18),
        0 0 0 1px rgba(249, 115, 22, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), rgba(124, 58, 237, 0.05));
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.teacher-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    padding: 2.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.4s, box-shadow 0.4s;
    border: 1px solid rgba(226, 232, 240, 0.8);
    will-change: transform;
}

.teacher-card:hover {
    transform: translateY(-14px) scale(1.01);
    box-shadow: 0 40px 60px rgba(15, 23, 42, 0.15);
}

.teacher-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(6, 182, 212, 0.95));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    box-shadow: 0 25px 45px rgba(124, 58, 237, 0.25);
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.teacher-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.teacher-subject {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.teacher-degree {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Contact Section */
#contact {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(16, 185, 129, 0.1), 
        transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

#contact:hover::before {
    left: 100%;
}

#contact:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 
        0 35px 90px rgba(15, 23, 42, 0.25),
        0 18px 45px rgba(16, 185, 129, 0.18),
        0 0 0 1px rgba(16, 185, 129, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(6, 182, 212, 0.05));
}

.contact {
    background: var(--light-color);
    position: relative;
    z-index: 1;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 40px;
}

.contact-item h4 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-color);
    line-height: 1.8;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--white);
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .form-group input:focus ~ label,
.contact-form .form-group input:not(:placeholder-shown) ~ label,
.contact-form .form-group textarea:focus ~ label,
.contact-form .form-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    background: var(--white);
    padding: 0 0.5rem;
    color: var(--primary-color);
}

.contact-form .form-group input::placeholder,
.contact-form .form-group textarea::placeholder {
    color: transparent;
}

.contact-form .form-group input:focus::placeholder,
.contact-form .form-group textarea:focus::placeholder {
    color: #9ca3af;
}

.contact-form .form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    transition: all 0.3s;
    pointer-events: none;
}

.contact-form .form-group i {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: var(--primary-color);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: var(--success-color);
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: var(--danger-color);
    display: block;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 0.5rem 0;
    opacity: 0.8;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.btn-functions {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    text-decoration: none;
}

.btn-functions:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-functions i {
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Admin Styles */
.admin-body {
    background: var(--light-color);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-color);
}

.login-form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

.login-form .form-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-form .form-group input:focus ~ label,
.login-form .form-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    background: var(--white);
    padding: 0 0.5rem;
    color: var(--primary-color);
}

.login-form .form-group input::placeholder {
    color: transparent;
}

.login-form .form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    transition: all 0.3s;
    pointer-events: none;
}

.login-form .form-group i {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: var(--primary-color);
}

.login-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-top: 1rem;
    display: none;
}

.error-message.show {
    display: block;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.login-footer a:hover {
    gap: 1rem;
}

/* Admin Dashboard */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.sidebar-header h3 {
    color: var(--dark-color);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.25rem;
}

.badge {
    position: absolute;
    right: 2rem;
    background: var(--danger-color);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.sidebar-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
}

.admin-main {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.header-left h1 {
    font-size: 1.75rem;
    color: var(--dark-color);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-user i {
    font-size: 2rem;
    color: var(--primary-color);
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
}

.stat-icon.blue {
    background: var(--primary-color);
}

.stat-icon.green {
    background: var(--success-color);
}   

.stat-icon.orange {
    background: var(--warning-color);
}

.stat-icon.red {
    background: var(--danger-color);
}

.stat-details h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-details p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

.stat-change.neutral {
    color: var(--text-color);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.activity-content p {
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.quick-link-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
}

.quick-link-item i {
    font-size: 2rem;
}

/* Data Table */
.data-table {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--light-color);
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.5rem;
}

.settings-form-card,
.settings-preview-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.settings-form-card .form-group {
    margin-bottom: 1rem;
}

.settings-form-card .form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.settings-preview-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.settings-preview-card p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.settings-preview-card hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--dark-color);
}

table tbody tr:hover {
    background: var(--light-color);
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-icon.edit:hover {
    color: var(--primary-color);
}

.btn-icon.delete:hover {
    color: var(--danger-color);
}

.btn-icon.view:hover {
    color: var(--success-color);
}

/* News Admin Grid */
.news-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-admin-card {
    background: var(--white);
    border-radius: 15px;
    padding: 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.news-admin-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-admin-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3.5rem;
}

.news-admin-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    padding: 1rem 1.5rem 0;
    font-size: 1.25rem;
}

.news-admin-card p {
    padding: 0 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin: 1rem 0;
    padding: 0 1.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-category-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.news-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-color);
}

/* Messages */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

.message-item.unread {
    border-left: 4px solid var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-header h4 {
    color: var(--dark-color);
}

.message-time {
    font-size: 0.85rem;
    color: var(--text-color);
}

.message-email {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.message-preview {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

/* Gallery Admin */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-admin-item {
    position: relative;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.gallery-admin-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-admin-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3.5rem;
}

.gallery-admin-info {
    padding: 1rem;
    text-align: center;
}

.gallery-admin-info p {
    color: var(--dark-color);
    font-weight: 600;
    margin: 0;
}

.gallery-admin-desc {
    display: block;
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.gallery-admin-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.gallery-admin-actions .btn-icon {
    background: var(--white);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

/* Settings Form */
.settings-form {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 600px;
}

.settings-form .form-group {
    margin-bottom: 1.5rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    position: static;
}

.settings-form input,
.settings-form textarea {
    padding: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        transition: left 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 5rem 2rem 4rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .stats .container {
        grid-template-columns: 1fr;
    }

    .news-grid,
    .gallery-grid,
    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 2rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .logo span {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-section .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-section .section-header h2 {
        font-size: 1.5rem;
    }

    .content-section .section-header .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    overflow-y: auto;
    animation: fadeIn 0.3s;
    backdrop-filter: blur(3px);
}

.modal.show,
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.functions-modal {
    overflow: hidden;
}

.functions-modal {
    max-width: 95vw;
    width: 100%;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.functions-iframe-container {
    padding: 0;
    flex: 1;
    overflow: hidden;
    display: flex;
}

.functions-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 20px 20px;
}

.modal-body {
    padding: 2rem;
}

.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.function-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.function-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15);
    border-color: var(--primary-color);
}

.function-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.function-item h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.function-item p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.8;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 20px 20px 0 0;
}

.modal-header h3,
.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .full-width {
    grid-column: 1 / -1;
}

.modal-form .form-group {
    position: relative;
    margin-bottom: 0;
}

.modal-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    pointer-events: all;
}

.modal-form .form-group input,
.modal-form .form-group textarea,
.modal-form .form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--white);
}

.modal-form .form-group input:focus,
.modal-form .form-group textarea:focus,
.modal-form .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-form .form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-color);
    font-size: 0.85rem;
    opacity: 0.7;
}

.modal-form .form-group input[type="file"] {
    padding: 0.75rem;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border-color);
    background: var(--light-color);
    border-radius: 0 0 20px 20px;
}

.modal-cancel {
    background: var(--light-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.modal-cancel:hover {
    background: var(--border-color);
}

/* Icon Selector */
.icon-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
}

.icon-option {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    background: var(--light-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
}

.icon-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.icon-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Modal Animations */
@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .functions-modal {
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .functions-iframe-container {
        border-radius: 0;
    }
    
    .functions-iframe-container iframe {
        border-radius: 0;
    }
    
    .btn-functions {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-form {
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .icon-selector {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    .icon-option {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Video Player Modal */
.video-player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-modal.active {
    display: flex;
    opacity: 1;
}

.video-player-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-player-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-thumbnail-wrapper {
    transition: transform 0.2s ease;
}

.youtube-thumbnail-wrapper:hover {
    transform: scale(1.02);
}

.youtube-play-button {
    transition: all 0.3s ease;
}

.youtube-thumbnail-wrapper:hover .youtube-play-button {
    background: rgba(255, 0, 0, 0.9) !important;
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
    .video-player-content {
        width: 95%;
    }
    
    .video-player-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
}

