/* ═══════════════════════════════════════════════════════
   cookframes-index.css — CSS riêng cho trang chủ (index.php)
   Load SAU cookframes.css trong <head>
   ═══════════════════════════════════════════════════════ */

/* ── WRAPPER (index dùng --max-w, cookframes.css không có) ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}
:root {
  --max-w: 1180px;
}

/* ── HERO ── */
.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem var(--side-pad) 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 120%, rgba(196,64,28,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 30%, rgba(184,134,42,0.08) 0%, transparent 60%);
}
.hero-inner { position: relative; max-width: 640px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-light);
  border: 1px solid rgba(232,96,46,0.35);
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: var(--ember-light); }
.hero-desc {
  margin-top: 1.2rem;
  font-size: 1.02rem;
  color: rgba(247,242,234,0.75);
  line-height: 1.8;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stats {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(247,242,234,0.5);
  margin-top: 0.2rem;
}

/* ── SECTION HEADINGS ── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding-top: 3rem;
  gap: 1rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-head h2 .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ember);
  display: inline-block;
  flex-shrink: 0;
}
.see-all {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.see-all:hover { border-color: var(--ember); }

/* ── CARD GRID (index dùng .card-grid + .grid-4/.grid-5, khác .recipe-grid trong cookframes.css) ── */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ── CARD-CATEGORY (chỉ có ở index) ── */
.card-category {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ember);
  margin-bottom: 0.3rem;
}

/* ── BADGE-VIEW (chỉ có ở index) ── */
.badge-view { background: var(--gold); color: #fff; }

/* ── FEATURED GRID (card lớn đầu tiên) ── */
.grid-featured {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
}
.grid-featured .recipe-card.featured {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.grid-featured .recipe-card.featured .card-thumb {
  aspect-ratio: 4 / 3;
}
.grid-featured .recipe-card.featured .card-title {
  font-size: 1.25rem;
}
@media (max-width: 860px) {
  .grid-featured { grid-template-columns: 1fr 1fr; }
  .grid-featured .recipe-card.featured { grid-column: 1 / 3; grid-row: auto; }
}
@media (max-width: 500px) {
  .grid-featured { grid-template-columns: 1fr; }
  .grid-featured .recipe-card.featured { grid-column: auto; }
}

/* ── CATEGORY STRIP ── */
.cat-strip {
  background: var(--cream);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 3.5rem;
}
.cat-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem var(--side-pad);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.cat-strip-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-right: 0.5rem;
  white-space: nowrap;
}
.cat-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap;
}
.cat-pill:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: #fff;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 3rem 0 0;
}

/* ── CARD ANIMATIONS (index-specific nth-child delays) ── */
@media (prefers-reduced-motion: no-preference) {
  .recipe-card {
    opacity: 0;
    animation: cardIn 0.4s forwards;
  }
  .recipe-card:nth-child(1)  { animation-delay: 0.04s; }
  .recipe-card:nth-child(2)  { animation-delay: 0.09s; }
  .recipe-card:nth-child(3)  { animation-delay: 0.14s; }
  .recipe-card:nth-child(4)  { animation-delay: 0.19s; }
  .recipe-card:nth-child(5)  { animation-delay: 0.24s; }
  .recipe-card:nth-child(6)  { animation-delay: 0.29s; }
  .recipe-card:nth-child(7)  { animation-delay: 0.34s; }
  .recipe-card:nth-child(8)  { animation-delay: 0.39s; }
  .recipe-card:nth-child(9)  { animation-delay: 0.44s; }
  .recipe-card:nth-child(10) { animation-delay: 0.49s; }
  @keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
}