/* ============================================================
   Template 8 — Sleep / Comfort / Mattress
   Layout: centred magazine header · sidebar-meta article
   Palette: deep green #1a3c34 + warm beige bg + gold #c9a84c
   Fonts: Playfair Display (headings) + Jost (UI/body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400&family=Jost:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #f7f5f0;
  --bg-white:    #ffffff;
  --bg-soft:     #f0ede6;
  --text:        #1c1a18;
  --text-mid:    #3d3a35;
  --text-muted:  #7d7870;
  --border:      #e0ddd6;
  --green:       #1a3c34;
  --green-mid:   #235045;
  --green-light: #eaf2ef;
  --gold:        #c9a84c;
  --gold-light:  #fdf8ee;
  --gold-dark:   #9e7d2a;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-ui:     'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 16px; }
body { font-family: var(--font-ui); background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-mid); text-decoration: underline; }

/* ============================================================
   HEADER — centred magazine style
   Top bar → Logo centred → Nav centred
   ============================================================ */
#masthead { background: var(--green); }

.header-topbar {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 7px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.header-topbar a { color: rgba(255,255,255,0.4); }
.header-topbar a:hover { color: var(--gold); text-decoration: none; }
.header-topbar-links { display: flex; gap: 20px; }

.header-logo-row {
  text-align: center;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  display: block;
}
.site-title span { color: var(--gold); }
.site-title:hover { text-decoration: none; opacity: 0.9; }
.site-tagline {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 5px;
  display: block;
}

.header-nav-row { padding: 0 32px; }
.header-nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0;
}
.header-nav-inner a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  padding: 12px 18px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 2px solid transparent;
  display: block;
}
.header-nav-inner a:hover {
  color: #fff;
  border-bottom-color: var(--gold);
  text-decoration: none;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 24px 0;
  font-size: 0.7rem;
  font-family: var(--font-ui);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); text-decoration: none; }
.breadcrumb .sep { color: var(--border); }

/* ============================================================
   HOMEPAGE — featured left + numbered list right
   ============================================================ */
.home-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 72px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* Section label */
.section-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

/* Featured card */
.card-featured {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.card-featured-stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
}
.card-featured-body { padding: 30px 30px 24px; }
.card-cat {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  background: var(--gold-light);
  border: 1px solid #e8d59a;
  border-radius: 3px;
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 14px;
}
.card-featured-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.card-featured-title a { color: inherit; }
.card-featured-title a:hover { color: var(--green); text-decoration: none; }
.card-featured-excerpt {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.card-featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.73rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}
.card-featured-meta .sep { color: var(--border); }
.read-link {
  margin-left: auto;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.read-link:hover { color: var(--gold-dark); text-decoration: none; }

/* Right: numbered top list */
.home-side {}
.numbered-list { display: flex; flex-direction: column; gap: 0; }
.numbered-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.numbered-item:first-child { border-top: 1px solid var(--border); }
.num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  width: 36px;
  flex-shrink: 0;
  padding-top: 2px;
}
.num-body {}
.num-cat {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-family: var(--font-ui);
}
.num-title {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.num-title a { color: inherit; }
.num-title a:hover { color: var(--green); text-decoration: none; }
.num-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-ui);
}

/* ============================================================
   ARTICLE — sidebar-meta left + content right
   ============================================================ */
.article-outer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* Article title section — full width before columns */
.article-title-section {
  max-width: 780px;
  margin: 0 auto 36px;
  text-align: center;
  padding: 32px 0 36px;
  border-bottom: 1px solid var(--border);
}
.article-cat-pill {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--green);
  color: #fff;
  padding: 4px 14px;
  border-radius: 3px;
  margin-bottom: 18px;
}
.article-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.article-deck {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 300;
}

/* Two-column article body */
.article-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 52px;
  align-items: start;
}

/* Left meta sidebar */
.article-meta-col {
  position: sticky;
  top: 24px;
  font-family: var(--font-ui);
}
.meta-block {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}
.meta-block-head {
  background: var(--green);
  color: rgba(255,255,255,0.7);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 14px;
}
.meta-block-body { padding: 14px; }
.meta-row {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.meta-row:last-child { border-bottom: none; }
.meta-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.meta-value { color: var(--text); font-weight: 500; }
.meta-value a { color: var(--green); }

/* TOC in sidebar */
.toc-list { list-style: none; }
.toc-list li {
  border-bottom: 1px solid var(--border);
}
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: block;
  padding: 7px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  counter-increment: none;
}
.toc-list a:hover {
  color: var(--green);
  background: var(--green-light);
  text-decoration: none;
}

