/* ========================================
   LECTURE HOME PAGE
   Uses base.css + temple.css design system
   Classes prefixed lh- to avoid conflicts
   ======================================== */


/* ── Shared: horizontal scroll row ── */

.lh-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.lh-scroll::-webkit-scrollbar {
    display: none;
}


/* ── Section "view all" link ── */

.section-more {
    text-align: center;
    margin-top: 40px;
}

.section-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    transition: color var(--transition-fast);
}

.section-more-link:hover {
    color: var(--primary);
}

.section-more-link i {
    font-size: 0.8em;
    transition: transform var(--transition-fast);
}

.section-more-link:hover i {
}


/* ========================================
   LECTURERS — horizontal scroll cards
   ======================================== */

.lh-lecturer {
    flex: 0 0 170px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 14px 20px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    position: relative;
    box-shadow: var(--shadow-card);
}

.lh-lecturer:hover {
    box-shadow: var(--shadow-md);
}

/* Featured lecturer */
.lh-lecturer--featured {
    border-color: var(--primary-light);
}

.lh-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
    font-size: 0.85rem;
}

/* Photo circle */
.lh-lecturer-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
    color: var(--gray-400);
    font-size: 1.75rem;
}

.lh-lecturer--featured .lh-lecturer-photo {
    box-shadow: 0 0 0 3px rgba(212, 160, 58, 0.25);
}

.lh-lecturer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lh-lecturer-name {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
}

.lh-lecturer-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}


/* ========================================
   TOPICS — CSS Grid cards
   ======================================== */

.lh-topics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.lh-topic {
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid transparent;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.lh-topic:hover {
    box-shadow: var(--shadow-card-hover);
}

.lh-topic-cover {
    overflow: hidden;
    background: var(--gray-100);
}

.lh-topic-cover img {
    width: 100%;
    display: block;
}

.lh-topic:hover .lh-topic-cover img {
}

.lh-topic-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
}

.lh-topic-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lh-topic-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.35;
}

.lh-topic-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.4;
    margin-top: auto;
}


/* ========================================
   RECENT LECTURES — horizontal scroll
   ======================================== */

.lh-lecture {
    flex: 0 0 280px;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
}

.lh-lecture:hover {
    box-shadow: var(--shadow-md);
}

.lh-lecture-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gray-400);
    font-size: 1rem;
}

.lh-lecture-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lh-lecture-info {
    flex: 1;
    min-width: 0;
}

.lh-lecture-title {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lh-lecture-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ========================================
   QUICK ACCESS — 3-col grid (auth only)
   ======================================== */

.lh-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.lh-quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 32px 16px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    position: relative;
}

.lh-quick-card:hover {
    box-shadow: var(--shadow-md);
}

.lh-quick-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-base);
}

.lh-quick-icon--listening {
    background: rgba(48, 112, 104, 0.1);
    color: #489080;
}

.lh-quick-icon--favorites {
    background: rgba(184, 56, 48, 0.1);
    color: #d05048;
}

.lh-quick-icon--history {
    background: var(--accent-light);
    color: var(--primary);
}

.lh-quick-card:hover .lh-quick-icon--listening {
    background: #307068;
    color: #fff;
}

.lh-quick-card:hover .lh-quick-icon--favorites {
    background: #b83830;
    color: #fff;
}

.lh-quick-card:hover .lh-quick-icon--history {
    background: var(--primary);
    color: var(--white);
}

.lh-quick-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.lh-quick-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
}


/* ========================================
   DARK THEME
   ======================================== */

[data-theme="dark"] .lh-lecturer,
[data-theme="dark"] .lh-topic,
[data-theme="dark"] .lh-lecture,
[data-theme="dark"] .lh-quick-card {
    background: var(--bg-cream);
    border-color: rgba(229, 184, 74, 0.1);
}

[data-theme="dark"] .lh-lecturer:hover,
[data-theme="dark"] .lh-topic:hover,
[data-theme="dark"] .lh-lecture:hover,
[data-theme="dark"] .lh-quick-card:hover {
    border-color: rgba(229, 184, 74, 0.2);
}

[data-theme="dark"] .lh-lecturer--featured {
    border-color: rgba(229, 184, 74, 0.3);
}

[data-theme="dark"] .lh-topic-placeholder {
    color: rgba(20, 18, 16, 0.5);
}

[data-theme="dark"] .section-more-link {
    color: var(--primary);
}


/* ========================================
   RESPONSIVE — 768px
   ======================================== */

@media (max-width: 768px) {
    .lh-lecturer {
        flex: 0 0 140px;
        padding: 18px 10px 16px;
    }

    .lh-lecturer-photo {
        width: 80px;
        height: 80px;
    }

    .lh-lecturer-name { font-size: 0.85rem; }

    .lh-topics {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .lh-topic-body { padding: 14px; }
    .lh-topic-title { font-size: 0.9rem; }
    .lh-topic-meta { font-size: 0.75rem; }

    .lh-lecture {
        flex: 0 0 240px;
        padding: 12px;
        gap: 10px;
    }

    .lh-lecture-avatar { width: 40px; height: 40px; }
    .lh-lecture-title { font-size: 0.85rem; }
    .lh-lecture-meta { font-size: 0.75rem; }

    .lh-quick { gap: 16px; }

    .lh-quick-card { padding: 24px 12px; }

    .lh-quick-icon {
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }

    .lh-quick-label { font-size: 0.85rem; }

    .section-more { margin-top: 28px; }
}


/* ========================================
   RESPONSIVE — 480px
   ======================================== */

@media (max-width: 480px) {
    .lh-lecturer {
        flex: 0 0 120px;
        padding: 14px 8px 12px;
    }

    .lh-lecturer-photo { width: 64px; height: 64px; }
    .lh-lecturer-name { font-size: 0.8rem; }

    .lh-topics {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .lh-lecture { flex: 0 0 220px; }

    .lh-quick {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lh-quick-card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
        gap: 14px;
    }

    .lh-quick-icon {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .lh-quick-badge {
        position: static;
        margin-left: auto;
    }
}
