/* Public site (nogabis.com/recommendations). Brand tokens match the shop (website_v2/styles.css). Mobile first. */
:root {
  --brown-800: #3D2523;
  --brown-600: #6B4A47;
  --rose-300: #E8C4B8;
  --pink-150: #F8E2DB;
  --cream-100: #F5E6DD;
  --cream-50: #FFF8F3;
  --paper: #FFFCF9;
  --accent: #C0584F;
  --bg: var(--cream-50);
  --ink: var(--brown-800);
  --ink-soft: var(--brown-600);
  --line: rgba(74, 44, 42, .14);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui: 'Rubik', system-ui, sans-serif;
  --shadow-md: 0 14px 40px -16px rgba(74, 44, 42, .28);
  --r-md: 1rem;
  --r-lg: 1.6rem;
  --header-h: 60px;
  --gutter: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-ui); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }

/* --- header: the shared site nav (/site/nav.css), in the page flow and always solid on these pages --- */
.map-page .nav, .place-page .nav {
  position: sticky; top: 0; z-index: 1000; flex: none; padding-block: 8px;
  background: var(--paper); box-shadow: 0 1px 0 var(--line);
}
.map-page .nav-logo img, .place-page .nav-logo img { width: 40px; height: 40px; }
.nav .welcome-btn { flex: none; }
@media (max-width: 860px) { .map-page .nav-links, .place-page .nav-links { z-index: 1001; } }

/* old header (before the shared nav) */
.site-header {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1000;
}
.brand { flex: none; display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.brand em { color: var(--accent); font-style: italic; font-weight: 400; }
.brand img { width: 36px; height: 36px; object-fit: contain; }

/* --- buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 999px; font-weight: 500; text-decoration: none; border: 1.5px solid var(--ink); }
.btn-primary { background: var(--ink); color: var(--cream-50); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--rose-300); outline-offset: 2px; }
.kicker { display: inline-block; font-size: .8rem; letter-spacing: .02em; color: var(--accent); font-weight: 500; }

/* --- map page --- */
.map-page { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.map-shell { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* Welcome popup: Noga's note and the total, over the whole page on every load. The "i" in the header opens it again. */
.welcome-btn { font-family: var(--font-display); font-style: italic; }
.welcome { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(61, 37, 35, .45); }
.welcome[hidden] { display: none; }
.welcome-card {
  position: relative; width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--rose-300); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 22px 22px 20px;
}
.welcome-close { position: absolute; top: 10px; inset-inline-end: 10px; }
/* the font of "ממליצה" (.brand em), in bold */
.welcome-note { margin: 0; padding-inline-end: 40px; color: var(--ink); font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1rem; line-height: 1.45; }
.welcome-note .heart { color: var(--accent); font-style: normal; font-size: 1.4em; line-height: 1; vertical-align: -.08em; margin-inline-start: 2px; }
.welcome-total { margin-top: 10px; padding-inline-end: 0; }
.welcome-total[hidden] { display: none; }
.welcome-total .total-num { color: var(--accent); font-style: normal; font-size: 1.15em; }
.map-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
.map-bar input, .map-bar select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px;
}
.map-bar input { flex: 1 1 200px; min-width: 0; }
.map-bar select { flex: 0 1 auto; max-width: 48%; }
.count { font-size: .85rem; color: var(--ink-soft); }
.clear-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.clear-btn:hover { border-color: var(--accent); color: var(--accent); }
.map-stage { position: relative; flex: 1; min-height: 0; }
.map { position: absolute; inset: 0; background: var(--cream-100); }
.map-state {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 500; margin: 0;
  background: var(--paper); border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow-md); font-size: .9rem; max-width: calc(100% - 32px); text-align: center;
}
.locate {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 500; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--paper); box-shadow: var(--shadow-md); cursor: pointer; display: grid; place-items: center;
}
.locate svg { width: 22px; height: 22px; fill: var(--accent); stroke: var(--ink); stroke-width: 1.6; }
.locate svg circle[fill="none"] { fill: none; }
.pin { background: none; border: 0; }
.pin svg { width: 34px; height: 44px; filter: drop-shadow(0 3px 4px rgba(46, 27, 25, .3)); }
.pin-icon { position: absolute; top: 6px; left: 0; width: 34px; text-align: center; font-size: 14px; line-height: 21px; pointer-events: none; }

/* search box with the AI and voice buttons */
.search-box { flex: 1 1 260px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.search-box input { flex: 1; }
.icon-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; width: 40px; height: 40px; cursor: pointer; font-size: 1.05rem; flex: none; }
.icon-btn.listening { background: var(--accent); border-color: var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.ask-btn { border: 0; background: var(--ink); color: var(--cream-50); border-radius: 999px; padding: 9px 14px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; flex: none; }
.ask-btn:disabled { opacity: .6; cursor: wait; }

/* search help: one small panel under the search bar, opened by the "?" button */
.help-btn { font-weight: 600; color: var(--accent); }
.help {
  position: absolute; z-index: 600; top: 10px; inset-inline: 10px; margin-inline: auto; max-width: 420px; max-height: calc(100% - 20px); overflow-y: auto;
  background: var(--paper); border: 1px solid var(--rose-300); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 10px 14px 14px;
}
.help[hidden] { display: none; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.help-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.help-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; line-height: 1.4; }
.help-list li[hidden] { display: none; }
/* the same icon as the .locate button on the map, small, inside its help line */
.help-locate { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-md); vertical-align: middle; margin-inline-end: 2px; }
.help-locate svg { width: 16px; height: 16px; fill: var(--accent); stroke: var(--ink); stroke-width: 1.6; }
.help-locate svg circle[fill="none"] { fill: none; }

