/*
Theme Name: Carbs Optional
Theme URI: https://carbsoptional.com/
Author: Carbs Optional
Description: Custom theme for Carbs Optional — delicious low-carb recipes for real life.
Version: 0.5.1
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: carbs-optional
*/

:root {
  --co-charcoal: #2D2D2D;
  --co-green: #556B46;
  --co-orange: #C55A2C;
  --co-linen: #F7F3EA;
  --co-white: #FFFFFF;
  --co-border: #E6E0D6;
  --co-muted: #6E6A64;
  --co-content: 1180px;
  --co-reading: 760px;
  --co-radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--co-charcoal);
  background: var(--co-white);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--co-green); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--co-orange); }
h1,h2,h3,h4,h5,h6 {
  margin: 0 0 .65em;
  font-family: "Lora", Georgia, serif;
  line-height: 1.15;
  color: var(--co-charcoal);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }

.co-container { width: min(calc(100% - 40px), var(--co-content)); margin-inline: auto; }
.co-reading { width: min(calc(100% - 40px), var(--co-reading)); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--co-border);
}
.site-header__inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 42px;
}
.site-branding { flex: 0 0 auto; }
.site-logo { display:block; width: 360px; max-width: 42vw; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display:flex; align-items:center; gap:28px; list-style:none; margin:0; padding:0; }
.primary-nav a {
  color: var(--co-charcoal);
  text-decoration:none;
  font-weight:650;
  font-size:.95rem;
}
.primary-nav a:hover { color:var(--co-orange); }
.menu-toggle {
  display:none; margin-left:auto; border:1px solid var(--co-border); background:#fff;
  border-radius:999px; padding:10px 15px; font:inherit; font-weight:700;
}

