/* =========================================================================
   Meseriaș Cluj — Design System
   Vanilla CSS. Fără dependențe externe. Fonturi de sistem.
   ========================================================================= */

:root {
  /* Culori — Meseriaș Cluj (albastru) */
  --accent: #0b6bcb;
  --accent-600: #0957a8;
  --accent-700: #07458a;
  --accent-050: #eff6ff;
  --accent-100: #d5e7fb;
  --accent-rgb: 11, 107, 203;

  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;

  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e6eaf1;
  --line-2: #eef2f7;

  --gold: #f59e0b;
  --danger: #ef4444;
  --danger-050: #fef2f2;
  --success: #10b981;

  /* Forme */
  --r-xl: 22px;
  --r: 16px;
  --r-sm: 11px;
  --r-xs: 8px;

  /* Umbre */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --sh: 0 4px 12px rgba(15, 23, 42, .07), 0 2px 4px rgba(15, 23, 42, .05);
  --sh-lg: 0 18px 45px rgba(15, 23, 42, .14), 0 8px 18px rgba(15, 23, 42, .08);

  /* Layout */
  --maxw: 1320px;
  --header-h: 68px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* ------------------------------ Base ---------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-100); outline-offset: 2px; border-radius: 6px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 560px) { .container { padding: 0 22px; } }
.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;
}

/* ------------------------------ Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 10px 16px; font-size: 14.5px; font-weight: 600;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(var(--accent-rgb),.35); }
.btn-primary:hover { background: var(--accent-600); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted-2); }
.btn-soft { background: var(--accent-050); color: var(--accent-700); }
.btn-soft:hover { background: var(--accent-100); }
.btn-danger { background: var(--danger-050); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: var(--r-xs); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------ Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--accent) 0%, #3b93e2 100%);
  display: grid; place-items: center; color: #fff; box-shadow: 0 4px 12px rgba(var(--accent-rgb),.4);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-name b { color: var(--accent-700); }
.brand-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; margin-top: -2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-link { color: var(--ink-2); font-weight: 600; font-size: 14px; }

/* ------------------------------ Hero ----------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 400px at 88% -10%, rgba(14,165,169,.14), transparent 60%),
    radial-gradient(900px 380px at 5% 0%, rgba(37,99,235,.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-block: 56px 40px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-050); color: var(--accent-700);
  font-weight: 700; font-size: 13px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--accent-100); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 850; letter-spacing: -.03em; }
.hero h1 .accent { color: var(--accent-700); }
.hero-lead { max-width: 620px; margin: 14px auto 0; color: var(--muted); font-size: clamp(15px, 1.8vw, 18px); }

/* Search bar */
.searchbar {
  max-width: 680px; margin: 30px auto 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: var(--sh);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100), var(--sh); }
.searchbar svg { color: var(--muted-2); flex: none; }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--ink); min-width: 0;
}
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar .btn { border-radius: 999px; padding-inline: 20px; }
.hero-stats { display: flex; gap: 26px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.hero-stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ------------------------------ Toolbar / filtre ----------------------- */
.toolbar {
  position: sticky; top: var(--header-h); z-index: 30;
  background: rgba(244, 247, 251, .92); backdrop-filter: blur(6px);
  padding: 16px 0; border-bottom: 1px solid var(--line-2);
}
.toolbar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 34px 9px 13px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; box-shadow: var(--sh-sm);
}
.select:hover { border-color: var(--muted-2); }
.toolbar-spacer { flex: 1; }
.results-count { color: var(--muted); font-size: 14px; font-weight: 600; }
.results-count b { color: var(--ink); }

/* ------------------------------ Grid + Card ---------------------------- */
.grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; gap: 16px; } }
/* Home: „Firme recomandate" pe 2 coloane și pe mobil */
@media (max-width: 640px) {
  .page-home .section-alt .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .page-home .section-alt .card-body { padding: 11px 11px 13px; gap: 6px; }
  .page-home .section-alt .card-title { font-size: 14px; }
  /* Badges más compactos para que no se solapen en tarjetas estrechas */
  .page-home .section-alt .badge-featured { top: 8px; left: 8px; font-size: 9px; padding: 4px 7px; gap: 3px; }
  .page-home .section-alt .card-rating { top: 8px; right: 8px; font-size: 11px; padding: 3px 7px; }
}

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }
.card:focus-visible { outline: 3px solid var(--accent-100); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.badge-featured {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(15,23,42,.82); color: #fff; backdrop-filter: blur(4px);
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; letter-spacing: .01em;
}
.badge-featured svg { color: var(--gold); }
.card-rating {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(255,255,255,.94); color: var(--ink);
  font-size: 12.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px; box-shadow: var(--sh-sm);
}
.card-rating svg { color: var(--gold); }
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; }
.card-zone { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.card-zone svg { color: var(--accent); flex: none; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag {
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 11px; font-weight: 650;
  padding: 3px 8px; border-radius: 7px; white-space: nowrap;
}
.tag-more { background: var(--accent-050); color: var(--accent-700); border-color: var(--accent-100); }
.card-foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; }
.card-cta { color: var(--accent-700); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }

/* Empty state */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--muted);
}
.empty-icn {
  width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 20px;
  background: var(--accent-050); color: var(--accent); display: grid; place-items: center;
}
.empty h3 { color: var(--ink); font-size: 19px; margin-bottom: 6px; }

