/* =====================================================================
   ODIA RECIPE — public website stylesheet
   (loaded by private/shared/public_header.php, on top of Bootstrap 5)

   Same family as the admin: food green + warm orange, Fira Sans +
   Noto Sans Oriya, simple and clean ("Minimal" style from the
   ui-ux-pro-max design system), made for phones first.

     1. Colours + base        4. Recipe cards
     2. Header + menu         5. Recipe page
     3. Home + category       6. Footer + accessibility
   ===================================================================== */

/* ---------- 1. COLOURS + BASE ---------- */
:root {
  --site-green: #047857;        /* buttons, links (white text = 5.5:1) */
  --site-green-dark: #065f46;
  --site-green-soft: #e6f4ee;
  --site-orange: #c2410c;       /* small highlights */
  --site-cream: #fffaf3;        /* page background — warm, like a kitchen */
  --site-card: #ffffff;
  --site-border: #eee3d3;
  --site-text: #1f2937;
  --site-muted: #57534e;
  --site-radius: 16px;
  --bs-body-font-family: "Noto Sans Oriya", "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--site-text);
  --bs-body-bg: var(--site-cream);
  --bs-link-color: var(--site-green);
  --bs-link-color-rgb: 4, 120, 87;
  --bs-link-hover-color: var(--site-green-dark);
}
html[lang="en"] { --bs-body-font-family: "Fira Sans", "Noto Sans Oriya", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { background: var(--site-cream); font-size: 1.05rem; line-height: 1.65; }
a { text-decoration: none; }
h1, h2, h3 { line-height: 1.3; font-weight: 700; text-wrap: balance; }

.btn-brand { background: var(--site-green); color: #fff; border-radius: 12px; padding: .6rem 1.2rem; font-weight: 600; }
.btn-brand:hover { background: var(--site-green-dark); color: #fff; }

/* ---------- 2. HEADER + MENU ---------- */
.site-header { background: var(--site-card); border-bottom: 1px solid var(--site-border); position: sticky; top: 0; z-index: 100; }
.site-header > .container { min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; color: var(--site-text); }
.brand img { border-radius: 10px; }
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .3rem .9rem; border: 1px solid var(--site-border); border-radius: 999px; color: var(--site-text); font-weight: 500; }
.lang-switch:hover { border-color: var(--site-green); color: var(--site-green); }

.subject-nav { border-top: 1px solid var(--site-border); }
.subject-nav .container { display: flex; gap: .4rem; overflow-x: auto; padding-top: .45rem; padding-bottom: .45rem; scrollbar-width: none; }
.subject-nav .container::-webkit-scrollbar { display: none; }
.subject-nav a { flex-shrink: 0; padding: .35rem .95rem; border-radius: 999px; background: var(--site-green-soft); color: var(--site-green-dark); font-weight: 600; font-size: .95rem; }
.subject-nav a:hover, .subject-nav a[aria-current="page"] { background: var(--site-green); color: #fff; }

/* ---------- 3. HOME + CATEGORY ---------- */
.hero { padding: 2.5rem 0 1.5rem; text-align: center; }
.hero img { width: 96px; height: 96px; border-radius: 22px; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin: 1rem 0 .3rem; }
.hero p { color: var(--site-muted); font-size: 1.1rem; margin: 0; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.section-head h2 { font-size: 1.4rem; margin: 0; }

.subject-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.subject-tile { display: flex; flex-direction: column; justify-content: center; min-height: 92px; padding: 1rem; border-radius: var(--site-radius); background: var(--site-card); border: 1px solid var(--site-border); color: var(--site-text); transition: border-color .18s, transform .18s; }
.subject-tile:hover { border-color: var(--site-green); transform: translateY(-2px); color: var(--site-text); }
.subject-tile strong { font-size: 1.15rem; }
.subject-tile span { color: var(--site-muted); font-size: .9rem; }

.crumbs { font-size: .9rem; color: var(--site-muted); margin: 1.25rem 0 .5rem; }
.crumbs a { color: var(--site-muted); }
.crumbs a:hover { color: var(--site-green); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: '›'; margin-right: .35rem; }

.menu-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1.25rem; }
.menu-chips a { padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--site-border); background: var(--site-card); color: var(--site-text); font-size: .95rem; }
.menu-chips a:hover { border-color: var(--site-green); }
.menu-chips a[aria-current="page"] { background: var(--site-green); border-color: var(--site-green); color: #fff; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--site-muted); border: 1px dashed var(--site-border); border-radius: var(--site-radius); background: var(--site-card); }

/* ---------- 4. RECIPE CARDS ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
@media (max-width: 480px) { .recipe-grid { grid-template-columns: 1fr 1fr; gap: .7rem; } }
.recipe-card { display: flex; flex-direction: column; height: 100%; background: var(--site-card); border: 1px solid var(--site-border); border-radius: var(--site-radius); overflow: hidden; color: var(--site-text); transition: box-shadow .2s, transform .2s; }
.recipe-card:hover { color: var(--site-text); transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(60, 40, 10, .45); }
.recipe-card-img { display: block; aspect-ratio: 16 / 9; background: var(--site-green-soft); }
.recipe-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-noimg { display: grid; place-items: center; height: 100%; font-size: 2rem; color: var(--site-green); }
.recipe-card-body { display: flex; flex-direction: column; gap: .15rem; padding: .75rem .9rem 1rem; }
.recipe-card-cat { font-size: .78rem; font-weight: 600; color: var(--site-orange); text-transform: uppercase; letter-spacing: .03em; }
.recipe-card-title { font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.recipe-card-meta { font-size: .85rem; color: var(--site-muted); margin-top: .2rem; }

/* ---------- 5. RECIPE PAGE ---------- */
.recipe-head h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 0; }
.recipe-head .other-name { color: var(--site-muted); font-size: 1.1rem; margin: .2rem 0 0; }
.facts { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; padding: 0; list-style: none; }
.facts li { display: flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 12px; background: var(--site-card); border: 1px solid var(--site-border); font-size: .95rem; }
.facts i { color: var(--site-green); }
.recipe-photo { border-radius: var(--site-radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--site-green-soft); }
.recipe-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.panel { background: var(--site-card); border: 1px solid var(--site-border); border-radius: var(--site-radius); padding: 1.25rem; }
.panel h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px dashed var(--site-border); }
.ing-list li:last-child { border-bottom: 0; }
.ing-list img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--site-green-soft); flex-shrink: 0; }
.ing-list .qty { margin-left: auto; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1rem 2.6rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--site-green); color: #fff; font-weight: 700; font-size: .9rem; }
.btn-whatsapp { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 12px; background: #128c4a; color: #fff; font-weight: 600; }
.btn-whatsapp:hover { background: #0e6f3a; color: #fff; }
.draft-note { background: #fff7e6; border: 1px solid #f5d38f; border-radius: 12px; padding: .7rem 1rem; margin-top: 1rem; }

/* ---------- 6. FOOTER + ACCESSIBILITY ---------- */
.site-footer { margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--site-border); background: var(--site-card); color: var(--site-muted); font-size: .9rem; }
.skip-link { position: absolute; left: .75rem; top: -60px; z-index: 2000; background: var(--site-green); color: #fff; padding: .5rem 1rem; border-radius: 8px; }
.skip-link:focus { top: .75rem; color: #fff; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(4, 120, 87, .55); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- 7. SEARCH + INGREDIENTS (F2) ---------- */
/* round search button in the header */
.icon-link-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--site-border); color: var(--site-text); }
.icon-link-btn:hover { border-color: var(--site-green); color: var(--site-green); }

/* search box: icon + field + button in one rounded bar */
.search-box { display: flex; align-items: center; gap: .5rem; max-width: 640px; padding: .35rem .35rem .35rem .9rem; background: var(--site-card); border: 2px solid var(--site-border); border-radius: 999px; }
.search-box:focus-within { border-color: var(--site-green); }
.search-box-lg { margin: 0 auto; box-shadow: 0 12px 30px -20px rgba(60, 40, 10, .5); }
.search-box > i { color: var(--site-muted); font-size: 1.1rem; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; min-height: 40px; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.search-box .btn-brand { border: 0; border-radius: 999px; min-height: 40px; padding: .4rem 1.1rem; }

/* ingredient tiles (search results + all ingredients) */
.ing-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.ing-tile { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; background: var(--site-card); border: 1px solid var(--site-border); border-radius: 14px; color: var(--site-text); }
.ing-tile:hover { border-color: var(--site-green); color: var(--site-text); }
.ing-tile img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--site-green-soft); flex-shrink: 0; }
.ing-tile strong { display: block; line-height: 1.25; }
.ing-tile small { color: var(--site-muted); }
.ing-hero { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: var(--site-green-soft); }
.ing-list a { color: var(--site-text); text-decoration: underline; text-decoration-color: var(--site-border); text-underline-offset: 3px; }
.ing-list a:hover { color: var(--site-green); text-decoration-color: var(--site-green); }

/* ---------- 8. RECIPE PAGE EXTRAS (F3) ---------- */
/* servings scaler: [−] 4 ଜଣ [+] */
.scaler { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: .75rem; padding: .25rem; border: 1px solid var(--site-border); border-radius: 999px; background: var(--site-cream); }
.scaler[hidden] { display: none; }
.scaler-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--site-green); color: #fff; font-size: 1.1rem; display: grid; place-items: center; }
.scaler-btn:hover { background: var(--site-green-dark); }
.scaler-btn:disabled { opacity: .4; cursor: not-allowed; }
.scaled-note { font-size: .85rem; color: var(--site-orange); margin: -.25rem 0 .5rem; }

.btn-print { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem 1.1rem; margin-left: .4rem; border-radius: 12px; border: 1px solid var(--site-border); background: var(--site-card); color: var(--site-text); font-weight: 600; }
.btn-print:hover { border-color: var(--site-green); color: var(--site-green); }

/* star rating */
.stars { display: flex; gap: .25rem; }
.star { width: 48px; height: 48px; border: 0; background: transparent; font-size: 1.9rem; color: #f59e0b; border-radius: 10px; display: grid; place-items: center; }
.star:hover, .star:focus-visible { background: #fff7e6; }
.star:disabled { opacity: .6; }

/* PRINT: only the recipe — no menus, buttons, rating or "more like this" */
@media print {
  .site-header, .site-footer, .skip-link, .crumbs, .btn-whatsapp, .btn-print, .scaler, .rate-box, #related-title, .recipe-grid, .lang-switch { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .panel { border: 0; padding: 0; }
  .recipe-photo { max-height: 7cm; }
  .row > [class*="col-"] { width: 100%; }
  a { color: inherit; text-decoration: none !important; }
}
