:root {
  --maccabi-blue: #0D47A1;
  --maccabi-blue-dark: #0a3a86;
  --maccabi-blue-light: #1565c0;
  --maccabi-magenta: #E6007E;
  --ink: #2b2b2b;
  --muted: #6b7280;
  --bg: #f5f7fb;
  --line: #e6e9ef;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Heebo', sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Utility bar ===== */
.utility-bar {
  background: var(--maccabi-blue-dark);
  color: #dbe7ff;
  font-size: 13px;
}
.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}
.utility-langs { display: flex; gap: 16px; }
.utility-langs a { opacity: .8; transition: opacity .2s; }
.utility-langs a.active, .utility-langs a:hover { opacity: 1; }
.utility-langs a.active { font-weight: 600; color: #fff; }
.login-link { display: inline-flex; align-items: center; gap: 6px; opacity: .9; }
.login-link:hover { opacity: 1; }

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(13,71,161,.04);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 78px;
}
.logo img { height: 44px; display: block; }

.main-nav {
  display: flex;
  gap: 24px;
  margin-inline-start: 12px;
  flex: 1;
}
.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: #3a4252;
  padding: 6px 2px;
  position: relative;
  transition: color .2s;
}
.main-nav a:hover { color: var(--maccabi-blue); }
.main-nav a.nav-active { color: var(--maccabi-blue); font-weight: 600; }
.main-nav a.nav-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 3px;
  background: var(--maccabi-magenta);
}

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  background: transparent;
  border: none;
  color: var(--maccabi-blue);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
}
.icon-btn:hover { background: #eef3fb; }
.join-btn {
  background: var(--maccabi-magenta);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 50px;
  white-space: nowrap;
  transition: filter .2s, transform .2s;
}
.join-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--maccabi-blue) 0%, var(--maccabi-blue-light) 100%);
  color: #fff;
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -80px;
  top: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(230,0,126,.35) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  padding: 5px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -.5px;
}
.hero-sub {
  margin: 0 auto;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
  opacity: .95;
}

/* ===== Chat section ===== */
.chat-section {
  padding: 36px 0 56px;
  margin-top: -24px;
}
.chat-frame {
  position: relative;
  width: 100%;
  max-width: 820px;
  height: 70vh;
  min-height: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(13,71,161,.16);
  overflow: hidden;
  display: flex;
}
.chat-loading {
  margin: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 16px;
}
.spinner {
  width: 22px; height: 22px;
  border: 3px solid #d9e2f2;
  border-top-color: var(--maccabi-blue);
  border-radius: 50%;
  animation: moh-spin .8s linear infinite;
}
@keyframes moh-spin { to { transform: rotate(360deg); } }

.chat-disclaimer {
  max-width: 820px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== Embedded Wonderful Chat overrides ===== */
.wonderful-chat-button { display: none !important; }

.wonderful-chat-window.moh-embedded {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  z-index: auto !important;
}
.wonderful-chat-window.moh-embedded .wonderful-chat-close { display: none !important; }

/* ===== Footer ===== */
.site-footer {
  background: #0b3a86;
  color: #cdd9f0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 24px 36px;
}
.footer-col h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: #cdd9f0;
  padding: 6px 0;
  opacity: .85;
  transition: opacity .2s, color .2s;
}
.footer-col a:hover { opacity: 1; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  font-size: 13px;
  color: #b9c8e6;
}
.footer-logo { height: 28px; filter: brightness(0) invert(1); opacity: .9; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 16px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .utility-langs { gap: 10px; }
  .header-inner { gap: 14px; height: 64px; }
  .logo img { height: 36px; }
  .join-btn { padding: 8px 16px; font-size: 14px; }
  .chat-frame { height: 78vh; min-height: 480px; border-radius: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; padding: 32px 24px; }
}
