/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gradient-1: linear-gradient(135deg, #4361ee, #3a0ca3);
    --gradient-2: linear-gradient(135deg, #7209b7, #4361ee);
    --gradient-3: linear-gradient(135deg, #f72585, #b5179e);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: var(--light-color);
    font-size: 16px;
    overflow-x: hidden;
}

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--dark-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
    color: #555;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-2);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

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

.btn-outline::before {
    background: var(--gradient-1);
}

.btn-outline:hover {
    color: white;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    padding: 5px 0;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

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

.logo img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: 10px;
}

.logo h1 {
    font-size: 1.4rem;
    margin: 0;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

.desktop-nav ul {
    display: flex;
    gap: 2px;
    list-style: none;
}

.desktop-nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 60%;
}

/* Mobile Navigation */
.mobile-menu {
    display: block;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 20px 30px;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 10px;
}

.mobile-nav a {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition);
    font-size: 1.1rem;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--gradient-1);
    color: white;
}

/* ===== PAGE HEADER ===== */
.page-header.about-header {
    margin-top: 80px;
    padding: 80px 0;
    background: var(--gradient-2);
    position: relative;
    overflow: hidden;
}

.page-header.about-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center;
}

.page-header.about-header .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-header.about-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-header.about-header p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== NEWS SECTION ===== */
.news-section {
    padding: 80px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.news-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    z-index: 1;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .main-image {
    transform: scale(1.05);
}

.news-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient-1);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #888;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(67, 97, 238, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
}

.read-more {
    align-self: flex-start;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.read-more:hover {
    gap: 10px;
}

/* ===== TOP STUDENTS SECTION ===== */
.top-students {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
}

.students-leaderboard {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr;
    background: var(--gradient-1);
    color: white;
    padding: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.student-row {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.student-row:hover {
    background: rgba(67, 97, 238, 0.05);
}

.student-row.top1 .rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.student-row.top2 .rank {
    background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
    color: white;
}

.student-row.top3 .rank {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
}

.rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    background: #f0f0f0;
    justify-self: center;
}

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

.student-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    padding: 3px;
}

.student-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.name {
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.name:hover {
    color: var(--primary-color);
}

.achievement ul {
    list-style: none;
    font-size: 0.9rem;
    color: #666;
}

.achievement li {
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== VIDEO SECTION ===== */
.video-section {
    padding: 80px 0;
    background: white;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.responsive-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== TEACHERS SECTION ===== */
.teachers {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff9f9 0%, #fff 100%);
}

.teachers-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.teacher-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.teacher-image {
    height: 250px;
    overflow: hidden;
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Rasm to'liq ko'rinadi, lekin fon bo'shliq qolishi mumkin */
    object-position: center;
    background-color: #f5f5f5;
    transition: transform 0.5s ease;
}

.teacher-card:hover .teacher-image img {
    transform: scale(1.05);
}

.teacher-info {
    padding: 25px;
}

.teacher-info h3 {
    color: var(--dark-color);
    margin-bottom: 8px;
}

.subject {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.bio {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teacher-social {
    display: flex;
    gap: 10px;
}

.teacher-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.teacher-social a:hover {
    transform: scale(1.1);
}

.teacher-social .fa-telegram { background: #0088cc; }
.teacher-social .fa-facebook { background: #3b5998; }
.teacher-social .fa-instagram { background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D); }

/* ===== ABOUT SECTION ===== */
.about-intro {
    padding: 80px 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

.about-content {
    text-align: center;
}

.highlight-text {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 20px 0;
    line-height: 1.5;
}

.about-image {
    text-align: center;
}

.featured-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    padding: 60px 0;
    background: white;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.contact-form-container {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    position: relative;
}

.loading-spinner {
    display: none;
}

.contact-info-container {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
}

.contact-info-container h2 {
    color: white;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-content h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.social-links {
    margin-top: 40px;
}

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

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

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

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.4s ease;
}

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

.modal-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.modal-close-btn {
    margin-top: 20px;
    width: 100%;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-section.links ul {
    list-style: none;
}

.footer-section.links li {
    margin-bottom: 12px;
}

.footer-section.links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section.links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-section.contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section.contact i {
    color: var(--primary-color);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {
    .header .container {
        padding: 15px 40px;
    }
    
    .desktop-nav {
        display: block;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .about-content {
        text-align: left;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .teachers-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

