/*
 * Home Page Styles
 * Ported from design_preview/index.html <style> section.
 * Footer styles excluded (handled by layout).
 */

/* === Hero Section (Branding Image) === */
.hero-section {
    text-align: center;
}

.hero-section img {
    width: 100%;
    height: auto;
    aspect-ratio: 1371 / 457;
    display: block;
}

/* === Level Filter (Illustration Images from CloudFront) === */
.level-filter-bar {
    padding: 0.75rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.level-filter-wrapper {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.5rem 0;
}

.level-filter-wrapper::-webkit-scrollbar { display: none; }

.level-filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 15%;
}

.level-filter-btn:hover {
    transform: scale(1.05);
}

.level-filter-btn img {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
}

/* Hide inactive image, show active image when .active or :hover */
.level-filter-btn .level-img-active { display: none; }
.level-filter-btn .level-img-inactive { display: block; }
.level-filter-btn.active .level-img-active,
.level-filter-btn:hover .level-img-active { display: block; }
.level-filter-btn.active .level-img-inactive,
.level-filter-btn:hover .level-img-inactive { display: none; }

/* === Content Sections === */
.content-section {
    padding: 1.75rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.content-section + .content-section {
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* === Full-width "More" Button === */
.section-more-btn {
    display: block;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.section-more-btn:hover {
    background: var(--hover-bg, rgba(128,128,128,0.06));
    border-color: var(--accent);
    color: var(--accent);
}

.section-more-btn:active {
    transform: scale(0.99);
}

/* === Section Illustrated Headers (CloudFront images) === */
.kids-illustrated-header,
.section-illustrated-header {
    display: inline-block;
    margin-bottom: 0.25rem;
}

.kids-illustrated-header img,
.section-illustrated-header img {
    height: 40px;
    width: auto;
}

/* === Stats Section (Compact) === */
.stats-section {
    padding: 1.25rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.stats-item {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.stats-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* === SEO Text === */
.seo-section {
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.seo-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.seo-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.seo-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* === Featured Typing Videos Section === */
.home-featured-tv {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(139, 92, 246, 0.08));
    border-radius: 12px;
}

.home-featured-tv-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.home-featured-tv-title i {
    color: #a855f7;
}

.home-featured-tv-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* === Mobile === */
@media (max-width: 768px) {
    .content-section { padding: 1.25rem 1rem; }
    .section-title { font-size: 1.25rem; }
    .level-filter-bar { padding: 0.5rem 1rem; }
    .level-filter-wrapper { gap: 0.25rem; }
    .stats-grid { gap: 1.5rem; }
    .stats-value { font-size: 1.1rem; }
    .section-header { margin-bottom: 1rem; }
    .kids-illustrated-header img,
    .section-illustrated-header img { height: 32px; }
}
