:root {
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --secondary: #F8FAFC;
    --accent: #F59E0B;
    --surface: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --radius: 1rem;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Premium Card Design */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #F1F5F9;
}

/* Elite Form Design - No More "Small & Vertical" */
.form-group { margin-bottom: 2rem; }
.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.form-control {
    width: 100%;
    height: 4rem; /* Wide and prominent */
    padding: 0 1.5rem;
    border-radius: 0.875rem;
    border: 2px solid #E2E8F0;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea.form-control { height: auto; padding: 1.5rem; min-height: 150px; }

/* Global Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    gap: 0.75rem;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }

.btn-secondary { background: #F1F5F9; color: var(--text-main); }
.btn-secondary:hover { background: #E2E8F0; }

/* Alerts Engine */
.alert {
    padding: 1.25rem 2rem;
    border-radius: 0.875rem;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert-success { background: #ECFDF5; color: #065F46; border-left: 5px solid #10B981; }
.alert-danger { background: #FEF2F2; color: #991B1B; border-left: 5px solid #EF4444; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tables Admin */
.w-full { width: 100%; border-collapse: collapse; }
th { padding: 1.5rem; background: #F8FAFC; color: #64748B; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
td { padding: 1.5rem; border-bottom: 1px solid #F1F5F9; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 3rem 0; }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    padding: 8rem 0;
    overflow: hidden;
    position: relative;
}

.hero-content { align-self: center; }
.hero h1 { font-family: 'Outfit', sans-serif; font-size: 4rem; line-height: 1.1; margin-bottom: 2rem; color: #0F172A; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.25rem; color: #64748B; margin-bottom: 3rem; line-height: 1.8; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-img {
    width: 100%;
    border-radius: 3rem;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-img:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

.relative { position: relative; }
.btn-lg { padding: 1.25rem 3rem; font-size: 1.125rem; }

.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h2 { font-family: 'Outfit', sans-serif; font-size: 2.5rem; color: #0F172A; }

@media (max-width: 1024px) {
    .hero-img { display: none; }
    .hero-content { max-width: 100%; text-align: center; }
    .hero h1 { font-size: 3rem; }
}

/* Notifications Engine */
.notifications-dropdown {
    position: relative;
}

.notifications-menu {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    width: 400px;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #F1F5F9;
    display: none;
    z-index: 1000;
}

.notifications-menu.active {
    display: block;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notifications-header {
    padding: 1.5rem;
    border-bottom: 1px solid #F1F5F9;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #F8FAFC;
    transition: background 0.2s;
    cursor: pointer;
    display: flex;
    gap: 1rem;
}

.notification-item:hover { background: #F8FAFC; }

.notification-item.unread {
    background: #F5F3FF;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #EEF2FF;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 2px solid white;
}

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

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
/* Discovery Interface Modules */
.discovery-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.filter-sidebar {
    position: sticky;
    top: 2rem;
    background: white;
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid #F1F5F9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-group { margin-bottom: 2.5rem; }
.filter-title { 
    font-family: 'Outfit', sans-serif; 
    font-weight: 700; 
    font-size: 1.125rem; 
    margin-bottom: 1.25rem;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
    color: #64748B;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}

.category-link:hover {
    background: #F8FAFC;
    color: var(--primary);
}

.category-link.active {
    background: #F5F3FF;
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
    font-weight: 700;
}

.category-count {
    font-size: 0.75rem;
    background: white;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    border: 1px solid #E2E8F0;
}

@media (max-width: 1024px) {
    .discovery-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; margin-bottom: 2rem; }
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.discovery-card {
    background: white;
    border-radius: 2rem;
    border: 1px solid #F1F5F9;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.discovery-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.discovery-card .img-container {
    height: 260px;
    position: relative;
    overflow: hidden;
}

.discovery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.discovery-card:hover img {
    transform: scale(1.08);
}

.price-tag {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.6rem 1.25rem;
    border-radius: 1.25rem;
    font-weight: 800;
    color: #0F172A;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
}

.topic-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    background: #F1F5F9;
    color: #475569;
}

/* Dashboard Interface Modules */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-card {
    background: white;
    padding: 2.5rem;
    border-radius: 2.5rem;
    border: 1px solid #F1F5F9;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.08);
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #0F172A;
}

.stat-label {
    color: #64748B;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
}

@media (max-width: 1024px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

.course-progress-card {
    background: white;
    padding: 2rem;
    border-radius: 2rem;
    border: 1px solid #F1F5F9;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    transition: all 0.2s;
}

.course-progress-card:hover {
    border-color: var(--primary);
    background: #F8FAFC;
}

.status-glow {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: glow 2s infinite;
}

@keyframes glow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
}

.icon-pulse {
    animation: pulse 2s infinite;
}


/* --- Comprehensive Mobile Responsiveness --- */

/* Mobile Navigation */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; padding: 0.5rem; }

@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    
    /* Header & Nav */
    .navbar-public { padding: 1rem 0; }
    .navbar-public .container { flex-wrap: wrap; }
    .mobile-menu-btn { display: block; }
    
    .nav-collapse { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
        padding-top: 1.5rem; 
        gap: 1rem !important; 
        align-items: flex-start !important;
    }
    .nav-collapse.active { display: flex; }
    .nav-links { flex-direction: column; width: 100%; gap: 1rem !important; }
    .nav-links a { width: 100%; padding: 0.5rem 0; border-bottom: 1px solid #F1F5F9; }
    
    /* Typography Overrides */
    html { font-size: 14px; } /* Scales down rems globally */
    .hero h1 { font-size: 2.5rem; line-height: 1.2; }
    .hero p { font-size: 1.125rem; }
    .section-title h2 { font-size: 2rem; }
    .btn { padding: 0.875rem 1.5rem; text-align: center; }
    .btn-lg { padding: 1rem 2rem; font-size: 1rem; }
    
    /* Forms & Inputs */
    .form-control { height: 3.5rem; font-size: 1rem; }
    .card { padding: 1.5rem; }
    
    /* Dashboards & Grids */
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .stat-value { font-size: 2.25rem; }
    .course-progress-card { grid-template-columns: auto 1fr; gap: 1rem; padding: 1.5rem; }
    .course-progress-card > *:last-child { grid-column: span 2; text-align: left; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 1rem; }
    
    /* Footer */
    .footer-translation { margin-top: 1.5rem; }
    footer .grid-4 { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
    /* Super small devices */
    .hero h1 { font-size: 2rem; }
    .stat-card { flex-direction: row; align-items: center; gap: 1rem; }
    .stat-icon { margin-bottom: 0; width: 40px; height: 40px; }
    .btn-primary.w-full { white-space: normal; height: auto; padding: 1rem; }
}

/* Filter Sidebar Drawer (Teacher Directory) */
.filter-sidebar-mobile-toggle { display: none; }
@media (max-width: 1024px) {
    .filter-sidebar-mobile-toggle { 
        display: flex; align-items: center; justify-content: space-between; 
        padding: 1rem 1.5rem; background: var(--white); border-radius: 1rem; 
        border: 1px solid #E2E8F0; margin-bottom: 1.5rem; font-weight: 700; cursor: pointer; 
    }
    .filter-sidebar { 
        display: none; padding: 1.5rem; 
        position: fixed; bottom: 0; left: 0; width: 100vw; max-height: 85vh; overflow-y: auto; 
        z-index: 9999; border-radius: 2rem 2rem 0 0; border: none; box-shadow: 0 -20px 40px rgba(0,0,0,0.2); 
    }
    .filter-sidebar.active { display: block; animation: slideUpDrawer 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
    /* Mobile Overlay */
    .filter-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15,23,42,0.5); z-index: 9998; backdrop-filter: blur(4px); }
    .filter-overlay.active { display: block; }
}

@keyframes slideUpDrawer {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}


@media (min-width: 1025px) {
    .filter-sidebar-header { display: none !important; }
}

