/*
Theme Name: CSSBuy Spreadsheet Guide
Theme URI: https://sheetfinds.com/
Author: CSSBuy Spreadsheet
Author URI: https://sheetfinds.com/
Description: A clean, light, Western-aesthetic WordPress theme for CSSBuy Spreadsheet SEO content. Features dropdown category navigation to external product pages, 21 auto-imported original SEO guide articles, internal link scaffolding, and a fast, Google-friendly homepage layout.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cssbuy-guide
Tags: blog, one-page, custom-menu, custom-colors, seo, light, clean
*/

/* ============================================
   Design tokens — light pastel Western palette
   ============================================ */
:root {
  --bg: #FFFBF5;
  --bg-alt: #FFF4E8;
  --bg-mint: #EAFBF3;
  --bg-sky:  #EAF3FF;
  --bg-lavender: #F1ECFF;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --border: #F0E7DA;
  --primary: #FF7A59;
  --primary-hover: #FF5F3D;
  --secondary: #4ECDC4;
  --accent: #7C9EFF;
  --yellow: #FFD166;
  --shadow-sm: 0 1px 3px rgba(31, 41, 55, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.08);
  --shadow-lg: 0 20px 40px rgba(31, 41, 55, 0.10);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --transition: 200ms ease;
  --container: 1180px;
}

/* ============================================
   Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1.1em; color: var(--text); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 245, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.15rem;
  color: var(--text);
}
.site-brand .brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--yellow));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
}

/* ============================================
   Nav + Dropdowns
   ============================================ */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav > .nav-item { position: relative; }
.main-nav .nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}
.main-nav .nav-link:hover { background: var(--bg-alt); color: var(--primary); }
.main-nav .nav-link .chev {
  width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -3px; margin-left: 2px;
  transition: transform var(--transition);
}
.nav-item.has-dropdown:hover .nav-link .chev,
.nav-item.has-dropdown:focus-within .nav-link .chev { transform: rotate(-135deg); margin-top: 3px; }

.dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition);
  z-index: 60;
}
.dropdown.dropdown-wide { min-width: 340px; }
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block; padding: 10px 12px; border-radius: 8px;
  color: var(--text); font-size: 0.93rem;
  transition: background var(--transition), color var(--transition);
}
.dropdown a:hover { background: var(--bg-alt); color: var(--primary); }
.dropdown .dd-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 8px 12px 4px;
}

/* Mobile nav */
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 12px; gap: 4px;
    max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .dropdown { position: static; box-shadow: none; border: 0; opacity: 1; visibility: visible; transform: none; padding: 4px 0 4px 12px; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.98rem;
  border-radius: 999px;
  border: 0; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #FFA07A);
  color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 89, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 122, 89, 0.35); color: #fff; }
.btn-secondary {
  background: #fff; color: var(--text); border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid transparent; }
.btn-ghost:hover { background: var(--bg-alt); color: var(--primary); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative; padding: 80px 0 60px; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--bg-lavender), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, var(--bg-sky), transparent 60%),
    radial-gradient(700px 400px at 50% 120%, var(--bg-mint), transparent 60%),
    var(--bg);
}
.hero-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.hero h1 { margin-bottom: 18px; }
.hero h1 span.hl {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }

/* Category selector on hero */
.hero-select {
  max-width: 460px; margin: 0 auto; background: #fff;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 6px 6px 20px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-md);
}
.hero-select label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.hero-select select {
  flex: 1; border: 0; background: transparent; font-family: inherit; font-size: 0.95rem;
  color: var(--text); padding: 10px 4px; outline: none; cursor: pointer;
}
.hero-select .go {
  padding: 10px 22px; border-radius: 999px; background: var(--primary); color: #fff;
  border: 0; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background var(--transition);
}
.hero-select .go:hover { background: var(--primary-hover); }

/* ============================================
   Sections
   ============================================ */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head .kicker {
  color: var(--primary); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 8px;
}
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ============================================
   Category grid
   ============================================ */