.co-hero {
  padding: clamp(64px, 8vw, 118px) 0;
  background: var(--co-linen);
  border-bottom: 1px solid var(--co-border);
}
.co-hero__grid { display:grid; grid-template-columns: 1.05fr .95fr; align-items:center; gap:70px; }
.co-eyebrow {
  display:inline-block; margin-bottom:18px; color:var(--co-orange);
  font-size:.78rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
}
.co-hero p { max-width:640px; font-size:1.2rem; color:#55514c; }
.co-hero__card {
  min-height:390px; border-radius:24px; background:#fff; border:1px solid var(--co-border);
  display:grid; place-items:center; padding:44px; text-align:center;
  box-shadow:0 18px 50px rgba(45,45,45,.07);
}
.co-hero__emblem { width:min(290px,70%); }
.co-button {
  display:inline-flex; align-items:center; justify-content:center; margin-top:18px;
  padding:13px 22px; border-radius:999px; background:var(--co-green); color:#fff;
  text-decoration:none; font-weight:750;
}
.co-button:hover { color:#fff; background:var(--co-orange); }

.co-section { padding:80px 0; }
.co-section--linen { background:var(--co-linen); }
.co-section__heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:30px; }
.co-section__heading p { max-width:560px; margin:0; color:var(--co-muted); }

.co-card-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.co-card {
  overflow:hidden; border:1px solid var(--co-border); border-radius:var(--co-radius);
  background:#fff;
}
.co-card__image { aspect-ratio:4/3; background:#eee8dd; overflow:hidden; }
.co-card__image img { width:100%; height:100%; object-fit:cover; }
.co-card__body { padding:22px; }
.co-card__meta { color:var(--co-orange); font-size:.75rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.co-card h3 { margin:.35em 0 .3em; }
.co-card h3 a { color:inherit; text-decoration:none; }
.co-card p { margin:0; color:var(--co-muted); }

.site-main { min-height:50vh; }
.entry-shell { padding:70px 0; }
.entry-header { margin-bottom:32px; }
.entry-content > * { max-width:var(--co-reading); margin-left:auto; margin-right:auto; }
.entry-content > .alignwide { max-width:var(--co-content); }
.entry-content > .alignfull { max-width:none; }

.site-footer { margin-top:70px; background:var(--co-charcoal); color:#ddd8d0; padding:55px 0 30px; }
.site-footer__grid { display:grid; grid-template-columns:1fr auto; gap:40px; align-items:center; }
.site-footer__brand img { width:280px; filter:none; }
.site-footer a { color:#fff; }
.site-footer__fine { margin-top:35px; padding-top:22px; border-top:1px solid rgba(255,255,255,.15); font-size:.85rem; }

@media (max-width: 900px) {
  .site-header__inner { min-height:84px; }
  .site-logo { width:280px; max-width:68vw; }
  .menu-toggle { display:block; }
  .primary-nav { display:none; position:absolute; top:84px; left:0; right:0; padding:18px 20px 26px; background:#fff; border-bottom:1px solid var(--co-border); }
  .primary-nav.is-open { display:block; }
  .primary-nav ul { align-items:stretch; flex-direction:column; gap:4px; }
  .primary-nav a { display:block; padding:11px 0; }
  .co-hero__grid { grid-template-columns:1fr; gap:40px; }
  .co-hero__card { min-height:300px; }
  .co-card-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 600px) {
  body { font-size:16px; }
  .co-container,.co-reading { width:min(calc(100% - 28px), var(--co-content)); }
  .co-hero { padding:55px 0; }
  .co-section { padding:58px 0; }
  .co-card-grid { grid-template-columns:1fr; }
  .co-section__heading { display:block; }
  .site-footer__grid { grid-template-columns:1fr; }
}


/* ==========================================================
   0.2.0 — Homepage & discovery system
   ========================================================== */
.co-topbar {
  background: var(--co-green);
  color: #fff;
  padding: 7px 0;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.co-topbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.co-topbar__contact { justify-self: start; }
.co-topbar__tagline { justify-self: center; white-space: nowrap; }
.co-topbar__social { justify-self: end; min-width: 1px; }
.co-topbar a { color: #fff; text-decoration: none; }
.co-topbar a:hover { color: #fff; text-decoration: underline; text-underline-offset: .18em; }

.co-hero--photo { padding: clamp(52px,7vw,96px) 0; }
.co-hero__photo {
  position:relative; min-height:480px; overflow:hidden; border-radius:24px;
  background:#e9e2d6; box-shadow:0 18px 50px rgba(45,45,45,.08);
}
.co-hero__photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.co-hero__photo-placeholder { position:absolute; inset:0; display:grid; place-items:center; padding:40px; text-align:center; color:var(--co-muted); }
.co-hero__badge {
  position:absolute; left:22px; right:22px; bottom:22px; padding:17px 19px;
  background:rgba(255,255,255,.94); border-radius:13px; backdrop-filter:blur(8px);
}
.co-hero__badge small { display:block; color:var(--co-orange); font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.co-hero__badge strong { display:block; margin-top:3px; font-family:"Lora",Georgia,serif; font-size:1.15rem; }

.co-category-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.co-category {
  min-height:150px; padding:25px; display:flex; flex-direction:column; justify-content:flex-end;
  border-radius:var(--co-radius); background:#fff; border:1px solid var(--co-border);
  text-decoration:none; transition:transform .18s ease, border-color .18s ease;
}
.co-category:hover { transform:translateY(-3px); border-color:#cfc7b9; }
.co-category__icon { font-size:1.4rem; margin-bottom:auto; color:var(--co-orange); }
.co-category strong { color:var(--co-charcoal); font-family:"Lora",Georgia,serif; font-size:1.25rem; }
.co-category span { color:var(--co-muted); font-size:.88rem; margin-top:4px; }

.co-recipe-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.co-recipe-card { min-width:0; }
.co-recipe-card__image {
  display:block; aspect-ratio:4/3; overflow:hidden; border-radius:var(--co-radius);
  background:#eee8dd; text-decoration:none;
}
.co-recipe-card__image img { width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.co-recipe-card:hover .co-recipe-card__image img { transform:scale(1.025); }
.co-recipe-card__placeholder { width:100%; height:100%; display:grid; place-items:center; padding:30px; text-align:center; color:#8a8379; }
.co-recipe-card__body { padding:16px 2px 0; }
.co-recipe-card__meta { color:var(--co-orange); font-size:.72rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.co-recipe-card h3 { margin:.35em 0 .25em; font-size:1.38rem; }
.co-recipe-card h3 a { color:inherit; text-decoration:none; }
.co-recipe-card p { margin:0; color:var(--co-muted); font-size:.94rem; }

.co-feature {
  display:grid; grid-template-columns:1fr 1fr; overflow:hidden; border-radius:22px;
  background:var(--co-charcoal); color:#fff;
}
.co-feature__image { min-height:440px; background:#4b493f; }
.co-feature__image img { width:100%; height:100%; object-fit:cover; display:block; }
.co-feature__content { padding:clamp(38px,6vw,76px); align-self:center; }
.co-feature__content h2 { color:#fff; }
.co-feature__content p { color:#ddd8d0; max-width:520px; }
.co-feature .co-eyebrow { color:#f19a6e; }

.co-newsletter {
  display:grid; grid-template-columns:1fr .8fr; gap:55px; align-items:center;
  padding:48px; border:1px solid var(--co-border); border-radius:22px; background:var(--co-linen);
}
.co-newsletter h2 { margin-bottom:.3em; }
.co-newsletter p { margin-bottom:0; color:var(--co-muted); }
.co-newsletter__form { display:flex; gap:10px; }
.co-newsletter__form input {
  min-width:0; flex:1; border:1px solid #cbc4b8; border-radius:999px; padding:13px 17px;
  font:inherit; background:#fff;
}
.co-newsletter__form button { border:0; margin:0; cursor:pointer; }

.co-text-link { font-weight:750; text-decoration:none; white-space:nowrap; }
.co-text-link::after { content:" →"; }

@media (max-width:900px) {
  .co-category-grid { grid-template-columns:repeat(2,1fr); }
  .co-recipe-grid { grid-template-columns:repeat(2,1fr); }
  .co-feature { grid-template-columns:1fr; }
  .co-feature__image { min-height:360px; }
  .co-newsletter { grid-template-columns:1fr; gap:28px; }
}
@media (max-width:600px) {
  .co-category-grid,.co-recipe-grid { grid-template-columns:1fr; }
  .co-hero__photo { min-height:360px; }
  .co-newsletter { padding:30px 22px; }
  .co-newsletter__form { flex-direction:column; }
}

/* 0.2.1 refinements */
.site-footer__contact { margin-top: 10px; }
.site-footer__contact a { font-weight: 700; text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; text-underline-offset: .18em; }

@media (max-width: 700px) {
  .co-topbar__inner { display: block; text-align: center; }
  .co-topbar__contact, .co-topbar__social { display: none; }
  .co-topbar__tagline { white-space: normal; }
}

/* ==========================================================
   0.3.1 — Browse system + native WordPress-managed navigation
   ========================================================== */
.primary-nav .menu-item-has-children { position:relative; }
.primary-nav .sub-menu {
  display:none; position:absolute; top:100%; left:-16px; min-width:210px;
  padding:12px; margin:0; background:#fff; border:1px solid var(--co-border);
  border-radius:12px; box-shadow:0 14px 36px rgba(45,45,45,.10); list-style:none;
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu { display:block; }
.primary-nav .sub-menu li { width:100%; }
.primary-nav .sub-menu a { display:block; padding:8px 10px; white-space:nowrap; }

.co-archive-hero{padding:64px 0;background:var(--co-linen);border-bottom:1px solid var(--co-border)}
.co-archive-hero p{max-width:680px;color:var(--co-muted)}
.co-browse{display:grid;grid-template-columns:240px minmax(0,1fr);gap:44px;align-items:start}
.co-filter{position:sticky;top:24px;border:1px solid var(--co-border);border-radius:var(--co-radius);padding:22px;background:#fff}
.co-filter h2{font-size:1.2rem}.co-filter__group+.co-filter__group{margin-top:20px;padding-top:18px;border-top:1px solid var(--co-border)}
.co-filter__label{display:block;margin-bottom:8px;color:var(--co-orange);font-size:.72rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}
.co-filter ul{list-style:none;padding:0;margin:0}.co-filter li+li{margin-top:5px}.co-filter a{color:var(--co-charcoal);text-decoration:none;font-size:.92rem}
.co-filter a:hover,.co-filter .current-cat>a{color:var(--co-orange)}
.co-pagination{margin-top:44px}.co-pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap}
.co-pagination .page-numbers{min-width:40px;min-height:40px;display:inline-grid;place-items:center;padding:6px 11px;border:1px solid var(--co-border);border-radius:999px;color:var(--co-charcoal);text-decoration:none}
.co-pagination .current{background:var(--co-green);color:#fff;border-color:var(--co-green)}
.co-empty{padding:36px;border:1px dashed #cfc7b9;border-radius:var(--co-radius);background:var(--co-linen)}
.co-card-count{color:var(--co-muted);font-size:.88rem}
@media(max-width:900px){
  .primary-nav .sub-menu{display:block;position:static;min-width:0;padding:0 0 0 18px;border:0;box-shadow:none}
  .primary-nav .sub-menu a{padding:8px 0;white-space:normal;font-weight:550}
  .co-browse{grid-template-columns:1fr}.co-filter{position:static}
}


/* ==========================================================
   0.3.2 — Motion, featured hero control, recipe alignment
   ========================================================== */

/* Smooth interactive feedback without transition: all. */
a,
button,
.co-button,
.co-chip,
.co-category,
.menu-toggle {
  transition:
    color 300ms ease,
    background-color 300ms ease,
    border-color 300ms ease,
    opacity 300ms ease,
    box-shadow 300ms ease,
    transform 300ms ease;
}

/* Desktop dropdowns fade and settle gently into place. */
@media (min-width: 901px) {
  .primary-nav .sub-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px);
    transition:
      opacity 300ms ease,
      transform 300ms ease,
      visibility 300ms ease;
  }
  .primary-nav .menu-item-has-children:hover > .sub-menu,
  .primary-nav .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* Subtle photography motion. */
.co-hero__photo img,
.co-feature__image img,
.co-recipe-card__image img,
.co-card__image img {
  transition: transform 550ms cubic-bezier(.2,.7,.2,1);
}
.co-hero__photo:hover img,
.co-feature:hover .co-feature__image img,
.co-recipe-card:hover .co-recipe-card__image img,
.co-card:hover .co-card__image img {
  transform: scale(1.025);
}

/* Scroll reveal: only activated when JS adds .co-motion-ready. */
.co-motion-ready .co-reveal {
  opacity: 0;
  transform: translateY(18px);
}
.co-motion-ready .co-reveal.co-reveal--image {
  transform: translateY(14px) scale(.992);
}
.co-motion-ready .co-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 600ms cubic-bezier(.2,.7,.2,1),
    transform 600ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--co-reveal-delay, 0ms);
}

/* Keep the Core-rendered recipe content inside the reading column. */
.single-recipe .entry-content {
  width: min(calc(100% - 40px), var(--co-reading));
  margin-inline: auto;
}
.single-recipe .entry-content > * {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Accessibility: decorative motion disappears when requested. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .co-motion-ready .co-reveal,
  .co-motion-ready .co-reveal.co-reveal--image,
  .co-motion-ready .co-reveal.is-revealed {
    opacity: 1;
    transform: none;
  }

  .primary-nav .sub-menu {
    transform: none;
  }

  .co-hero__photo:hover img,
  .co-feature:hover .co-feature__image img,
  .co-recipe-card:hover .co-recipe-card__image img,
  .co-card:hover .co-card__image img {
    transform: none;
  }
}


/* ==========================================================
   0.4.0 — Recipe Experience
   ========================================================== */

.single-recipe .entry-header {
  padding-top: clamp(42px, 6vw, 76px);
  padding-bottom: 24px;
  text-align: center;
}
.single-recipe .entry-header h1 {
  margin-bottom: 18px;
}
.co-recipe-taxonomy {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.co-recipe-taxonomy__term {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(85,107,70,.28);
  border-radius: 999px;
  color: var(--co-green);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.co-recipe-taxonomy__term:hover,
.co-recipe-taxonomy__term:focus-visible {
  color: #fff;
  background: var(--co-green);
  border-color: var(--co-green);
}
.co-single-hero {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: clamp(26px, 4vw, 46px);
}
.co-single-hero img {
  display: block;
  width: 100%;
  height: auto;
}
.single-recipe .entry-content {
  margin-bottom: clamp(54px, 7vw, 90px);
}

.co-related {
  padding-top: clamp(44px, 6vw, 76px);
  padding-bottom: clamp(64px, 8vw, 104px);
  border-top: 1px solid rgba(45,45,45,.12);
}
.co-related .co-section__heading {
  max-width: 720px;
  margin: 0 auto 30px;
  text-align: center;
}
.co-related .co-section__heading h2 {
  margin-top: 4px;
}
.co-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 30px);
}
.co-related-card {
  min-width: 0;
}
.co-related-card__image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: var(--co-linen);
}
.co-related-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 550ms cubic-bezier(.2,.7,.2,1);
}
.co-related-card:hover .co-related-card__image img {
  transform: scale(1.025);
}
.co-related-card__body {
  padding: 14px 4px 0;
}
.co-related-card__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--co-green);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.co-related-card h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.3;
}
.co-related-card h3 a {
  color: var(--co-charcoal);
  text-decoration: none;
}
.co-related-card h3 a:hover,
.co-related-card h3 a:focus-visible {
  color: var(--co-orange);
}

@media (max-width: 760px) {
  .co-related__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .co-related-card__image {
    aspect-ratio: 16 / 10;
  }
}

/* A printed recipe should be the recipe, not the website around it. */
@media print {
  .site-header,
  .site-footer,
  .co-utility-bar,
  .co-related,
  .co-recipe-taxonomy,
  .menu-toggle,
  nav {
    display: none !important;
  }

  body,
  .single-recipe .entry-content,
  .entry-shell {
    background: #fff !important;
    color: #000 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .single-recipe .entry-header {
    text-align: left;
    padding: 0 0 12pt;
  }

  .co-single-hero {
    max-width: 5.5in;
    margin: 0 0 18pt !important;
    border-radius: 0;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .co-related-card:hover .co-related-card__image img {
    transform: none;
  }
}


/* ==========================================================
   0.4.1 — Recipe mobile + print cleanup
   ========================================================== */

@media (max-width: 760px) {
  .single-recipe .entry-header {
    padding-top: 26px;
  }
}

/*
 * Print philosophy:
 * Website = story + photography + discovery + recipe.
 * Print = recipe.
 *
 * Core controls are targeted with broad, print-only selectors so this remains
 * harmless if a selector is absent in a given Core build.
 */
@media print {
  /* Theme chrome / screen-only recipe presentation. */
  .site-header,
  header.site-header,
  .site-footer,
  footer.site-footer,
  .co-utility,
  .co-utility-bar,
  .utility-bar,
  .top-bar,
  .site-topbar,
  .co-single-hero,
  .single-recipe > .entry-header,
  .single-recipe .entry-header,
  .co-related,
  .co-recipe-taxonomy,
  .menu-toggle,
  nav,
  .wp-block-button,
  .jump-to-recipe,
  .co-jump-to-recipe,
  [href^="#recipe"] {
    display: none !important;
  }

  /* Core's interactive unit / scaling controls. */
  .co-unit-toggle,
  .co-unit-selector,
  .co-unit-controls,
  .co-recipe-units,
  .co-batch-controls,
  .co-batch-selector,
  .co-scaling-controls,
  .co-recipe-scaling,
  [data-unit-toggle],
  [data-unit-selector],
  [data-batch-controls],
  [data-scale-controls] {
    display: none !important;
  }
}


/* ==========================================================
   0.4.2 — Print visibility bug fix
   ========================================================== */

@media print {
  /*
   * IntersectionObserver is a screen behavior. Print must never depend on an
   * element having intersected the viewport first.
   */
  .co-motion-ready .co-reveal,
  .co-motion-ready .co-reveal.co-reveal--image,
  .co-motion-ready .co-reveal.is-revealed,
  .co-reveal {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }

  /* Actual theme masthead structures. */
  .utility-strip,
  .site-branding,
  .site-header__inner,
  .site-header,
  #site-header,
  #masthead {
    display: none !important;
  }

  /* Editorial web story is useful on screen, not on the printed recipe. */
  .co-recipe-story {
    display: none !important;
  }
}


/* ==========================================================
   0.4.3 — Recipe spacing + print story cleanup
   ========================================================== */

/* Keep the editorial feel, but get the recipe into view sooner on desktop. */
@media (min-width: 761px) {
  .single-recipe .entry-header {
    padding-top: 34px;
  }
}

/*
 * Recipe editorial/story copy is emitted as direct paragraphs inside
 * .entry-content. The actual Core recipe lives inside its own <article>,
 * so this does not affect paragraphs within the printable recipe.
 */
@media print {
  body.single-recipe .entry-content > p {
    display: none !important;
  }
}


/* 0.4.4 — final Recipe Experience print cleanup */
@media print {
  .co-topbar {
    display: none !important;
  }
}


/* ==========================================================
   0.5.0 — Content & Editorial Experience
   ========================================================== */
.co-editorial-hero {
  padding-top: clamp(42px, 6vw, 76px);
  padding-bottom: 28px;
  text-align: center;
}
.co-editorial-hero h1,
.co-listing-hero h1,
.co-404 h1 {
  margin: 5px 0 14px;
}
.co-editorial-deck {
  max-width: 680px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: rgba(45,45,45,.76);
}
.co-editorial-feature {
  overflow: hidden;
  margin-bottom: clamp(34px, 5vw, 58px);
  border-radius: 18px;
}
.co-editorial-feature img {
  display: block;
  width: 100%;
  height: auto;
}
.co-editorial-content {
  padding-bottom: clamp(70px, 9vw, 120px);
  font-size: 1.05rem;
  line-height: 1.78;
}
.co-editorial-content > :first-child { margin-top: 0; }
.co-editorial-content h2 { margin-top: 2.2em; }
.co-editorial-content h3 { margin-top: 1.8em; }
.co-editorial-content img { border-radius: 12px; }
.co-editorial-content blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--co-green);
  font-family: Lora, serif;
  font-size: 1.12em;
}

.co-listing-page {
  padding-top: clamp(46px, 6vw, 80px);
  padding-bottom: clamp(70px, 9vw, 110px);
}
.co-listing-hero {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
}
.co-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px);
}
.co-content-card {
  min-width: 0;
}
.co-content-card__image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: var(--co-linen);
}
.co-content-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 550ms cubic-bezier(.2,.7,.2,1);
}
.co-content-card:hover .co-content-card__image img { transform: scale(1.025); }
.co-content-card__body { padding: 15px 4px 0; }
.co-content-card__eyebrow {
  color: var(--co-green);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.co-content-card h2 {
  margin: 5px 0 8px;
  font-size: clamp(1.2rem, 2vw, 1.48rem);
  line-height: 1.25;
}
.co-content-card h2 a { color: var(--co-charcoal); text-decoration: none; }
.co-content-card h2 a:hover { color: var(--co-orange); }
.co-content-card p { margin: 0 0 9px; color: rgba(45,45,45,.74); }

.co-search-form {
  display: flex;
  width: min(100%, 680px);
  margin: 0 auto 42px;
  gap: 8px;
}
.co-search-form input[type="search"] {
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(45,45,45,.22);
  border-radius: 8px;
  font: inherit;
}
.co-search-form button {
  padding: 12px 18px;
  border: 1px solid var(--co-green);
  border-radius: 8px;
  background: var(--co-green);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.co-search-form button:hover { background: var(--co-charcoal); border-color: var(--co-charcoal); }

.co-empty-state,
.co-404 {
  padding-top: clamp(70px, 10vw, 140px);
  padding-bottom: clamp(90px, 12vw, 160px);
  text-align: center;
}
.co-empty-state p,
.co-404 p { color: rgba(45,45,45,.74); }
.co-404__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 28px 0 38px;
}
.co-404 .co-search-form { margin-bottom: 0; }

@media (max-width: 800px) {
  .co-content-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .co-editorial-hero { padding-top: 28px; }
  .co-content-grid { grid-template-columns: 1fr; }
  .co-search-form { flex-direction: column; }
  .co-search-form button { width: 100%; }
  .co-404__actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .co-content-card:hover .co-content-card__image img { transform: none; }
}
@media print {
  .co-search-form,
  .co-404__actions { display: none !important; }
}


/* ==========================================================
   0.5.1 — Site-wide newsletter CTA
   ========================================================== */
.co-newsletter-section {
  padding: clamp(34px, 5vw, 62px) 0 clamp(48px, 6vw, 76px);
}
.co-newsletter-section + .site-footer {
  margin-top: 0;
}

@media print {
  .co-newsletter-section {
    display: none !important;
  }
}