/* ------------------------------ Modal ---------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 18px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 760px; background: var(--surface);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg);
  transform: translateY(14px) scale(.98); transition: transform .22s cubic-bezier(.2,.8,.3,1);
}
.modal-backdrop.open .modal { transform: none; }
.modal-hero { position: relative; height: 220px; background: var(--surface-2); }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15,23,42,.55)); }
.modal-hero-caption { position: absolute; left: 22px; right: 22px; bottom: 16px; z-index: 2; color: #fff; }
.modal-hero-caption h2 { font-size: 25px; font-weight: 820; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.modal-hero-caption .card-zone { color: rgba(255,255,255,.92); }
.modal-hero-caption .card-zone svg { color: #fff; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center;
  box-shadow: var(--sh); transition: transform .12s ease, background .15s ease;
}
.modal-close:hover { background: #fff; transform: rotate(90deg); }
.modal-rating {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  background: rgba(255,255,255,.94); color: var(--ink); font-weight: 800; font-size: 13px;
  padding: 6px 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; box-shadow: var(--sh-sm);
}
.modal-rating svg { color: var(--gold); }
.modal-body { padding: 22px 24px 26px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.modal-section { padding: 18px 0; border-top: 1px solid var(--line-2); }
.modal-section:first-of-type { border-top: 0; padding-top: 0; }
.modal-section h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 800; margin-bottom: 11px;
}
.modal-about { color: var(--ink-2); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--accent-050); color: var(--accent-700); border: 1px solid var(--accent-100);
  font-size: 13px; font-weight: 650; padding: 6px 12px; border-radius: 999px;
}
.hours-table { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; font-size: 14px; }
.hours-row { display: contents; }
.hours-row > .d { color: var(--ink-2); font-weight: 600; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.hours-row > .h { color: var(--muted); text-align: right; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-variant-numeric: tabular-nums; }
.hours-row.today > .d { color: var(--accent-700); font-weight: 800; }
.hours-row.today > .h { color: var(--accent-700); font-weight: 700; }
.hours-row .closed { color: var(--muted-2); }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
.contact-item .ci-icn {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--accent);
  display: grid; place-items: center;
}
.contact-item .ci-txt { min-width: 0; }
.contact-item .ci-txt small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.contact-item .ci-txt a, .contact-item .ci-txt span { font-size: 14px; font-weight: 650; color: var(--ink); word-break: break-word; }
.socials { display: flex; gap: 10px; }
.social-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); display: grid; place-items: center;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.social-btn:hover { transform: translateY(-2px); color: #fff; background: var(--accent); border-color: var(--accent); }

/* ------------------------------ Footer --------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 34px 0; margin-top: 10px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { color: var(--muted); font-size: 13.5px; }
.footer-note { font-size: 12px; color: var(--muted-2); max-width: 520px; }

/* =========================================================================
   ADMIN
   ========================================================================= */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } }

