/* DIYThatThing — clean, fast, AdSense-ready */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #2D6A4F;
  --green-light: #40916C;
  --green-pale: #D8F3DC;
  --orange: #E76F51;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e0e0e0;
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --max: 1140px;
  --article-max: 760px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

html { font-size: 17px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-light); }

/* ── HEADER ── */
.site-header {
  background: var(--green);
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-logo { color: #fff; font-size: 1.35rem; font-weight: 700; letter-spacing: -.3px; }
.site-logo span { color: #B7E4C7; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: #B7E4C7; font-size: .9rem; font-weight: 500; transition: color .15s; }
.site-nav a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--orange); color: #fff !important;
  padding: .35rem .9rem; border-radius: 4px; font-size: .85rem !important;
}

/* ── LAYOUT ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.page-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0;
}
.page-main { min-width: 0; }
.page-sidebar { min-width: 0; }

/* ── HERO STRIP ── */
.hero-strip {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  color: #fff; padding: 2.5rem 1.5rem; text-align: center;
}
.hero-strip h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.hero-strip p { font-size: 1.05rem; opacity: .88; max-width: 540px; margin: 0 auto; }

/* ── AD SLOTS ── */
.ad-slot {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  font-size: .75rem;
  color: #999;
  margin: 1.75rem 0;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.ad-slot ins { display: block; width: 100%; }

/* ── ARTICLE CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.card {
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; transition: box-shadow .2s;
  background: var(--bg);
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-img-placeholder {
  width: 100%; height: 200px;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.card-body { padding: 1.1rem; }
.card-category {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--green); margin-bottom: .4rem;
}
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.35; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--green); text-decoration: none; }
.card-excerpt { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.card-meta { font-size: .78rem; color: #999; margin-top: .75rem; display: flex; gap: 1rem; }

/* ── ARTICLE PAGE ── */
.article-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.75rem; }
.article-category-badge {
  display: inline-block; background: var(--green-pale); color: var(--green);
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  padding: .25rem .65rem; border-radius: 4px; margin-bottom: .75rem;
}
.article-title { font-family: var(--font-serif); font-size: 2.1rem; line-height: 1.25; font-weight: 700; margin-bottom: 1rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.article-meta .author-link { color: var(--green); font-weight: 600; }
.article-meta .divider { color: var(--border); }
.article-hero { width: 100%; max-height: 460px; object-fit: cover; border-radius: 8px; margin-bottom: 1.75rem; }

/* ── ARTICLE BODY ── */
.article-body { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.8; color: #222; max-width: var(--article-max); }
.article-body h2 { font-family: var(--font); font-size: 1.45rem; font-weight: 700; margin: 2rem 0 .75rem; color: var(--text); }
.article-body h3 { font-family: var(--font); font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 .6rem; color: var(--text); }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol { margin: .75rem 0 1.2rem 1.5rem; }
.article-body li { margin-bottom: .4rem; }
.article-body strong { color: var(--text); }
.article-body blockquote {
  border-left: 4px solid var(--green); margin: 1.5rem 0;
  padding: .75rem 1.25rem; background: var(--green-pale);
  border-radius: 0 6px 6px 0; font-style: italic;
}
.article-body img { border-radius: 8px; margin: 1.5rem 0; }
.article-body a { color: var(--green); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-family: var(--font); font-size: .9rem; }
.article-body th { background: var(--green); color: #fff; padding: .6rem 1rem; text-align: left; }
.article-body td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--bg-soft); }

/* ── PRO TIP BOX ── */
.pro-tip {
  background: #FFF3E0; border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin: 1.5rem 0;
  font-family: var(--font); font-size: .95rem;
}
.pro-tip strong { color: var(--orange); display: block; margin-bottom: .25rem; }

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 2rem;
  font-family: var(--font); font-size: .9rem; max-width: var(--article-max);
}
.toc-title { font-weight: 700; margin-bottom: .75rem; color: var(--green); }
.toc ol { margin: 0 0 0 1.25rem; }
.toc li { margin-bottom: .3rem; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--green); }

/* ── AUTHOR BIO ── */
.author-bio {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; margin: 2.5rem 0;
  font-family: var(--font);
}
.author-avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
}
.author-bio-name { font-weight: 700; margin-bottom: .25rem; }
.author-bio-title { font-size: .82rem; color: var(--green); margin-bottom: .5rem; }
.author-bio-text { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }

/* ── FAQ ── */
.faq { margin: 2rem 0; font-family: var(--font); }
.faq-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq-q { font-weight: 600; margin-bottom: .5rem; font-size: .95rem; }
.faq-a { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* ── RELATED ── */
.related { margin: 2rem 0; font-family: var(--font); }
.related-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--green); }

/* ── SIDEBAR ── */
.sidebar-widget { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--green); color: var(--green); text-transform: uppercase; letter-spacing: .4px; font-size: .85rem; }
.category-list { list-style: none; }
.category-list li { padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.category-list li:last-child { border-bottom: none; }
.category-list a { color: var(--text); display: flex; justify-content: space-between; }
.category-list a:hover { color: var(--green); text-decoration: none; }
.category-count { background: var(--green-pale); color: var(--green); font-size: .75rem; font-weight: 600; padding: .1rem .45rem; border-radius: 10px; }
.recent-list { list-style: none; }
.recent-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; line-height: 1.4; }
.recent-list li:last-child { border-bottom: none; }
.recent-list a { color: var(--text); }
.recent-list a:hover { color: var(--green); text-decoration: none; }

/* ── BREADCRUMB ── */
.breadcrumb { font-size: .82rem; color: var(--text-muted); padding: .75rem 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep { color: var(--border); }

/* ── STATIC PAGES ── */
.static-page { max-width: 780px; padding: 2.5rem 0; }
.static-page h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.static-page h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .75rem; color: var(--green); }
.static-page p { margin-bottom: 1rem; line-height: 1.7; color: var(--text-muted); }
.static-page ul { margin: .75rem 0 1rem 1.5rem; }
.static-page li { margin-bottom: .4rem; color: var(--text-muted); }

/* ── CONTACT FORM ── */
.contact-form { max-width: 560px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .65rem .9rem;
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--font); font-size: .95rem; color: var(--text);
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--green); }
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit {
  background: var(--green); color: #fff; border: none;
  padding: .75rem 2rem; border-radius: 6px; font-size: 1rem;
  font-weight: 600; cursor: pointer; transition: background .2s;
}
.btn-submit:hover { background: var(--green-light); }

/* ── FOOTER ── */
.site-footer { background: #1a1a1a; color: #999; margin-top: 3rem; padding: 2.5rem 1.5rem 1.5rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { color: #fff; font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.footer-brand p { font-size: .85rem; line-height: 1.6; }
.footer-col h4 { color: #ddd; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; font-size: .85rem; }
.footer-col a { color: #999; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #333; padding-top: 1.25rem; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.footer-bottom a { color: #999; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: .5rem; justify-content: center; padding: 2rem 0; flex-wrap: wrap; }
.page-link { padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: .9rem; }
.page-link:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.page-link.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── NOTICE / ALERT ── */
.notice { padding: 1rem 1.25rem; border-radius: 6px; font-size: .9rem; margin: 1rem 0; }
.notice-success { background: var(--green-pale); color: var(--green); border: 1px solid #95d5b2; }
.notice-error { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  html { font-size: 15px; }
  .hero-strip h1 { font-size: 1.5rem; }
  .article-title { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .author-bio { flex-direction: column; }
}
