/* ===== אהב"ה — shared styles (RTL + LTR via logical properties) ===== */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --primary: #1d6a63;
  --primary-dark: #14504b;
  --accent: #d96c50;
  --accent-soft: #fbe9e3;
  --border: #e7e0d6;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.05rem;
}

/* ===== Header / nav ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.25;
}

.brand .logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand .brand-name {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
}

.brand .brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.site-nav a:hover { background: var(--accent-soft); }

.site-nav a.active {
  background: var(--primary);
  color: #fff;
}

.lang-switch {
  border: 1.5px solid var(--primary);
  color: var(--primary) !important;
  font-weight: 700;
  margin-inline-start: 0.5rem;
}

.lang-switch:hover { background: var(--primary); color: #fff !important; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 3.5rem 1rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto;
}

.hero .hero-acronym {
  display: inline-block;
  margin-top: 1.1rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  font-size: 0.95rem;
}

/* ===== Layout ===== */
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.page-title {
  color: var(--primary-dark);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0.5rem 0 0.3rem;
}

.page-lead {
  color: var(--muted);
  max-width: 720px;
  margin-top: 0;
}

section { margin-block: 2.2rem; }

h2 {
  color: var(--primary-dark);
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}

h3 { margin-bottom: 0.35rem; }

a { color: var(--primary); }

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card h3 { margin: 0; color: var(--primary-dark); }

.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

a.card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.card .card-icon { font-size: 1.8rem; }

/* ===== Event / training items ===== */
.item-list { display: flex; flex-direction: column; gap: 1rem; }

.item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
}

.item .item-meta {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.item h3 { margin: 0.15rem 0 0.3rem; }

.item p { margin: 0; color: var(--muted); }

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.item-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  margin-inline-start: 0.5rem;
  vertical-align: middle;
}

/* ===== Links page ===== */
.link-list { list-style: none; padding: 0; margin: 0.8rem 0 0; display: flex; flex-direction: column; gap: 0.7rem; }

.link-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
}

.link-list .link-title { font-weight: 700; }

.link-list .link-desc { color: var(--muted); font-size: 0.95rem; margin: 0.15rem 0 0; }

/* ===== Events calendar ===== */
.cal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  max-width: 560px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.cal-title { font-weight: 800; color: var(--primary-dark); font-size: 1.05rem; }

.cal-nav {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--primary-dark);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-dow { font-size: 0.78rem; font-weight: 700; color: var(--muted); padding: 0.2rem 0; }

.cal-day {
  padding: 0.35rem 0;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--ink);
}

.cal-day.empty { visibility: hidden; }

.cal-day.has-event {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.cal-day.has-event:hover { transform: scale(1.08); }

.cal-panel { margin-top: 0.8rem; }

.cal-event {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.cal-event-meta { color: var(--accent); font-size: 0.85rem; font-weight: 700; margin-top: 0.15rem; }

.cal-event-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }

.cal-gcal {
  background: var(--primary);
  color: #fff !important;
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ===== Notice / placeholder ===== */
.notice {
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  color: #8a4433;
  font-size: 0.95rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-dark);
  color: #e8f0ef;
  padding: 1.6rem 1rem;
  text-align: center;
  font-size: 0.92rem;
}

.site-footer a { color: #fff; }

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .brand { justify-content: center; text-align: center; }
  .site-nav { justify-content: center; }
  .hero { padding: 2.4rem 1rem; }
  body { font-size: 1rem; }
}