.admin-side {
  background: #0f172a; color: #cbd5e1; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
@media (max-width: 860px) { .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; } }
.admin-brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 18px; padding: 0 6px; }
@media (max-width: 860px) { .admin-brand { margin-bottom: 0; margin-right: auto; } }
.admin-brand .brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.admin-brand b { font-weight: 800; font-size: 15px; }
.admin-nav-btn {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: 0; color: #cbd5e1; text-align: left;
  padding: 11px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
@media (max-width: 860px) { .admin-nav-btn { width: auto; } }
.admin-nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav-btn.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(var(--accent-rgb),.4); }
.admin-nav-btn svg { flex: none; }
.admin-side-foot { margin-top: auto; padding: 12px 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
@media (max-width: 860px) { .admin-side-foot { margin-top: 0; border: 0; padding: 0; } }
.admin-side-foot a { color: var(--muted-2); font-size: 13px; }

.admin-main { padding: 26px 28px 60px; overflow: hidden; }
@media (max-width: 560px) { .admin-main { padding: 20px 16px 50px; } }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-head h1 { font-size: 24px; font-weight: 820; letter-spacing: -.02em; }
.admin-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.admin-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.panel-pad { padding: 20px 22px; }
.panel + .panel { margin-top: 20px; }
.panel-head { padding: 16px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h3 { font-size: 16px; font-weight: 750; }

/* Stat cards */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-row { grid-template-columns: 1fr; } }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-sm); }
.stat-card .s-icn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; }
.s-icn.teal { background: var(--accent-050); color: var(--accent-700); }
.s-icn.blue { background: #eff6ff; color: #2563eb; }
.s-icn.gold { background: #fffbeb; color: var(--gold); }
.s-icn.pink { background: #fdf2f8; color: #db2777; }
.stat-card .s-val { font-size: 28px; font-weight: 850; letter-spacing: -.02em; }
.stat-card .s-lbl { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stat-card .s-trend { font-size: 12.5px; font-weight: 700; margin-top: 6px; color: var(--muted); }
.s-trend.up { color: var(--success); }
.s-trend.down { color: var(--danger); }

/* Chart */
.chart-wrap { padding: 8px 6px 0; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-bar { fill: var(--accent); transition: fill .15s ease; cursor: default; }
.chart-bar:hover { fill: var(--accent-700); }
.chart-bar-bg { fill: var(--line-2); }
.chart-label { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font); }
.chart-value { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font); }

/* Top list */
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.rank-item:first-child { border-top: 0; }
.rank-n { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.rank-item:nth-child(1) .rank-n { background: var(--accent); color: #fff; }
.rank-thumb { width: 40px; height: 40px; flex: none; border-radius: 9px; object-fit: cover; }
.rank-name { font-weight: 700; font-size: 14px; }
.rank-name small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.rank-val { margin-left: auto; font-weight: 800; color: var(--ink); }
.rank-val small { color: var(--muted); font-weight: 600; }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 14px; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: var(--surface-2); }
.t-clinic { display: flex; align-items: center; gap: 11px; }
.t-clinic img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.t-clinic .t-name { font-weight: 700; }
.t-clinic .t-zone { color: var(--muted); font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.pill-gold { background: #fffbeb; color: #b45309; }
.pill-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; transition: background .12s, color .12s, border-color .12s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--muted-2); }
.icon-btn.danger:hover { background: var(--danger-050); color: var(--danger); border-color: #fecaca; }
.icon-btn.gold.on { background: #fffbeb; color: var(--gold); border-color: #fde68a; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.col-2 { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field label .req { color: var(--danger); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .textarea, textarea.input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 13px; font-size: 14.5px; font-family: inherit; color: var(--ink);
  background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* Chips input (servicii) */
.chips-input { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.chips-input .chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-050); color: var(--accent-700); border: 1px solid var(--accent-100); padding: 5px 6px 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 650; }
.chips-input .chip-x button { border: 0; background: transparent; color: var(--accent-700); display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.chips-input .chip-x button:hover { background: var(--accent-100); }
.chips-input input { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; font-size: 14px; padding: 5px; }

/* Hours editor */
.hours-editor { display: flex; flex-direction: column; gap: 8px; }
.hours-editor-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; }
.hours-editor-row > label { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }

/* Photo upload */
.photo-upload { display: flex; align-items: center; gap: 16px; }
.photo-preview { width: 108px; height: 108px; flex: none; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload .pu-controls { display: flex; flex-direction: column; gap: 8px; }

/* Drawer (form add/edit) */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 121; width: min(620px, 100%);
  background: var(--bg); box-shadow: var(--sh-lg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.3,1);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-head h3 { font-size: 18px; font-weight: 780; }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 15px 22px; border-top: 1px solid var(--line); background: var(--surface); }

/* Login gate */
.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: linear-gradient(160deg, #1a0a0f, #5c0f1e); padding: 20px; }
.gate-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--r-xl); padding: 32px 28px; box-shadow: var(--sh-lg); text-align: center; }
.gate-card .brand-logo { width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 16px; }
.gate-card h2 { font-size: 21px; font-weight: 800; }
.gate-card p { color: var(--muted); font-size: 14px; margin-top: 6px; margin-bottom: 20px; }
.gate-card .input { text-align: center; margin-bottom: 12px; }
.gate-err { color: var(--danger); font-size: 13px; font-weight: 600; margin-bottom: 12px; min-height: 18px; }
.gate-hint { margin-top: 16px; font-size: 12px; color: var(--muted-2); background: var(--surface-2); padding: 10px; border-radius: 10px; }

/* Toast */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--sh-lg); display: flex; align-items: center; gap: 9px; animation: toastIn .25s ease; }
.toast svg { color: var(--accent); }
.toast.err svg { color: #fca5a5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Importar desde URL (modal) */
.import-url-modal { max-width: 520px; }
.iu-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.iu-head h3 { font-size: 18px; font-weight: 800; }
.iu-body { padding: 20px 24px; }
.iu-intro { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
.iu-body .hint { display: block; margin-top: 12px; color: var(--muted-2); font-size: 12px; }
.iu-body code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.iu-progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--accent-700); font-weight: 600; font-size: 14px; }
.iu-spinner { width: 18px; height: 18px; border: 2.5px solid var(--accent-100); border-top-color: var(--accent); border-radius: 50%; animation: iuSpin .7s linear infinite; flex: none; }
@keyframes iuSpin { to { transform: rotate(360deg); } }
.iu-error { margin-top: 14px; color: var(--danger); background: #fef2f2; border: 1px solid #fecaca; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.iu-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

/* Resumen de importación (dentro del drawer) */
.import-summary { background: var(--accent-050); border: 1px solid var(--accent-100); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.import-summary h4 { font-size: 13px; font-weight: 800; color: var(--accent-700); margin-bottom: 4px; display: flex; align-items: center; gap: 7px; }
.import-summary p { font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.import-summary ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.import-summary li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.conf-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.conf-alta { background: #16a34a; } .conf-media { background: var(--gold); } .conf-baja { background: #94a3b8; }
.import-summary .cf-field { font-weight: 700; color: var(--ink); }
.import-summary .cf-src { color: var(--muted-2); font-size: 11.5px; }

/* Utils */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.divider-note { text-align: center; color: var(--muted-2); font-size: 12px; margin: 8px 0; }

/* =========================================================================
   MESERIAȘ CLUJ — Pagini publice SSR (nav, hero, listări, fișă firmă, footer)
   ========================================================================= */
.ic { width: 1em; height: 1em; vertical-align: -.125em; flex: none; }
main { display: block; }

/* ------------------------------ Header --------------------------------- */
.header-inner { display: flex; align-items: center; gap: 18px; }
.brand-logo .brand-mark { width: 22px; height: 22px; }
.brand-name { line-height: 1.1; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2);
  font-weight: 650; font-size: 14.5px; padding: 9px 12px; border-radius: 10px;
  background: transparent; border: 0; cursor: pointer;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.has-mega > .nav-link::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px); opacity: .55; margin-left: 2px;
}
.mega {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-lg); padding: 18px; min-width: 640px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.mega::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav-item.has-mega:hover .mega,
.nav-item.has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 18px; }
.mega-col { min-width: 0; }
.mega-head { display: block; font-weight: 800; font-size: 13.5px; color: var(--ink); padding: 4px 0 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.mega-head:hover { color: var(--accent-700); text-decoration: none; }
.mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.mega-col li a { display: block; color: var(--muted); font-size: 13px; font-weight: 550; padding: 5px 8px; border-radius: 7px; }
.mega-col li a:hover { background: var(--accent-050); color: var(--accent-700); text-decoration: none; }
.mega-zonas { min-width: 560px; left: auto; }
.zonas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 10px; }
.zonas-grid a { color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 8px; border-radius: 7px; }
.zonas-grid a:hover { background: var(--accent-050); color: var(--accent-700); text-decoration: none; }
.nav-search { display: flex; align-items: center; }
.nav-search input {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 8px 14px; font-size: 13.5px; width: 160px; transition: width .2s ease, box-shadow .15s ease, border-color .15s;
}
.nav-search input:focus { outline: 0; width: 210px; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); background: var(--surface); }
.header-actions { margin-left: auto; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 750; font-size: 15px; }
.header-phone .ic { color: var(--accent); font-size: 18px; }
.header-phone:hover { color: var(--accent-700); text-decoration: none; }
.nav-toggle { display: none; width: 42px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink-2); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ------------------------------ Hero ----------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #061f3d; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* Fundal generat în CSS (fără asset binar): două halouri radiale peste un
     degradat diagonal în albastrul de brand. Degradatul întunecat de jos
     garantează contrastul textului alb. Dacă apare o fotografie reală cu
     Clujul, se adaugă aici ca `url(...)` sub gradientul de contrast. */
  background-image:
    linear-gradient(180deg, rgba(6,31,61,.30) 0%, rgba(6,31,61,.45) 45%, rgba(6,31,61,.86) 100%),
    radial-gradient(120% 90% at 18% 12%, rgba(59,147,226,.55) 0%, rgba(59,147,226,0) 55%),
    radial-gradient(100% 80% at 88% 8%, rgba(13,148,136,.42) 0%, rgba(13,148,136,0) 60%),
    linear-gradient(135deg, #0b6bcb 0%, #07458a 48%, #061f3d 100%);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-inner { position: relative; z-index: 1; padding-block: 78px 40px; text-align: center; color: #fff; }
@media (max-width: 640px) { .hero-inner { padding-block: 44px 26px; } }
.hero-eyebrow { display: inline-block; color: rgba(255,255,255,.85); font-weight: 650; font-size: 13.5px; letter-spacing: .02em; margin-bottom: 14px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.hero-title { font-size: clamp(30px, 5vw, 54px); font-weight: 850; letter-spacing: -.03em; text-shadow: 0 3px 24px rgba(0,0,0,.4); }
.hero-title span { color: #ffd9a0; }
.hero-lead { max-width: 640px; margin: 14px auto 0; color: rgba(255,255,255,.9); font-size: clamp(15px, 1.8vw, 18px); text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-search {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 10px; align-items: end;
  max-width: 980px; margin: 30px auto 0; padding: 14px; background: rgba(255,255,255,.96);
  border-radius: 18px; box-shadow: var(--sh-lg); text-align: left;
}
.hs-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hs-field label { font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-left: 2px; }
.hs-field select {
  appearance: none; -webkit-appearance: none; width: 100%;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 34px 11px 13px;
  font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.hs-field select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); }
.hs-field select:disabled { opacity: .6; cursor: not-allowed; }
.hero-search .hs-go { height: 44px; padding-inline: 26px; border-radius: var(--r-sm); font-size: 15px; }
@media (max-width: 720px) { .hero-search { grid-template-columns: 1fr 1fr; } .hero-search .hs-go { grid-column: 1 / -1; } }
@media (max-width: 420px) { .hero-search { grid-template-columns: 1fr; } }
/* Barra de búsqueda por palabra clave (entre los filtros y las estadísticas) */
.hero .hero-keyword { max-width: 760px; margin: 16px auto 0; }
.hero .hero-keyword input { font-size: 15px; }
.hero-stats { display: flex; gap: 36px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-stats > div { text-align: center; color: #fff; }
.hero-stats b { display: block; font-size: 26px; font-weight: 850; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-stats span { font-size: 12.5px; color: rgba(255,255,255,.82); font-weight: 600; }

/* ------------------------------ Secciones ------------------------------ */
.section { padding-block: 64px; }
@media (max-width: 640px) { .section { padding-block: 44px; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 820; letter-spacing: -.02em; }
.section-link { font-weight: 700; font-size: 14px; color: var(--accent-700); display: inline-flex; align-items: center; gap: 5px; }
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
@media (max-width: 900px) { .cat-tiles { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (max-width: 640px) { .cat-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cat-tiles { grid-template-columns: 1fr; } }
.cat-tile {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--r); box-shadow: var(--sh-sm); background: var(--ink);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); text-decoration: none; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0) 32%, rgba(15,23,42,.35) 62%, rgba(15,23,42,.82) 100%);
}
.cat-name {
  position: absolute; left: 18px; right: 18px; bottom: 15px; z-index: 2; color: #fff;
  font-weight: 800; font-size: 19px; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

/* Card: enlaces internos */
.card-media { display: block; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent-700); text-decoration: none; }

/* ------------------------------ Listado -------------------------------- */
.container.section, main > .container { padding-top: 26px; padding-bottom: 50px; }
.breadcrumb { padding: 18px 0 6px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--muted-2); }
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent-700); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 700; }
.page-head { margin: 8px 0 24px; }
.page-head h1 { font-size: clamp(24px, 3.6vw, 36px); font-weight: 850; letter-spacing: -.02em; }
.page-intro { max-width: 720px; margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.page-count { margin-top: 10px; color: var(--muted); font-size: 13.5px; font-weight: 650; }
.linkset { margin: 30px 0 6px; }
.linkset-title { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip b { font-weight: 800; opacity: .7; }
.chip .ic { font-size: 14px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.empty p:first-child { color: var(--ink-2); font-weight: 650; font-size: 16px; }
.empty-sub { font-size: 13.5px; margin-top: 6px; }
.empty-404 { border-style: solid; padding: 60px 24px; }
.empty-404 h1 { font-size: 28px; margin-bottom: 10px; }
.empty-404 .chips { justify-content: center; margin-top: 22px; }
.page-search { display: flex; gap: 10px; margin: 14px 0 6px; max-width: 560px; }
.page-search input { flex: 1; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; font-size: 15px; }
.page-search input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); }

/* ------------------------------ Ficha ---------------------------------- */
.page-biz .biz { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; margin: 10px 0 26px; }
@media (max-width: 760px) { .page-biz .biz { grid-template-columns: 1fr; gap: 18px; } }
.biz-media { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); box-shadow: var(--sh-sm); }
.biz-media img { width: 100%; height: 100%; object-fit: cover; }
.biz-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 850; letter-spacing: -.02em; }
.biz-zone { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; margin-top: 8px; }
.biz-zone .ic { color: var(--accent); }
.biz-rating { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-2); font-weight: 600; }
.biz-rating .ic { color: var(--gold); }
.biz-rating b { color: var(--ink); }
.biz-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.biz-grid { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; padding-bottom: 20px; }
@media (max-width: 760px) { .biz-grid { grid-template-columns: 1fr; } }
.biz-section { padding: 0 0 22px; }
.biz-section h2, .biz-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; margin-bottom: 12px; }
.biz-section p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.biz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh-sm); margin-bottom: 18px; }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.hours td { text-align: right; color: var(--muted); padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-variant-numeric: tabular-nums; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.contact-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.contact-list .ic { color: var(--accent); }

/* ------------------------------ Footer --------------------------------- */
.site-footer { display: block; }
.site-footer .container { display: block; }
/* Nota: la especificidad de `.site-footer .container` obliga a repetir el scope
   aquí, de lo contrario el grid quedaba anulado a `display:block` (columnas apiladas). */
.site-footer .footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 10px; }
@media (max-width: 860px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .site-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand .brand-name { font-size: 18px; font-weight: 800; }
.footer-brand p { margin: 8px 0 12px; max-width: 320px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { color: var(--ink-2); font-size: 14px; }
.footer-col li a:hover { color: var(--accent-700); }
/* Barra de confianza (credibilidad) */
.site-footer .footer-trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  border-top: 1px solid var(--line-2); margin-top: 28px; padding-top: 22px;
}
@media (max-width: 860px) { .site-footer .footer-trust { grid-template-columns: 1fr 1fr; gap: 14px; } }
@media (max-width: 480px) { .site-footer .footer-trust { grid-template-columns: 1fr; } }
.trust-badge { display: flex; align-items: center; gap: 11px; }
.trust-ic {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: var(--accent-050); color: var(--accent-700);
  display: grid; place-items: center;
}
.trust-ic .ic { font-size: 20px; }
.trust-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.trust-txt b { font-size: 13.5px; font-weight: 750; color: var(--ink); }
.trust-txt small { font-size: 12px; color: var(--muted); }

.footer-legal { border-top: 1px solid var(--line-2); margin-top: 22px; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.footer-legal p { color: var(--muted-2); font-size: 12.5px; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-legal-links a { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.footer-legal-links a:hover { color: var(--accent-700); }

/* Banner de cookies (RGPD) */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: rgba(255,255,255,.97); backdrop-filter: saturate(160%) blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(15,23,42,.12);
  animation: cookieUp .3s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 14px 32px; flex-wrap: wrap; }
.cookie-txt { color: var(--ink-2); font-size: 13.5px; max-width: 760px; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
@media (max-width: 560px) { .cookie-inner { padding: 14px 18px; } .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }
@keyframes cookieUp { from { transform: translateY(100%); } to { transform: none; } }

/* Páginas legales */
.legal { max-width: 820px; margin: 0 auto; padding-bottom: 30px; }
.legal-section { padding: 18px 0; border-top: 1px solid var(--line-2); }
.legal-section:first-of-type { border-top: 0; }
.legal-section h2 { font-size: 18px; font-weight: 780; letter-spacing: -.01em; margin-bottom: 10px; }
.legal-section p { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin-bottom: 10px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-links { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13.5px; }

/* ------------------------------ Móvil ---------------------------------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-actions { margin-left: 0; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-lg);
    padding: 12px; margin: 0; display: none;
  }
  .main-nav.open { display: flex; }
  .nav-item { position: static; }
  .mega, .mega-zonas { position: static; min-width: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 6px 10px; display: none; }
  .nav-item.open .mega { display: block; }
  .mega-grid, .zonas-grid { grid-template-columns: 1fr 1fr; }
  .nav-search { padding: 6px; }
  .nav-search input { width: 100%; }
  .has-mega > .nav-link { justify-content: space-between; }
}

/* ---------------------- Admin: taxonomía estructurada ------------------ */
.tax-check { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; background: var(--surface); }
@media (max-width: 640px) { .tax-check { grid-template-columns: 1fr; } }
.tax-check-group { min-width: 0; }
.tax-check-parent { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); padding-bottom: 5px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; cursor: pointer; }
.tax-check-children { display: flex; flex-direction: column; gap: 3px; padding-left: 4px; }
.tax-check-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; padding: 2px 0; }
.tax-check input, .metro-check input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

.metro-check { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 14px; max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface); }
@media (max-width: 640px) { .metro-check { grid-template-columns: 1fr 1fr; } }
.metro-check-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; padding: 2px 0; }
.ml-lines { color: var(--muted-2); font-size: 11px; font-weight: 700; }

.tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .tax-grid { grid-template-columns: 1fr; } }
.tax-col-2 { grid-column: 1 / -1; }
.tax-list { display: flex; flex-direction: column; }
.tax-list-scroll { max-height: 420px; overflow-y: auto; }
.tax-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.tax-row:last-child { border-bottom: 0; }
.tax-row-parent { font-size: 14.5px; }
.tax-row-child { padding-left: 20px; color: var(--ink-2); font-size: 13.5px; }
.tax-row-child::before { content: "↳"; color: var(--muted-2); margin-right: 6px; }
.tax-row-main { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tax-slug { color: var(--muted-2); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tax-inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tax-inline-form .input { flex: 1; min-width: 160px; }

/* ---------------- Zonas: agrupación por región de la Comunidad ---------- */
/* Mega-menú "Zonas": columnas por grupo + enlace a índice completo. */
.mega-zonas { min-width: 720px; }
.mega-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 800; font-size: 13px; color: var(--accent-700); }
.mega-all .ic { width: 15px; height: 15px; }
.mega-more { color: var(--accent-700) !important; font-weight: 750 !important; }

/* Home "Explora por zona": grupos con título + conteo + chips. */
.zona-group { margin: 16px 0 20px; }
.zona-group:last-child { margin-bottom: 4px; }
.zona-group-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; color: var(--ink); margin: 0 0 11px; }
.zona-group-title a { color: var(--ink); }
.zona-group-title a:hover { color: var(--accent-700); text-decoration: none; }
.zona-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--accent-050); color: var(--accent-700); font-size: 12px; font-weight: 800; border: 1px solid var(--accent-100); }
.chip-more { background: var(--accent-700); color: #fff; border-color: var(--accent-700); font-weight: 800; }
.chip-more:hover { background: var(--accent-800, var(--accent-700)); text-decoration: none; }

/* Índice /zonas: secciones ancladas por zona. */
.zona-index-block { margin: 28px 0; scroll-margin-top: 92px; }
.zona-index-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 8px; padding-bottom: 9px; border-bottom: 1px solid var(--line-2); }
.zona-index-sub { color: var(--muted); font-size: 14px; margin: 0 0 13px; }

