/* Recipes page styles — Wellness with Verity
   Shared reset, palette, nav, footer and animations come from assets/base.css.
   This file only contains what's specific to the recipes page. */

/* ---------- Nav: mark the active page ---------- */
.nav-links a.active { color: var(--sage-dark); }
.nav-links a.active::after { width: 100%; }

/* ---------- Hero ---------- */
.recipes-hero {
  padding: 9rem 5% 3rem;
  background: linear-gradient(135deg, var(--mint-light) 0%, var(--cream) 50%, var(--mint) 100%);
  text-align: center;
}
.recipes-hero h1 {
  font-family: 'Playfair Display', serif; color: var(--navy);
  font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.1; margin-bottom: 1rem;
}
.recipes-hero p { color: var(--text-light); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }
.hero-eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem;
  font-weight: 600; color: var(--terracotta); margin-bottom: 1rem;
  text-decoration: none; transition: color 0.3s;
}
a.hero-eyebrow:hover { color: var(--terracotta-dark); }

/* ---------- Controls: search + filters ---------- */
.controls {
  position: sticky; top: 64px; z-index: 500; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 1.2rem 5%; border-bottom: 1px solid rgba(45,52,54,0.06);
}
.controls-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.search-wrap { position: relative; width: 100%; max-width: 460px; }
.search-wrap input {
  width: 100%; padding: 0.75rem 1rem 0.75rem 2.6rem; border-radius: 50px;
  border: 1.5px solid var(--mint); background: #fff; font-family: inherit; font-size: 0.95rem;
  color: var(--text); transition: border-color 0.3s, box-shadow 0.3s;
}
.search-wrap input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(129,178,154,0.18); }
.search-wrap .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-light); }

.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.chip {
  border: 1.5px solid var(--mint); background: #fff; color: var(--text-light);
  padding: 0.45rem 1.1rem; border-radius: 50px; font-family: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.25s; display: inline-flex; align-items: center; gap: 0.4rem;
}
.chip:hover { border-color: var(--sage); color: var(--sage-dark); }
.chip.active { background: var(--sage); border-color: var(--sage); color: #fff; }
.chip .count { font-size: 0.72rem; opacity: 0.8; font-weight: 500; }

.result-meta { text-align: center; color: var(--text-light); font-size: 0.85rem; padding: 1.2rem 5% 0; }

/* ---------- Recipe grid ---------- */
.recipe-grid {
  max-width: 1200px; margin: 0 auto; padding: 1.5rem 5% 4rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.8rem;
}
.card {
  background: #fff; border-radius: 18px; overflow: hidden; cursor: pointer;
  box-shadow: 0 8px 30px rgba(45,52,54,0.08);
  transition: opacity 0.4s ease, transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column; opacity: 0;
}
.card.visible { opacity: 1; }
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(45,52,54,0.14); }
.card-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--mint-light); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; display: block; }
.card:hover .card-img-wrap img { transform: scale(1.06); }
.card-tags { position: absolute; top: 0.7rem; left: 0.7rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tag-pill {
  background: rgba(255,255,255,0.92); color: var(--sage-dark); font-size: 0.68rem; font-weight: 700;
  padding: 0.25rem 0.6rem; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-family: 'Playfair Display', serif; color: var(--navy); font-size: 1.15rem; line-height: 1.25; margin-bottom: 0.5rem; }
.card-body p {
  color: var(--text-light); font-size: 0.88rem; margin-bottom: 0.9rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--text-light); border-top: 1px solid var(--mint-light); padding-top: 0.8rem; }
.card-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.card-meta i { color: var(--sage); }

.sentinel { height: 1px; }
.loading { text-align: center; padding: 2rem; color: var(--text-light); grid-column: 1 / -1; }
.empty { text-align: center; padding: 4rem 1rem; color: var(--text-light); grid-column: 1 / -1; }
.empty i { font-size: 2.5rem; color: var(--mint); margin-bottom: 1rem; display: block; }

/* ---------- Recipe modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(45,52,54,0.55); backdrop-filter: blur(4px);
  z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 22px; max-width: 820px; width: 100%; overflow: hidden;
  box-shadow: 0 16px 40px rgba(45,52,54,0.14); animation: modalIn 0.35s ease; margin: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-hero { position: relative; aspect-ratio: 16/9; background: var(--mint-light); }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.9); color: var(--navy); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform 0.2s, background 0.2s;
}
.modal-close:hover { background: #fff; transform: rotate(90deg); }
.modal-body { padding: 2rem; }
.modal-body .modal-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.modal-body .tag-pill { background: var(--mint-light); color: var(--sage-dark); }
.modal-body h2 { font-family: 'Playfair Display', serif; color: var(--navy); font-size: 2rem; margin-bottom: 0.6rem; }
.modal-intro { color: var(--text-light); margin-bottom: 1.4rem; white-space: pre-line; }
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1rem 1.2rem; background: var(--cream);
  border-radius: 14px; margin-bottom: 1.8rem;
}
.modal-meta div { text-align: center; flex: 1; min-width: 90px; }
.modal-meta .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); font-weight: 600; }
.modal-meta .value { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--navy); margin-top: 0.2rem; }
.modal-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; }
.modal-cols h3 { font-family: 'Playfair Display', serif; color: var(--navy); font-size: 1.25rem; margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-cols h3 i { color: var(--terracotta); font-size: 1rem; }
.ingredients-list { list-style: none; }
.ingredients-list li { padding: 0.5rem 0 0.5rem 1.5rem; position: relative; border-bottom: 1px dashed var(--mint); font-size: 0.92rem; }
.ingredients-list li::before { content: ''; position: absolute; left: 0; top: 0.95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.ingredients-list li.subhead { font-weight: 700; color: var(--sage-dark); padding-left: 0; border-bottom: none; margin-top: 0.6rem; }
.ingredients-list li.subhead::before { display: none; }
.steps-list { list-style: none; counter-reset: step; }
.steps-list li { padding: 0 0 1.1rem 2.6rem; position: relative; font-size: 0.94rem; }
.steps-list li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--terracotta); color: #fff;
  font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
}
.steps-list li.subhead { font-weight: 700; color: var(--sage-dark); padding-left: 0; }
.steps-list li.subhead::before { display: none; }
.modal-notes { margin-top: 1.6rem; padding: 1rem 1.2rem; background: var(--mint-light); border-radius: 14px; font-size: 0.9rem; color: var(--text); }
.modal-notes strong { color: var(--sage-dark); }
.modal-gallery { display: flex; gap: 0.6rem; margin-top: 1.6rem; flex-wrap: wrap; }
.modal-gallery img { width: 90px; height: 90px; object-fit: cover; border-radius: 12px; cursor: pointer; transition: transform 0.2s; }
.modal-gallery img:hover { transform: scale(1.05); }

/* ---------- Footer (recipes page variant) ---------- */
/* .site-footer styles now live in assets/base.css (shared with 404.html). */

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .controls { top: 56px; }
  .modal-cols { grid-template-columns: 1fr; gap: 1.4rem; }
  .modal-body { padding: 1.4rem; }
  /* .nav-links.open and the rest of the mobile nav now live in assets/base.css. */
}
