/* =========================================================
   Shoresh Helsinki — Jewish Learning Center
   Design system & global styles
   ========================================================= */

:root {
  /* Brand palette */
  --navy: #153c72;
  --navy-700: #0f2d56;
  --navy-50: #f0f4fa;
  --bronze: #74522b;
  --bronze-100: #e9dfd0;
  --bronze-50: #f6f1e8;
  --white: #ffffff;
  --cream: #fafafa;
  --ink: #1a1f2e;
  --ink-soft: #4a5168;
  --muted: #8089a0;
  --line: #e6e9f0;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-hebrew: "Frank Ruhl Libre", "David", "Times New Roman", serif;

  /* Layout */
  --max-w: 1180px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(21, 60, 114, 0.06), 0 1px 3px rgba(21, 60, 114, 0.04);
  --shadow-md: 0 4px 12px rgba(21, 60, 114, 0.08), 0 2px 4px rgba(21, 60, 114, 0.04);
  --shadow-lg: 0 12px 32px rgba(21, 60, 114, 0.12), 0 4px 8px rgba(21, 60, 114, 0.06);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--bronze); }
button { font-family: inherit; cursor: pointer; }

/* RTL support for Hebrew */
[dir="rtl"] body { font-family: var(--font-hebrew), var(--font-sans); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 0.75rem;
}

/* Skip-link for keyboard accessibility — used on every content page */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 8px 14px; border-radius: 0 0 6px 0;
  font-size: 0.9rem; font-weight: 600; z-index: 1000;
}
.skip-link:focus { left: 0; outline: 3px solid var(--bronze); }
[dir="rtl"] .skip-link { left: auto; right: -9999px; border-radius: 0 0 0 6px; }
[dir="rtl"] .skip-link:focus { left: auto; right: 0; }


/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section   { padding: 80px 0; }
.section-sm{ padding: 48px 0; }
.section-tight { padding: 32px 0; }
.divider   { height: 1px; background: var(--line); margin: 0; border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-700); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-bronze { background: var(--bronze); color: var(--white); }
.btn-bronze:hover { background: #5d4222; color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 96px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 76px; width: auto; }
.brand .brand-text {
  display: flex; flex-direction: column; line-height: 1;
}
.brand .brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.brand .brand-tag {
  font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bronze);
  margin-top: 4px;
}
.nav-links {
  display: flex; gap: 2px; list-style: none; padding: 0; margin: 0; align-items: center;
}
.nav-links a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .nav-links a { padding: 8px 8px; font-size: 0.85rem; }
}
.nav-links a:hover { background: var(--navy-50); color: var(--navy); }
.nav-links a.active { color: var(--navy); background: var(--navy-50); }
.nav-right { display: flex; align-items: center; gap: 16px; }

/* Language switcher */
.lang-switch {
  position: relative;
}
.lang-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition);
}
.lang-toggle:hover { border-color: var(--navy); color: var(--navy); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 140px;
  padding: 6px;
  display: none;
  z-index: 50;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0;
  padding: 8px 12px; border-radius: 4px;
  font-size: 0.9rem; color: var(--ink);
}
.lang-menu button:hover { background: var(--navy-50); color: var(--navy); }
.lang-menu button.current { color: var(--navy); font-weight: 600; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent; border: 0;
  padding: 8px; color: var(--navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-inner { height: 76px; }
  .brand img { height: 56px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 12px;
    gap: 2px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .brand .brand-tag { display: none; }
}

/* ---------- Jewish info bar (under nav, on every page) ---------- */
.info-bar {
  background: var(--bronze-50);
  border-bottom: 1px solid var(--bronze-100);
  padding: 10px 0;
  font-size: 0.875rem;
}
.info-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.info-bar .info-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.info-bar .info-icon {
  width: 20px; height: 20px;
  color: var(--bronze);
  flex-shrink: 0;
}
.info-bar .info-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}
.info-bar .info-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bronze);
}
.info-bar .info-value {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
}
.info-bar .info-value a {
  color: var(--navy);
  font-weight: 600;
}
.info-bar .info-holiday .info-icon { color: var(--navy); }
.info-bar .info-holiday .info-label { color: var(--navy); }
@media (max-width: 880px) {
  /* Mobile: switch to a 2x2 grid so the 4 items line up cleanly
     instead of wrapping unevenly. */
  .info-bar { padding: 12px 0; }
  .info-bar .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    align-items: start;
    justify-content: stretch;
    padding: 0 16px;
  }
  .info-bar .info-item {
    align-items: flex-start;
    white-space: normal;
    min-width: 0;
  }
  .info-bar .info-icon { width: 18px; height: 18px; margin-top: 2px; }
  .info-bar .info-label { font-size: 0.6rem; }
  .info-bar .info-value { font-size: 0.82rem; line-height: 1.3; word-break: break-word; }
}
@media (max-width: 400px) {
  /* Very narrow: single column to give each item room to breathe */
  .info-bar .container { grid-template-columns: 1fr; gap: 10px; }
}

