/*
Theme Name: Little Sparrow Press Custom Theme
Theme URI: https://littlesparrowpress.com
Author: World-Class Developer
Description: A minimalist, high-contrast, bold & easy layout optimized for printable coloring sheet directories.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: little-sparrow-press
*/

:root {
    --primary-black: #111111;
    --pure-white: #ffffff;
    --accent-yellow: #ffca28;
    --bg-light: #fafafa;
    --free-green: #e8f5e9;
    --border-width: 3px;
    --font-display: 'Fredoka', sans-serif;
    --font-body: 'Quicksand', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--primary-black); background-color: var(--pure-white); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navigation Area */
header { border-bottom: var(--border-width) solid var(--primary-black); padding: 15px 0; background: var(--pure-white); position: sticky; top: 0; z-index: 100; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; text-decoration: none; color: var(--primary-black); }
.logo-area img { height: 45px; width: 45px; object-fit: contain; margin-right: 10px; }
nav ul { display: flex; list-style: none; }
nav ul li a { text-decoration: none; color: var(--primary-black); font-weight: 700; margin-left: 20px; transition: color 0.2s; }
nav ul li a:hover { color: var(--accent-yellow); }

/* Hero Element */
.hero { padding: 74px 0 86px; background: #fff8df; border-bottom: var(--border-width) solid var(--primary-black); overflow: hidden; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr); gap: 56px; align-items: center; }
.hero-copy { max-width: 660px; }
.hero-kicker { display: inline-flex; align-items: center; width: fit-content; margin-bottom: 18px; padding: 8px 14px; background: var(--pure-white); border: 2px solid var(--primary-black); border-radius: 999px; box-shadow: 3px 3px 0 var(--primary-black); font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.hero h1 { font-family: var(--font-display); font-size: clamp(3.2rem, 7vw, 6.35rem); line-height: 0.96; margin-bottom: 24px; max-width: 760px; }
.hero p { font-size: 1.35rem; max-width: 600px; color: #333; font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 32px; flex-wrap: wrap; }
.hero-actions .btn { display: inline-block; min-width: 220px; }
.hero-note { max-width: 300px; color: #454545; font-size: 0.98rem; font-weight: 700; }
.hero-preview { position: relative; min-height: 460px; }
.hero-page { position: absolute; top: 12px; right: 26px; width: min(82%, 410px); aspect-ratio: 4 / 5; background: var(--pure-white); border: var(--border-width) solid var(--primary-black); border-radius: 18px; box-shadow: 10px 10px 0 var(--primary-black); transform: rotate(3deg); }
.hero-page-back { top: 42px; right: 72px; background: #dff4ee; transform: rotate(-6deg); box-shadow: 8px 8px 0 var(--primary-black); }
.hero-page-ring { position: absolute; left: 13%; top: 13%; width: 31%; aspect-ratio: 1; border: 5px solid var(--primary-black); border-radius: 50%; }
.hero-page-ring::before { content: ""; position: absolute; inset: 24%; border: 4px solid var(--primary-black); border-radius: 50%; }
.hero-page-sun { position: absolute; right: 15%; top: 12%; width: 22%; aspect-ratio: 1; background: var(--accent-yellow); border: 4px solid var(--primary-black); border-radius: 50%; }
.hero-page-hill { position: absolute; left: 8%; right: 8%; bottom: 16%; height: 34%; border: 5px solid var(--primary-black); border-top-left-radius: 80% 90%; border-top-right-radius: 80% 90%; border-bottom: 0; }
.hero-page-lines { position: absolute; left: 12%; right: 12%; bottom: 9%; display: grid; gap: 9px; }
.hero-page-lines span { display: block; height: 5px; background: var(--primary-black); border-radius: 999px; }
.hero-page-lines span:nth-child(2) { width: 76%; }
.hero-page-lines span:nth-child(3) { width: 52%; }
.hero-page-image { display: grid; place-items: center; overflow: hidden; padding: 18px; }
.hero-page-image img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Directories Setup */
.categories-section { padding: 72px 0 88px; }
.section-title { text-align: center; font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 10px; }
.section-subtitle { text-align: center; font-size: 1.15rem; color: #666; margin-bottom: 50px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.category-card { background: var(--pure-white); border: var(--border-width) solid var(--primary-black); border-radius: 20px; padding: 24px; text-align: center; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 6px 6px 0px var(--primary-black); transition: transform 0.2s; text-decoration: none; color: inherit; }
.category-card:hover { transform: translateY(-4px); box-shadow: 8px 8px 0px var(--primary-black); }
.category-preview { display: grid; place-items: center; min-height: 330px; margin-bottom: 22px; padding: 22px; background: #f6fbff; border: 2px solid var(--primary-black); border-radius: 14px; }
.category-preview img { width: min(100%, 240px); height: auto; max-height: 290px; object-fit: contain; background-color: var(--pure-white); border-radius: 10px; border: 2px solid var(--primary-black); box-shadow: 5px 5px 0 var(--primary-black); }
.category-preview-empty { display: grid; place-items: center; width: min(100%, 240px); aspect-ratio: 4 / 5; padding: 22px; background: var(--pure-white); border: 2px dashed var(--primary-black); border-radius: 10px; color: #666; font-family: var(--font-display); font-weight: 700; }
.category-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; }
.category-desc { font-size: 1rem; color: #555; margin-bottom: 20px; }

/* Internal Grid Structure - Exactly 2 Columns */
.main-content-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 40px; padding: 40px 0 80px 0; }
@media (max-width: 992px) { .main-content-layout { grid-template-columns: 1fr; } }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 580px) { .gallery-grid { grid-template-columns: 1fr; } }

.sheet-card { background: var(--pure-white); border: 2px solid var(--primary-black); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.sheet-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; background: #fff; border: 1px solid #eee; border-radius: 8px; margin-bottom: 15px; }
.sheet-info h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 6px; }
.sheet-info p { font-size: 0.9rem; color: #666; margin-bottom: 20px; font-weight: 500; }

/* Framework Buttons */
.btn { display: block; font-family: var(--font-display); font-weight: 600; text-decoration: none; color: var(--primary-black); background: var(--accent-yellow); padding: 14px 20px; border: var(--border-width) solid var(--primary-black); border-radius: 10px; font-size: 1.1rem; box-shadow: 3px 3px 0px var(--primary-black); text-align: center; cursor: pointer; }
.btn-download { display: block; font-family: var(--font-display); font-weight: 600; text-decoration: none; color: var(--primary-black); background: var(--free-green); padding: 12px 0; border: 2px solid var(--primary-black); border-radius: 8px; font-size: 1rem; text-align: center; box-shadow: 2px 2px 0px var(--primary-black); transition: all 0.1s; }
.btn-download:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0px var(--primary-black); background: #d0ebd2; }

/* Sidebar Layout */
.sidebar { border: var(--border-width) solid var(--primary-black); border-radius: 20px; padding: 25px; background: var(--bg-light); height: fit-content; box-shadow: 4px 4px 0px var(--primary-black); }
.sidebar-widget { margin-bottom: 35px; }
.widget-title { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 15px; border-bottom: 2px dashed var(--primary-black); padding-bottom: 5px; }
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { margin-bottom: 12px; font-weight: 700; }
.sidebar-widget ul li a { color: var(--primary-black); text-decoration: none; }
.sidebar-widget ul li a:hover { color: #4caf50; text-decoration: underline; }

/* Search Component Override */
.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; padding: 12px; border: 2px solid var(--primary-black); border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; }
.search-submit { font-family: var(--font-display); background: var(--accent-yellow); border: 2px solid var(--primary-black); padding: 0 15px; border-radius: 8px; cursor: pointer; font-weight: 600; }

footer { background: var(--primary-black); color: var(--pure-white); padding: 40px 0; text-align: center; font-size: 0.95rem; border-top: var(--border-width) solid var(--primary-black); }

@media (max-width: 900px) {
    header { padding: 12px 0; position: relative; }
    .nav-wrapper { flex-direction: column; justify-content: center; gap: 12px; }
    .logo-area { font-size: 1.35rem; }
    nav { width: 100%; }
    nav ul { justify-content: center; gap: 10px; flex-wrap: wrap; }
    nav ul li a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 0;
        padding: 8px 10px;
        border: 2px solid var(--primary-black);
        border-radius: 999px;
        background: var(--pure-white);
        font-size: .95rem;
        line-height: 1.1;
        text-align: center;
        white-space: normal;
    }
    .hero { padding: 58px 0 66px; }
    .hero-layout { grid-template-columns: 1fr; gap: 34px; }
    .hero-copy { max-width: none; text-align: center; }
    .hero-kicker, .hero p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-preview { min-height: 360px; }
    .hero-page { right: 50%; width: min(74%, 330px); transform: translateX(50%) rotate(3deg); }
    .hero-page-back { right: calc(50% - 34px); transform: translateX(50%) rotate(-6deg); }
}

@media (max-width: 580px) {
    .container { padding: 0 16px; }
    .logo-area { font-size: 1.18rem; justify-content: center; }
    .logo-area img { width: 38px; height: 38px; margin-right: 8px; }
    nav ul { gap: 8px; }
    nav ul li a {
        padding: 7px 9px;
        font-size: .82rem;
        max-width: 150px;
    }
    .hero h1 { font-size: 3.4rem; }
    .hero p { font-size: 1.08rem; }
    .hero-actions .btn { width: 100%; min-width: 0; }
    .hero-note { max-width: none; }
    .hero-preview { min-height: 300px; }
    .category-grid { grid-template-columns: 1fr; }
    .category-preview { min-height: 280px; padding: 16px; }
    .category-preview img { max-height: 240px; }
}
