/* ════════════════════════════════════════════════════════════
   CONTENT — static page layout and pasted WordPress content
   ════════════════════════════════════════════════════════════ */

/* ─── PAGE HERO (title band at top of static pages) ─── */
.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem 0.65rem;
}

.page-hero-inner {
  max-width: var(--overall-max-width);
  width: 100%;
  margin: 0 auto;
}

.page-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.25rem;
}

.page-title {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

/* ─── PAGE BODY ─── */
.page-body {
  padding: 0 2rem 5rem;
}

.page-body-inner {
  max-width: var(--overall-max-width);
  width: 100%;
  margin: 0 auto;
  padding-top: 0.5rem;
  padding-inline: 1rem;
  border: none;

  /* ─── TYPOGRAPHY for pasted WordPress HTML ─── */

  & h2 {
    font-family: 'Frank Ruhl Libre', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    margin: 2.5rem 0 1rem;
    line-height: 1.25;

    body.lang-en & { font-family: 'Lora', serif; }
  }

  & h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy);
    margin: 2rem 0 0.75rem;
  }

  & p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-md);
    margin-bottom: 1.25rem;
    font-weight: 300;  /* Hebrew override below */

    body.lang-he & {
      font-weight: 400;
      font-size: 20px;
    }
  }

  & ul, & ol {
    padding-right: 1.5rem;
    padding-left: 0;
    margin-bottom: 1.25rem;
    color: var(--text-md);

    body.lang-en & {
      padding-right: 0;
      padding-left: 1.5rem;
    }
  }

  & li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
    font-weight: 300;
  }

  & a {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 2px;

    &:hover { color: var(--red-lt); }
  }

  & strong { font-weight: 600; color: var(--text); }
  & em     { font-style: italic; }

  & blockquote {
    border-right: 3px solid var(--red);
    border-left: none;
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem 0.75rem 0;
    color: var(--text-md);
    font-style: italic;

    body.lang-en & {
      border-right: none;
      border-left: 3px solid var(--red);
      padding: 0.75rem 0 0.75rem 1.25rem;
    }
  }

  & figure {
    margin: 2rem 0;
  }

  & img {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border);
  }

  & figcaption {
    font-size: 0.8rem;
    color: var(--text-lt);
    margin-top: 0.5rem;
    text-align: center;
  }

  /* YouTube and other embeds from WordPress */
  & iframe,
  & .wp-block-embed__wrapper iframe {
    max-width: 100%;
    border-radius: 6px;
    border: none;
  }

  & .wp-block-embed {
    margin: 2rem 0;
  }
}

/* ─── DOCUMENT PAGE EXTRAS ─── */
.doc-category-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;

  &:hover { text-decoration: underline; }
}

.doc-date-sep { color: var(--text-lt); margin: 0 0.4rem; }

.doc-date { color: var(--text-lt); }

.doc-lang-switch {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.doc-lang-current {
  color: var(--text-lt);
  font-weight: 400;
}

.doc-lang-sep { color: var(--border-dk); margin: 0 0.4rem; }

.doc-lang-other {
  color: var(--red);
  text-decoration: none;
  font-weight: 500;

  &:hover { text-decoration: underline; }
}

/* document-content: same as page-body-inner but
   with slightly more generous spacing for long reads,
   plus side padding and a subtle bevel border (wide screens only) */
.document-content {
  padding-inline: var(--doc-content-padding-x);
  background-color: var(--doc-content-bg);

  & p { margin-bottom: 1.5rem; }

  & h2 { margin-top: 3rem; }

  /* Highlighted spans from Mammoth conversion */
  & .marked-yellow { background: #fff59d; padding: 0 2px; border-radius: 2px; }
  & .marked-green  { background: #c8e6c9; padding: 0 2px; border-radius: 2px; }

  /* Responsive video embeds */
  & .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
    border-radius: 6px;

    & iframe {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      border: none;
      border-radius: 6px;
    }
  }
}

.doc-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.doc-nav-back {
  color: var(--red);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;

  &:hover { text-decoration: underline; }
}

/* ─── SEARCH PAGE ─── */
.search-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.search-form {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
}

.search-form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 200px;

  & input {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--border-dk);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;

    body.lang-he & { padding: 0.6rem 2.5rem 0.6rem 1rem; }

    &::placeholder { color: var(--text-lt); }
    &:focus { border-color: var(--navy); }
  }

  & .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lt);
    pointer-events: none;

    body.lang-he & { left: auto; right: 0.75rem; }
  }
}

