/* ==========================================================================
   15minute.md – UI kit (Light & Dark) • v2025.11.19
   - Bază pe front.css (v2025.08.29b) +:
       • grid 12 coloane tip Bootstrap
       • footer sticky
       • polish Cook mode + print
       • fundal animat subtil + header glow
   - Token comun pentru aspect: --tile-aspect
   ========================================================================== */

/* ---------------------------- Variables ---------------------------------- */

:root {
  /* Brand */
  --brand:        #16a34a;
  --brand-ink:    #0b5c28;

  /* Base (Dark by default) */
  --bg:           #0b0c10;
  --bg-2:         #0f1115;
  --text:         #eaeef3;
  --text-weak:    #c7ccd3;
  --text-dim:     #98a1ab;
  --ink:          #0d0f12;

  /* Cards / controls */
  --card-bg:      #0f1216;
  --card-border:  #1c2230;
  /*--border-soft:  color-mix(in oklab, var(--card-border) 80%, transparent); */
  --hover-bg:     rgba(255,255,255,.06);
  --focus:        rgba(22,163,74,.55);

  /* Shadows */
  --shadow-sm:    0 2px 8px rgba(0,0,0,.25);
  --shadow-md:    0 10px 24px rgba(0,0,0,.35);
  --shadow-lg:    0 26px 60px rgba(0,0,0,.45);

  /* Radii */
  --r-sm:         3px;
  --r-md:         6px;
  --r-lg:         10px;

  /* Layout */
  --container:    960px;
  --grid-gutter:  24px;     /* pentru sistemul de 12 coloane */
  --space-1:      6px;
  --space-2:      10px;
  --space-3:      14px;
  --space-4:      18px;
  --space-5:      24px;

  /* Media */
  --tile-aspect:  16/10;     /* folosit la card/brick images */

  /* Overlay text color (flip cu .on-light / .ink-light) */
  --overlay-ink:  #ffffff;
}

/* Light theme explicit (forțat de data-theme="light" pe <html>) */
html[data-theme="light"] {
  color-scheme: light;
  --bg:           #ffffff;
  --bg-2:         #fafafa;
  --text:         #0e1013;
  --text-weak:    #1f2328;
  --text-dim:     #60656f;
  --ink:          #0b0c10;

  --card-bg:      #ffffff;
  --card-border:  #e6e8eb;
  --hover-bg:     #f4f6f8;

  --shadow-sm:    0 2px 8px rgba(0,0,0,.06);
  --shadow-md:    0 12px 28px rgba(0,0,0,.10);
  --shadow-lg:    0 28px 60px rgba(0,0,0,.12);
}

/* Dark theme explicit (când toggler setează data-theme="dark") */
html[data-theme="dark"] {
  color-scheme: dark;
}

/* Dacă nu e setat explicit dark, dar sistemul preferă light → folosește variabilele de mai sus */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:           #ffffff;
    --bg-2:         #fafafa;
    --text:         #0e1013;
    --text-weak:    #1f2328;
    --text-dim:     #60656f;
    --ink:          #0b0c10;

    --card-bg:      #ffffff;
    --card-border:  #e6e8eb;
    --hover-bg:     #f4f6f8;

    --shadow-sm:    0 2px 8px rgba(0,0,0,.06);
    --shadow-md:    0 12px 28px rgba(0,0,0,.10);
    --shadow-lg:    0 28px 60px rgba(0,0,0,.12);
  }
}

/* ------------------------------ Reset ------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Fundal animat subtil (halo gradient în spate) */
body::before {
  content: "";
  position: fixed;
  inset: -40%;
  background:
    radial-gradient(circle at 0%   0%,  rgba(22,163,74,.22),  transparent 55%),
    radial-gradient(circle at 100% 100%,rgba(59,130,246,.26), transparent 50%),
    radial-gradient(circle at 80%  0%,  rgba(234,179,8,.18), transparent 55%);
  opacity: .7;
  filter: blur(42px);
  transform: translate3d(0,0,0);
  pointer-events: none;
  z-index: -1;
  animation: bg-orbit 30s ease-in-out infinite alternate;
}

/* Atenuăm halo în light mode */
html[data-theme="light"] body::before {}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body::before {
    opacity: .45;
    filter: blur(32px);
  }
}

/* Main content se întinde să împingă footer-ul jos (sticky footer) */
main,
#main {
  flex: 1 0 auto;
}

img, svg, video, canvas, audio { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 700; }
button { font: inherit; }
input, button, textarea { color: inherit; }