@media (max-width: 860px) { .mega-zonas { min-width: 0; } }


/* ===================== Logo / galería / paginación ===================== */
/* Logo suprapus pe cardul de negocio (colț jos-stânga peste copertă). */
.card-logo {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  width: 46px; height: 46px; border-radius: 11px; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(15,23,42,.18); display: grid; place-items: center;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

/* Logo în ficha de negocio. */
.biz-logo {
  width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--sh-sm); display: grid; place-items: center;
  margin-bottom: 12px;
}
.biz-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Galería de trabajos en la ficha. */
.biz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.biz-gallery-item { display: block; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.biz-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.biz-gallery-item:hover img { transform: scale(1.05); }

/* Paginación. */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 28px 0 6px; }
.pg-nums { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-num, .pg-arrow {
  display: inline-flex; align-items: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px;
  justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 14px;
}
.pg-num:hover, .pg-arrow:hover { border-color: var(--accent); color: var(--accent-700); background: var(--accent-050); }
.pg-num.is-current { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(var(--accent-rgb),.35); }
.pg-gap { color: var(--muted-2); padding: 0 2px; }
.pg-arrow svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .pg-arrow span { display: none; } }

/* ===================== Admin: editor de fotos (galería) ================ */
.photo-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pg-thumb { position: relative; width: 84px; height: 84px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg-thumb .pg-remove {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(15,23,42,.72); color: #fff; cursor: pointer; font-size: 14px; line-height: 1;
  display: grid; place-items: center;
}
.pg-thumb .pg-remove:hover { background: var(--accent); }
.pg-add-tile { width: 84px; height: 84px; border-radius: var(--r-sm); border: 1.5px dashed var(--muted-2); background: var(--surface-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 26px; }
.pg-add-tile:hover { border-color: var(--accent); color: var(--accent-700); background: var(--accent-050); }

/* ===================== Admin: board de clasament ====================== */
.ord-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 18px; }
.ord-toolbar .field { min-width: 180px; }
.ord-toolbar label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.ord-hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.ord-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

.ord-board { display: flex; flex-direction: column; gap: 18px; }
.ord-page { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.ord-page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ord-page-head b { font-size: 14px; color: var(--ink); }
.ord-page-head .ord-page-count { font-size: 12px; color: var(--muted); }
.ord-slots { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 46px; }

.ord-slot { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: grab; }
.ord-slot:hover { border-color: var(--muted-2); }
.ord-slot:active { cursor: grabbing; }
.ord-grip { flex: none; color: var(--muted-2); font-size: 18px; line-height: 1; letter-spacing: -2px; cursor: grab; user-select: none; }
.ord-slot:hover .ord-grip { color: var(--accent); }
.ord-slot.dragging { opacity: .45; }
.ord-slot.drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-100); }
.ord-pos { flex: none; width: 30px; text-align: center; font-weight: 800; color: var(--accent-700); font-size: 15px; }
.ord-thumb { flex: none; width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ord-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ord-info { min-width: 0; flex: 1; }
.ord-name { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-zone { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-slot-actions { display: flex; gap: 4px; flex: none; }
.ord-drag-handle { color: var(--muted-2); cursor: grab; padding: 0 4px; }
.ord-empty { padding: 26px; text-align: center; color: var(--muted); }
.admin-subnote { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.admin-subnote a { color: var(--accent-700); font-weight: 700; text-decoration: none; }
.admin-subnote a:hover { text-decoration: underline; }

.ord-add { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ord-add-head { padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: 14px; }
.ord-add-body { padding: 14px 16px; }
.ord-add-list { display: flex; flex-direction: column; gap: 5px; max-height: 320px; overflow-y: auto; margin-top: 10px; }
.ord-add-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); }
.ord-add-row:hover { background: var(--surface-2); }
.ord-add-row .ord-thumb { width: 32px; height: 32px; }
.ord-add-row .ord-name { flex: 1; }

/* ======================= Lead / cerere de ofertă ====================== */
.lead-cta {
  margin: 26px 0; padding: 22px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-sm);
}
.lead-cta-compact { background: var(--surface-2); }
.lead-cta-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.lead-cta-ic {
  flex: none; width: 44px; height: 44px; border-radius: 12px; color: #fff;
  display: grid; place-items: center; background: var(--accent);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), .35);
}
.lead-cta-ic .ic { width: 22px; height: 22px; }
.lead-cta-head h2 { font-size: 20px; margin: 0 0 3px; }
.lead-cta-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
.lead-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lead-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.lead-field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lead-field input, .lead-field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; font-size: 15px; font-family: inherit; background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lead-field input:focus, .lead-field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); }
.lead-field textarea { resize: vertical; min-height: 76px; }
.lead-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.lead-actions .btn { padding-inline: 22px; }
.lead-hint { color: var(--muted); font-size: 13px; }
.lead-note { color: var(--muted-2); font-size: 12.5px; margin: 12px 0 0; }
.lead-note a { color: var(--muted); text-decoration: underline; }
.lead-feedback { margin-top: 14px; padding: 12px 15px; border-radius: var(--r-sm); font-weight: 600; font-size: 14.5px; }
.lead-feedback-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.lead-feedback-error { background: var(--danger-050); color: #b91c1c; border: 1px solid #fecaca; }
.lead-feedback-pending { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
/* En el aside de la ficha el formulario es estrecho → una sola columna */
.biz-aside .lead-cta { padding: 18px; margin-top: 0; }
.biz-aside .lead-row { grid-template-columns: 1fr; }
@media (max-width: 720px) { .lead-row { grid-template-columns: 1fr; } }

/* ===================== Admin · inbox de leads ========================= */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1;
}
.lead-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-filter .is-active { pointer-events: none; }
.lead-list { display: flex; flex-direction: column; gap: 10px; }
.lead-item {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease;
}
.lead-item:hover { box-shadow: var(--sh-sm); }
.lead-status-new { border-left: 3px solid var(--accent); }
.lead-status-contacted { border-left: 3px solid var(--success); }
.lead-status-archived { opacity: .68; }
.lead-item-main { min-width: 0; flex: 1; }
.lead-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-name { font-weight: 700; font-size: 15.5px; color: var(--ink); }
.lead-badge { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.lead-badge-new { background: var(--accent-050); color: var(--accent-700); }
.lead-badge-contacted { background: #ecfdf5; color: #047857; }
.lead-badge-archived { background: var(--surface-2); color: var(--muted); }
.lead-time { color: var(--muted-2); font-size: 12.5px; margin-left: auto; }
.lead-contact { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 7px; }
.lead-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.lead-contact a svg { width: 15px; height: 15px; color: var(--muted); }
.lead-msg { margin: 9px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.lead-meta { margin-top: 8px; color: var(--muted); font-size: 13px; }
.lead-meta a { color: var(--accent); font-weight: 600; }
.lead-item-actions { display: flex; flex-direction: column; gap: 6px; flex: none; align-items: stretch; }
.lead-item-actions .btn { white-space: nowrap; justify-content: center; }
.lead-item-actions .lead-del { color: var(--danger); padding-inline: 10px; }
@media (max-width: 720px) {
  .lead-item { flex-direction: column; }
  .lead-item-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
}
