/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #faf9f7;
  --color-text: #2c2c2c;
  --color-text-light: #666;
  --color-accent: #3d6b4f;
  --color-accent-light: #e8f0ea;
  --color-border: #e0ddd8;
  --color-card-bg: #fff;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --max-width: 720px;
  --max-width-wide: 1080px;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1, h2, h3, h4 { font-family: var(--font-sans); line-height: 1.3; font-weight: 600; }
h1 { font-size: 2rem; margin-bottom: 0.5em; }
h2 { font-size: 1.4rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 1.5em 0 0.5em; }
p { margin-bottom: 1.2em; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  color: var(--color-text-light);
  font-style: italic;
}
ul, ol { margin: 0 0 1.2em 1.5em; }
li { margin-bottom: 0.3em; }
hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 2rem;
  background: var(--color-card-bg);
}
.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}
.site-title {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
.site-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.15em;
}
.site-nav { margin-top: 0.8rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 500;
}
.nav-list a:hover, .nav-list a.active { color: var(--color-accent); }

/* === Main Content === */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* === Hero === */
.hero { margin-bottom: 2.5rem; }
.hero h1 { font-size: 2.2rem; }
.hero-text { font-size: 1.1rem; color: var(--color-text-light); max-width: 600px; }
.hero-author { font-size: 0.9rem; color: var(--color-text-light); margin-top: 0.8rem; }

/* === Category Grid === */
.home-sections { margin-top: 3rem; }
.home-sections h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
  max-width: var(--max-width-wide);
}
.category-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.category-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-decoration: none;
}
.category-card h2, .category-card h3 { font-size: 1rem; margin: 0; color: var(--color-text); }
.category-count { font-size: 0.8rem; color: var(--color-text-light); margin: 0.3em 0 0; }

/* === Articles Image Grid (Homepage) === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: var(--max-width-wide);
}
.grid-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.grid-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.grid-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--color-accent-light);
}
.grid-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.grid-card:hover .grid-card-img img {
  transform: scale(1.05);
}
.grid-card-noimg {
  background: linear-gradient(135deg, var(--color-accent-light) 0%, #d4e4d8 100%);
}
.grid-card-body {
  padding: 1rem 1.2rem 1.2rem;
}
.grid-card-body h3 {
  font-size: 0.95rem;
  margin: 0 0 0.4em;
  color: var(--color-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grid-card-meta {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin: 0;
}

/* === Article List === */
.section-header { margin-bottom: 2rem; }
.section-description { color: var(--color-text-light); }
.article-preview { margin-bottom: 1.8rem; padding-bottom: 1.8rem; border-bottom: 1px solid var(--color-border); }
.article-preview.has-image { display: flex; gap: 1.5rem; align-items: flex-start; }
.article-preview:last-child { border-bottom: none; }
.article-preview h2, .article-preview h3 { margin: 0 0 0.3em; }
.article-preview h2 a, .article-preview h3 a { color: var(--color-text); }
.article-preview h2 a:hover, .article-preview h3 a:hover { color: var(--color-accent); }
.article-thumb { flex-shrink: 0; width: 160px; }
.article-thumb img { width: 160px; height: 120px; object-fit: cover; border-radius: 4px; display: block; }
.article-text { flex: 1; min-width: 0; }
.article-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 0.5em;
}

/* === Single Article === */
.article-header { margin-bottom: 2rem; }
.article-hero { width: 100%; max-height: 400px; object-fit: cover; border-radius: 6px; margin-bottom: 1.5rem; }
.article-tags { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 0.2em 0.7em;
  border-radius: 3px;
}
.article-body img { max-width: 100%; height: auto; border-radius: 4px; margin: 1.5em 0; }
.references { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.references h2 { font-size: 1.1rem; }
.references li { font-size: 0.9rem; color: var(--color-text-light); margin-bottom: 0.5em; }
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}
.nav-prev, .nav-next { max-width: 45%; }

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  margin-top: 3rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-light);
}
.footer-inner { max-width: var(--max-width-wide); margin: 0 auto; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.8rem; }
.footer-links a { color: var(--color-text-light); }
.footer-links a:hover { color: var(--color-accent); }

/* === Mobile === */
@media (max-width: 700px) {
  html { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-list { display: none; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
  .nav-list.open { display: flex; }
  .hero h1 { font-size: 1.7rem; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .grid-card-img { height: 140px; }
  .grid-card-body { padding: 0.8rem; }
  .grid-card-body h3 { font-size: 0.85rem; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .site-header { padding: 1rem 1.2rem; }
  main { padding: 1.5rem 1.2rem; }
  .article-preview.has-image { flex-direction: column; }
  .article-thumb { width: 100%; }
  .article-thumb img { width: 100%; height: 200px; }
}

@media (max-width: 480px) {
  .articles-grid { grid-template-columns: 1fr; }
  .grid-card-img { height: 200px; }
}
/* =============================================
   GESTALT THERAPY RESOURCE PAGE
   Add this to the END of your existing style.css
   ============================================= */

/* Hero image */
.resource-hero {
  margin: -2rem -1rem 2rem -1rem;
  max-height: 350px;
  overflow: hidden;
}
.resource-hero img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

/* Article grid */
.gestalt-articles-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
}

.gestalt-articles-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.gestalt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.gestalt-grid-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #eee;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gestalt-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.gestalt-grid-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.gestalt-grid-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #e8e0d6 0%, #d4c8b8 100%);
}

.gestalt-grid-title {
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  color: #2c2c2c;
}

/* Responsive */
@media (max-width: 600px) {
  .gestalt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  .gestalt-grid-item img,
  .gestalt-grid-placeholder {
    height: 130px;
  }
  .gestalt-grid-title {
    font-size: 0.78rem;
    padding: 0.5rem;
  }
  .resource-hero {
    max-height: 200px;
  }
  .resource-hero img {
    height: 200px;
  }
}
