/*
Theme Name: Hapvol
Theme URI: https://example.com/hapvol
Author: OpenAI
Author URI: https://openai.com
Description: A lightweight premium-looking recipe WordPress theme for Hapvol.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: hapvol
*/

:root {
  --bg: #fbf7f1;
  --bg-soft: #fffaf4;
  --card: #ffffff;
  --text: #3f2d24;
  --muted: #7b6356;
  --muted-2: #8d776b;
  --accent: #b85c38;
  --accent-dark: #93452a;
  --accent-soft: #f4e5d7;
  --green-soft: #edf3e5;
  --green-text: #5f7148;
  --border: #eadfce;
  --radius: 28px;
  --radius-sm: 20px;
  --shadow: 0 16px 44px rgba(63,45,36,.08);
  --shadow-soft: 0 10px 24px rgba(63,45,36,.05);
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #fffaf4 0%, #fbf7f1 260px);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header,
.site-footer,
.top-strip { background: rgba(255,250,244,.94); backdrop-filter: blur(10px); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(234,223,206,.9);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  min-height: 86px;
}
.branding {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.custom-logo-link img {
  max-height: 52px;
  width: auto;
}
.brand-text { min-width: 0; }
.site-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.site-title a { color: var(--text); }
.site-tagline {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: .92rem;
  line-height: 1.3;
}

.main-nav {
  justify-self: center;
}
.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav li { margin: 0; }
.main-nav a {
  font-size: .96rem;
  font-weight: 700;
  color: #5d463a;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-button,
.button,
.wp-block-button__link,
input[type="submit"],
button,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, background-color .18s ease, opacity .18s ease;
}
.header-button:hover,
.button:hover,
button:hover,
input[type="submit"]:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button.secondary {
  background: #fff;
  color: #6a4b3d;
  border: 1px solid #d7c1ad;
  box-shadow: none;
}
.button.secondary:hover { background: #fff5ea; }

.top-strip {
  border-bottom: 1px solid var(--border);
  color: #7c6356;
  font-size: .92rem;
}
.top-strip-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.top-strip-features { display: flex; gap: 18px; flex-wrap: wrap; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
  padding: 52px 0 34px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9a5b3f;
  font-size: .94rem;
  font-weight: 700;
}
.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
  max-width: 13ch;
}
.hero p {
  max-width: 650px;
  font-size: 1.08rem;
  color: #6f5649;
  margin: 18px 0 0;
}
.hero-actions,
.search-inline-form,
.newsletter-form { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions { margin-top: 30px; }
.stats-grid,
.categories-grid,
.cards-grid,
.trust-grid,
.footer-grid,
.latest-grid,
.insight-grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
.stat-card,
.card,
.search-box,
.content-card,
.widget,
.trust-card,
.latest-card,
.insight-card,
.archive-card,
.single-article,
.page-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.stat-card { padding: 24px; }
.stat-card strong {
  display: block;
  font-size: 1.95rem;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.stat-card span { display: block; margin-top: 6px; color: var(--muted); font-size: .96rem; }

.hero-visual-wrap { position: relative; }
.hero-visual-wrap::before,
.hero-visual-wrap::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: .65;
  pointer-events: none;
}
.hero-visual-wrap::before {
  width: 110px;
  height: 110px;
  left: -10px;
  top: -12px;
  background: #f0c7a7;
}
.hero-visual-wrap::after {
  width: 140px;
  height: 140px;
  right: -14px;
  bottom: -10px;
  background: #d7e1c6;
}
.hero-visual {
  overflow: hidden;
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-visual img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}
.hero-panels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
}
.mini-panel {
  border-radius: 22px;
  padding: 18px;
  font-weight: 800;
  line-height: 1.35;
}
.mini-panel small {
  display: block;
  margin-bottom: 8px;
  font-size: .85rem;
  opacity: .8;
}
.mini-panel.warm { background: #fbf4eb; color: #7b4f3d; }
.mini-panel.green { background: var(--green-soft); color: var(--green-text); }

.section { padding: 34px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-header h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.04em; }
.section-header p,
.section-subtext,
.muted { color: var(--muted); }
.section-header p { margin: 6px 0 0; max-width: 720px; }

.search-box { padding: 28px; }
.search-box form { display: grid; grid-template-columns: minmax(0,1fr) 220px auto; gap: 12px; }
input[type="text"],
input[type="email"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid #d7c1ad;
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
}
textarea { min-height: 140px; border-radius: 24px; }
input:focus,
select:focus,
textarea:focus {
  border-color: #c78666;
  box-shadow: 0 0 0 4px rgba(184,92,56,.12);
}

.categories-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.category-card {
  display: block;
  padding: 22px;
  text-align: center;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.content-layout,
.archive-layout,
.page-layout,
.single-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 26px; }
.cards-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.recipe-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.recipe-card:hover,
.archive-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.recipe-card .thumb,
.archive-card .thumb,
.single-thumb { display: block; }
.recipe-card .thumb img,
.archive-card .thumb img,
.single-thumb img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.recipe-card .card-body,
.archive-card .card-body,
.single-content,
.page-content { padding: 24px; }
.meta-row,
.entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .92rem;
  color: var(--muted);
}
.chip,
.tag-cloud-link,
.widget_tag_cloud a,
.card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9a5b3f;
  font-size: .84rem !important;
  font-weight: 800;
}
.recipe-card h3,
.archive-card h2,
.latest-card h3,
.insight-card h3 {
  margin: 14px 0 0;
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: -.03em;
}
.recipe-card p,
.archive-card p,
.latest-card p,
.insight-card p { margin-bottom: 0; }

.sidebar { display: grid; gap: 20px; }
.widget { padding: 24px; }
.widget h3,
.widget h2 { margin: 0 0 12px; font-size: 1.35rem; }
.widget ul { margin: 0; padding-left: 18px; }
.widget li { margin-bottom: 8px; }

.trust-section { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.trust-card { padding: 24px; }
.trust-card h3 { margin-top: 0; font-size: 1.35rem; }

.insight-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.insight-card { padding: 24px; }
.insight-count {
  display: block;
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.05em;
}

.mission-layout {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 26px;
  align-items: center;
}
.mission-box {
  background: linear-gradient(135deg, #b85c38, #9e4c2f);
  color: #fff;
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 18px 40px rgba(94,54,38,.18);
}
.mission-box h2,
.mission-box p { color: #fff; }
.latest-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.latest-card { padding: 24px; }
.latest-card .card-label { margin-bottom: 14px; }
.newsletter {
  background: #2f241e;
  color: #fff;
  border-radius: 32px;
  padding: 34px;
}
.newsletter h2 { margin-top: 0; color: #fff; }
.newsletter p { color: rgba(255,255,255,.76); }
.newsletter input[type="email"] { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.newsletter input::placeholder { color: rgba(255,255,255,.6); }

.site-footer { border-top: 1px solid var(--border); margin-top: 36px; }
.footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; padding: 44px 0; }
.footer-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; }
.footer-col h4 { margin: 0 0 12px; font-size: 1.05rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; color: var(--muted); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .94rem;
}

.archive-layout,
.page-layout,
.single-layout { padding: 38px 0 20px; }
.archive-grid { display: grid; gap: 24px; }
.single-article,
.page-card { overflow: hidden; }
.entry-title {
  margin: 8px 0 0;
  font-size: clamp(2rem, 3.4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -.05em;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2,
.entry-content h3 { line-height: 1.15; letter-spacing: -.03em; }
.entry-content ul,
.entry-content ol { padding-left: 20px; }
.pagination { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

.post-nav,
.related-posts { margin-top: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.related-card { background: #fffaf4; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.related-card .content { padding: 16px; }
.related-card img { width: 100%; height: 180px; object-fit: cover; }

.screen-reader-text { position: absolute; left: -9999px; }
.menu-toggle { display: none; }

@media (max-width: 1100px) {
  .header-inner,
  .hero,
  .content-layout,
  .mission-layout,
  .archive-layout,
  .page-layout,
  .single-layout,
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { justify-self: start; }
  .header-actions { justify-content: flex-start; }
  .cards-grid,
  .categories-grid,
  .trust-grid,
  .latest-grid,
  .insight-grid,
  .related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { gap: 14px; padding: 14px 0; min-height: auto; }
  .site-title { font-size: 1.6rem; }
  .site-tagline { display: none; }
  .main-nav ul { gap: 14px; justify-content: flex-start; }
  .header-button { width: 100%; }
  .hero { padding-top: 34px; }
  .hero h1 { max-width: none; }
  .hero-visual img { height: 320px; }
  .stats-grid,
  .cards-grid,
  .categories-grid,
  .trust-grid,
  .latest-grid,
  .hero-panels,
  .insight-grid,
  .related-grid { grid-template-columns: 1fr; }
  .search-box form { grid-template-columns: 1fr; }
  .top-strip-inner { padding: 10px 0; }
}
