/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-gray-100);
    height: var(--navbar-height);
}

.navbar__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--color-gray-900);
    letter-spacing: -0.02em;
}

.navbar__logo:hover {
    color: var(--color-gray-900);
    text-decoration: none;
}

.navbar__logo-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
}

.navbar__logo-accent {
    color: var(--color-teal-600);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    padding: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-600);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--color-gray-900);
    background: var(--color-gray-50);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--color-primary-600);
    background: var(--color-primary-50);
}

.navbar__support {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--color-teal);
    transition: all var(--transition-fast);
}

.navbar__support:hover {
    background: #f0fdfa;
    color: var(--color-teal-600);
    transform: scale(1.1);
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--color-gray-700);
}

.nav-links__mobile-only {
    display: none;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--color-primary-600);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    z-index: 200;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: var(--space-2);
}

/* Bottom tab bar (mobile PWA navigation) */
.bottom-tabs {
    display: none;
}

@media (max-width: 768px) {
    .bottom-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: white;
        border-top: 1px solid var(--color-gray-200);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        height: 3.5rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .bottom-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--color-gray-400);
        font-size: 10px;
        font-weight: 500;
        padding: var(--space-1) 0;
        transition: color var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-tab--active {
        color: var(--color-teal-600);
    }

    .bottom-tab--create {
        color: white;
    }

    .bottom-tab--create svg {
        background: var(--color-teal);
        border-radius: var(--radius-full);
        padding: 3px;
        box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
    }

    .bottom-tab--create span {
        color: var(--color-teal-600);
        font-weight: 600;
    }

    /* Hide hamburger menu and desktop nav on mobile — bottom tabs replace them */
    .mobile-nav-toggle {
        display: none !important;
    }

    .nav-links {
        display: none !important;
    }

    .navbar__actions {
        margin-left: auto;
    }

    .navbar__actions .btn {
        display: none;
    }

    /* Keep support icon visible in navbar */
    .navbar__support {
        display: flex;
    }

    /* Add padding for bottom tabs so content doesn't get hidden */
    .footer {
        padding-bottom: 4rem;
    }

    /* Position toast above bottom tabs */
    .toast-container {
        bottom: calc(var(--space-4) + 3.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary-600) 0%, #1e3a5f 40%, var(--color-teal-700) 100%);
    color: white;
    padding: var(--space-24) 0 var(--space-20);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(13, 148, 136, 0.2) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(42, 82, 212, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -0.03em;
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-10);
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__search {
    max-width: 560px;
    margin: var(--space-10) auto 0;
}

.hero__stats {
    display: flex;
    gap: var(--space-12);
    justify-content: center;
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: white;
}

.hero__stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-1);
}

@media (max-width: 768px) {
    .hero {
        padding: var(--space-16) 0 var(--space-12);
    }
    .hero h1 {
        font-size: var(--text-3xl);
    }
    .hero__subtitle {
        font-size: var(--text-base);
    }
    .hero__stats {
        gap: var(--space-6);
    }
    .hero__stat-value {
        font-size: var(--text-2xl);
    }
}

/* Section headers */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.section-header__link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary-500);
}

.section-header__link:hover {
    color: var(--color-primary-700);
}

/* Course detail */
.course-hero {
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-teal-700) 100%);
    color: white;
    padding: var(--space-12) 0;
}

.course-hero h1 {
    color: white;
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.course-hero__meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.course-hero__instructor {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
}

.course-hero__badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.course-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-8);
    padding: var(--space-8) 0;
}

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

.course-sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-6));
    align-self: start;
}

.course-sidebar__card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-gray-100);
    box-shadow: var(--shadow-lg);
    padding: var(--space-6);
}

.course-sidebar__price {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--color-gray-900);
    margin-bottom: var(--space-4);
}

.course-sidebar__price--free {
    color: var(--color-teal-600);
}

.course-sidebar__info {
    list-style: none;
    padding: 0;
    margin: var(--space-5) 0;
}

.course-sidebar__info li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-gray-100);
    font-size: var(--text-sm);
    color: var(--color-gray-600);
}

.course-sidebar__info li:last-child {
    border-bottom: none;
}

.course-sidebar__info-label {
    font-weight: 600;
    color: var(--color-gray-800);
    min-width: 80px;
}

.course-content section {
    margin-bottom: var(--space-10);
}

.course-content h2 {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-gray-100);
}

/* Schedule list */
.schedule-list {
    list-style: none;
    padding: 0;
}

.schedule-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--color-gray-50);
    margin-bottom: var(--space-3);
    transition: background var(--transition-fast);
}

.schedule-item:hover {
    background: var(--color-primary-50);
}

.schedule-item__date {
    min-width: 70px;
    text-align: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-100);
}

.schedule-item__day {
    display: block;
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-primary-600);
    line-height: 1;
}

.schedule-item__month {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schedule-item__details {
    flex: 1;
}

.schedule-item__time {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-gray-800);
}

.schedule-item__notes {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    margin-top: var(--space-1);
}

/* Footer */
.footer {
    background: var(--color-gray-900);
    color: var(--color-gray-500);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: auto;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-10);
}

.footer__brand .navbar__logo {
    color: white;
}

.footer__brand .navbar__logo:hover {
    color: white;
}

.footer__brand p {
    font-size: var(--text-sm);
    line-height: 1.7;
    margin-top: var(--space-4);
    max-width: 280px;
}

.footer h4 {
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.footer__links {
    list-style: none;
    padding: 0;
}

.footer__links li {
    margin-bottom: var(--space-2);
}

.footer__links a {
    color: var(--color-gray-400);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: white;
}

.footer__bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-gray-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
}

@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-3);
    }
}

@media (max-width: 480px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
}

/* Page header (for listing pages) */
.page-header {
    background: white;
    border-bottom: 1px solid var(--color-gray-100);
    padding: var(--space-8) 0;
}

.page-header h1 {
    margin-bottom: var(--space-2);
}

/* Utility */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.w-full { width: 100%; }

/* Divider */
.divider {
    height: 1px;
    background: var(--color-gray-200);
    margin: var(--space-6) 0;
}
