/*
Theme Name: Rumah Source Code
Description: Tema katalog source code, metode, dan tutorial dengan integrasi Rumah Source Code Core.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: rumahsourcecode
License: GNU General Public License v2 or later
*/
:root { --navy:#14213d; --ink:#172b4d; --muted:#627389; --teal:#087e8b; --teal-dark:#06636d; --line:#dce5ed; --paper:#fff; --sky:#f4f8fb; --radius:14px; }
* { box-sizing:border-box; }
body { margin:0; background:var(--sky); color:var(--ink); font:16px/1.75 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:var(--teal-dark); text-underline-offset:3px; }
a:hover { color:var(--teal); }
img { max-width:100%; height:auto; }
button,input,select,textarea { font:inherit; }
button,a,input,select,summary,textarea { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid #14b8a6; outline-offset:4px; }
input,select,textarea { padding:.65rem .8rem; border:1px solid #bdcbd8; border-radius:8px; background:#fff; color:var(--ink); width:100%; min-width:0; }
label { display:block; font-weight:650; font-size:.85rem; margin-bottom:.35rem; }
h1,h2,h3 { color:var(--navy); line-height:1.3; letter-spacing:-.02em; overflow-wrap:anywhere; }
h1 { font-size:clamp(2rem,4vw,3rem); margin:.5rem 0 1rem; }
h2 { font-size:1.55rem; }
h3 { font-size:1.2rem; }
p { margin:0 0 1rem; }
.container { width:min(1180px,calc(100% - 48px)); margin-inline:auto; }
.muted,.result-count { color:var(--muted); }
.eyebrow { display:block; color:var(--teal-dark); font-size:.75rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:.65rem; padding:.75rem 1.15rem; border:1px solid var(--teal); border-radius:8px; background:var(--teal); color:#fff; text-decoration:none; font-weight:700; line-height:1.4; cursor:pointer; white-space:nowrap; }
.button:hover { color:#fff; background:var(--teal-dark); border-color:var(--teal-dark); }
.button-outline { color:var(--teal-dark); background:transparent; border-color:#a3bdc7; }
.button-small { font-size:.85rem; padding:.55rem .8rem; }
.text-link { font-size:.9rem; font-weight:700; text-decoration:none; }
.skip-link { position:fixed; left:1rem; top:-100px; padding:.75rem; background:#fff; z-index:999999; }
.skip-link:focus { top:1rem; }
.site-header { background:var(--navy); position:sticky; top:0; z-index:100; box-shadow:0 2px 12px #14213d12; }
.admin-bar .site-header { top:32px; }
.header-inner { display:flex; align-items:center; justify-content:space-between; min-height:82px; gap:2rem; }
.site-brand { display:flex; align-items:center; gap:.8rem; color:#fff; text-decoration:none; font-size:1.05rem; font-weight:800; line-height:1.3; }
.site-brand:hover { color:#fff; }
.site-brand small { display:block; margin-top:.25rem; font-size:.68rem; font-weight:450; color:#a5b7d0; letter-spacing:.03em; }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; border:1px solid #36828a; border-radius:10px; color:#53dac8; font:700 18px/1 monospace; }
.brand-logo { width:auto; max-width:60px; max-height:48px; }
.nav-links { display:flex; gap:.3rem; align-items:center; list-style:none; padding:0; margin:0; }
.nav-links a { display:block; padding:.55rem .8rem; color:#d3deed; font-size:.9rem; text-decoration:none; border-radius:7px; font-weight:650; }
.nav-links a:hover,.nav-links a[aria-current],.nav-links .current-menu-item>a { color:#62e0cf; background:#ffffff09; }
.menu-toggle { display:none; padding:.45rem .7rem; border:1px solid #71849f; color:#fff; border-radius:7px; background:transparent; cursor:pointer; }
.home-hero { background:linear-gradient(125deg,#fff 20%,#edf7f8 100%); border-bottom:1px solid var(--line); }
.hero-grid { display:grid; grid-template-columns:1.15fr 1fr; gap:4rem; align-items:center; padding-block:70px; }
.hero-grid h1 { font-size:clamp(2.2rem,4.3vw,3.6rem); line-height:1.18; }
.hero-grid h1 span { color:var(--teal); }
.hero-grid p { color:var(--muted); max-width:48ch; margin-bottom:1.7rem; font-size:1.05rem; }
.hero-actions { display:flex; flex-wrap:wrap; gap:.7rem; }
.discovery-panel { background:#fff; padding:2rem; border:1px solid #cfe0e7; border-radius:18px; box-shadow:0 16px 45px #10314208; }
.discovery-panel h2 { margin:0 0 1.5rem; font-size:1.25rem; }
.search-row { display:flex; gap:.6rem; }
.home-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-top:2rem; padding-top:1.5rem; border-top:1px solid var(--line); }
.home-stats strong { display:block; font-size:1.9rem; color:var(--navy); line-height:1.3; }
.home-stats span { color:var(--muted); font-size:.72rem; }
.home-section { padding-block:50px; }
.learning-section { background:#edf4f8; border-block:1px solid var(--line); }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; }
.section-heading h2 { margin:.3rem 0 0; }
.card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.4rem; }
.content-card { display:flex; flex-direction:column; min-width:0; background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.content-card:hover { border-color:#8cbac4; box-shadow:0 8px 24px #14213d08; }
.card-image { display:block; aspect-ratio:16/10; padding:1rem; background:#f9fbfd; border-bottom:1px solid var(--line); }
.card-image img { display:block; width:100%; height:100%; object-fit:contain; }
.preview-placeholder { display:flex; height:100%; min-height:120px; align-items:center; justify-content:center; flex-direction:column; gap:.6rem; color:#72869c; background:#eef4f8; border-radius:8px; }
.preview-placeholder span { font:700 32px/1 monospace; color:#8da6b9; }
.preview-placeholder small { font-size:.75rem; }
.card-body { padding:1.3rem; display:flex; flex-direction:column; flex:1; }
.card-body :is(h2,h3) { font-size:1.05rem; margin:.55rem 0 .8rem; line-height:1.5; }
.card-body :is(h2,h3) a { color:var(--navy); text-decoration:none; }
.card-body :is(h2,h3) a:hover { color:var(--teal); }
.card-body p { font-size:.88rem; color:var(--muted); }
.card-bottom { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; justify-content:space-between; margin-top:auto; padding-top:.8rem; }
.rsc-price { color:#15803d; font-weight:750; }
.page-main { padding-block:45px 65px; min-height:60vh; }
.page-heading { max-width:760px; margin-bottom:2rem; }
.page-heading p { color:var(--muted); }
.catalog-filter { display:flex; flex-wrap:wrap; align-items:end; gap:1rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:1.25rem; margin-bottom:1.5rem; }
.catalog-filter>div { flex:1 1 170px; }
.catalog-filter .filter-keyword { flex:1.7 1 230px; }
.catalog-filter .button { min-height:48px; }
.filter-reset { font-size:.85rem; padding-block:.5rem; }
.result-count { font-size:.9rem; margin-bottom:1.25rem; }
.pagination { margin-top:2rem; text-align:center; }
.pagination .nav-links { justify-content:center; flex-wrap:wrap; }
.page-numbers { padding:.45rem .9rem; border:1px solid var(--line); border-radius:7px; background:#fff; text-decoration:none; }
.page-numbers.current { background:var(--teal); color:#fff; border-color:var(--teal); }
.pagination .nav-links a { color:var(--teal-dark); }
.group-navigation { display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:2.5rem; }
.group-navigation a { padding:.5rem .85rem; text-decoration:none; background:#fff; border:1px solid var(--line); border-radius:999px; font-size:.88rem; }
.group-navigation span { margin-left:.3rem; color:var(--muted); }
.method-group { margin-bottom:3rem; scroll-margin-top:110px; }
.method-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.2rem; }
.method-card { padding:1.4rem; border:1px solid var(--line); border-radius:var(--radius); background:#fff; display:flex; flex-direction:column; }
.method-card h3 { margin:.75rem 0; font-size:1.2rem; }
.method-card h3 a { color:var(--navy); text-decoration:none; }
.method-card p { font-size:.9rem; color:var(--muted); }
.method-count { align-self:start; font-size:.72rem; color:var(--teal-dark); font-weight:750; background:#eaf7f5; border-radius:5px; padding:.15rem .55rem; }
.method-actions { display:flex; flex-wrap:wrap; gap:.8rem; align-items:center; margin-top:auto; padding-top:1rem; }
.method-actions .muted { font-size:.8rem; }
.reader-layout { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:2rem; padding-block:30px 60px; align-items:start; }
.reader-article { padding:2rem; border:1px solid var(--line); border-radius:var(--radius); background:#fff; min-width:0; }
.reader-article h1 { font-size:clamp(1.75rem,3vw,2.5rem); }
.breadcrumbs { margin-bottom:1.3rem; font-size:.75rem; color:var(--muted); overflow-wrap:anywhere; }
.breadcrumbs ol { display:flex; flex-wrap:wrap; gap:.4rem; list-style:none; padding:0; margin:0; }
.breadcrumbs li+li::before { content:"/"; margin-right:.4rem; color:#a2afbd; }
.breadcrumbs a { color:var(--muted); text-decoration:none; }
.post-meta { display:flex; align-items:center; gap:.9rem; flex-wrap:wrap; color:var(--muted); font-size:.78rem; margin-bottom:1.5rem; }
.post-meta .edit-link { margin-left:auto; }
.post-intro { color:var(--muted); font-size:1.05rem; }
.featured-image { margin:1.75rem 0; }
.featured-image img { display:block; width:100%; height:auto; border:1px solid var(--line); border-radius:10px; }
.content-toc { background:#f0f8fa; border:1px solid #c9e4e9; border-radius:10px; padding:1rem 1.2rem; margin-block:1.5rem; }
.content-toc summary { font-weight:750; cursor:pointer; color:var(--navy); }
.content-toc ul { list-style:none; padding:0; columns:2; gap:1.5rem; font-size:.85rem; }
.content-toc li { break-inside:avoid; margin-bottom:.3rem; }
.content-toc li.level-h3 { padding-left:.8rem; font-size:.8rem; }
.content-toc a { text-decoration:none; }
.entry-content { overflow-wrap:anywhere; }
.entry-content :is(h2,h3,h4) { margin-top:2rem; margin-bottom:.8rem; scroll-margin-top:110px; }
.entry-content h2 { font-size:1.4rem; }
.entry-content h3 { font-size:1.13rem; }
.entry-content h4 { font-size:1rem; }
.entry-content ul,.entry-content ol { padding-left:1.4rem; }
.entry-content li { margin-bottom:.3rem; }
.entry-content blockquote { border-left:3px solid var(--teal); padding:.2rem 1rem; margin:1.5rem 0; color:var(--muted); background:#f5f9fc; }
.entry-content pre { padding:1.2rem; border-radius:9px; background:#182942; color:#e7edf5; font-size:.85rem; white-space:pre; }
.entry-content code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.entry-content :not(pre)>code { padding:.1rem .3rem; border-radius:4px; background:#f0f4f8; color:#bd315b; }
.entry-content .source-code-related-body h3 { margin:0 0 .4rem; font-size:.9rem; }
.entry-content hr { border:0; border-top:1px solid var(--line); margin:2rem 0; }
.reader-sidebar { min-width:0; }
.sidebar-widget { padding:1.3rem; background:#fff; border:1px solid var(--line); border-radius:var(--radius); margin-bottom:1.3rem; }
.sidebar-widget h2 { font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; margin:0 0 1rem; color:var(--muted); }
.sidebar-products { display:grid; gap:1rem; }
.sidebar-product { display:flex; align-items:center; gap:.7rem; padding-bottom:1rem; border-bottom:1px solid var(--line); min-width:0; }
.sidebar-product:last-child { padding:0; border:0; }
.sidebar-product-image { width:65px; flex:0 0 65px; height:55px; }
.sidebar-product img { width:65px; height:55px; object-fit:contain; border-radius:5px; }
.sidebar-product .preview-placeholder { min-height:55px; height:55px; }
.sidebar-product .preview-placeholder small { display:none; }
.sidebar-product .preview-placeholder span { font-size:20px; }
.sidebar-product h3 { font-size:.78rem; margin:0 0 .3rem; line-height:1.5; }
.sidebar-product h3 a { color:var(--navy); text-decoration:none; }
.sidebar-product .rsc-price { font-size:.75rem; }
.chapter-list { margin:0; padding-left:1.15rem; font-size:.85rem; }
.chapter-list li { margin-bottom:.75rem; }
.chapter-list a { text-decoration:none; }
.chapter-list a[aria-current] { font-weight:800; color:var(--navy); }
.tutorial-chapters { margin-block:2rem; border-top:1px solid var(--line); padding-top:1rem; }
.empty-state { padding:3rem 1.5rem; text-align:center; border:1px dashed #bbcbd8; border-radius:var(--radius); background:#fff; }
.site-footer { padding-top:3rem; background:var(--navy); color:#b9c8dc; }
.footer-grid { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:3rem; padding-bottom:2rem; font-size:.85rem; }
.footer-grid strong { color:#fff; font-size:1.1rem; }
.footer-grid p { margin-top:.6rem; }
.footer-grid h2 { font-size:.85rem; color:#fff; margin-top:0; }
.footer-grid ul { padding:0; margin:0; list-style:none; }
.footer-grid li { margin-bottom:.5rem; }
.footer-grid a { color:#c9d8e9; text-decoration:none; }
.footer-grid a:hover { color:#62e0cf; }
.footer-bottom { border-top:1px solid #ffffff15; padding-block:1rem; font-size:.75rem; }
.comments-area { border-top:1px solid var(--line); margin-top:2rem; padding-top:1rem; }
.comment-list { list-style:none; padding:0; }
.comment-list .children { padding-left:1rem; list-style:none; }
.comment-body { border-bottom:1px solid var(--line); padding-block:1rem; }
.comment-metadata { font-size:.75rem; color:var(--muted); }
.comment-form-cookies-consent { display:flex; align-items:start; gap:.6rem; }
.comment-form-cookies-consent input { width:auto; margin-top:.4rem; }
.comment-form .submit { width:auto; background:var(--teal); color:#fff; cursor:pointer; border-color:var(--teal); }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:1000px) {
    .hero-grid { gap:2rem; }
    .reader-layout { grid-template-columns:minmax(0,1fr) 255px; gap:1.2rem; }
    .reader-article { padding:1.5rem; }
    .card-grid,.method-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:800px) {
    .container { width:calc(100% - 32px); }
    .header-inner { min-height:72px; gap:1rem; flex-wrap:wrap; }
    .site-brand { font-size:.9rem; }
    .rsc-js .menu-toggle { display:block; }
    .menu-toggle[hidden] { display:none; }
    .site-navigation { width:100%; padding-bottom:1rem; }
    .rsc-js .site-navigation { display:none; }
    .rsc-js .site-navigation.is-open { display:block; }
    .nav-links { flex-wrap:wrap; }
    .nav-links a { padding:.5rem .65rem; }
    .hero-grid { grid-template-columns:1fr; padding-block:40px; }
    .hero-grid h1 { max-width:20ch; }
    .discovery-panel { padding:1.5rem; }
    .reader-layout { grid-template-columns:1fr; }
    .reader-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
    .home-section { padding-block:35px; }
    .footer-grid { gap:1.5rem; }
    .admin-bar .site-header { top:46px; }
}
@media (max-width:560px) {
    .card-grid,.method-grid,.footer-grid,.reader-sidebar { grid-template-columns:1fr; }
    .section-heading { align-items:start; }
    .section-heading h2 { font-size:1.3rem; }
    .section-heading>.text-link { font-size:.75rem; text-align:right; }
    .catalog-filter>div { flex-basis:100%; }
    .catalog-filter .button { width:100%; }
    .content-toc ul { columns:1; }
    .reader-article { padding:1.25rem; }
    .reader-layout { padding-top:16px; }
    .site-brand small { font-size:.6rem; }
    .hero-actions .button { width:100%; }
    .home-stats { gap:.5rem; }
    .home-stats strong { font-size:1.6rem; }
    .site-footer { padding-top:2rem; }
}
