/* ============================================
   5. LAYOUT & STRUCTURE
   ============================================ */

.show-more-checkbox,
#show-more-guides,#show-more-projects,#show-more-resources,#show-more-scripts,
#show-more-contact,#show-more-games,#show-more-distros,#show-more-references,
#show-more-blog,#show-more-about,#show-more-contact,#show-more-tests {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}

.lesson-card {
    display:block;
}

#about .about-preview {
    min-height:24px;
    transition:all 0.3s ease;
}

.manifesto {
    padding:32px 32px;
    max-width:1030px;
    margin:0 auto 32px;
    background:var(--white);
}

#manifesto .section-header {
    padding:0 32px;
    margin-bottom:16px;
    max-width:1030px;
    margin-left:auto;
    margin-right:auto;
    min-height:80px;
}

.about-preview {
    margin-top:0;
    padding-top:0;
    margin-bottom:0;
    min-height:24px;
}

.about-section .section-header {
    margin-bottom:16px;
    min-height:80px;
}

#about .about-preview {
    min-height:24px;
    margin-bottom:0;
}

.project-card,.resource-card {
    display:none;
}

/* ============================================
   6. SECTION VISIBILITY
   ============================================ */

body:not(.guide-page) #guides .lesson-card,
body:not(.guide-page) #games .lesson-card,
body:not(.guide-page) #blog .lesson-card,
body:not(.guide-page) #references .lesson-card,
body:not(.guide-page) #distros .lesson-card {
    display: none;
}

.guide-page .lesson-card {
    display: block !important;
}

#games .lesson-card.visible {
    display:block;
}

body:not(.guide-page) #guides .lesson-card.visible {
    display: block;
}

#blog .lesson-card.visible {
    display:block;
}

#distros .lesson-card.visible {
    display:block;
}

#guides:has(#section-guides:checked) .lesson-card {
    display:block;
}

#projects:has(#section-projects:checked) .project-card {
    display:block;
}

#resources:has(#section-resources:checked) .resource-card {
    display:block;
}

#scripts:has(#section-scripts:checked) .resource-card {
    display:block;
}

#games:has(#section-games:checked) .lesson-card {
    display:block;
}

#tests:has(#section-tests:checked) .lesson-card {
    display:block;
}

#tests .lesson-card {
    display:none;
}

#distros:has(#section-distros:checked) .lesson-card {
    display:block;
}

#games .browser-games-header {
    display:none;
}

#games:has(#section-games:checked) .browser-games-header {
    display:block;
}

#references:has(#section-references:checked) .lesson-card {
    display:block;
}

#blog:has(#section-blog:checked) .lesson-card {
    display:block;
}

#about .about-content {
    transition:opacity 0.3s ease;
}

/* ============================================
   7. SHOW MORE BUTTON
   ============================================ */

#guides:has(#section-guides:checked) .show-more-btn,
#projects:has(#section-projects:checked) .show-more-btn,
#resources:has(#section-resources:checked) .show-more-btn,
#scripts:has(#section-scripts:checked) .show-more-btn,
#contact:has(#section-contact:checked) .show-more-btn,
#games:has(#section-games:checked) .show-more-btn,
#browser-games:has(#show-more-browser-games:checked) .show-more-btn,
#distros:has(#section-distros:checked) .show-more-btn,
#references:has(#section-references:checked) .show-more-btn,
#blog:has(#section-blog:checked) .show-more-btn,
#about:has(#section-about:checked) .show-more-btn,
#manifesto:has(#section-manifesto:checked) .show-more-btn,
#contact:has(#section-contact:checked) .show-more-btn {
}

#guides:has(#section-guides:checked) .show-more-btn::after,
#projects:has(#section-projects:checked) .show-more-btn::after,
#resources:has(#section-resources:checked) .show-more-btn::after,
#scripts:has(#section-scripts:checked) .show-more-btn::after,
#contact:has(#section-contact:checked) .show-more-btn::after,
#games:has(#section-games:checked) .show-more-btn::after,
#distros:has(#section-distros:checked) .show-more-btn::after,
#references:has(#section-references:checked) .show-more-btn::after,
#blog:has(#section-blog:checked) .show-more-btn::after,
#about:has(#section-about:checked) .show-more-btn::after,
#manifesto:has(#section-manifesto:checked) .show-more-btn::after,
#tests:has(#section-tests:checked) .show-more-btn::after,
#contact:has(#section-contact:checked) .show-more-btn::after {
    transform:rotate(90deg);
}

.show-more-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    background:var(--black);
    color:var(--white);
    font-family:'IBM Plex Mono',monospace;
    font-size:1.5rem;
    cursor:pointer;
    border:none;
    transition:all 0.2s ease;
    position:relative;
    line-height:1;
}

.show-more-btn::after {
    content:'▼';
    transform:rotate(180deg);
    transition:transform 0.3s ease;
}

.show-more-btn:hover {
}

.show-more-btn:hover::after {
}

.show-more-container {
    text-align:center;
    margin-top:32px;
}