/* ==========================================
   EDUAI - MODERN EDUCATION PLATFORM
   ========================================== */

:root {
    --primary: #5852fe;
    --primary-dark: #4641d9;
    --secondary: #2dca8c;
    --accent: #ff6b6b;
    --dark: #0f1629;
    --gray-dark: #1a1f36;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #5852fe 0%, #2dca8c 100%);
}

/* ==========================================
   GLOBAL RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-desktop {
    display: flex;
    gap: 40px;
}

.nav-desktop a {
    font-weight: 600;
    color: var(--dark);
    position: relative;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(88, 82, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(88, 82, 254, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -10px 0 50px rgba(0,0,0,0.2);
    padding: 100px 40px 40px;
    transition: right 0.4s ease;
    z-index: 999;
    overflow-y: auto;
}

.nav-mobile.active {
    right: 0;
}

.nav-mobile a {
    display: block;
    padding: 15px 0;
    font-weight: 600;
    font-size: 18px;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-light);
}

.nav-mobile a:hover {
    color: var(--primary);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 998;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf4 100%);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(100px);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark);
}

.hero-text h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    margin-top: 5px;
}

/* ==========================================
   CATEGORIES
   ========================================== */
.categories {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(88, 82, 254, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 14px;
    color: var(--gray);
}

/* ==========================================
   COURSES / EXERCISES
   ========================================== */
.courses {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf4 100%);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.course-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.course-content {
    padding: 25px;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--gray);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.course-description {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.course-difficulty {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* ==========================================
   STATS SECTION
   ========================================== */
.stats {
    padding: 80px 0;
    background: var(--gradient);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stats .stat-number {
    color: var(--white);
    -webkit-text-fill-color: var(--white);
}

.stats .stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf4 100%);
}

.cta-content {
    background: var(--gradient);
    border-radius: 30px;
    padding: 80px 60px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta-content h2 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.3);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-about h3 {
    font-size: 28px;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--gray);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .hero-content {
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 42px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-desktop,
    .header-actions {
        display: none !important;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 36px;
    }
    
    .hero-text p {
        font-size: 16px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .cta-content {
        padding: 50px 30px;
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .hero-text h1 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
}