/*
Theme Name: WellnessCompass
Theme URI: https://wellnesscompass.com
Author: Berry
Description: A clean, editorial wellness theme for WellnessCompass.com. Focused on readability, trust, and natural aesthetics.
Version: 1.0
*/

/* ============================================================
   VARIABLES & RESET
============================================================ */
:root {
  --green-dark:   #2C5C3E;
  --green-main:   #4A8C63;
  --green-light:  #5B9A6F;
  --green-pale:   #EAF3ED;
  --green-muted:  #A8C5B0;
  --cream:        #FAF7F2;
  --cream-dark:   #F2EDE4;
  --brown-warm:   #7A5C3E;
  --text-dark:    #1E2A22;
  --text-body:    #3A4A40;
  --text-muted:   #6E8070;
  --white:        #FFFFFF;
  --border:       #DDE8E0;
  --shadow:       0 2px 20px rgba(44, 92, 62, 0.08);
  --shadow-hover: 0 8px 40px rgba(44, 92, 62, 0.15);
  --radius:       12px;
  --radius-sm:    6px;
  --font-head:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'Courier New', monospace;
  --max-width:    1200px;
  --content-width: 760px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-main); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dark); }

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1.4rem; }

blockquote {
  border-left: 4px solid var(--green-light);
  background: var(--green-pale);
  padding: 1.2rem 1.8rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--green-dark);
}

ul, ol { padding-left: 1.8rem; margin-bottom: 1.4rem; }
li { margin-bottom: 0.5rem; }
ul li::marker { color: var(--green-light); }

strong { color: var(--text-dark); font-weight: 700; }
em { color: var(--text-muted); }

hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ============================================================
   LAYOUT
============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: start;
  padding: 60px 0;
}
.content-wrap.full-width {
  grid-template-columns: 1fr;
}
main { min-width: 0; }

/* ============================================================
   HEADER
============================================================ */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(44, 92, 62, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-logo img { height: 52px; width: auto; }
.site-logo .text-logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.site-logo .text-logo span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--green-light);
  text-transform: uppercase;
  font-family: var(--font-body);
}

/* Nav */
nav#main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}
nav#main-nav a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-body);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  text-transform: uppercase;
}
nav#main-nav a:hover,
nav#main-nav .current-menu-item a {
  background: var(--green-pale);
  color: var(--green-dark);
}
.header-cta {
  background: var(--green-main);
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: 50px !important;
}
.header-cta:hover { background: var(--green-dark) !important; color: var(--white) !important; }

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all .3s;
}

/* ============================================================
   HERO / FRONT PAGE BANNER
============================================================ */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-main) 60%, var(--green-light) 100%);
  color: var(--white);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--white); margin-bottom: 1.2rem; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-cats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cat-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: all .2s;
}
.hero-cat-btn:hover { background: rgba(255,255,255,0.3); color: var(--white); }

/* ============================================================
   CATEGORY PILLS / BADGES
============================================================ */
.cat-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--green-pale);
  color: var(--green-dark);
  margin-bottom: 10px;
}
.cat-badge.nutrition  { background: #FFF4E0; color: #8B5E00; }
.cat-badge.mental     { background: #EEE8FF; color: #5B3DA6; }
.cat-badge.fitness    { background: #E0F4FF; color: #0B5F8A; }
.cat-badge.natural    { background: #E8F5EC; color: #2C6B3E; }

/* ============================================================
   CARD GRID
============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.posts-grid.featured-grid {
  grid-template-columns: 2fr 1fr;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }

.post-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-card__title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color .2s;
}
.post-card:hover .post-card__title { color: var(--green-main); }
.post-card__excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}
.post-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-main);
  margin-top: 12px;
  letter-spacing: 0.3px;
}
.read-more::after { content: '→'; transition: transform .2s; }
.post-card:hover .read-more::after { transform: translateX(4px); }

/* ============================================================
   SECTION HEADERS
============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.section-header h2 {
  font-size: 1.7rem;
  margin: 0;
  position: relative;
}
.section-header h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--green-main);
  margin-top: 6px;
  border-radius: 2px;
}
.view-all {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-main);
  letter-spacing: 0.5px;
}

/* ============================================================
   SINGLE POST
============================================================ */
.single-post-header {
  background: var(--white);
  padding: 60px 0 0;
  margin-bottom: 0;
}
.post-hero-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
}
.post-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; margin-bottom: 1rem; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.post-meta .author { font-weight: 600; color: var(--text-dark); }

.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.entry-content h2 { font-size: 1.65rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content img {
  border-radius: var(--radius-sm);
  margin: 2rem 0;
}
.entry-content a { color: var(--green-main); text-decoration: underline; text-underline-offset: 3px; }

/* Wellness disclaimer in content */
.entry-content div[style*="background:#f0f7f0"],
.entry-content .wellness-disclaimer {
  background: var(--green-pale) !important;
  border-left: 4px solid var(--green-light) !important;
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem !important;
  font-size: 0.9rem;
  color: var(--text-muted) !important;
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar { position: sticky; top: 90px; }
.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.widget-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-pale);
}

/* Newsletter widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--green-dark), var(--green-main));
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
}
.newsletter-widget .widget-title {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.2);
}
.newsletter-widget p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 1rem; }
.wc-newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.wc-newsletter-form input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-body);
  color: var(--text-dark);
  box-sizing: border-box;
}
.wc-newsletter-form input[type="email"]::placeholder { color: var(--text-muted); }
.wc-newsletter-form input[type="email"]:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.wc-newsletter-form button {
  width: 100%;
  background: var(--white);
  color: var(--green-dark);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s, transform .15s;
}
.wc-newsletter-form button:hover { background: var(--green-pale); transform: translateY(-1px); }
.wc-nl-msg { font-size: 0.82rem; margin: 4px 0 0; }
.wc-nl-msg.success { color: #a8f0c6; }
.wc-nl-msg.error   { color: #fca5a5; }

/* Popular posts widget */
.popular-post {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.popular-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.popular-post img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.popular-post-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
}

/* Category list widget */
.cat-list { list-style: none; padding: 0; }
.cat-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.cat-list li:last-child { border-bottom: none; }
.cat-list a { color: var(--text-body); font-weight: 500; }
.cat-list a:hover { color: var(--green-main); }
.cat-list .count {
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
}

/* ============================================================
   FOOTER
============================================================ */
#site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-about .footer-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-about p { font-size: 0.9rem; line-height: 1.7; }
.footer-heading {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   PAGINATION
============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 60px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-body);
  transition: all .2s;
}
.pagination a:hover { border-color: var(--green-main); color: var(--green-main); }
.pagination .current { background: var(--green-main); color: var(--white); border-color: var(--green-main); }

/* ============================================================
   UTILITIES
============================================================ */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.section { padding: 60px 0; }
.bg-white { background: var(--white); }
.bg-cream { background: var(--cream); }
.bg-green-pale { background: var(--green-pale); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .posts-grid.featured-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 640px) {
  nav#main-nav { display: none; }
  nav#main-nav.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 16px; border-bottom: 1px solid var(--border); }
  nav#main-nav.is-open ul { flex-direction: column; }
  .menu-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .posts-grid { grid-template-columns: 1fr; }
  .header-inner { position: relative; }
}