/* Midreshet Dror - shared look for every page.
   Palette from the logo: sky wash, sage field, peach field, charcoal line. White page.
   Headings: Frank Ruhl Libre (a Hebrew book face, for a house of study). Text: Assistant. */

:root {
  --ink: #2B3133;
  --ink-soft: #535B5E;
  --line-grey: #7E8A8D;
  --sage: #4A7A60;
  --sage-deep: #3D6750;
  --sage-wash: #CBDFCE;
  --sage-mist: #EEF5F0;
  --sky: #DAE5E6;
  --sky-mist: #F2F7F7;
  --sky-deep: #4F7480;
  --peach: #EDCFC1;
  --peach-mist: #FBF2ED;
  --clay: #A35F47;
  --hairline: #DCE4E4;
  --serif: "Frank Ruhl Libre", "David Libre", serif;
  --sans: "Assistant", "Heebo", system-ui, sans-serif;
  --birds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 24'%3E%3Cg fill='none' stroke='%237E8A8D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10 Q10 3 15 11 Q19 4 26 5'/%3E%3Cpath d='M31 17 Q36 11 40 17 Q44 12 50 13'/%3E%3Cpath d='M53 6 Q57 2 61 7 Q64 3 69 4'/%3E%3C/g%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body.dr-page {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--serif); text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
::selection { background: var(--sage-wash); color: #1E3A2C; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Buttons and links that are styled with a heading size use the text face, not the serif */
a.font-headline-md, button.font-headline-md, a.font-label-md, button.font-label-md,
a.font-display-lg, a.font-bold, summary {
  font-family: var(--sans);
}
a.font-headline-md, button.font-headline-md { font-weight: 700; font-size: 1.0625rem; }

/* Every call-to-action button is a soft pill */
main a.bg-primary, main button.bg-primary, main a.bg-warm-wood, main a.border-warm-wood,
main a.bg-white.text-primary, main a.border-primary, main a.bg-on-primary {
  border-radius: 999px;
}
main a.bg-primary, main button.bg-primary { box-shadow: 0 8px 20px -12px rgba(61, 103, 80, .55); }

/* Softer shadows everywhere */
body .shadow-xl, body .shadow-lg, body .shadow-md {
  box-shadow: 0 22px 44px -28px rgba(47, 53, 55, .30);
}
body .shadow-sm { box-shadow: 0 10px 30px -24px rgba(47, 53, 55, .28); }

/* ---------- Ornament: the three birds from the logo ---------- */
.dr-ornament {
  display: block;
  width: 72px;
  height: 24px;
  margin: 6px auto 0;
  background: var(--birds) center / contain no-repeat;
}
.dr-ornament--start { margin-inline: 0; }

/* ---------- Header ---------- */
.dr-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: transform .35s ease, opacity .35s ease, box-shadow .35s ease;
}
/* Slides away when scrolling down, comes back when scrolling up (assets/site.js) */
.dr-header.is-hidden { transform: translateY(-100%); opacity: 0; }
.dr-header.is-scrolled { box-shadow: 0 10px 28px -22px rgba(47, 53, 55, .35); }
.dr-header__bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
@media (min-width: 768px) { .dr-header__bar { padding: 10px 48px; } }
.dr-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.dr-brand img { width: 52px; height: 52px; object-fit: contain; }
.dr-brand span { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; letter-spacing: .01em; color: var(--sage-deep); }

.dr-nav { display: none; align-items: center; gap: 4px; }
@media (min-width: 768px) { .dr-nav { display: flex; } }
.dr-nav > a, .dr-nav__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 10px 14px;
  font: 600 1rem/1 var(--sans);
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.dr-nav > a:hover, .dr-nav__toggle:hover, .dr-nav__group:focus-within .dr-nav__toggle { color: var(--sage-deep); background: var(--sage-mist); }
.dr-nav a[aria-current="page"], .dr-nav__group.is-current .dr-nav__toggle { color: var(--sage-deep); }
.dr-nav > a[aria-current="page"]::after, .dr-nav__group.is-current .dr-nav__toggle::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--peach), var(--sage-wash));
}
.dr-nav__toggle .material-symbols-outlined { font-size: 20px; transition: transform .2s; }
.dr-nav__group { position: relative; }
.dr-nav__menu {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 6px);
  min-width: 248px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 24px 48px -28px rgba(47, 53, 55, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.dr-nav__group:hover .dr-nav__menu, .dr-nav__group:focus-within .dr-nav__menu, .dr-nav__group.is-open .dr-nav__menu {
  opacity: 1; visibility: visible; transform: none;
}
.dr-nav__group:hover .dr-nav__toggle .material-symbols-outlined, .dr-nav__group.is-open .dr-nav__toggle .material-symbols-outlined { transform: rotate(180deg); }
.dr-nav__menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.dr-nav__menu a:hover, .dr-nav__menu a:focus-visible { background: var(--sage-mist); color: var(--sage-deep); }
.dr-nav__menu a[aria-current="page"] { color: var(--sage-deep); font-weight: 700; }

.dr-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #fff;
  color: var(--sage-deep);
  cursor: pointer;
}
.dr-menu-btn .material-symbols-outlined { font-size: 26px; }
@media (min-width: 768px) { .dr-menu-btn { display: none; } }
.dr-mobile { border-top: 1px solid var(--hairline); background: #fff; }
.dr-mobile[hidden] { display: none; }
@media (min-width: 768px) { .dr-mobile { display: none; } }
.dr-mobile nav { display: flex; flex-direction: column; padding: 8px 16px 16px; }
.dr-mobile a { padding: 13px 4px; color: var(--ink); font-weight: 600; text-decoration: none; border-top: 1px solid #EEF2F2; }
.dr-mobile a:first-child { border-top: 0; }
.dr-mobile a.dr-mobile__sub { padding-inline-start: 18px; font-weight: 500; border-top: 0; }
.dr-mobile a[aria-current="page"] { color: var(--sage-deep); font-weight: 700; }
.dr-mobile__label { padding: 13px 4px 4px; font-size: .875rem; color: var(--ink-soft); border-top: 1px solid #EEF2F2; }

/* ---------- Hero (same pattern on every page) ---------- */
/* Full-width wide photo, title and text sit on the photo (start side, bottom).
   Height follows the page width (about 2.4:1), never below 460px so the text fits on phones, never above 640px. */
.dr-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  height: clamp(460px, 42vw, 640px);
  background: #3A4446;
}
.dr-hero__inner {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 16px 44px;
  display: flex;
  align-items: flex-end;
}
@media (min-width: 900px) {
  .dr-hero__inner { padding: 72px 48px 80px; }
}
.dr-hero__text { position: relative; z-index: 2; max-width: 640px; color: #fff; text-shadow: 0 1px 14px rgba(20, 26, 28, .28); }
.dr-hero .dr-hero__birds { color: rgba(255, 255, 255, .85); }
.dr-hero h1 { color: #fff; }
.dr-hero .dr-hero__lead { color: rgba(255, 255, 255, .92); }
.dr-hero .dr-hero__quote { color: #E4F0E7; }
.dr-hero .dr-chip { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: none; }
.dr-hero .dr-btn { text-shadow: none; }
.dr-hero .dr-btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dr-hero .dr-btn--ghost:hover { background: rgba(255, 255, 255, .24); border-color: #fff; }
.dr-hero__birds { display: block; width: 116px; height: 40px; margin-bottom: 18px; color: var(--line-grey); }
.dr-hero__birds path { animation: dr-glide 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.dr-hero__birds path:nth-child(2) { animation-delay: .15s; }
.dr-hero__birds path:nth-child(3) { animation-delay: .3s; }
@keyframes dr-glide { from { opacity: 0; transform: translate(14px, 6px); } to { opacity: 1; transform: none; } }
.dr-hero h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.35rem, 4.4vw, 3.5rem);
  line-height: 1.14;
  color: #fff;
}
.dr-hero__lead { margin: 0 0 32px; max-width: 34em; font-size: 1.2rem; line-height: 1.75; color: var(--ink-soft); }
.dr-hero__quote { margin: 0 0 32px; font-family: var(--serif); font-size: 1.45rem; line-height: 1.6; color: var(--sage-deep); }
.dr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dr-chip {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid #D3E4D8;
  background: var(--sage-mist);
  color: var(--sage-deep);
  font-weight: 600;
  font-size: .95rem;
}
.dr-hero__media { position: absolute; inset: 0; z-index: 0; margin: 0; }
/* soft charcoal shade on the text side (right in Hebrew) and along the bottom, so the title reads on any photo */
.dr-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(35, 42, 44, .66) 0%, rgba(35, 42, 44, .46) 38%, rgba(35, 42, 44, .08) 78%),
    linear-gradient(to top, rgba(35, 42, 44, .55) 0%, rgba(35, 42, 44, 0) 60%);
}
.dr-hero__media img, .dr-hero__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: dr-settle 1.2s ease-out both;
}
@keyframes dr-settle { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
/* Per-page options: a brighter photo with a lighter shade, and a mirrored photo
   (uses the separate `scale` property so the fade-in animation's transform doesn't cancel it) */
.dr-hero--bright .dr-hero__media img { filter: brightness(1.18) saturate(1.05); }
.dr-hero--bright .dr-hero__media::after {
  background:
    linear-gradient(to left, rgba(35, 42, 44, .55) 0%, rgba(35, 42, 44, .34) 38%, rgba(35, 42, 44, .04) 78%),
    linear-gradient(to top, rgba(35, 42, 44, .42) 0%, rgba(35, 42, 44, 0) 55%);
}
.dr-hero--mirror .dr-hero__media img { scale: -1 1; }

/* Short page heading without a photo (forms, policy) */
.dr-pagehead { background: linear-gradient(180deg, var(--sky-mist) 0%, #fff 100%); }
.dr-pagehead__inner { max-width: 1200px; margin: 0 auto; padding: 56px 16px 28px; text-align: center; }
.dr-pagehead .dr-hero__birds { margin-inline: auto; }
.dr-pagehead h1 { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.15; color: var(--ink); }
.dr-pagehead p { margin: 0 auto; max-width: 40em; color: var(--ink-soft); font-size: 1.15rem; line-height: 1.7; }

/* ---------- Buttons used in heroes and closing bands ---------- */
.dr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font: 700 1.0625rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.dr-btn--primary { background: var(--sage); color: #fff; box-shadow: 0 10px 22px -14px rgba(61, 103, 80, .7); }
.dr-btn--primary:hover { background: var(--sage-deep); }
.dr-btn--ghost { background: #fff; color: var(--sage-deep); border: 1.5px solid #B9CFC0; }
.dr-btn--ghost:hover { background: var(--sage-mist); border-color: var(--sage); }
.dr-btn--clay { background: #fff; color: var(--clay); border: 1.5px solid #E2BFAE; }
.dr-btn--clay:hover { background: var(--peach-mist); border-color: var(--clay); }

/* ---------- Soft bands between white sections ---------- */
.dr-band { background: linear-gradient(180deg, #fff 0%, var(--sky-mist) 16%, #F3F8F5 84%, #fff 100%); }

/* Gentle three-colour wash, used for highlight boxes */
.dr-wash { background: linear-gradient(120deg, var(--sage-mist) 0%, var(--sky-mist) 52%, var(--peach-mist) 100%); }

/* ---------- Closing call-to-action ---------- */
.dr-cta { padding: 56px 16px 0; }
.dr-cta__card {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
  border-radius: 32px;
  border: 1px solid #E3ECE8;
  background: linear-gradient(120deg, var(--sage-mist) 0%, var(--sky-mist) 52%, var(--peach-mist) 100%);
  overflow: hidden;
}
@media (min-width: 768px) { .dr-cta__card { padding: 80px 48px; } }
.dr-cta__card .dr-ornament { margin-bottom: 18px; }
.dr-cta__card h2 { margin: 0 0 16px; font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.2; color: var(--ink); }
.dr-cta__card p { margin: 0 auto 32px; max-width: 36em; font-size: 1.2rem; line-height: 1.7; color: var(--ink-soft); }
.dr-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Questions and answers ---------- */
main details { transition: border-color .2s, background-color .2s; }
main details > summary { transition: color .2s; }
main details > summary:hover { color: var(--sage-deep); }
main details[open] { border-color: #C5DCCB; background: linear-gradient(180deg, #fff 0%, var(--sage-mist) 100%); }

/* ---------- Form fields ---------- */
main input[type="text"], main input[type="email"], main input[type="tel"], main input[type="number"],
main select, main textarea {
  border-color: #D5DFDF;
  background-color: #F7FAFA;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
main input:focus, main select:focus, main textarea:focus { background-color: #fff; border-color: var(--sage); --tw-ring-color: rgba(74, 122, 96, .35); }

/* ---------- Footer ---------- */
.dr-footer {
  margin-top: 64px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, #fff 0%, var(--sky-mist) 55%, var(--sage-mist) 100%);
  color: var(--ink-soft);
}
.dr-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
@media (min-width: 768px) { .dr-footer__inner { flex-direction: row; justify-content: space-between; padding: 36px 48px; } }
.dr-footer__brand { display: flex; align-items: center; gap: 14px; }
.dr-footer__brand img { width: 60px; height: 60px; object-fit: contain; }
.dr-footer__brand span { font-size: .975rem; }
.dr-footer__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.dr-footer__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--sky-deep);
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.dr-footer__links a:hover { color: var(--sage-deep); background: rgba(255, 255, 255, .8); }
.dr-footer__links a svg { width: 24px; height: 24px; }
.dr-footer__links a.dr-footer__text { padding: 0 12px; font-weight: 600; }

/* EU partnership line above the footer */
.dr-eu { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 16px 0; color: var(--ink-soft); }
.dr-eu + .dr-footer { margin-top: 32px; }

/* Space between page sections: 56px each side on wide screens (theme.js "section-gap"), a little less on phones */
@media (max-width: 767px) {
  body .py-section-gap { padding-top: 44px; padding-bottom: 44px; }
  body .mb-section-gap { margin-bottom: 36px; }
  body .gap-section-gap { gap: 40px; }
  .dr-cta { padding-top: 44px; }
}

/* ---------- Privacy policy text ---------- */
.privacy h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--sage-deep); margin: 2.75rem 0 .75rem; }
.privacy h3 { font-size: 1.2rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.privacy p { margin: 0 0 1rem; }
.privacy ul { list-style: disc; padding-right: 1.5rem; margin: 0 0 1rem; }
.privacy li { margin-bottom: .4rem; }
.privacy li::marker { color: var(--sage); }
.privacy a { color: var(--sage-deep); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