/* AI answer: bottom sheet on phones, side panel on wide screens */
.answer {
  position: absolute; z-index: 550; left: 0; right: 0; bottom: 0; height: 50vh; height: 50dvh; max-height: 100%; overflow-y: auto; /* phone: half the screen, never taller than the map area */
  background: var(--paper); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-md); padding: 14px var(--gutter) 18px;
}
.answer[hidden] { display: none; }
.answer-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.answer-summary { margin: 4px 0 10px; font-weight: 500; }
.answer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.answer-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; text-decoration: none; align-items: start; }
.answer-item img { width: 64px; aspect-ratio: 9 / 16; max-height: 100px; object-fit: cover; border-radius: .6rem; background: var(--cream-100); }
.answer-item span { display: grid; gap: 1px; }
.answer-item strong { font-family: var(--font-display); font-size: 1.1rem; }
.answer-item small { color: var(--ink-soft); }
.answer-item .why { font-size: .92rem; }
/* list of the places on the map when a category or area is picked: wide screens only */
.answer.place-list { display: none; }
.place-list .answer-item:hover strong, .place-list .answer-item:focus-visible strong { color: var(--accent); }

/* place card: a bubble above the tapped pin */
.place-popup .leaflet-popup-content-wrapper { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 10px; } /* padding, not a content margin: a margin collapses out of the wrapper and leaves the close button above the card */
.place-popup .leaflet-popup-content { margin: 0; direction: rtl; text-align: right; font-family: var(--font-ui); } /* Leaflet sets text-align: left on the wrapper */
.place-popup .leaflet-popup-tip-container { display: none; } /* the bubble sits beside the pin, so no arrow */
.place-popup a.leaflet-popup-close-button { left: 4px; right: auto; color: var(--ink-soft); }
.place-popup a.place-card { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.place-card img { width: 76px; aspect-ratio: 9 / 16; max-height: 120px; object-fit: cover; border-radius: .6rem; background: var(--cream-100); }
.card-body { display: grid; gap: 2px; }
.card-body strong { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; }
.card-city { color: var(--ink-soft); font-size: .85rem; }
.card-more { margin-top: 4px; color: var(--accent); font-weight: 500; font-size: .9rem; }

/* --- place page --- */
.place { max-width: 1040px; margin: 0 auto; padding: 16px var(--gutter) 40px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.place-grid { display: grid; gap: 22px; }
.cover { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--cream-100); box-shadow: var(--shadow-md); }
.cover img { width: 100%; aspect-ratio: 9 / 16; max-height: 78vh; object-fit: cover; }
.place-text h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.15; margin: 4px 0 6px; }
.where { margin: 0 0 14px; color: var(--ink-soft); }
.description { font-size: 1.05rem; unicode-bidi: plaintext; }
.description p { margin: 0 0 .8em; }
.visit { color: var(--ink-soft); font-size: .9rem; }
.nav-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--pink-150); border-radius: 999px; padding: 4px 12px; font-size: .9rem; text-decoration: none; }
a.tag:hover { background: var(--rose-300); }
.not-found { text-align: center; padding-top: 60px; }
.site-footer { text-align: center; padding: 24px var(--gutter) 32px; font-size: .9rem; color: var(--ink-soft); }
.site-footer a { text-decoration: none; }
.site-footer .footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 10px 0; }
.analytics-notice { margin: 8px 0 0; font-size: .75rem; }

@media (min-width: 760px) {
  :root { --gutter: 28px; }
  .answer { left: auto; right: 24px; top: 24px; bottom: auto; width: 400px; height: auto; max-height: calc(100% - 48px); border-radius: var(--r-lg); }
  .answer.place-list:not([hidden]) { display: block; }
  .place-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; gap: 40px; }
  .place-text { padding-top: 10px; }
  /* Desktop: the welcome popup sits at the right side of the screen (the page is RTL, so start is right), still centred vertically */
  .welcome { justify-items: start; padding-inline: 28px; }
}

/* Hover name on map pins: site-styled replacement for the native browser title tooltip */
.leaflet-tooltip.place-tip {
  background: var(--paper); color: var(--ink); border: 1px solid var(--rose-300); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 4px 10px; direction: rtl; font-family: var(--font-display); font-size: 1rem; font-weight: 600;
}
.leaflet-tooltip-top.place-tip::before { border-top-color: var(--rose-300); }

/* Read by screen readers and crawlers, not shown: the page heading and the plain list of all places (the map shows them). */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* "הוספה למסך הבית" in the place-page footer: a plain link-like button, same size as the footer text next to it, no frame. */
.site-footer .install-btn { font-size: 1em; font-family: inherit; padding: 0; margin: 0 14px; gap: 6px; border: 0; border-radius: 0; background: none; vertical-align: baseline; }
.site-footer .install-btn:hover { background: none; text-decoration: underline; }