/* ============================================================
   ARTICLE CONTENT
   ============================================================ */
.entry-content {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-mid);
}
.entry-content p { margin-bottom: 1.35em; }
.entry-content > p:first-child {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--text);
  font-style: italic;
}

.entry-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.4em 0 0.7em;
  color: var(--text);
  letter-spacing: -0.01em;
}
.entry-content h3 {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 1.7em 0 0.4em;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.entry-content ul, .entry-content ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}
.entry-content li { margin-bottom: 0.45em; }
.entry-content strong { font-weight: 700; color: var(--text); }

/* Table */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-bottom: 2em;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.entry-content th {
  background: var(--green);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}
.entry-content tr:last-child td { border-bottom: none; }
.entry-content tr:nth-child(even) td { background: var(--bg-soft); }

/* Callout blocks with icon */
.callout {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 6px;
  margin: 1.8em 0;
  align-items: flex-start;
  font-size: 0.9rem;
  font-family: var(--font-ui);
}
.callout-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}
.callout-body { flex: 1; }
.callout-title {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.callout-text { line-height: 1.6; }

.callout.tip {
  background: var(--green-light);
  border: 1px solid #b0d0c8;
}
.callout.tip .callout-title { color: var(--green); }
.callout.tip .callout-text { color: #2a5248; }

.callout.warn {
  background: #fef9ec;
  border: 1px solid #f0d998;
}
.callout.warn .callout-title { color: var(--gold-dark); }
.callout.warn .callout-text { color: #6b5418; }

.callout.info {
  background: #f0f5ff;
  border: 1px solid #c4d4f0;
}
.callout.info .callout-title { color: #2a4a9e; }
.callout.info .callout-text { color: #243980; }

/* Rating comparison table */
.rating-table {
  border: 2px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
  margin: 2em 0;
  font-family: var(--font-ui);
}
.rating-table-head {
  background: var(--green);
  color: #fff;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rating-table-head div,
.rating-row div { padding: 10px 14px; }
.rating-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  align-items: center;
}
.rating-row:nth-child(even) { background: var(--bg-soft); }
.rating-row .type-name { font-weight: 600; color: var(--text); }
.stars { color: var(--gold); font-size: 0.8rem; letter-spacing: 1px; }

/* Entry footer tags */
.entry-footer {
  border-top: 1px solid var(--border);
  margin-top: 44px;
  padding-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}
.entry-footer a {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mid);
  margin: 2px 3px 2px 0;
}
.entry-footer a:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  text-decoration: none;
}

/* ============================================================
   FOOTER — slogan centred + columns
   ============================================================ */
#colophon {
  background: var(--green);
  font-family: var(--font-ui);
}
.footer-slogan {
  text-align: center;
  padding: 44px 32px 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-slogan-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 14px;
  line-height: 1.4;
}
.footer-slogan-text em { color: var(--gold); font-style: normal; }
.footer-links-row {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.footer-links-row a {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
}
.footer-links-row a:hover { color: var(--gold); text-decoration: none; }

.footer-cols {
  max-width: 1140px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer-about-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  margin-top: 10px;
}
.footer-col-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 0.82rem; color: rgba(255,255,255,0.4); }
.footer-col ul a:hover { color: #fff; text-decoration: none; }
.footer-site-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
}
.footer-site-name span { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  display: flex;
  justify-content: space-between;
}

/* Category page */
.cat-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%);
  text-align: center;
  padding: 52px 32px 44px;
}
.cat-hero h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 8px;
}
.cat-hero p { font-size: 0.88rem; color: rgba(255,255,255,0.55); }

/* Responsive */
@media (max-width: 860px) {
  .home-wrap { grid-template-columns: 1fr; }
  .article-body { grid-template-columns: 1fr; }
  .article-meta-col { position: static; }
  .article-title { font-size: 1.6rem; }
  .rating-table-head,
  .rating-row { grid-template-columns: 2fr 1fr 1fr; }
  .rating-table-head div:last-child,
  .rating-row div:last-child { display: none; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .header-nav-inner { flex-wrap: wrap; justify-content: center; }
}
