/*
Theme Name: Calories Today Blog
Theme URI: https://calories.today
Author: Calories.Today
Author URI: https://calories.today
Description: A clean, minimal blog theme for Calories.Today
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: calories-today
*/

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

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2d6a4f;
  --accent-light: #e8f5ee;
  --border: #e8e4de;
  --callout-bg: #f0f7f3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

/* ─── NAV ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 5vw, 3rem);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent) !important;
  color: white !important;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-weight: 500 !important;
  font-size: 0.85rem !important;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.88; }

/* ─── BLOG INDEX ─── */
.blog-index {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2rem);
}
.blog-index-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.blog-index-desc {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.5s ease both;
}
.post-card:last-child { border-bottom: none; }
.post-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
  text-decoration: none;
}
.post-card-title {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.post-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.post-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.post-card-meta span { opacity: 0.5; }
.read-more {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: auto;
}
.read-more:hover { text-decoration: underline; }

/* ─── SINGLE POST HERO ─── */
.post-hero {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 2rem) 2.5rem;
  animation: fadeUp 0.55s ease both;
}
.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  text-decoration: none;
}
.post-hero h1 {
  font-family: 'Lora', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.post-hero h1 em { font-style: italic; color: var(--accent); }
.post-lede {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  font-weight: 300;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.post-meta-dot { opacity: 0.4; }

/* ─── SINGLE POST CONTENT ─── */
.post-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 2rem) 5rem;
  animation: fadeUp 0.55s ease 0.1s both;
}
.post-content p { margin-bottom: 1.4rem; color: #2a2a2a; }

.post-content h2 {
  font-family: 'Lora', serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  margin: 3rem 0 1rem;
}
.post-content h3 {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.6rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 0 0.75rem 1.5rem;
  margin: 2.5rem 0;
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

/* Callout box */
.callout {
  background: var(--callout-bg);
  border: 1px solid #b7dfc9;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.callout-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.callout p { margin: 0; font-size: 0.97rem; }

/* Stat boxes */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.stat-num {
  font-family: 'Lora', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}
.stat-label { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }

/* Comparison table */
.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.93rem;
}
.compare th {
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--border);
}
.compare th:not(:first-child) { text-align: center; }
.compare td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: #2a2a2a;
}
.compare td:not(:first-child) { text-align: center; }
.compare tr:last-child td { border-bottom: none; }
.compare tr:hover td { background: #fafaf7; }
.check { color: var(--accent); font-weight: 700; }
.cross { color: #c0392b; }

/* CTA banner */
.cta-banner {
  background: var(--accent);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 4rem 0 2rem;
}
.cta-banner h3 {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 0.6rem;
  font-style: italic;
}
.cta-banner p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; font-size: 0.95rem; }
.cta-btn {
  display: inline-block;
  background: white;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.15); }
.cta-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.75rem;
  margin-bottom: 0 !important;
}

/* ─── FOOTER ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.25rem, 5vw, 3rem);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer p + p { margin-top: 0.4rem; }

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 3rem;
}
.pagination a, .pagination span {
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.15s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .compare { font-size: 0.82rem; }
  .compare th, .compare td { padding: 0.5rem 0.6rem; }
  .nav-links a:not(.nav-cta) { display: none; }
}
