/* 
    ALI ILM NTM - Ultimate Modern Stylesheet 2024
    - Responsive Design
    - Modern Typography (Plus Jakarta Sans)
    - Admin & Frontend UI Components
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --primary: #0f172a;       /* Deep Navy */
    --accent: #3b82f6;        /* Bright Blue */
    --accent-dark: #2563eb;
    --secondary: #10b981;     /* Success Green */
    --bg-light: #f8fafc;      /* Background Slate */
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    /* Effects & Shapes */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --glass: rgba(255, 255, 255, 0.8);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 100px; /* Header uchun joy */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* 2. Navigation Header (Glassmorphism) */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1250px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 12px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo span { color: var(--accent); }

.nav-list {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-list a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

.nav-list a:hover, .nav-list a.active {
    color: var(--accent);
}

.admin-link {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

/* 3. Hero Section */
.hero {
    padding: 40px 5% 80px;
    text-align: center;
}

.badge {
    background: #dbeafe;
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-block;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* 4. Layout & Grid System */
.container {
    max-width: 1250px;
    margin: 60px auto;
    padding: 0 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* 5. Modern Cards (Bento Style) */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    height: 220px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--white);
    padding: 5px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--accent);
}

.card-content {
    padding: 20px 10px 10px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* 6. Buttons */
.btn-primary {
    background: var(--accent);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

.btn-enroll {
    background: #f1f5f9;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-enroll:hover {
    background: var(--primary);
    color: var(--white);
}

/* 7. Video Section Specials */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* 8. Contact Section & Forms */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input, textarea {
    width: 100%;
    padding: 14px 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: var(--transition);
}

input:focus, textarea:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* 9. Mobile Navigation Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.bar {
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 5px;
    transition: var(--transition);
}

/* 10. Admin Panel Specific Styles */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--primary);
    padding: 40px 25px;
    color: white;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    color: #94a3b8;
    border-radius: 12px;
    transition: var(--transition);
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* 11. Footer */
footer {
    background: var(--primary);
    color: #94a3b8;
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

/* 12. Media Queries */
@media (max-width: 992px) {
    header { width: 95%; padding: 12px 20px; }
    .nav-list {
        position: absolute;
        top: 90px;
        left: 0;
        width: 0;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        
    }
    .nav-list.active { max-height: 600px; }
    .menu-toggle { display: flex; }
    .contact-wrapper { grid-template-columns: 1fr; padding: 30px; }
}

@media (max-width: 768px) {
    body { padding-top: 80px; }
    .hero h1 { font-size: 2.5rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 992px) {
    /* Header balandligini biroz kamaytiramiz mobil uchun */
    header { 
        width: 92%; 
        padding: 10px 20px; 
        top: 10px;
    }

    /* NAV-LIST ni boshlang'ich holati - YOPUQ */
    .nav-list {
        position: absolute;
        top: 75px; /* Headerni pastidan chiqadi */
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 0; /* Yopiqligida padding bo'lmasligi kerak */
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        
        /* MUHIM QISMI: Mana bu kodlar rasmda ko'ringan muammoni hal qiladi */
        max-height: 0; 
        overflow: hidden; 
        transition: max-height 0.4s ease-in-out, padding 0.3s;
        border: none;
    }

    /* Menyu ochilgandagi holati */
    .nav-list.active { 
        max-height: 500px; 
        padding: 20px 0; 
        border: 1px solid #eee;
    }

    .nav-list li {
        width: 100%;
        text-align: center;
    }

    .nav-list li a {
        display: block;
        padding: 12px;
    }

    .menu-toggle { display: flex; }
}.filter-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Animatsiya natijalar uchun */
.animate-fade {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Video Section Mobile Optimization */
.video-intro-section {
    background: var(--primary);
    padding: 80px 0;
    color: white;
    border-radius: 50px;
    margin: 60px 20px;
}

@media (max-width: 768px) {
    .video-intro-section {
        padding: 40px 15px !important;
        margin: 20px 10px !important;
        border-radius: 30px !important;
    }
    
    .video-intro-section .container {
        grid-template-columns: 1fr !important; /* Ustunni bitta qilish */
        gap: 30px !important;
        text-align: center; /* Matnlarni markazga olish */
    }

    .video-intro-section h2 {
        font-size: 1.8rem !important; /* Sarlavhani kichraytirish */
        margin: 15px 0 !important;
    }

    .video-intro-section p {
        font-size: 0.95rem !important;
        margin-bottom: 20px !important;
    }
    
    .video-intro-section .video-container {
        box-shadow: 0 15px 30px rgba(0,0,0,0.3) !important;
    }
}