/*
Theme Name: Heal and Happy
Theme URI: https://example.com/heal-and-happy
Author: OpenAI Codex
Description: A custom wellness magazine WordPress theme with curated homepage sections, automatic navigation pages, and customizable header/footer styles.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: heal-and-happy
*/

:root {
  --hh-background: #f5efe6;
  --hh-surface: #fffdf8;
  --hh-accent: #3f7d65;
  --hh-accent-dark: #254d3f;
  --hh-heading: #20362f;
  --hh-text: #4e5d57;
  --hh-border: #d8d0c3;
  --hh-header-bg: #fffaf2;
  --hh-header-text: #20362f;
  --hh-footer-bg: #23352f;
  --hh-footer-text: #f8f3ea;
  --hh-highlight: #f0c77f;
  --hh-soft: #e8dfd2;
  --hh-shadow: 0 18px 45px rgba(31, 51, 43, 0.08);
  --hh-radius-lg: 30px;
  --hh-radius-md: 20px;
  --hh-radius-sm: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(240, 199, 127, 0.18), transparent 30%),
    linear-gradient(180deg, #fffdf9 0%, var(--hh-background) 100%);
  color: var(--hh-text);
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--hh-header-bg) 92%, white 8%);
  color: var(--hh-header-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.site-footer__inner,
.content-width {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.site-branding__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--hh-accent), var(--hh-accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  box-shadow: var(--hh-shadow);
}

.site-branding__text {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
  color: var(--hh-header-text);
}

.site-branding__tag {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--hh-header-text) 70%, transparent);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  background: var(--hh-accent);
  color: #fff;
  font: inherit;
}

.menu-close {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  background: rgba(63, 125, 101, 0.12);
  color: var(--hh-heading);
  font: inherit;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.primary-navigation ul,
.footer-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.primary-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.45);
  transition: 0.25s ease;
}

.primary-navigation .current-menu-item > a,
.primary-navigation a:hover,
.primary-navigation a:focus {
  background: var(--hh-accent);
  color: #fff;
}

.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  background: var(--hh-heading);
  color: #fff;
  font-weight: 600;
}

.site-main {
  padding-bottom: 4rem;
}

.hero {
  padding: 4.5rem 0 2.5rem;
}

.hero__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 2rem;
  align-items: stretch;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 239, 230, 0.88)),
    linear-gradient(135deg, rgba(63, 125, 101, 0.08), transparent 60%);
  box-shadow: var(--hh-shadow);
}

.hero__eyebrow,
.section__eyebrow {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(63, 125, 101, 0.1);
  color: var(--hh-accent-dark);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1,
.section__title,
.page-header__title {
  margin: 1rem 0 0.8rem;
  color: var(--hh-heading);
  line-height: 1.08;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.hero__copy {
  font-size: 1.08rem;
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
}

.button-link--primary {
  background: var(--hh-accent);
  color: #fff;
}

.button-link--secondary {
  border: 1px solid var(--hh-border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--hh-heading);
}

.hero__aside {
  display: grid;
  gap: 1rem;
}

.hero-feature {
  padding: 1.25rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(35, 53, 47, 0.96), rgba(53, 83, 72, 0.94));
  color: #fff;
}

.hero-feature h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
}

.hero-feature ul {
  margin: 0;
  padding-left: 1.2rem;
}

.hero-feature li + li {
  margin-top: 0.55rem;
}

.page-section {
  padding: 1.4rem 0 0;
}

.section {
  padding: 2.25rem 0;
}

.section--compact {
  padding-bottom: 0.4rem;
}

.section__head,
.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section__title,
.page-header__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section__title--small {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section__description,
.page-header__description {
  max-width: 64ch;
  margin: 0;
  font-size: 1rem;
}

.section__link {
  font-weight: 700;
  color: var(--hh-accent-dark);
}

.home-admin-links,
.home-section-actions,
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.home-admin-links {
  padding-top: 1.2rem;
}

.home-section-actions {
  margin-bottom: 1rem;
}

.category-strip__link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 239, 230, 0.9));
  box-shadow: var(--hh-shadow);
  font-weight: 700;
  color: var(--hh-accent-dark);
  border: 1px solid rgba(63, 125, 101, 0.12);
}

.category-strip__icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 18%, transparent 20%),
    linear-gradient(135deg, var(--hh-accent), #8eb7a3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.category-strip__icon svg {
  width: 1rem;
  height: 1rem;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-strip__icon--health-topics {
  background: linear-gradient(135deg, #d26a6a, #ef9a8f);
}

.category-strip__icon--health-topics svg {
  fill: #fff;
  stroke: none;
}

.category-strip__icon--wellness {
  background: linear-gradient(135deg, #4f8d72, #8ec5a0);
}

.category-strip__icon--wellness svg {
  fill: rgba(255, 255, 255, 0.95);
  stroke: none;
}

.category-strip__icon--ayurveda {
  background: linear-gradient(135deg, #6b8f3d, #accf62);
}

.category-strip__icon--recipes {
  background: linear-gradient(135deg, #d3913a, #efc16f);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.cards-grid--stacked {
  grid-template-columns: 1fr;
}

.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--hh-radius-lg);
  background: color-mix(in srgb, var(--hh-surface) 94%, white 6%);
  box-shadow: var(--hh-shadow);
}

.article-card--horizontal {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
}

.article-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.3rem;
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hh-accent-dark);
}

.category-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.category-badges a,
.article-single__terms a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(63, 125, 101, 0.12);
  color: var(--hh-accent-dark);
}

