@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #1f3b57;
  --navy-dark: #142838;
  --gold: #b08d3f;
  --gold-light: #e8dcc0;
  --cta: #2f6b63;
  --cta-dark: #234f49;
  --paper: #faf8f4;
  --ink: #232323;
  --ink-soft: #62666b;
  --border: #e4e1d8;
  --success: #2f6f4f;
  --danger: #a13d3d;
  --radius: 0;
  --shadow: 0 1px 3px rgba(31, 59, 87, 0.07), 0 1px 2px rgba(31, 59, 87, 0.05);
  --max-width: 1100px;
  --font-body: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 15px; height: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
body[dir='rtl'] { direction: rtl; }

#layout { display: flex; flex-direction: column; min-height: 100vh; }
#layout main#app { flex: 1 0 auto; }
#layout .site-footer { flex-shrink: 0; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
p { margin: 0 0 .7em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow);
}
.site-header .container { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; height: 100%; color: #fff; font-family: var(--font-head); font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
/* The logo artwork is navy - the same color as the header/footer background
   - so it sits on a light panel here to stay visible while keeping its own
   navy color (rather than recoloring the artwork itself). Stretches to the
   header's full height so it reads as a panel, not a floating box. */
.brand img { height: 100%; background: #fff; padding: 10px 18px; box-sizing: border-box; }
.main-nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.main-nav a { color: rgba(255,255,255,.82); padding: 6px 10px; border-radius: var(--radius); font-size: .86rem; font-weight: 500; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.site-search { flex-shrink: 1; min-width: 0; }
.site-search input {
  width: 100%; min-width: 90px; max-width: 220px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08);
  color: #fff; border-radius: 0; padding: 6px 10px; font-size: .82rem;
}
.site-search input::placeholder { color: rgba(255,255,255,.55); }
.site-search input:focus { outline: none; background: #fff; color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
@media (max-width: 600px) { .site-search input { max-width: 120px; } }
.btn-post {
  background: var(--cta); color: #fff; font-weight: 700; padding: 7px 15px;
  border-radius: 0; border: none; font-size: .84rem;
}
.btn-post:hover { background: var(--cta-dark); color: #fff; }
.lang-toggle, .bookmarks-link {
  background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 0;
  padding: 5px 11px; font-size: .78rem;
}
.hamburger { display: none; background: none; border: none; width: 26px; height: 20px; padding: 0; flex-direction: column; justify-content: space-between; }
.hamburger span { display: block; height: 2px; width: 100%; background: #fff; }

@media (max-width: 860px) {
  .main-nav { display: none; position: absolute; top: 52px; inset-inline: 0; background: var(--navy-dark); flex-direction: column; padding: 6px; }
  .main-nav.open { display: flex; }
  .hamburger { display: flex; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--navy); background: var(--navy); color: #fff; font-weight: 600; font-size: .86rem; }
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn-gold:hover { background: var(--cta-dark); border-color: var(--cta-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: .78rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Home page layout: main column + sidebar (zmanim/daf yomi/weather) ---------- */
.home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } .home-sidebar { order: -1; } }
.home-sidebar { display: flex; flex-direction: column; gap: 14px; padding-top: 30px; }

/* ---------- Combo widget (sidebar: date + daf yomi + zmanim, one compact card) ---------- */
.combo-widget { background: #fff; border: 1px solid var(--border); padding: 10px 14px; box-shadow: var(--shadow); font-size: .8rem; }
.combo-widget-top { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.combo-label { display: block; font-weight: 700; color: var(--navy); font-size: .86rem; }
.combo-sub { display: block; color: var(--ink-soft); font-size: .72rem; }
.combo-zman-row { display: flex; flex-direction: column; gap: 5px; color: var(--ink-soft); font-size: .74rem; }
.combo-zman-row span { display: flex; justify-content: space-between; gap: 8px; }
.combo-zman-row b { color: var(--ink); font-weight: 600; }

.weather-widget .weather-day { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: .8rem; }
.weather-widget .weather-day:last-of-type { border-bottom: none; }
.weather-day-label { font-weight: 700; color: var(--navy); flex-shrink: 0; }
.weather-desc { color: var(--ink-soft); flex: 1; text-align: center; }
.weather-temps { flex-shrink: 0; white-space: nowrap; }
.weather-attribution { font-size: .64rem; color: var(--ink-soft); margin: 8px 0 0; text-align: end; }
.weather-attribution a { color: var(--ink-soft); text-decoration: underline; }

/* ---------- Carousels ---------- */
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 10px; }
.section-heading a { font-size: .82rem; font-weight: 600; }
.carousel { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.carousel::-webkit-scrollbar { height: 5px; }
.carousel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }
.carousel .card { scroll-snap-align: start; flex: 0 0 210px; }

/* ---------- Cards ---------- */
/* Square corners by design - no image, the card is a compact text summary;
   full contact info only ever appears after clicking through to the post. */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 0; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--gold); }
.card .body { padding: 12px 13px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.card .cat { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gold); font-weight: 700; }
.card .title { font-weight: 700; color: var(--navy); font-size: .94rem; line-height: 1.3; }
.card .card-desc {
  font-size: .8rem; color: var(--ink); margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta { font-size: .76rem; color: var(--ink-soft); }
.card .price { font-weight: 700; color: var(--success); font-size: .88rem; }
.card.featured { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-light); }
.badge-featured { color: var(--gold); font-size: .9rem; }

/* ---------- List/grid pages ---------- */
.page-header { padding: 20px 0 6px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.category-pills a { padding: 5px 12px; border: 1px solid var(--border); border-radius: 0; font-size: .78rem; background: #fff; }
.category-pills a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.category-pills a .count { color: var(--ink-soft); margin-inline-start: 3px; }
.category-pills a.active .count { color: rgba(255,255,255,.7); }

.filters-bar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: .76rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  padding: 6px 9px; border: 1px solid var(--border); border-radius: 0; font-family: inherit; font-size: .85rem; background: #fff;
}
.field textarea { resize: vertical; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.empty-state { text-align: center; padding: 44px 16px; color: var(--ink-soft); font-size: .9rem; }

.pagination { display: flex; justify-content: center; gap: 5px; margin: 22px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 11px; border: 1px solid var(--border); border-radius: 0; background: #fff; font-size: .82rem; }
.pagination a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Detail page ---------- */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin: 18px 0 44px; align-items: start; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-anim { animation: detail-fade-in .35s ease; }
@keyframes detail-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.detail-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.detail-topline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tag-lg { font-size: .74rem; padding: 4px 10px; }
.detail-posted { font-size: .78rem; color: var(--ink-soft); margin-inline-start: auto; }
.detail-title { font-size: 1.85rem; border-bottom: 3px solid var(--cta); display: inline-block; padding-bottom: 6px; margin-bottom: 16px; }
.detail-desc { font-size: 1rem; white-space: pre-wrap; line-height: 1.65; }
.detail-gallery { margin: 14px 0; }
.detail-gallery-main { border: 1px solid var(--border); background: #fff; }
.detail-gallery-main img { display: block; width: 100%; max-height: 460px; object-fit: cover; }
.detail-gallery-thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; }
.detail-gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border: 2px solid transparent; opacity: .7; cursor: pointer; flex-shrink: 0; }
.detail-gallery-thumbs img.active, .detail-gallery-thumbs img:hover { opacity: 1; border-color: var(--cta); }
.share-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.share-row a, .share-row button {
  font-size: .8rem; font-weight: 600; color: var(--cta); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
}
.share-row a:hover, .share-row button:hover { text-decoration: underline; }
.contact-card { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--cta); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: sticky; top: 66px; }
.contact-card .btn { width: 100%; margin-bottom: 6px; text-align: center; }
.detail-meta-list { list-style: none; margin: 14px 0; padding: 0; font-size: .85rem; background: #fff; border: 1px solid var(--border); }
.detail-meta-list li { padding: 8px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.detail-meta-list li:last-child { border-bottom: none; }
.detail-meta-list li span:first-child { color: var(--ink-soft); font-weight: 600; }
.detail-meta-list li.stacked { flex-direction: column; align-items: flex-start; gap: 4px; }

/* ---------- Forms / wizard ---------- */
.wizard-steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.wizard-steps span { padding: 5px 10px; border-radius: 0; background: #fff; border: 1px solid var(--border); font-size: .76rem; color: var(--ink-soft); }
.wizard-steps span.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); max-width: 680px; }
.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-row label { font-weight: 600; font-size: .84rem; }
.form-row .hint { font-size: .74rem; color: var(--ink-soft); font-weight: 400; }
.char-counter { font-size: .72rem; color: var(--ink-soft); text-align: end; }
.form-row input, .form-row select, .form-row textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 0; font-family: inherit; font-size: .88rem;
}
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-cols { grid-template-columns: 1fr; } }
.places-suggestions {
  list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  background: #fff; border: 1px solid var(--border); border-top: none; max-height: 220px; overflow-y: auto;
  box-shadow: var(--shadow);
}
.places-suggestions li { padding: 8px 10px; font-size: .85rem; cursor: pointer; }
.places-suggestions li:hover { background: var(--paper); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 700px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
.category-tile { border: 2px solid var(--border); border-radius: var(--radius); padding: 12px 8px; text-align: center; background: #fff; font-size: .82rem; font-weight: 600; }
.category-tile.selected { border-color: var(--gold); background: var(--gold-light); }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.tier-tile { border: 2px solid var(--border); border-radius: var(--radius); padding: 11px; text-align: center; background: #fff; }
.tier-tile.selected { border-color: var(--navy); background: #eef3f7; }
.tier-tile .price { font-family: var(--font-head); font-size: 1.05rem; color: var(--navy); font-weight: 700; }
.addon-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 0; margin-bottom: 6px; font-size: .86rem; }
.error-list { background: #fdecec; border: 1px solid var(--danger); color: var(--danger); padding: 8px 12px; border-radius: 0; margin-bottom: 12px; font-size: .84rem; }
.error-list ul { margin: 4px 0 0; padding-inline-start: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.7); margin-top: 44px; padding: 24px 0; font-size: .8rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
/* Same navy-on-navy issue as the header logo - light chip instead of recoloring. */
.footer-logo { height: 52px; background: #fff; padding: 8px 16px; box-sizing: border-box; }
@media (max-width: 600px) { .footer-row { flex-direction: column-reverse; align-items: flex-start; } }

/* ---------- Misc ---------- */
.tag { display: inline-block; padding: 2px 7px; border-radius: 0; background: var(--gold-light); color: var(--navy-dark); font-size: .7rem; font-weight: 700; }
.spinner { text-align: center; padding: 30px; color: var(--ink-soft); font-size: .88rem; }
.toast { position: fixed; bottom: 16px; inset-inline: 0; margin: 0 auto; max-width: 340px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); z-index: 100; font-size: .86rem; }
.report-link, .bookmark-btn { background: none; border: 1px solid var(--border); border-radius: 0; padding: 5px 9px; font-size: .76rem; color: var(--ink-soft); }
.bookmark-btn.active { color: var(--gold); border-color: var(--gold); }