/* MyZmanim widget container — hidden until we have a verified working
   widget URL from MyZmanim. The "Shabbat in Helsinki" link in the info-bar
   above already takes users to the right page. To re-enable: remove the
   `display: none` rule below and confirm the iframe src returns content. */
.zmanim-strip { display: none; }
.zmanim-strip-active {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  text-align: center;
}
.zmanim-strip-active iframe {
  border: 0;
  max-width: 100%;
  width: 100%;
  height: 90px;
  display: block;
}
.zmanim-fallback {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.zmanim-fallback a {
  color: var(--navy);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0f2d56 0%, #153c72 60%, #1e4a85 100%);
  color: var(--white);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(116, 82, 43, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 820px; }
.hero h1 { color: var(--white); margin-bottom: 20px; font-size: clamp(2.4rem, 5vw, 3.75rem); }
.hero p { color: rgba(255, 255, 255, 0.85); font-size: 1.15rem; max-width: 640px; margin-bottom: 32px; }
.hero .eyebrow { color: var(--bronze-100); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn-primary { background: var(--bronze); border-color: var(--bronze); }
.hero-cta .btn-primary:hover { background: #8d6435; border-color: #8d6435; }
.hero-cta .btn-secondary { color: var(--white); border-color: rgba(255, 255, 255, 0.4); }
.hero-cta .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }

/* Quote band */
.quote-band {
  background: var(--bronze-50);
  border-top: 1px solid var(--bronze-100);
  border-bottom: 1px solid var(--bronze-100);
  padding: 56px 0;
}
.quote {
  max-width: 780px; margin: 0 auto; text-align: center;
  position: relative;
}
.quote::before {
  content: "\201C";
  font-family: var(--font-serif);
  font-size: 5rem;
  color: var(--bronze);
  position: absolute;
  top: -32px; left: 50%; transform: translateX(-50%);
  opacity: 0.4; line-height: 1;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-style: italic;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 16px;
}
.quote-author {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
}

/* ---------- Cards / grid ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 40px;
}
.section-head h2 { margin: 0; }
.section-head .lead { color: var(--ink-soft); margin: 8px 0 0; max-width: 540px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--navy-50); }
.card-img {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--navy-50) 0%, var(--bronze-50) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); opacity: 0.6;
}
/* Variant used when the card has a real cover image (Kol Shoresh issue covers) */
.card-img.has-cover {
  aspect-ratio: 5 / 4;
  background: var(--cream);
  opacity: 1;
  overflow: hidden;
  position: relative;
}
.card-img.has-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.card:hover .card-img.has-cover img { transform: scale(1.03); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card .eyebrow { margin-bottom: 8px; }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { font-size: 0.95rem; flex: 1; }
.card-meta {
  font-size: 0.8rem; color: var(--muted);
  display: flex; gap: 12px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-700);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
  margin-top: 80px;
}

/* Partner band: rabbinic guidance text + partner logo, sits below the main grid
   and above the copyright row */
.footer-partners {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}
.footer-rabbinic {
  flex: 1 1 460px;
  min-width: 0;
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}
.footer-partner-logos {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.footer-partners-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}
.footer-partner-logos img {
  max-height: 56px;
  width: auto;
  display: block;
  background: white;
  padding: 8px 14px;
  border-radius: 8px;
  transition: transform 200ms ease;
}
.footer-partner-logos a:hover img { transform: translateY(-1px); }
@media (max-width: 720px) {
  .footer-partners { justify-content: center; text-align: center; }
  .footer-rabbinic { flex-basis: 100%; text-align: center; }
  .footer-partner-logos { align-items: center; }
}
[dir="rtl"] .footer-partner-logos { align-items: flex-start; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img { height: 96px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; max-width: 280px; }
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; }
.site-footer a { color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; }
.site-footer a:hover { color: var(--bronze-100); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 0.85rem; color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Page header (non-home) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--navy-50) 0%, var(--bronze-50) 100%);
  padding: 80px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-header h1 { margin-bottom: 12px; }
.page-header p { font-size: 1.1rem; max-width: 640px; margin: 0 auto; color: var(--ink-soft); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 8px;
  font-size: 0.875rem; font-weight: 500; color: var(--ink);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem;
  color: var(--ink); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(21, 60, 114, 0.1);
}
.form-textarea { min-height: 140px; resize: vertical; }

/* ---------- Library / archive specific ---------- */
.archive-filters {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.archive-filters input, .archive-filters select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--white);
}
.archive-filters input { flex: 1; min-width: 200px; }

.archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.archive-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--bronze);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all var(--transition);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.archive-item:hover {
  border-left-color: var(--navy);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}