.category-badges a:nth-child(3n + 1),
.article-single__terms a:nth-child(3n + 1) {
  background: rgba(63, 125, 101, 0.12);
}

.category-badges a:nth-child(3n + 2),
.article-single__terms a:nth-child(3n + 2) {
  background: rgba(240, 199, 127, 0.24);
}

.category-badges a:nth-child(3n),
.article-single__terms a:nth-child(3n) {
  background: rgba(35, 53, 47, 0.12);
}

.article-card__title {
  margin: 0;
  color: var(--hh-heading);
  font-size: 1.45rem;
  line-height: 1.2;
}

.article-card__title a {
  color: inherit;
}

.article-card__excerpt {
  margin: 0;
}

.article-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.article-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(63, 125, 101, 0.12);
  color: var(--hh-accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.section-band {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(63, 125, 101, 0.12);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(232, 223, 210, 0.35));
}

.section-band__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.section-band__item {
  padding: 1rem;
  border-radius: var(--hh-radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.page-header {
  padding-top: 3.5rem;
}

.page-summary {
  margin-top: 2rem;
  padding: 1.4rem;
  border-left: 5px solid var(--hh-accent);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0 var(--hh-radius-md) var(--hh-radius-md) 0;
}

.site-footer {
  margin-top: 4rem;
  background: var(--hh-footer-bg);
  color: var(--hh-footer-text);
}

.site-footer__inner {
  padding: 3rem 0 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h2,
.site-footer h3 {
  margin-top: 0;
  color: inherit;
}

.footer-navigation ul,
.footer-links {
  display: grid;
  gap: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-note {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
}

.page-content {
  padding: 1rem 0 0;
}

.archive-list {
  display: grid;
  gap: 1.25rem;
}

.pagination-wrap .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--hh-shadow);
}

.pagination-wrap .current {
  background: var(--hh-accent);
  color: #fff;
}

.search-panel {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  border-radius: var(--hh-radius-md);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--hh-shadow);
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.search-form__input {
  flex: 1 1 280px;
  min-height: 48px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--hh-border);
  border-radius: 999px;
  font: inherit;
}

.search-form__button {
  min-height: 48px;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--hh-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.checks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.check-card {
  padding: 1.4rem;
  border-radius: var(--hh-radius-lg);
  background: color-mix(in srgb, var(--hh-surface) 94%, white 6%);
  box-shadow: var(--hh-shadow);
}

.check-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.check-form input,
.check-form select {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--hh-border);
  border-radius: 18px;
  font: inherit;
  background: #fff;
}

.check-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--hh-radius-md);
  background: rgba(63, 125, 101, 0.08);
  color: var(--hh-accent-dark);
  min-height: 72px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 1.5rem;
  align-items: start;
}

.article-single {
  padding: 1.5rem;
  border-radius: var(--hh-radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--hh-shadow);
}

.article-single__media {
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 24px;
}

.article-single__media img {
  width: 100%;
  height: auto;
}

.article-single__meta,
.article-single__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-bottom: 1rem;
  color: var(--hh-accent-dark);
  font-size: 0.92rem;
  font-weight: 600;
}

.article-single__footer {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hh-border);
}

.content-sidebar {
  display: grid;
  gap: 1rem;
}

.author-line {
  font-size: 0.92rem;
  color: var(--hh-accent-dark);
}

.author-box,
.comments-area,
.not-found {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--hh-radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--hh-shadow);
}

.comments-title {
  margin-top: 0;
  color: var(--hh-heading);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}

.comment-list .comment {
  padding: 1rem 1.1rem;
  border-radius: var(--hh-radius-md);
  background: rgba(245, 239, 230, 0.65);
}

.comment-meta {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  color: var(--hh-accent-dark);
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-respond label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--hh-heading);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--hh-border);
  border-radius: 18px;
  font: inherit;
  background: #fff;
}

.widget {
  padding: 1.25rem;
  border-radius: var(--hh-radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--hh-shadow);
}

.widget-title {
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: var(--hh-heading);
}

.widget ul {
  margin: 0;
  padding-left: 1.1rem;
}

.widget select,
.widget input,
.widget button {
  max-width: 100%;
}

@media (max-width: 960px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 100%);
    height: 100vh;
    padding: 1rem;
    display: block;
    background: rgba(255, 250, 242, 0.98);
    box-shadow: -8px 0 32px rgba(32, 54, 47, 0.16);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .primary-navigation.is-open {
    transform: translateX(0);
  }

  .primary-navigation ul {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 24px;
  }

  .menu-close {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .hero__panel,
  .cards-grid,
  .checks-grid,
  .section-band__grid,
  .site-footer__grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-card--horizontal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header__inner,
  .site-footer__inner,
  .content-width {
    width: min(100% - 1.2rem, 1180px);
  }

  .hero {
    padding-top: 3rem;
  }

  .hero__panel {
    border-radius: 24px;
  }

  .article-card__title {
    font-size: 1.25rem;
  }
}