/* A11y helpers */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 12px; top: 12px; width: auto; height: auto;
  padding: 8px 12px; background: var(--ink); color: #fff; border-radius: var(--r-sm);
  z-index: 2000; box-shadow: var(--shadow-sm);
}

/* ------------------------------ Layout ----------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-5);
}
@supports(padding: max(0px)) {
  .container {
    padding-left: max(var(--space-5), env(safe-area-inset-left));
    padding-right: max(var(--space-5), env(safe-area-inset-right));
  }
}

/* -------- Grid 12 coloane (tip Bootstrap) -------- */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--grid-gutter) / 2);
  margin-right: calc(-1 * var(--grid-gutter) / 2);
}

[class^="col-"],
[class*=" col-"] {
  padding-left: calc(var(--grid-gutter) / 2);
  padding-right: calc(var(--grid-gutter) / 2);
  box-sizing: border-box;
}

/* XS: 0+ */
.col-1   { flex: 0 0 8.3333%;  max-width: 8.3333%; }
.col-2   { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3   { flex: 0 0 25%;      max-width: 25%; }
.col-4   { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5   { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6   { flex: 0 0 50%;      max-width: 50%; }
.col-7   { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8   { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9   { flex: 0 0 75%;      max-width: 75%; }
.col-10  { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11  { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12  { flex: 0 0 100%;     max-width: 100%; }

.col-auto { flex: 0 0 auto; width: auto; max-width: 100%; }

/* MD: ≥ 768px */
@media (min-width: 768px) {
  .col-md-1   { flex: 0 0 8.3333%;  max-width: 8.3333%; }
  .col-md-2   { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-md-3   { flex: 0 0 25%;      max-width: 25%; }
  .col-md-4   { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-5   { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-md-6   { flex: 0 0 50%;      max-width: 50%; }
  .col-md-7   { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-md-8   { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-md-9   { flex: 0 0 75%;      max-width: 75%; }
  .col-md-10  { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-md-11  { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-md-12  { flex: 0 0 100%;     max-width: 100%; }
}

/* LG: ≥ 1024px */
@media (min-width: 1024px) {
  .col-lg-1   { flex: 0 0 8.3333%;  max-width: 8.3333%; }
  .col-lg-2   { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-lg-3   { flex: 0 0 25%;      max-width: 25%; }
  .col-lg-4   { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-lg-5   { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-lg-6   { flex: 0 0 50%;      max-width: 50%; }
  .col-lg-7   { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-lg-8   { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-lg-9   { flex: 0 0 75%;      max-width: 75%; }
  .col-lg-10  { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-lg-11  { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-lg-12  { flex: 0 0 100%;     max-width: 100%; }
}

/* Heading-uri */
h1, h2, h3 { margin: var(--space-4) 0 var(--space-2); line-height: 1.2; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(20px, 2.8vw, 24px); font-weight: 800; letter-spacing: -0.01em; }

/* ------------------------------ Header ----------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(130%) blur(16px);
  border-bottom: 1px solid color-mix(in oklab, var(--card-border), #ffffff 6%);
  flex-shrink: 0;
}

/* Glow transparent fin sub header – fără umbră grea */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.site-header::before {
  top: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 12% 0,
    rgba(22, 163, 74, 0.28),
    transparent 55%
  );
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.site-header::after {
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(22, 163, 74, 0.75),
    rgba(56, 189, 248, 0.65),
    transparent
  );
  opacity: 0.7;
}

.hdr__wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
}

.hdr__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: var(--space-3);
}

.logo {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.logo span {
  color: var(--brand);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.main-nav a,
.nav-link {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text-dim);
}

.main-nav a:hover,
.nav-link:hover,
.main-nav a:focus-visible,
.nav-link:focus-visible {
  background: var(--hover-bg);
  color: var(--text-weak);
  outline: none;
}

.hdr__actions {
  margin-left: auto;
  display: flex;
  gap: var(--space-2);
}

.btn,
.hdr__btn {
  --_bg: var(--card-bg);
  --_br: var(--card-border);
  background: var(--_bg);
  color: var(--text);
  border: 1px solid var(--_br);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.06s ease;
}

.btn:hover,
.hdr__btn:hover {
  background: color-mix(in oklab, var(--_bg), #fff 3%);
  border-color: color-mix(in oklab, var(--_br), #fff 10%);
}

.btn:active,
.hdr__btn:active {
  transform: scale(0.99);
}

.btn--primary {
  --_bg: color-mix(in oklab, var(--brand), #000 10%);
  --_br: color-mix(in oklab, var(--brand), #000 20%);
  color: #ecfdf5;
}

.btn--ghost {
  --_bg: transparent;
  --_br: var(--card-border);
  color: var(--text-weak);
}

.hdr__burger {
  display: none;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  color: var(--text);
}

/* Buton icon pentru theme toggle etc. */
.hdr__btn--icon {
  border-radius: 999px;
  padding: 6px 8px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --------------------- Mega dropdown & nav chips ------------------------- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown > button,
.nav-dropdown > .nav-link,
.nav-dropdown > .hdr__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.1;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 0.18s ease-out,
    border-color 0.18s ease-out,
    color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    transform 0.18s ease-out;
}

.nav-dropdown > button:hover,
.nav-dropdown > .nav-link:hover,
.nav-dropdown > .hdr__btn:hover {
  transform: translateY(-1px);
}

/* Panou dropdown */
.nav-dropdown .mega {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  margin-top: 0.65rem;
  min-width: 260px;
  max-width: min(560px, 90vw);
  border-radius: 1rem;
  padding: 0.85rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  z-index: 1100;
  display: none;
}

/* Deschidere: hover, focus, .open */
.nav-dropdown:hover > .mega,
.nav-dropdown:focus-within > .mega,
.nav-dropdown.open > .mega {
  display: block;
}

/* „hover bridge” ca să nu se închidă când treci pe diagonală */
.nav-dropdown .mega::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

/* Drop-UP (ex. în footer) */
.nav-dropdown.nav-dropdown--up .mega {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 10px;
}

.nav-dropdown.nav-dropdown--up .mega::before {
  top: auto;
  bottom: -12px;
}

/* Layout mega comun (categorii etc.) */
.mega__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 24px;
}

.mega__item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
}

.mega__item:hover {
  background: var(--hover-bg);
  border-color: var(--card-border);
}

.mega__title {
  font-weight: 800;
  color: var(--text-weak);
}

.mega__sub {
  display: block;
  opacity: 0.9;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.mega__footer {
  border-top: 1px solid var(--card-border);
  margin-top: 12px;
  padding-top: 12px;
  text-align: right;
}

.mega__all {
  color: var(--text-weak);
}

.mega__all:hover {
  color: var(--text);
}

/* Submeniuri (opțional) */
.mega__item .submenu {
  display: none;
  margin-top: 8px;
  padding-left: 0;
  list-style: none;
}

.mega__item.open .submenu {
  display: block;
}

.mega__item .submenu a {
  display: block;
  padding: 6px 0;
  color: var(--text-dim);
}

.mega__item .submenu a:hover,
.mega__item .submenu a:focus-visible {
  color: var(--text-weak);
}

/* Ușoară mărire a zonei clicabile la link-ul de declanșare */
.nav-link.dropdown-toggle {
  position: relative;
}

.nav-link.dropdown-toggle::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: -4px;
  bottom: -4px;
}

/* Focus vizibil în mega */
.mega a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Mega – languages (limbi + search + pinned) */
.mega.mega--langs {
  min-width: 420px;
  max-width: min(520px, 90vw);
}

.mega.mega--langs .langs__search {
  margin-bottom: 0.5rem;
}

.mega.mega--langs .langs__search input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.mega.mega--langs .langs__pinned {
  margin: 0.25rem 0 0.5rem;
}

.mega.mega--langs .langs__pinned-title {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0 0 0.25rem 0.1rem;
}

.mega.mega--langs .langs__pinned-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mega.mega--langs .langs__list {
  max-height: 60vh;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.mega.mega--langs .lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.mega.mega--langs .lang.lang--pin {
  padding-inline: 0.5rem;
}

.mega.mega--langs .lang__code {
  font-weight: 600;
  font-variant: small-caps;
}

.mega.mega--langs .lang[hidden] {
  display: none !important;
}

.mega.mega--langs.has-query
  .lang:not(.is-match):not(.is-active) {
  opacity: 0.4;
}

/* Păstrăm „pilula” pentru butonul de limbă */
.hdr__btn--pill {
  border-radius: 999px;
}

/* Tema nav chips & mega – DARK */
html[data-theme="dark"] .nav-dropdown > button,
html[data-theme="dark"] .nav-dropdown > .nav-link,
html[data-theme="dark"] .nav-dropdown > .hdr__btn {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
}

html[data-theme="dark"] .nav-dropdown > button:hover,
html[data-theme="dark"] .nav-dropdown > .nav-link:hover,
html[data-theme="dark"] .nav-dropdown > .hdr__btn:hover {
  background: rgba(22, 163, 74, 0.16);
  border-color: #16a34a;
}

html[data-theme="dark"] .nav-dropdown .mega {
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .mega.mega--langs .langs__search input {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(30, 64, 175, 0.5);
  color: #e5e7eb;
}

html[data-theme="dark"] .mega.mega--langs .lang {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

html[data-theme="dark"] .mega.mega--langs .lang.is-active {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px #16a34a;
}

html[data-theme="dark"] .mega.mega--langs .lang mark {
  background: rgba(22, 163, 74, 0.4);
}

/* Tema nav chips & mega – LIGHT */
html[data-theme="light"] .nav-dropdown > button,
html[data-theme="light"] .nav-dropdown > .nav-link,
html[data-theme="light"] .nav-dropdown > .hdr__btn {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.4);
  color: #111827;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nav-dropdown > button:hover,
html[data-theme="light"] .nav-dropdown > .nav-link:hover,
html[data-theme="light"] .nav-dropdown > .hdr__btn:hover {
  background: #f9fafb;
  border-color: rgba(22, 163, 74, 0.85);
}

html[data-theme="light"] .nav-dropdown .mega {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

html[data-theme="light"] .mega.mega--langs .langs__search input {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.5);
  color: #111827;
}

html[data-theme="light"] .mega.mega--langs .lang {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.35);
  color: #111827;
}

html[data-theme="light"] .mega.mega--langs .lang.is-active {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px #16a34a;
}

html[data-theme="light"] .mega.mega--langs .lang mark {
  background: rgba(22, 163, 74, 0.2);
}

/* -------------------------- Mobile nav panel ----------------------------- */

@media (max-width: 840px) {
  .main-nav {
    display: none;
  }

  .hdr__burger {
    display: inline-block;
  }
}

/* Mobile panel – controlat de JS via [hidden] */
.nav-panel {
  display: none;
  position: fixed;
  inset: 56px 0 auto 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--card-border);
  padding: 12px 24px;
  box-shadow: var(--shadow-md);
  z-index: 1050;
}

.nav-panel[hidden] {
  display: none;
}

.nav-panel a {
  display: block;
  padding: 10px 0;
  color: var(--text-weak);
  border-bottom: 1px solid
    color-mix(in oklab, var(--card-border), transparent);
}

.nav-panel details {
  padding: 10px 0;
  border-bottom: 1px solid
    color-mix(in oklab, var(--card-border), transparent);
}

.panel__cats a {
  padding: 6px 0 6px 14px;
  display: block;
}

/* --------------------------- Hero & Search ------------------------------- */

.hero {
  margin: 0 0 var(--space-4);
  padding: 8px 0;
}

.lang-switch a {
  color: var(--text-dim);
  text-decoration: none;
  margin-right: 10px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--text);
  border-color: color-mix(in oklab, var(--card-border), #fff 10%);
  background: var(--card-bg);
}

/* Căutare rapidă */
.quick-search,
.search-form {
  position: relative;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  max-width: 720px;
}

.quick-search input,
.search-form input[type="search"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
}

.quick-search input:focus-visible,
.search-form input[type="search"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.quick-search button,
.search-form button {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

/* Typeahead */
.ta-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 8px;
  z-index: 1300;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ta-dropdown:empty,
.ta-dropdown[hidden],
.ta-dropdown[aria-expanded="false"] {
  display: none !important;
}

.ta-section {
  padding: 8px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.38px;
  color: var(--text-dim);
  background: color-mix(in oklab, var(--card-bg), #000 4%);
  border-bottom: 1px solid var(--card-border);
}

.ta-list {
  display: block;
  max-height: 420px;
  overflow: auto;
  scroll-behavior: smooth;
}

.ta-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid
    color-mix(in oklab, var(--card-border), transparent 40%);
  background: var(--card-bg);
  transition: background 0.15s ease;
}

.ta-item:last-child {
  border-bottom: none;
}

.ta-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: color-mix(in oklab, var(--card-bg), #000 8%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ta-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ta-title {
  font-weight: 800;
  color: var(--text-weak);
  line-height: 1.2;
}

.ta-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.ta-count {
  opacity: 0.9;
}

.ta-highlight {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.ta-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.ta-badge--recipe {
  background: #1e3a8a;
  color: #bfdbfe;
  border-color: #173b7a;
}

.ta-badge--ingredient {
  background: #064e3b;
  color: #86efac;
  border-color: #0b6a52;
}

.ta-badge--tag {
  background: #4c1d95;
  color: #ddd6fe;
  border-color: #3d1778;
}

@media (prefers-color-scheme: light),
html[data-theme="light"] {
  .ta-badge--recipe {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #93c5fd;
  }
  .ta-badge--ingredient {
    background: #dcfce7;
    color: #065f46;
    border-color: #86efac;
  }
  .ta-badge--tag {
    background: #ede9fe;
    color: #4c1d95;
    border-color: #c4b5fd;
  }
  .mega__item .submenu a {
    color: #374151;
  }
  .mega__item .submenu a:hover,
  .mega__item .submenu a:focus-visible {
    color: #111;
  }
}

/* --------------------------- Chips / Pills ------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.pill {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  background: var(--card-bg);
  color: var(--text-weak);
  font-size: 14px;
}

.chip:hover,
.pill:hover {
  background: color-mix(in oklab, var(--card-bg), #fff 3%);
}

/* ---------------------------- Cards + Bricks ------------------------------ */

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

.card {
  background: transparent;
}

.card__link {
  display: block;
  position: relative;
  color: inherit;
}

.card__media {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--card-border);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.28) 80%
  );
  z-index: 1;
  pointer-events: none;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: var(--tile-aspect);
  transform: scale(1.0001);
  transition: transform 0.35s ease;
}

.card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 38%,
    rgba(0, 0, 0, 0.82) 100%
  );
  color: var(--overlay-ink);
  z-index: 2;
  pointer-events: none;
}

.card__title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 1px rgba(0, 0, 0, 0.35);
}

.card__meta {
  opacity: 0.95;
  font-size: 14px;
  display: flex;
  gap: 6px;
  align-items: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (hover: hover) and (pointer: fine) {
  .card__link:hover .card__img,
  .card__link:focus-visible .card__img {
    transform: scale(1.04);
  }
}

.card__link:focus-visible {
  outline: none;
}

.card__link:focus-visible .card__media {
  box-shadow: 0 0 0 2px var(--brand), var(--shadow-sm);
}

/* Bricks de bază */
.bricks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.brick {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.brick__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.brick__img {
  width: 100%;
  aspect-ratio: var(--tile-aspect);
  object-fit: cover;
  display: block;
}

.brick__meta {
  padding: 12px 14px;
}

.brick__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.brick__sub {
  opacity: 0.95;
  font-size: 14px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--text-dim);
}

/* ===== Tiles responsiv (1 pe mobil, 2–3 pe desktop) ===== */
.bricks--tiles {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .bricks--tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .bricks--tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== Variantă overlay (text alb pe imagine) ===== */
.brick--overlay {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: var(--shadow-sm);
}

.brick--overlay .brick__img {
  width: 100%;
  aspect-ratio: var(--tile-aspect);
  object-fit: cover;
  display: block;
  transition:
    transform 0.35s ease,
    filter 0.2s ease;
}

.brick--overlay .brick__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  padding: 14px 16px;
  color: #fff;
}

.brick--overlay .brick__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 1px rgba(0, 0, 0, 0.35);
}

.brick--overlay .brick__sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* strat de umbrire pentru lizibilitate */
.brick--overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.28) 80%
  );
  transition: background 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .brick--overlay:hover::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.06) 0%,
      rgba(0, 0, 0, 0.6) 85%
    );
  }
  .brick--overlay:hover .brick__img {
    transform: scale(1.02);
    filter: brightness(0.9);
  }
}

/* ------------------- Ink utilities (deterministe) ------------------------ */

.on-light,
.ink-light {
  color: #111 !important;
  text-shadow: none !important;
}

.on-dark,
.ink-dark {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
}

.on-light,
.on-light * {
  --overlay-ink: #111 !important;
}

/* ------------------------------ Recipe ----------------------------------- */

.recipe {
}

.recipe__head h1 {
  margin: 0.2rem 0 0 0;
}

.recipe__meta {
  opacity: 0.9;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px 0;
  color: var(--text-dim);
}

.recipe__actions {
  display: flex;
  gap: 8px;
  margin: 8px 0 14px;
  align-items: center;
}

.recipe__actions button {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
}

.recipe__media {
  position: relative;
  margin: 0 0 12px 0;
}

/* Imaginea de pe rețeta detaliată – FĂRĂ efecte speciale, doar statică */
.recipe__media img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--card-border);
  background: var(--bg-2);
}

.recipe__ingredients,
.recipe__steps,
.recipe__partners,
.recipe__notes,
.recipe__related {
  margin: 18px 0;
}

.servings__ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.servings__buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.servings__buttons input {
  width: 68px;
  text-align: center;
  padding: 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
}

.servings__buttons button {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
}

#ingredientsList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

#ingredientsList li {
  display: flex;
  gap: 8px;
  align-items: center;
}

#ingredientsList .qty {
  min-width: 72px;
  display: inline-block;
  opacity: 0.95;
  color: var(--text-weak);
}

.recipe__steps ol {
  padding-left: 1.2rem;
}

/* Partners grid (reuse utils grid) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.card--simple,
.card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card--simple {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 12px;
}

/* Related cards */
.recipe__related .card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-bottom: 8px;
}

/* ---------------------------- Favorites ---------------------------------- */

.btn-fav {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  transition:
    transform 0.08s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn-fav:active {
  transform: scale(0.97);
}

.btn-fav.is-active,
.btn-fav.is-favorited {
  border-color: color-mix(in oklab, var(--brand), #000 15%);
  background: color-mix(in oklab, var(--brand), #000 85%);
  color: #eaffea;
}

.btn-fav__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.btn-fav[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.fav-count {
  font-weight: 600;
  margin-left: 4px;
  color: #a3e635;
}

/* ------------------------------- Footer ---------------------------------- */

.site-footer {
  border-top: 1px solid var(--card-border);
  background: var(--bg-2);
  padding: 20px 0;
  margin-top: 24px;
  flex-shrink: 0;
}

.footer__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  align-items: start;
}

.footer__brand .logo {
  color: var(--text);
}

.footer__brand .logo span {
  color: var(--brand);
}

.footer__brand .logo:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.footer__brand .copy {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
}

.footer__nav a,
.footer__langs a {
  color: var(--text-dim);
  text-decoration: none;
  margin-right: 10px;
}

.footer__langs a.active {
  color: var(--brand);
  font-weight: 800;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  cursor: pointer;
}

@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr auto auto;
  }
}

/* Hide header/footer în Cook mode (pe ecran & la print) */
/* suportă și body.cook-mode și body[data-cook-mode="on"] ca să fie compatibil cu orice JS */
body.cook-mode .site-header,
body.cook-mode .site-footer,
body.cook-mode #backToTop,
body[data-cook-mode="on"] .site-header,
body[data-cook-mode="on"] .site-footer,
body[data-cook-mode="on"] #backToTop {
  display: none;
}

/* Cook mode – focus pe rețetă */
body.cook-mode,
body[data-cook-mode="on"] {
  background: #ffffff;
  color: #111111;
  display: block; /* scoatem flex-ul pentru pagină full */
}

body.cook-mode #main,
body[data-cook-mode="on"] #main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

/* ----------------------------- Focus rings --------------------------------*/

:where(
    a,
    button,
    input,
    summary,
    .card__link,
    .brick__link,
    .nav-link,
    .mega a
  ):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ----------------------------- Utilities --------------------------------- */

.muted {
  color: var(--text-dim);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-weak);
  font-size: 12px;
  font-weight: 700;
}

/* ----------------------------- Animations -------------------------------- */

@keyframes subtle-fade-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ta-dropdown {
  animation: subtle-fade-in 0.12s ease-out;
}

.mega {
  animation: subtle-fade-in 0.12s ease-out;
}

/* Fundal animat */
@keyframes bg-orbit {
  from {
    transform: translate3d(-16px, -8px, 0);
  }
  to {
    transform: translate3d(18px, 10px, 0);
  }
}

/* ----------------------------- Light mode -------------------------------- */

@media (prefers-color-scheme: light),
html[data-theme="light"] {
  .site-header {
    background: color-mix(in oklab, #fff 90%, transparent);
  }
  .logo {
    color: #111;
  }
  .lang-switch a.active,
  .lang-switch a:hover {
    background: #fff;
  }
  .card__media {
    background: #f6f7f9;
  }
  .footer__brand .logo {
    color: #111;
  }
  .back-to-top {
    background: #fff;
    color: #111;
    border-color: #e1e4e8;
  }
}

/* ----------------------------- Dark polish ------------------------------- */

html:not([data-theme="light"]) .site-header {
  /* puțin mai opac în Dark (fix pentru “pata deschisă” peste H1/Edge) */
  background: color-mix(in oklab, var(--bg) 97%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
}

@supports not (background: color-mix(in oklab, #000 50%, #fff)) {
  html:not([data-theme="light"]) .site-header {
    background: rgba(11, 12, 16, 0.94);
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html:not([data-theme="light"]) .site-header {
    background: #0b0c10;
  }
}

html:not([data-theme="light"]) .mega__title {
  color: var(--text-weak);
}

html:not([data-theme="light"]) .mega__sub {
  color: color-mix(in oklab, var(--text-dim), #fff 6%);
}

html:not([data-theme="light"]) .mega__all {
  color: color-mix(in oklab, var(--text-weak), #fff 6%);
}

html:not([data-theme="light"]) .mega__item:hover {
  background: color-mix(in oklab, var(--hover-bg), #fff 2%);
  border-color: color-mix(in oklab, var(--card-border), #fff 14%);
}

html:not([data-theme="light"])
  .quick-search
  input::placeholder,
html:not([data-theme="light"])
  .search-form
  input[type="search"]::placeholder {
  color: color-mix(in oklab, var(--text-dim), #fff 14%);
}

html:not([data-theme="light"]) .btn--ghost {
  color: color-mix(in oklab, var(--text-weak), #fff 6%);
}

html:not([data-theme="light"]) .footer__nav a,
html:not([data-theme="light"]) .footer__langs a {
  color: color-mix(in oklab, var(--text-dim), #fff 10%);
}

html:not([data-theme="light"]) .footer__langs a.active {
  color: var(--brand);
}

html:not([data-theme="light"]) .card__media,
html:not([data-theme="light"]) .brick {
  border-color: color-mix(in oklab, var(--card-border), #fff 8%);
}

html:not([data-theme="light"])
  :where(a, button, input, .nav-link, .mega a):focus-visible {
  outline: 2px solid var(--focus);
}

/* -------------------------- Reduce motion -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .card__img,
  .brick--overlay .brick__img {
    transition: none;
  }
  .ta-dropdown,
  .mega {
    animation: none;
  }
  body::before {
    animation: none;
  }
}

/* -------------------------- Forced colors (a11y) ------------------------- */

@media (forced-colors: active) {
  .nav-dropdown .mega,
  .card__media,
  .brick {
    border: 1px solid CanvasText;
  }
  .btn--primary {
    color: ButtonText;
  }
}

/* ------------------------------ Print ------------------------------------ */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    display: block;
  }

  body::before {
    display: none !important;
  }

  .site-header,
  .site-footer,
  #backToTop,
  .nav-panel,
  .recipe__actions,
  .btn-fav,
  .chips,
  .lang-switch,
  .hero {
    display: none !important;
  }

  #main,
  main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
  }

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


/* ==========================================================
   ADS – stil unificat (transparent, dashed, frumos în light/dark)
   ========================================================== */

/* --- Slot-uri largi (deasupra / dintre secțiuni) ------------ */

.ad-slot {
  margin: 2.5rem 0;
  border-radius: 16px;
  border: 1px dashed var(--border-soft, rgba(0,0,0,.12));
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.02); /* foarte fin pe light */
}

/* Variante de poziționare (opțional, doar reglaj de margini) */
.ad-slot--incontent_1 {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.ad-slot--search_top {
  margin-top: 1.75rem;
  margin-bottom: 2rem;
}

.ad-slot--search_bottom {
  margin-top: 2.25rem;
  margin-bottom: 2.75rem;
}

/* Dark mode – același stil, dar cu background alb foarte transparent */
[data-theme="dark"] .ad-slot {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
}

/* Placeholder vizibil, dar discret (și folosit peste tot) */
.ad-slot__placeholder,
.ad-card__placeholder {
  opacity: .45;
  font-size: .85rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.5;
}

.ad-slot__placeholder small,
.ad-card__placeholder small {
  display: block;
  margin-top: 0.15rem;
  font-size: .75rem;
  text-transform: none;
  letter-spacing: .04em;
}

/* Ușor feedback vizual la hover, fără umbre & fără mișcare */
.ad-slot:hover {
  border-color: color-mix(in oklab, var(--border-soft, rgba(0,0,0,.12)), var(--brand) 35%);
  background: rgba(0,0,0,0.03);
}

[data-theme="dark"] .ad-slot:hover {
  border-color: rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.05);
}

/* ==========================================================
   Card Ads – bannere în grid (bricks) cu același look
   ========================================================== */

/* Wrapper-ul ocupă o celulă din grid ca orice brick normal */
.brick--ad {
  position: relative;
  border-radius: 16px;
  overflow: visible;
  background: transparent;
  border: none;
}

/* Conținutul bannerului în grid – aceleași calități ca .ad-slot */
.brick--ad .ad-card {
  min-height: 120px;
  border-radius: 16px;
  border: 1px dashed var(--border-soft, rgba(0,0,0,.12));
  background: rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.1rem;
  text-align: center;
  color: var(--text-dim);
}

/* Dark mode pentru card ads */
[data-theme="dark"] .brick--ad .ad-card {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
}

/* Când nu există cod de reclamă, folosim același placeholder */
.brick--ad .ad-card.ad-slot__placeholder,
.brick--ad .ad-card.ad-card__placeholder {
  /* stilul de text e deja definit mai sus,
     aici doar ne asigurăm de centrări */
  justify-content: center;
}

/* Badge mic "AD" în colț – discret, fără noisy styling */
.brick--ad::before {
  content: "AD";
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(0,0,0,0.04);
  color: var(--text-dim);
}

[data-theme="dark"] .brick--ad::before {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}

/* Dacă în interior vine iframe / imagine de la Google Ads,
   ne asigurăm că nu iese din card */
.brick--ad .ad-card > * {
  max-width: 100%;
}

/* Bannere de tip card cu link → pointer, dar fără efecte agresive */
.brick--ad .ad-card[href],
.brick--ad a.ad-card {
  cursor: pointer;
}

/* Mobile: doar ajustăm marginile exterioare ale sloturilor largi */
@media (max-width: 640px) {
  .ad-slot {
    margin: 1.75rem 0;
  }
}

/* =========================================================
   Search page – layout & styling comun (light + dark)
   ========================================================= */

.search-hero {
  max-width: 980px;
  margin: 0 auto 2.75rem;
  padding: 2.4rem 2.6rem 2.7rem;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

/* mic accent de lumină în colțul din dreapta sus */
.search-hero::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 85% 15%,
              rgba(255, 255, 255, 0.25),
              transparent 58%);
  opacity: 0.8;
  pointer-events: none;
}

.search-hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.1rem, 2.4vw, 2.5rem);
  margin: 0 0 0.35rem;
}

/* mic subtitlu sub H1 – dacă vei vrea, poți adăuga <p> în PHP */
.search-hero p {
  position: relative;
  z-index: 1;
}

.quick-search {
  position: relative;
  z-index: 1;
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.quick-search input[type="search"] {
  width: 100%;
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.96);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out,
              background-color 0.18s ease-out, transform 0.12s ease-out;
}

.quick-search input[type="search"]:focus {
  border-color: var(--brand, #16a34a);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.5),
              0 18px 40px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.quick-search button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: var(--brand, #16a34a);
  color: #fff;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(22, 163, 74, 0.45);
  transition: transform 0.12s ease-out, box-shadow 0.18s ease-out,
              background-color 0.18s ease-out;
}

.quick-search button:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.55);
}

.quick-search button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.4);
}

/* sort pills sub căutare */

.sort-pills {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.sort-pills .pill {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out,
              color 0.16s ease-out, transform 0.12s ease-out;
}

.sort-pills .pill:hover {
  transform: translateY(-1px);
}

.sort-pills .pill.active {
  border-color: var(--brand, #16a34a);
  background: rgba(22, 163, 74, 0.08);
}

/* container rezultate */

.search-results {
  max-width: 1180px;
  margin: 0 auto 4.2rem;
  padding-top: 0.5rem;
}

.search-results h2 {
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
}

.search-meta {
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* grid-ul cu cardurile de rețete pentru search */

.search-results .bricks {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
}

/* cardurile standard de rețetă sunt deja stilizate ca .brick, doar adăugăm mici fine-tuning aici dacă vrei */
.search-results .brick {
  min-height: 100%;
}

/* ----- Empty state (fără termen de căutare) ----- */

.search-empty {
  width: 100%;
  margin-top: 0.75rem;
  padding: 2.4rem 2.5rem 2.7rem;
  border-radius: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.9);
}

.search-empty__text {
  font-size: 1.02rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.search-empty__hint {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.search-empty__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.pill--suggestion {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.96);
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out,
              transform 0.12s ease-out;
}

.pill--suggestion:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #16a34a);
  background: rgba(22, 163, 74, 0.06);
}

.search-hero__meta {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.search-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.3);
  white-space: nowrap;
}

.search-hero__hint {
  font-size: 0.86rem;
  opacity: 0.82;
}