.archive-thumb {
  flex: 0 0 88px;
  aspect-ratio: 5 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); opacity: 1;
  transition: transform 200ms ease;
}
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archive-thumb svg { opacity: 0.5; width: 32px; height: 32px; }
.archive-item:hover .archive-thumb { transform: scale(1.04); }
.archive-text { flex: 1; min-width: 0; }
.archive-item h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 4px;
  color: var(--navy);
}
.archive-item .parasha { font-size: 0.85rem; color: var(--bronze); font-weight: 600; letter-spacing: 0.06em; }
.archive-item .date    { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.archive-text > a {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-size: 0.85rem; font-weight: 500;
}

/* ---------- Login card ---------- */
.login-card {
  max-width: 440px;
  margin: 40px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
}
.login-card h2 { text-align: center; margin-bottom: 8px; }
.login-card .lead { text-align: center; color: var(--ink-soft); margin-bottom: 28px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.login-card .meta-link { text-align: center; margin-top: 20px; font-size: 0.875rem; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 0.8rem;
  margin: 24px 0;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.demo-banner {
  background: var(--bronze-50);
  border: 1px solid var(--bronze-100);
  color: var(--bronze);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-align: center;
}

/* ---------- Misc ---------- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--navy-50);
  color: var(--navy);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tag.bronze { background: var(--bronze-50); color: var(--bronze); }

.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.feature-icon {
  width: 56px; height: 56px;
  background: var(--navy-50);
  color: var(--navy);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { font-size: 0.95rem; }

/* ---------- MailerLite form overrides (subscribe-section on kol-shoresh.html) ----------
   We render our own header/lead text in the page and only use MailerLite for the
   email field + button. These rules hide MailerLite's default chrome and restyle
   the input and button to match our brand. */
.subscribe-section .subscribe-lede {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.05rem;
  color: var(--ink);
  font-style: italic;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
}

/* Inline-strip layout: text + form side-by-side (used on Kol Shoresh top + homepage). */
.subscribe-strip-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: center;
}
.subscribe-strip-wrap .subscribe-text { min-width: 0; }
.subscribe-strip-wrap .subscribe-form-wrap { min-width: 0; }
.subscribe-strip-wrap .ml-embedded { max-width: 320px; margin: 0; }
@media (max-width: 720px) {
  .subscribe-strip-wrap { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .subscribe-strip-wrap .ml-embedded { margin: 0 auto; }
}
.subscribe-section .ml-embedded { max-width: 480px; margin: 0 auto; }
.subscribe-section .ml-form-embedContainer,
.subscribe-section .ml-form-align-center,
.subscribe-section .ml-form-embedWrapper { background: transparent !important; box-shadow: none !important; border: none !important; max-width: 100% !important; }
.subscribe-section .ml-form-embedHeader,
.subscribe-section .ml-form-embedContent,
.subscribe-section .ml-form-embedPermissions,
.subscribe-section .ml-form-recaptcha-info { display: none !important; }
.subscribe-section .ml-form-formContent { padding: 0 !important; }
.subscribe-section .ml-form-fieldRow { padding: 0 !important; margin-bottom: 10px !important; }
.subscribe-section .ml-form-fieldRow input.form-control {
  width: 100% !important;
  padding: 13px 15px !important;
  border: 1px solid rgba(21,60,114,0.25) !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  background: var(--white) !important;
  font-family: var(--font-sans, Inter, system-ui, sans-serif) !important;
  color: var(--ink) !important;
  box-sizing: border-box !important;
}
.subscribe-section .ml-form-fieldRow input.form-control:focus {
  border-color: var(--navy) !important;
  box-shadow: 0 0 0 3px rgba(21,60,114,0.12) !important;
  outline: none !important;
}
.subscribe-section .ml-form-embedSubmit { padding: 0 !important; margin-top: 4px !important; }
.subscribe-section .ml-form-embedSubmit button.primary {
  width: 100% !important;
  padding: 13px 22px !important;
  background: var(--navy) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  font-family: var(--font-sans, Inter, system-ui, sans-serif) !important;
  transition: background 150ms ease;
}
.subscribe-section .ml-form-embedSubmit button.primary:hover { background: var(--bronze) !important; }
.subscribe-section .ml-form-embedSubmit button.loading { opacity: 0.7; cursor: progress; }
.subscribe-section .ml-form-successBody,
.subscribe-section .ml-form-successContent {
  padding: 18px 16px !important;
  background: rgba(16,185,129,0.06) !important;
  border: 1px solid rgba(16,185,129,0.3) !important;
  border-radius: 10px !important;
  color: #065f46 !important;
  text-align: center !important;
}
.subscribe-section .ml-form-embedSubmitLoad { color: var(--muted) !important; }
.subscribe-section .ml-validate-required { font-size: 0.85rem !important; }

/* RTL adjustments — for Hebrew (right-to-left) */
[dir="rtl"] .archive-item { border-left: 1px solid var(--line); border-right: 4px solid var(--bronze); }
[dir="rtl"] .archive-item:hover { border-right-color: var(--navy); transform: translateX(-2px); }
[dir="rtl"] .lang-menu { right: auto; left: 0; }

/* Hebrew/RTL polish — accent borders flip side, hover transforms flip direction */
[dir="rtl"] .around-card { border-left: 0; border-right: 4px solid var(--bronze); }
[dir="rtl"] .around-card:hover { transform: translateX(-2px); }
[dir="rtl"] .lesson-card:hover { transform: translateX(-2px); }
[dir="rtl"] .archive-thumb { margin-right: 0; margin-left: 16px; }
[dir="rtl"] .footer-partner-logos { align-items: flex-end; }
/* Mirror the decorative ש watermark on hero/page-header in RTL */
[dir="rtl"] .hero::before, [dir="rtl"] .page-header::before { right: auto; left: -60px; transform: scaleX(-1); }

/* Contact page — on mobile, show the message form FIRST and the
   contact info SECOND. Desktop layout keeps info left / form right. */
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .contact-grid > aside { order: 2; }
  .contact-grid > div   { order: 1; }
}

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle, .lang-switch { display: none; }
  body { color: #000; }
}

/* ---------- Parent dashboard child accordion ----------
   Each child renders as a <details> element so the parent only sees the
   child's name as a button; clicking expands to reveal status, username,
   schedule, and the reset-password control. */
.parent-child-card { transition: box-shadow var(--transition); }
.parent-child-card:hover { box-shadow: var(--shadow-sm); }
.parent-child-card > summary { transition: background var(--transition); }
.parent-child-card > summary:hover { background: var(--cream); }
.parent-child-card > summary::-webkit-details-marker { display: none; }
.parent-child-card > summary::marker { content: ""; }
.parent-child-card[open] > summary .parent-child-chevron { transform: rotate(180deg); }

