/* ================= THEME MAIN STYLES ================= */
/* All comments are in English */

/* Root variables */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --primary: #16a34a;
  --primary-weak: #dcfce7;
  --accent: #f59e0b;
  --chip: #f1f5f9;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
}
.dark {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --border: #1f2937;
  --card-bg: #0f172a;
  --primary: #22c55e;
  --primary-weak: #052e16;
  --accent: #eab308;
  --chip: #111827;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.35);
}

/* Base */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }


/* Nav menu list cleanup (remove bullets, align items) */
.nav-links ul { display: flex; align-items: center; gap: 14px; padding: 0; margin: 0; }
.nav-links li { list-style: none; }
.nav-links li a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.nav-links li a:hover { background: var(--chip); color: var(--text); }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand b { font-size: 1.05rem; letter-spacing: .2px; }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 8px 10px; border-radius: 10px; }
.nav-links a:hover { background: var(--chip); color: var(--text); }
.actions { display: flex; align-items: center; gap: 10px; }
.btn { border: 1px solid var(--border); background: var(--card-bg); color: var(--text); border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { box-shadow: var(--shadow); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--card-bg); width: 40px; height: 40px; border-radius: 999px; cursor: pointer; }
.icon-btn:hover { box-shadow: var(--shadow); }
.hamburger { display: none; }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  .mobile-menu { display: none; }
  .mobile-menu.open { display: grid; gap: 8px; padding: 10px 0 16px; }
  .mobile-menu a { color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 10px; }
}

/* Hero */
.hero { padding: 28px 0 18px; }
.hero .wrap { display: grid; gap: 18px; align-items: center; }
.headline { font-size: clamp(26px, 4vw, 42px); line-height: 1.15; letter-spacing: -.3px; font-weight: 800; }
.sub { color: var(--muted); max-width: 58ch; }

.searchbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 999px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow); }
.searchbar input { border: 0; outline: 0; background: transparent; color: var(--text); padding: 10px 6px; font-size: 1rem; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--chip); color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; border: 1px solid var(--border); cursor: pointer; user-select: none; }
.chip.active { background: var(--primary-weak); color: var(--primary); border-color: color-mix(in oklab, var(--primary), var(--border)); }

/* Sections & grid */
.section { padding: 12px 0 30px; }
.section h2 { font-size: clamp(20px, 3vw, 28px); margin: 6px 0 14px; }

.recipes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: clip; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr; }
.media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.media .ph { position: absolute; inset:0; background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(245,158,11,.12)), conic-gradient(from 180deg at 60% 40%, #fef3c7, #dcfce7, #fef3c7); }
.media .emoji { position: absolute; bottom: 10px; right: 10px; font-size: 32px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.fav { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); border: 0; width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.fav svg { width: 22px; height: 22px; fill: #fff; opacity: .9; }
.fav.active { background: var(--accent); }

.content { padding: 12px 14px 14px; display: grid; gap: 10px; }
.title { font-weight: 800; letter-spacing: .2px; }
.meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .8rem; border: 1px dashed var(--border); color: var(--muted); padding: 4px 8px; border-radius: 999px; }

/* Collections */
.collections { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.collection-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 8px; }
.collection-card b { font-size: 1.05rem; }
.collection-card p { color: var(--muted); margin: 0; }

/* Newsletter */
.newsletter { background: linear-gradient(180deg, color-mix(in oklab, var(--primary-weak), transparent 25%), transparent 85%); border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.newsletter small { color: var(--muted); }
.newsletter form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.newsletter input { border: 1px solid var(--border); background: var(--card-bg); border-radius: 999px; padding: 10px 14px; color: var(--text); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 22px 0 30px; margin-top: 30px; color: var(--muted); }
.foot { display: grid; gap: 10px; align-items: center; grid-template-columns: 1fr auto; }
.foot .links { display: flex; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }