/*
Theme Name: JCGS Theme
Theme URI: https://www.jcgardenseed.com/
Author: JC Garden Seed
Description: Fresh, modern gardening theme. Mobile-first. AI-SEO optimized. AdSense ready. Built for tropical gardening education, products, and services.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.0
License: GPL v2 or later
Text Domain: jcg25
Tags: blog, custom-logo, custom-menu, featured-images, responsive, translation-ready
*/

/* ===== Reset ===== */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.65;color:#1a1a1a;background:#fafaf5;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:#3e6b25;text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{font-weight:700;line-height:1.25;color:#1f3a13;margin:0 0 .75rem}
h1{font-size:clamp(1.5rem,4vw,2.5rem)}
h2{font-size:clamp(1.25rem,3vw,1.8rem)}
h3{font-size:1.2rem}
ul,ol{padding-left:1.3em;margin:0 0 1rem}

/* ===== Layout ===== */
.container{max-width:1200px;margin:0 auto;padding:0 1.25rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* ===== Header ===== */
.site-hd{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid #e5e0d6}
.site-hd-inner{display:flex;align-items:center;gap:.75rem;min-height:60px;max-width:1200px;margin:0 auto;padding:0 1.25rem}
.logo{display:flex;align-items:center;gap:.5rem;font-weight:700;color:#1f3a13}
.logo img{width:36px;height:36px;border-radius:6px}
.logo span{font-size:1rem}
@media(min-width:640px){.logo span{font-size:1.1rem}}

.menu-btn{display:flex;flex-direction:column;gap:4px;width:44px;height:44px;align-items:center;justify-content:center;background:0;border:0;cursor:pointer;margin-left:auto}
.menu-btn span{display:block;width:22px;height:2px;background:#333;border-radius:2px;transition:.2s}
.menu-btn.open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.menu-btn.open span:nth-child(2){opacity:0}
.menu-btn.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* Search button — sits next to hamburger on mobile */
.search-btn{display:flex;align-items:center;justify-content:center;width:44px;height:44px;background:0;border:0;cursor:pointer;color:#333;border-radius:8px;margin-left:.25rem}
.search-btn:hover{background:#e8f0e1;color:#3e6b25}
.search-btn[aria-expanded=true]{background:#e8f0e1;color:#3e6b25}

.main-nav{display:none;position:fixed;top:60px;right:0;bottom:0;left:0;width:100vw;height:calc(100vh - 60px);background:#fff;padding:1.5rem;overflow-y:auto;z-index:200;box-shadow:0 4px 12px rgba(0,0,0,.1)}
.main-nav.show{display:block}
.main-nav ul{list-style:none;margin:0;padding:0}
.main-nav a{display:block;padding:.7rem 1rem;border-radius:8px;color:#333;font-weight:500}
.main-nav a:hover{background:#e8f0e1;color:#3e6b25;text-decoration:none}
.main-nav .sub-menu{padding-left:1rem;border-left:2px solid #a8c88c;margin-left:.5rem}
@media(min-width:1024px){
  .menu-btn{display:none}
  .search-btn{display:none}
  .main-nav{display:block!important;position:static;width:auto;height:auto;background:0;padding:0;overflow:visible;z-index:auto;box-shadow:none}
  .main-nav>ul{display:flex;gap:.25rem;align-items:center}
  .main-nav>ul>li{position:relative}
  .main-nav>ul>li>a{padding:.4rem .7rem;font-size:.9rem}
  .main-nav .sub-menu{position:absolute;top:100%;left:0;min-width:200px;background:#fff;border:1px solid #e5e0d6;border-radius:8px;padding:.5rem;box-shadow:0 4px 12px rgba(0,0,0,.08);display:none}
  .main-nav li:hover>.sub-menu{display:block}
}

/* ===== Hero ===== */
.hero{background:linear-gradient(135deg,#e8f0e1 0%,#f5f9f0 50%,#fafaf5 100%);border-radius:12px;padding:2rem 1.5rem;margin:1.5rem 0 2rem;text-align:center}
@media(min-width:768px){.hero{padding:3.5rem 3rem;text-align:left}}
.hero h1{margin-bottom:.75rem}
.hero p{color:#555;font-size:1.05rem;margin-bottom:1.25rem;max-width:600px}
.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.7rem 1.4rem;border-radius:8px;font-weight:600;font-size:.95rem;border:0;cursor:pointer;text-decoration:none;transition:.15s}
.btn:hover{text-decoration:none;transform:translateY(-1px)}
.btn-primary{background:#5a8a3a;color:#fff}
.btn-primary:hover{background:#3e6b25;color:#fff}
.btn-outline{background:0;color:#3e6b25;border:1.5px solid #5a8a3a}
.btn-outline:hover{background:#e8f0e1}
.hero .btns{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:center}
@media(min-width:768px){.hero .btns{justify-content:flex-start}}

/* ===== Cards ===== */
.card-grid{display:grid;gap:1.5rem;grid-template-columns:1fr}
@media(min-width:640px){.card-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.card-grid{grid-template-columns:repeat(3,1fr);gap:2rem}}
.card{background:#fff;border:1px solid #e5e0d6;border-radius:12px;overflow:hidden;transition:transform .2s,box-shadow .2s}
.card:hover{transform:translateY(-3px);box-shadow:0 4px 12px rgba(0,0,0,.06)}
.card-thumb{aspect-ratio:16/9;overflow:hidden;background:#e8f0e1}
.card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.card:hover .card-thumb img{transform:scale(1.04)}
.card-body{padding:1.25rem}
.card-cat{display:inline-block;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#4a7530;background:#e8f0e1;padding:3px 10px;border-radius:20px;margin-bottom:.6rem}
.card-title{font-size:1.1rem;margin-bottom:.4rem}
.card-title a{color:#1f3a13}
.card-title a:hover{color:#4a7530}
.card-excerpt{font-size:.9rem;color:#555;margin-bottom:.75rem}
.card-meta{font-size:.8rem;color:#888}

/* ===== Page layout ===== */
.page-layout{display:grid;gap:2rem;grid-template-columns:1fr}
@media(min-width:1024px){.page-layout.has-sidebar{grid-template-columns:1fr 300px}}

/* ===== Sidebar ===== */
.sidebar{display:flex;flex-direction:column;gap:1.5rem}
@media(min-width:1024px){.sidebar{position:sticky;top:80px}}
.widget{background:#fff;border:1px solid #e5e0d6;border-radius:12px;padding:1.25rem}
.widget h3{font-size:.95rem;margin-bottom:.75rem;padding-bottom:.5rem;border-bottom:1px solid #e5e0d6}
.widget ul{list-style:none;padding:0;margin:0}
.widget li{padding:.35rem 0;border-bottom:1px dashed #e5e0d6;font-size:.9rem}
.widget li:last-child{border-bottom:0}
.widget a{color:#555}
.widget a:hover{color:#3e6b25}

/* ===== Category Nav ===== */
.cat-nav{display:grid;gap:.75rem;grid-template-columns:repeat(2,1fr)}
@media(min-width:480px){.cat-nav{grid-template-columns:repeat(4,1fr)}}
@media(min-width:768px){.cat-nav{grid-template-columns:repeat(4,1fr);gap:1rem}}
.cat-nav__item{display:flex;flex-direction:column;align-items:center;gap:.35rem;padding:1.25rem .75rem;background:#fff;border:1px solid #e5e0d6;border-radius:12px;text-decoration:none;transition:transform .2s,box-shadow .2s}
.cat-nav__item:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.06);text-decoration:none;border-color:#a8c88c}
.cat-nav__icon{font-size:1.8rem}
.cat-nav__name{font-weight:600;font-size:.9rem;color:#1f3a13;text-align:center}
.cat-nav__count{font-size:.7rem;color:#888}

/* ===== Article ===== */
.article-header{margin-bottom:2rem}
.article-title{margin-bottom:.5rem}
.article-meta{font-size:.9rem;color:#888;display:flex;flex-wrap:wrap;gap:.5rem}
.article-thumb{border-radius:12px;overflow:hidden;margin:1.5rem 0}
.article-body{font-size:1.05rem;line-height:1.8;max-width:720px}
.article-body h2{margin-top:2.5rem;padding-bottom:.5rem;border-bottom:1px solid #e5e0d6}
.article-body h3{margin-top:2rem}
.article-body img{border-radius:8px;margin:1.5rem 0}
.article-body iframe{width:100%!important;aspect-ratio:16/9;height:auto!important;border-radius:8px}
.article-body blockquote{border-left:4px solid #a8c88c;background:#e8f0e1;padding:1rem 1.5rem;margin:1.5rem 0;border-radius:0 8px 8px 0;font-style:italic}
.article-body table{width:100%;border-collapse:collapse;margin:1.5rem 0;font-size:.9rem}
.article-body th{background:#e8f0e1;padding:.75rem;text-align:left;border-bottom:1px solid #e5e0d6}
.article-body td{padding:.75rem;border-bottom:1px solid #e5e0d6}
.article-foot{margin-top:2.5rem;padding-top:2rem;border-top:1px solid #e5e0d6}

/* ===== TL;DR ===== */
.tldr{background:#e8f0e1;border-left:4px solid #5a8a3a;padding:1rem 1.25rem;border-radius:0 8px 8px 0;margin-bottom:1.5rem}
.tldr-label{display:inline-block;background:#5a8a3a;color:#fff;font-size:.65rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:3px 8px;border-radius:4px;margin-bottom:.5rem}
.tldr p{margin:0;font-weight:600;color:#1f3a13;font-size:1.05rem}

/* ===== Tags ===== */
.tags{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem}
.tags a{font-size:.8rem;background:#e8f0e1;color:#4a7530;padding:4px 12px;border-radius:20px}
.tags a:hover{background:#5a8a3a;color:#fff;text-decoration:none}

/* ===== Post nav ===== */
.post-nav{display:grid;gap:1rem;grid-template-columns:1fr;margin:2rem 0}
@media(min-width:640px){.post-nav{grid-template-columns:1fr 1fr}}
.post-nav a{padding:1rem;border:1px solid #e5e0d6;border-radius:12px;display:block}
.post-nav a:hover{border-color:#a8c88c;background:#f8faf5;text-decoration:none}
.post-nav .nav-label{font-size:.7rem;text-transform:uppercase;color:#4a7530;letter-spacing:.05em;display:block}
.post-nav .nav-title{font-weight:600;color:#1f3a13}

/* ===== Pagination ===== */
.pagination{margin:2.5rem 0;display:flex;justify-content:center;gap:.25rem}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 .5rem;border-radius:8px;font-weight:500;color:#333;border:1px solid transparent}
.pagination a:hover{background:#e8f0e1;border-color:#a8c88c;text-decoration:none}
.pagination .current{background:#5a8a3a;color:#fff}

/* ===== Footer ===== */
.site-ft{background:#5b4636;color:#d4ccc0;padding:3rem 0 1.5rem;margin-top:4rem}
.site-ft a{color:#a8c88c}
.site-ft a:hover{color:#fff}
.ft-grid{display:grid;gap:2rem;grid-template-columns:1fr}
@media(min-width:640px){.ft-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.ft-grid{grid-template-columns:repeat(4,1fr)}}
.ft-bottom{margin-top:2rem;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.1);text-align:center;font-size:.85rem}

/* ===== 404 ===== */
.page-404{text-align:center;padding:5rem 1rem}
.page-404 h1{font-size:2.5rem;margin-bottom:1rem}

/* ===== Search ===== */
.search-panel{background:#e8f0e1;padding:1rem 0;display:none}
.search-panel.open{display:block}
.search-panel form{display:flex;gap:.5rem;max-width:500px;margin:0 auto}
.search-panel input{flex:1;padding:.7rem 1rem;border:1px solid #e5e0d6;border-radius:8px;font-size:1rem}
.search-panel button{padding:.7rem 1.5rem;background:#5a8a3a;color:#fff;border:0;border-radius:8px;cursor:pointer;font-weight:600}

/* ===== Comments ===== */
.comment-form input,.comment-form textarea{width:100%;padding:.7rem;border:1px solid #e5e0d6;border-radius:8px;margin-bottom:.75rem;font:inherit}
.comment-form input[type=submit]{background:#5a8a3a;color:#fff;border:0;cursor:pointer;font-weight:600;width:auto;padding:.7rem 1.5rem}

/* ===== Responsive ===== */
@media(max-width:480px){.hero{padding:1.5rem 1rem}.hero h1{font-size:1.35rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}