:root {
  --navy: #062b5c;
  --blue: #2468a2;
  --sky: #6ab7e8;
  --gold: #d6a657;
  --paper: #f5f7fa;
  --white: #ffffff;
  --ink: #13283d;
  --muted: #617286;
  --line: #dfe7ee;
  --orange: #df8f5a;
  --purple: #7b61a8;
  --green: #4f8a71;
  --shadow: 0 18px 50px rgba(6, 43, 92, 0.1);
  --radius: 22px;
  font-family: "Noto Sans Hebrew", "Noto Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; transform: translateY(-150%); padding: 10px 16px; background: var(--white); color: var(--navy); z-index: 10000; border-radius: 10px; }
.skip-link:focus { transform: translateY(0); }

.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #041f44 0%, var(--navy) 56%, #0e4f85 100%); color: var(--white); padding: 0 5vw 72px; }
.hero::before { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(106, 183, 232, .25); border-radius: 50%; inset-inline-end: -120px; inset-block-start: 80px; box-shadow: 0 0 0 80px rgba(106, 183, 232, .05), 0 0 0 160px rgba(106, 183, 232, .035); }
.hero::after { content: "24"; position: absolute; inset-inline-end: 6vw; inset-block-end: -105px; color: rgba(255,255,255,.045); font-size: clamp(15rem, 31vw, 32rem); font-weight: 800; line-height: .75; letter-spacing: -.08em; }
.topbar { max-width: 1240px; margin: 0 auto; min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 2; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.logo { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; background: var(--white); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.brand-name { font-weight: 700; letter-spacing: .03em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.language-switcher { display: flex; padding: 4px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.language-button { border: 0; color: rgba(255,255,255,.72); background: transparent; padding: 8px 13px; border-radius: 999px; font-size: .82rem; }
.language-button.active { color: var(--navy); background: var(--white); font-weight: 700; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); color: var(--white); background: rgba(255,255,255,.08); font-size: 1.1rem; }
.icon-button:hover, .icon-button:focus-visible { background: rgba(255,255,255,.18); outline: 2px solid var(--gold); outline-offset: 2px; }

.hero-content { max-width: 1240px; margin: 70px auto 0; position: relative; z-index: 1; }
.eyebrow, .section-kicker { display: inline-block; color: var(--gold); font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { max-width: 850px; font-size: clamp(3.2rem, 8vw, 7.1rem); line-height: .96; margin: 15px 0 18px; letter-spacing: -.045em; }
.subtitle { max-width: 760px; font-size: clamp(1.15rem, 2.4vw, 1.6rem); color: #d8e8f7; margin: 0 0 38px; }
.intro-card { max-width: 720px; padding: 25px 28px; border-inline-start: 4px solid var(--gold); background: rgba(255,255,255,.08); backdrop-filter: blur(10px); border-radius: 0 18px 18px 0; }
[dir="rtl"] .intro-card { border-radius: 18px 0 0 18px; }
.intro-card h2 { margin: 0 0 6px; font-size: 1.15rem; }
.intro-card p { margin: 0 0 6px; color: #d8e8f7; }
.intro-card strong { color: var(--white); }

main { max-width: 1240px; margin: 0 auto; padding: 0 28px 72px; }
.route-summary { margin-top: -34px; position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.summary-stat { padding: 25px 22px; text-align: center; border-inline-end: 1px solid var(--line); }
.summary-stat:last-child { border-inline-end: 0; }
.summary-stat strong { display: block; color: var(--navy); font-size: 1.55rem; line-height: 1.2; }
.summary-stat span { color: var(--muted); font-size: .84rem; }

.map-section { padding-top: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-heading.compact { margin-bottom: 14px; }
.section-heading h2, .schedule-card h2, .tips-card h2, .evening-card h2 { color: var(--navy); margin: 3px 0 0; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
.secondary-button, .primary-button { min-height: 44px; padding: 10px 18px; border-radius: 12px; font-weight: 750; transition: .2s ease; }
.secondary-button { background: var(--white); color: var(--navy); border: 1px solid var(--line); }
.secondary-button:hover, .secondary-button:focus-visible { border-color: var(--blue); box-shadow: 0 4px 16px rgba(36,104,162,.12); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-button { border: 1px solid var(--line); background: var(--white); color: var(--muted); padding: 8px 14px; border-radius: 999px; }
.filter-button.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
#map { height: 570px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 6px solid var(--white); z-index: 1; }
.map-note { margin: 10px 4px 0; font-size: .84rem; color: var(--muted); }
.route-marker { width: 34px; height: 34px; border: 3px solid var(--white); border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); box-shadow: 0 5px 14px rgba(6,43,92,.26); display: grid; place-items: center; color: var(--white); }
.route-marker span { transform: rotate(45deg); font-weight: 800; font-size: .8rem; }
.leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 18px; min-width: 225px; font-family: inherit; line-height: 1.45; text-align: start; }
.popup-title { font-size: 1.05rem; color: var(--navy); font-weight: 800; margin-bottom: 2px; }
.popup-local { font-size: .78rem; color: var(--muted); margin-bottom: 9px; }
.popup-meta { margin: 10px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.popup-chip { background: var(--paper); padding: 4px 8px; border-radius: 999px; font-size: .72rem; color: var(--muted); }
.popup-actions { display: flex; gap: 7px; margin-top: 12px; }
.popup-actions a { text-decoration: none; flex: 1; text-align: center; padding: 7px 8px; border-radius: 9px; background: var(--navy); color: var(--white); font-size: .76rem; font-weight: 700; }
.popup-actions a:last-child { background: var(--paper); color: var(--navy); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr); gap: 32px; padding-top: 74px; align-items: start; }
.route-list { display: grid; gap: 12px; }
.route-card { background: var(--white); border: 1px solid transparent; border-radius: 17px; padding: 20px; display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: start; box-shadow: 0 6px 20px rgba(6,43,92,.045); transition: .18s ease; }
.route-card:hover, .route-card:focus-within { border-color: #b9d5ea; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(6,43,92,.09); }
.stop-number { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--navy); color: var(--white); font-size: 1.05rem; font-weight: 800; }
.route-card h3 { margin: 0; color: var(--navy); font-size: 1.15rem; }
.local-name { color: var(--muted); font-size: .82rem; margin: 1px 0 8px; }
.route-card p { margin: 0; color: #3e5267; font-size: .92rem; }
.recommendation { margin-top: 8px !important; color: var(--blue) !important; font-weight: 650; }
.card-meta { display: flex; flex-direction: column; align-items: end; gap: 8px; min-width: 125px; }
.category-pill, .time-pill, .optional-pill { border-radius: 999px; padding: 5px 9px; font-size: .72rem; white-space: nowrap; }
.category-pill { color: var(--blue); background: #eaf3fa; }
.time-pill { color: var(--muted); background: var(--paper); }
.optional-pill { color: var(--purple); background: #f1ebf8; }
.card-actions { display: flex; gap: 7px; margin-top: 12px; }
.card-button { border: 0; border-radius: 10px; padding: 8px 11px; background: var(--navy); color: var(--white); font-size: .78rem; font-weight: 700; text-decoration: none; }
.card-button.secondary { background: var(--paper); color: var(--navy); }

.side-panel { display: grid; gap: 18px; position: sticky; top: 18px; }
.schedule-card, .tips-card, .evening-card { background: var(--white); border-radius: var(--radius); padding: 26px; box-shadow: 0 8px 28px rgba(6,43,92,.06); }
.schedule-card h2, .tips-card h2, .evening-card h2 { font-size: 1.45rem; margin-bottom: 18px; }
.schedule-list { list-style: none; padding: 0; margin: 0; }
.schedule-list li { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.schedule-list li:last-child { border-bottom: 0; }
.schedule-list time { color: var(--blue); font-weight: 800; direction: ltr; }
.soft-note { background: var(--paper); border-radius: 12px; padding: 13px; color: var(--muted); font-size: .8rem; margin: 16px 0 0; }
.tips-list { padding: 0; margin: 0; list-style: none; }
.tips-list li { position: relative; padding-inline-start: 24px; margin: 10px 0; font-size: .88rem; }
.tips-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--green); font-weight: 900; }
.evening-item { border-top: 1px solid var(--line); padding: 13px 0; }
.evening-item:first-child { border-top: 0; padding-top: 0; }
.evening-item h3 { margin: 0 0 4px; color: var(--navy); font-size: .98rem; }
.evening-item p { margin: 0; color: var(--muted); font-size: .82rem; }

.share-banner { margin-top: 72px; padding: 38px; border-radius: 28px; background: linear-gradient(120deg, var(--navy), #114f84); color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 30px; box-shadow: var(--shadow); }
.share-banner h2 { margin: 3px 0 7px; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.15; }
.share-banner p { margin: 0; color: #d9e8f5; }
.section-kicker.light { color: #f3cf86; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.light-button { background: var(--white); color: var(--navy); border: 0; }
.light-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }

footer { text-align: center; padding: 45px 24px 58px; color: var(--muted); font-size: .84rem; }
.footer-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 50%; background: var(--white); margin-bottom: 8px; }
footer p { margin: 4px; }
footer a:hover { color: var(--blue); }
.toast { position: fixed; inset-inline-start: 50%; inset-block-end: 24px; transform: translate(-50%, 140%); opacity: 0; background: var(--navy); color: var(--white); padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); z-index: 9999; transition: .22s ease; }
[dir="rtl"] .toast { transform: translate(50%, 140%); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
[dir="rtl"] .toast.show { transform: translate(50%, 0); }

@media (max-width: 900px) {
  .brand-name { display: none; }
  .topbar { align-items: flex-start; padding-top: 14px; }
  .top-actions { flex-wrap: wrap; justify-content: end; }
  .route-summary { grid-template-columns: repeat(2, 1fr); }
  .summary-stat:nth-child(2) { border-inline-end: 0; }
  .summary-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .content-grid { grid-template-columns: 1fr; }
  .side-panel { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evening-card { grid-column: 1 / -1; }
  .share-banner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .hero { padding-inline: 18px; padding-bottom: 52px; }
  .logo { width: 50px; height: 50px; }
  .topbar { min-height: 80px; }
  .language-switcher { order: 3; width: 100%; justify-content: center; }
  .language-button { flex: 1; padding-inline: 8px; }
  .hero-content { margin-top: 45px; }
  .hero h1 { font-size: clamp(3.1rem, 18vw, 4.8rem); }
  .intro-card { padding: 20px; }
  main { padding-inline: 14px; }
  .route-summary { margin-top: -26px; }
  .summary-stat { padding: 17px 10px; }
  .summary-stat strong { font-size: 1.15rem; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  #map { height: 45vh; min-height: 350px; border-width: 4px; }
  .content-grid { padding-top: 54px; }
  .route-card { grid-template-columns: 46px 1fr; padding: 16px; gap: 12px; }
  .stop-number { width: 42px; height: 42px; }
  .card-meta { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .side-panel { grid-template-columns: 1fr; }
  .evening-card { grid-column: auto; }
  .share-banner { margin-top: 54px; padding: 26px 22px; }
  .share-actions { width: 100%; }
  .share-actions button { width: 100%; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: var(--white); color: #111; }
  .hero { padding: 18px 0 24px; background: var(--white); color: var(--navy); }
  .hero::before, .hero::after, .top-actions, .filter-bar, #map, .map-note, .share-banner, .card-actions, .secondary-button, .toast { display: none !important; }
  .topbar, .hero-content, main { max-width: none; }
  .hero-content { margin-top: 28px; }
  .hero h1 { font-size: 3rem; }
  .subtitle, .intro-card p { color: #334; }
  .intro-card { background: #f7f8fa; }
  .route-summary { margin-top: 0; box-shadow: none; border: 1px solid #ddd; }
  .map-section { display: none; }
  .content-grid { padding-top: 26px; grid-template-columns: 1fr; }
  .route-card, .schedule-card, .tips-card, .evening-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .route-card { padding: 12px; }
  .side-panel { position: static; grid-template-columns: 1fr 1fr; }
  footer { padding: 25px 0 0; }
}