.cat-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  color: var(--text);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; color: var(--text); }
.cat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700;
}
.cat-icon.c1 { background: #FFEDD5; color: #C2410C; }
.cat-icon.c2 { background: #DBEAFE; color: #1D4ED8; }
.cat-icon.c3 { background: #DCFCE7; color: #15803D; }
.cat-icon.c4 { background: #FCE7F3; color: #BE185D; }
.cat-icon.c5 { background: #FEF3C7; color: #A16207; }
.cat-icon.c6 { background: #E9D5FF; color: #7E22CE; }
.cat-icon.c7 { background: #CCFBF1; color: #0F766E; }
.cat-icon.c8 { background: #FEE2E2; color: #B91C1C; }
.cat-icon.c9 { background: #E0E7FF; color: #4338CA; }
.cat-icon.c10 { background: #FFE4E6; color: #BE123C; }
.cat-icon.c11 { background: #F0FDF4; color: #166534; }
.cat-card h3 { font-size: 1.05rem; margin: 0; }
.cat-card .cat-cta { font-size: 0.85rem; color: var(--text-muted); margin-top: auto; display: inline-flex; align-items: center; gap: 4px; }
.cat-card:hover .cat-cta { color: var(--primary); }

/* ============================================
   Article cards (Guide grid)
   ============================================ */
.article-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.article-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
  color: var(--text);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--text); }
.article-card .tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--bg-sky); color: #1D4ED8;
}
.article-card h3 { font-size: 1.1rem; margin: 4px 0 8px; line-height: 1.35; }
.article-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; flex: 1; }
.article-card .read {
  margin-top: 14px; font-size: 0.9rem; color: var(--primary); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ============================================
   CTA band
   ============================================ */
.cta-band {
  background: linear-gradient(120deg, #FFF4E8, #F1ECFF);
  border-radius: var(--radius-lg);
  padding: 56px 40px; text-align: center;
  border: 1px solid var(--border);
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 24px; }
.cta-band .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================
   Article (single post) styles
   ============================================ */
.article-page { padding: 60px 0 90px; background: var(--bg); }
.article-page .article-inner { max-width: 780px; margin: 0 auto; }
.article-page .meta-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px;
}
.article-page .meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); }
.article-page h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 20px; }
.article-page .lead {
  font-size: 1.15rem; color: var(--text-muted); margin-bottom: 30px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.article-page .prose { font-size: 1.05rem; line-height: 1.8; }
.article-page .prose h2 { margin-top: 2em; margin-bottom: 0.6em; }
.article-page .prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; }
.article-page .prose ul, .article-page .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.article-page .prose li { margin-bottom: 0.4em; }
.article-page .prose a { color: var(--primary); border-bottom: 1px dashed var(--primary); }
.article-page .prose a:hover { color: var(--primary-hover); border-bottom-style: solid; }
.article-page .prose blockquote {
  margin: 1.4em 0; padding: 18px 22px; border-left: 4px solid var(--primary);
  background: var(--bg-alt); border-radius: 8px; color: var(--text);
}

.article-footer {
  margin-top: 50px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--bg-sky), var(--bg-mint));
  text-align: center; border: 1px solid var(--border);
}
.article-footer h3 { margin: 0 0 8px; }
.article-footer p { color: var(--text-muted); margin: 0 0 18px; }

.related {
  margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border);
}
.related h3 { text-align: center; margin-bottom: 24px; }
.related-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: #FFFFFF; border-top: 1px solid var(--border);
  padding: 50px 0 30px; margin-top: 40px;
}
.footer-cols {
  display: grid; gap: 30px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  margin-bottom: 30px;
}
.footer-cols h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 8px 0; }
.footer-cols a { color: var(--text); font-size: 0.93rem; }
.footer-cols a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--text-muted); font-size: 0.85rem;
}

@media (max-width: 800px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .hero { padding: 60px 0 40px; }
  section { padding: 56px 0; }
  .cta-band { padding: 40px 24px; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  .hero-select { flex-direction: column; padding: 14px; border-radius: 18px; }
  .hero-select .go { width: 100%; }
}