.search-submit {
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.search-clear {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* ─── FILTER TABS ─── */
.search-filters {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: calc(var(--header-top) + var(--header-nav));
  z-index: 50;
}

.search-filters-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.filter-tab {
  display: block;
  padding: 0.85rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-md);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;

  &:hover { color: var(--navy); }

  &.active {
    color: var(--navy);
    border-bottom-color: var(--red);
    font-weight: 600;
  }
}

.search-count {
  font-size: 0.8rem;
  color: var(--text-lt);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── RESULTS AREA ─── */
.search-results {
  padding: 2.5rem 0 5rem;
}

.search-results-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.search-error,
.search-empty {
  padding: 3rem 0;
  color: var(--text-md);

  & a {
    color: var(--red);
    text-decoration: none;
    &:hover { text-decoration: underline; }
  }
}

/* ─── DOCUMENT CARDS ─── */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.doc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: var(--doc-card-height);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;

  &:hover {
    box-shadow: 0 4px 20px rgba(44,74,46,0.1);
    border-color: var(--border-dk);
  }

  &.doc-card--pending {
    background: var(--cream);
  }
}

.doc-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.doc-card-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

.doc-card-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  background: #fff3cd;
  color: #856404;
  border-radius: 3px;
  border: 1px solid #ffc107;
}

.doc-card-date {
  font-size: 0.72rem;
  color: var(--text);
  margin-right: auto;

  body.lang-en & { margin-right: 0; margin-left: auto; }
}

.doc-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  font-family: 'Frank Ruhl Libre', serif;

  body.lang-en & { font-family: 'Lora', serif; }
}

.doc-card-summary {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  font-weight: 300;
  flex: 1;
}

.doc-card-read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  margin-top: 0.25rem;
}

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-btn {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border-dk);
  border-radius: 6px;
  transition: border-color 0.15s;

  &:hover { border-color: var(--navy); }
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text-md);
  border: 1.5px solid transparent;
  transition: border-color 0.15s, color 0.15s;

  &:hover { border-color: var(--border-dk); color: var(--navy); }

  &.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    font-weight: 600;
  }
}

.pagination-ellipsis {
  color: var(--text-lt);
  padding: 0 0.25rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .search-hero-inner { flex-direction: column; }
  .search-form { max-width: 100%; }
  .doc-cards { grid-template-columns: 1fr; }
  .search-filters-inner { padding: 0 1.25rem; }
  .search-results-inner { padding: 0 1.25rem; }
  .search-filters { top: var(--header-top); }
}

/* ─── PENDING NOTICE ─── */
.doc-pending-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  font-size: 0.875rem;
  padding: 0.75rem 2rem;

  & a {
    color: #856404;
    font-weight: 600;
    margin-right: auto;

    body.lang-en & { margin-right: 0; margin-left: auto; }

    &:hover { text-decoration: underline; }
  }

  & svg { flex-shrink: 0; }
}

/* ── Bilingual search result cards ──────────────────────── */
.doc-card-title--he {
    font-size: 1.05rem;
    margin-bottom: 0.1rem;
}

.doc-card-title--en {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-family: 'Montserrat', sans-serif;
}

.doc-card-summary--he {
    margin-bottom: 0.15rem;
}

.doc-card-summary--en {
    font-size: 0.82rem;
    color: var(--text);
    font-style: italic;
}



/* ── Bilingual contact forms ─────────────────────────────────────────────── */

.bilingual-form {
    max-width: 560px;
    margin-inline: auto;
}

.bf-field {
    margin-bottom: 1.25rem;
}

/* Label row: English on left, Hebrew on right */
.bf-labels {
    display: flex;
    flex-direction: row;
    direction: ltr;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
    row-gap: 0.2rem;
}

.bf-label-he {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-md);
    font-family: 'Frank Ruhl Libre', serif;
    direction: rtl;
}

.bf-label-en {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-lt);
    font-family: 'Montserrat', sans-serif;
    direction: ltr;
    max-width: 55%;
}

/* Full-width inputs */
.bilingual-form input[type="text"],
.bilingual-form input[type="email"],
.bilingual-form textarea {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--border-dk);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    padding: 0.6rem 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;

    &:focus {
        border-color: var(--navy);
        box-shadow: 0 0 0 3px rgba(44,74,46,0.08);
    }
}

.bilingual-form textarea {
    resize: vertical;
    line-height: 1.6;
}

/* Success and error banners */
.contact-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;

    & p { margin: 0; font-weight: 500; }
}

.contact-error {
    background: #fff0ed;
    border: 1px solid #f5c0b0;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    color: var(--red);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Submit button */
.bilingual-form .btn-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    letter-spacing: 0.03em;

    &:hover    { background: var(--navy-lt); }
    &:disabled { opacity: 0.65; cursor: not-allowed; }
}

/* Subscribe note */
.subscribe-note {
    font-size: 0.8rem;
    color: var(--text-lt);
    text-align: center;
    margin-top: 0.75rem;
    font-weight: 300;
}

/* ── Mailing list checkboxes ─────────────────────────────────────────────── */

.bf-checkboxes {
    display: flex;
    gap: 2rem;
    direction: ltr;
    margin-top: 0.25rem;
    justify-content: center;
}

.bf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.bf-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

.bf-checkbox-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.bf-checkbox-he {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-md);
    font-family: 'Frank Ruhl Libre', serif;
    direction: rtl;
}

.bf-checkbox-en {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-lt);
    font-family: 'Montserrat', sans-serif;
    direction: ltr;
}
