/* =========================================
   Global Background
   ========================================= */
.site-main:not(.front-page):not(.contact-page):not(.dashboard-page):not(
    .inner-page
  ):not(.benefit-single-page):not(.press-single-page):not(
    .professional-info-page
  ) {
  background-image: url("../images/partners/main-background.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
}

.site-main.coming-soon-page {
  background-position: 0vw 7vw;
  background-size: 100% 75%;
}

/* =========================================
   Navigation Bar
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.nav-bar {
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.nav-bar .container.nav-inner {
  max-width: none;
  width: 100%;
}

/* Logo */
.nav-logo a {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 56px;
  width: auto;
}

.site-title-text {
  color: var(--color-text);
  font-size: var(--fs-body-para);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

/* Nav Menu */
.nav-menu-wrap {
  flex: 1 1 0; /* basis 0 — wrap can never be wider than the remaining space */
  min-width: 0;
  display: flex;
  justify-content: center;
  margin-inline: 24px; /* always-visible gap between menu and nav-actions / logo */
  /* overflow:visible so the sub-menu dropdown can spill below the bar. Horizontal overlap with
     nav-actions is prevented by flex:1 1 0 + the hamburger kicking in at ≤1500px. */
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0;
  flex-wrap: nowrap; /* stay on one row */
}

.nav-menu.nav-menu--fallback {
  padding: 0; /* margin-inline on wrap handles outer spacing */
  gap: 2px; /* fixed gap — does not change with zoom */
  width: 100%;
  flex: 1 1 auto;
  justify-content: space-evenly;
}

/* Items sit at natural width, packed together in the center */
.nav-menu.nav-menu--fallback > li {
  flex: 0 0 auto;
}

.nav-menu.nav-menu--fallback li a {
  font-size: var(--fs-body-m); /* fixed px so the bar stays constant on zoom */
  padding: 6px 4px;
  white-space: nowrap;
}

.nav-menu li a {
  display: block;
  padding: 8px 14px;
  color: var(--color-text);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  border-radius: var(--radius-sm);
  transition:
    color 0.15s,
    background 0.15s;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item > a {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.08);
}

.nav-menu .menu-item-toggle-only > a.nav-parent-toggle {
  cursor: pointer;
}

/* Dropdown arrow indicator (also a tap target inside the hamburger panel) */
.nav-arrow {
  font-size: 0.65em;
  margin-inline-start: 4px;
  display: inline-block;
  transition: transform 0.2s;
  vertical-align: middle;
  cursor: pointer;
  padding: 4px 6px;
}

/* Dropdown parent item */
.nav-menu .menu-item-has-children {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

/* Sub-menu — hidden by default */
.nav-menu .sub-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-drop);
  padding: 14px 0 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition: opacity 0.18s ease;
  z-index: 200;
  gap: 0;
  width: max-content;
}

/* Open on explicit click-toggle (works on every device) */
.nav-menu .menu-item-has-children.is-expanded > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-menu .menu-item-has-children.is-expanded > a .nav-arrow {
  transform: rotate(180deg);
}

/* Hover/focus triggers only on devices that actually hover (desktop).
   On touch devices these would persist after a tap and prevent the
   "second tap = close" toggle from taking effect. */
@media (hover: hover) and (pointer: fine) {
  .nav-menu
    .menu-item-has-children:not(.menu-item-toggle-only):hover
    > .sub-menu,
  .nav-menu
    .menu-item-has-children:not(.menu-item-toggle-only):focus-within
    > .sub-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-menu
    .menu-item-has-children:not(.menu-item-toggle-only):hover
    > a
    .nav-arrow,
  .nav-menu
    .menu-item-has-children:not(.menu-item-toggle-only):focus-within
    > a
    .nav-arrow {
    transform: rotate(180deg);
  }
}

/* Sub-menu items */
.nav-menu .sub-menu li {
  display: block;
  width: 100%;
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 20px;
  border-radius: 0;
  font-size: var(--fs-body);
  white-space: nowrap;
  text-align: right;
}

.nav-menu .sub-menu li a:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-shrink: 0;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 38px;
  padding-inline-start: 50px;
  min-height: 52px;
  background: transparent;
  border-color: transparent;
  color: var(--color-text);
  box-shadow: none;
  font-weight: var(--fw-regular);
  font-size: var(--fs-body-para);
}

.nav-login:hover {
  background: transparent;
  color: var(--color-text);
  border-color: transparent;
  box-shadow: none;
}

.btn.nav-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 52px;
  padding: 0;
}

/* Welcome button dropdown */
.nav-welcome-wrap {
  position: relative;
  display: inline-block;
}

.btn.nav-welcome {
  max-width: 220px;
}
.nav-welcome-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--color-white);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  padding: 6px;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s;
  z-index: 200;
}
/* A padding bridge so the menu doesn't close when the cursor crosses the gap */
.nav-welcome-wrap::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-welcome-wrap:hover .nav-welcome-menu,
.nav-welcome-wrap:focus-within .nav-welcome-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-welcome-menu-item {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: var(--fs-body-s);
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  text-align: right;
}
.nav-welcome-menu-item:hover {
  background: var(--color-bg, #f3f1ec);
  color: var(--color-primary);
}
.nav-welcome-logout {
  color: #a02020;
}
.nav-welcome-logout:hover {
  background: #ffeaea;
  color: #a02020;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition:
    transform 0.25s,
    opacity 0.25s;
}

.nav-hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
  position: relative;
  background-blend-mode: multiply;
  background-color: var(--color-primary);
  background-image: url("../images/partners/tel-aviv-skyline.webp");
  background-size: cover;
  background-position: center 45%;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: stretch;
}

.hero-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-grow: 1;
  min-height: 100px;
  margin-left: 0;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(16px, 3vw, 32px);
  padding-bottom: clamp(16px, 3vw, 32px);
}

.hero-title {
  font-size: clamp(var(--fs-h2), 4vw, var(--fs-h1));
  font-weight: var(--fw-extrabold);
  color: var(--color-white);
  line-height: var(--lh-h5);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: var(--fs-body-para);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--lh-body-scale);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-btn-secondary {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero-image {
  flex: 0 45%;
  align-self: stretch;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero-img {
  height: 114%;
  width: 134%;
  transform: translateX(22%);
  max-width: none;
  display: block;
  object-fit: cover;
  clip-path: polygon(
    34% 13%,
    3% 88%,
    23% 88%,
    40% 47%,
    56% 65%,
    79% 10%,
    76% -26%,
    49% 27%
  );
}

.site-logo-img,
.brand-logo__img {
  height: 56px;
  width: auto;
  display: block;
}

/* Mid-page shared background (stats + events) */
.mid-page-bg {
  background-image: url("../images/partners/main-background.webp");
  background-size: 100% 78%;
  background-position: top center;
  background-repeat: no-repeat;
}

/* =========================================
   Stats Section
   ========================================= */
.stats-section {
  background-color: transparent;
  padding: 40px 0;
  margin-top: 100px;
  margin-bottom: 100px;
}

.stats-section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 40px;
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  transform: scale(0.8);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  width: 285px;
  min-height: 177px;
  margin-top: 23px;
  justify-self: center;
  padding: 24px 16px;
  /* 1px “inner” gradient border + asymmetric corners (design spec) */
  border: 1px solid transparent;
  border-top-left-radius: 100px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 100px;
  border-bottom-left-radius: 5px;
  background:
    linear-gradient(var(--color-white), var(--color-white)) padding-box,
    linear-gradient(180deg, #629498 0%, var(--color-primary-dark) 100%)
      border-box;
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  transition: box-shadow 0.2s;
}

.stat-item:hover {
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--color-primary);
  border: 2px solid var(--color-accent-light);
}

.stat-icon svg {
  width: 28px;
  height: 28px;
}

.stat-value {
  display: none;
}

.stat-label {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

/* ---- Media-tag card variant ---- */
.stat-item--media {
  position: relative;
  overflow: visible;
  margin-top: 54px; /* extra space above to show the floating icon */
  padding-top: 20px;
  justify-content: center;
}

/* Icon sits ON TOP of the card border — mostly above, only ~10px inside */
.stat-media-tag {
  position: absolute;
  top: -42px;
  left: 55%;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  opacity: 1;
  filter: drop-shadow(0 4px 10px rgba(160, 120, 40, 0.4));
}

.stat-media-tag svg,
.stat-media-tag img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.stat-media-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  text-align: center;
}

/* =========================================
   Events Section
   ========================================= */
.events-section {
  background-color: transparent;
  padding: 60px 0;
}

.events-section > .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.events-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.events-view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  transition: gap 0.2s;
}

.events-view-all:hover {
  gap: 8px;
}

.events-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 0;
}

.events-section-title {
  margin-bottom: 0;
  text-align: center;
}

.events-calendar-col {
  align-self: stretch;
}

.events-cards-col {
  min-width: 0;
}

/* 3-column event cards grid (desktop) — used on archive page */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Homepage events section: 3 cards per row, slightly smaller */
.events-layout .events-carousel-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

/* Desktop: archive carousel track uses 3 columns */
.events-carousel-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Homepage events: slightly smaller cards */
.events-layout .event-card-thumbnail {
  aspect-ratio: 4/3;
}

.events-layout .event-card-body {
  padding: 0px 58px 16px;
}

.events-layout .event-card-description {
  font-size: var(--fs-label);
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Carousel arrows hidden on desktop, shown on mobile via media query */
.events-carousel-arrows {
  display: none;
}

.events-all-link-mobile {
  display: none;
}

/* Calendar naturally sits as the first grid item */
.events-calendar-wrap {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.event-card {
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
}

.event-card .event-card-link {
  display: block;
  color: inherit;
  border-top-right-radius: 100px;
}

.event-card-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  border-radius: 10px;
}

.event-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  border-radius: 10px;
}

.event-card:hover .event-thumb-img {
  transform: scale(1.04);
}

.event-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 100%
  );
  border-radius: 8px;
}

.event-date-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  text-align: center;
  line-height: var(--lh-h5);
  box-shadow: var(--shadow-sm);
  min-width: 40px;
}

.event-date-day {
  display: block;
  font-size: var(--fs-body-para);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
}

.event-date-month {
  display: block;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.event-price-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  padding: 3px 10px;
  border-radius: var(--radius-lg);
}

.event-price-badge--free {
  background: #4caf50;
  color: var(--color-white);
}

.event-card-body {
  display: flex;
  flex-direction: column;
  direction: rtl;
  gap: 15px;
  padding: 40px 32px 20px 32px;
  border-radius: 100px 5px;
  background-color: var(--color-white);
  box-shadow: 8px 8px 30px 0 rgba(50, 50, 50, 0.1);
  transform: translateY(-50px);
  transition: box-shadow 0.3s;
  width: 103%;
}

.event-card-body:hover {
  box-shadow: 8px 8px 40px 0 rgba(50, 50, 50, 0.18);
}

.event-card-title-link:hover .event-card-title {
  color: var(--color-primary);
}

.event-card-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  margin: 0;
  line-height: var(--lh-h3);
  text-align: right;
  overflow-wrap: break-word;
  word-break: break-word;
}

.event-card-description {
  font-size: var(--fs-body-s);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Keep pin icon aligned to the first line when a long address wraps */
.event-card-meta-item:has(svg path[d^="M21 10"]) svg {
  vertical-align: top;
}

.event-card-location,
.event-card-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  margin: 0;
}

.events-empty {
  color: var(--color-text-muted);
  padding: 32px 0;
  text-align: center;
}

/* Mini Calendar — Figma: white card, radius 10px, padding 18px, gap 27px, shadow */
.mini-calendar {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 8px 8px 30px 0 rgba(50, 50, 50, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 27px;
  flex: 1;
  height: 91%;
}

.mini-calendar-header {
  background: transparent;
  color: var(--color-primary);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
}

.mini-calendar-month-year {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
}

.mini-calendar-month {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

.mini-calendar-year {
  color: var(--color-text-muted);
  font-weight: var(--fw-regular);
}

.mini-calendar-nav {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
}

.mini-cal-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: var(--fs-h4);
  line-height: var(--lh-h5);
  color: var(--color-primary);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.mini-cal-btn:focus {
  outline: none;
}

.mini-cal-btn:hover {
  background: #f0eef8;
}

.mini-calendar-table {
  width: 100%;
  border-collapse: collapse;
  padding: 0;
  height: 100%;
}

.mini-calendar-table thead tr {
  background: #f8f7fd;
  border-radius: var(--radius-sm);
}

.mini-calendar-table thead th {
  text-align: center;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-text-muted);
  padding: 8px 2px;
}

.mini-cal-day,
.mini-cal-empty {
  text-align: center;
  padding: 5px 2px;
  font-size: var(--fs-label);
  color: var(--color-text);
  position: relative;
  cursor: pointer;
}

.mini-cal-day span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
}

.mini-cal-day--today {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  color: var(--color-text);
}

.mini-cal-day--active span:first-child {
  border: 1px solid var(--color-black);
  font-weight: var(--fw-bold);
}

.mini-cal-day--active:not(.mini-cal-day--event) span:first-child {
  background: transparent;
  color: var(--color-text);
}

.mini-cal-day--event span:first-child {
  background: var(--color-accent-light);
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
}

.mini-cal-day--active.mini-cal-day--event span:first-child {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
}

.mini-cal-day--no-event {
  cursor: default;
  pointer-events: none;
  color: var(--color-text-muted);
  opacity: 0.4;
}

.mini-cal-day--no-event span:first-child {
  background: transparent;
  color: inherit;
  font-weight: var(--fw-regular);
}

.mini-cal-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  margin: 2px auto 0;
}

/* =========================================
   Content Cards Section
   ========================================= */
.content-cards-section {
  background: var(--color-white);
  padding: 60px 0;
}

.content-cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.content-cards-header .section-title {
  margin-bottom: 20px;
}

.content-cards-view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  transition: gap 0.2s;
}

.content-cards-view-all:hover {
  gap: 8px;
}

.content-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.content-card {
  background: var(--color-bg-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.content-card-link {
  display: block;
}

.content-card-thumbnail {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.content-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.content-card:hover .content-thumb-img {
  transform: scale(1.04);
}

.content-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--color-bg) 0%,
    var(--color-accent-light) 100%
  );
}

.content-card-body {
  padding: 16px;
}

.content-card-date {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 6px;
}

.content-card-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  line-height: var(--lh-body-scale);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-excerpt {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-read-more {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

/* =========================================
   Member Search Section (Figma: 1920×700, pad 193 / 227 / 227, gap 10, gold gradient)
   ========================================= */
.member-search-section {
  box-sizing: border-box;
  width: 100%;
  max-width: 1920px;
  min-height: auto;
  min-width: 100%;
  padding: clamp(32px, 2vw, 193px) clamp(20px, 2vw, 227px)
    clamp(32px, 2vw, 64px);
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
  position: relative;
  /* Light cream into accent gold (#C9A659 stops per spec) */
  background: linear-gradient(
    180deg,
    #f9f9f9 10%,
    #f8f5e6 20%,
    #f8f1de 30%,
    #faeed2 52%,
    #fbeed0 68%,
    #fcecc6 100%
  );
}

.member-search-inner {
  flex: 0 1 auto;
  display: flex;
  flex-direction: row-reverse; /* photo left, content right in RTL */
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: calc(1920px - 454px);
  margin: 0 auto;
  min-height: 0;
}

.member-search-photo-wrap {
  flex: 0 0 min(435px, 30vw);
  width: min(435px, 30vw);
  height: min(434px, 30vw);
  position: relative;
  flex-shrink: 0;
  align-self: flex-end;
  overflow: visible;
}

/* Gold gradient ring — transparent center via mask */
.member-search-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(315deg, #e5d3a5 0%, #d7ba6f 50%, #be9749 100%);
  /* drop-shadow follows the ring shape (rendered after mask) */
  filter: drop-shadow(7px 7px 30px rgba(209, 133, 57, 0.3));
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 65px),
    var(--color-white) calc(100% - 65px)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 65px),
    var(--color-white) calc(100% - 65px)
  );
  z-index: 2;
  pointer-events: none;
  transform: translateY(35px);
}

.member-search-photo {
  position: absolute;
  width: auto;
  height: 700px;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%) translatey(40%);
  object-fit: contain;
  object-position: bottom center;
  display: block;
  z-index: 3;
}

.member-search-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 0;
  min-width: 0;
  text-align: right;
}

.member-search-title {
  font-size: clamp(var(--fs-h5), 2.5vw, var(--fs-h3));
  font-weight: var(--fw-extrabold);
  color: var(--color-primary-dark);
  margin: 0;
  grid-column: 1;
  grid-row: 1;
}

.member-search-form {
  display: grid;
  grid-template-columns: repeat(3, 296px);
  align-items: center;
  width: 100%;
  max-width: 980px;
  gap: 10px;
  justify-content: end;
}

.member-search-input-wrap {
  position: relative;
  grid-column: 1;
  grid-row: 2;
}

.member-search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.member-search-input {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: var(--fs-body);
  color: var(--color-text);
  font-family: inherit;
}

.member-search-input::placeholder {
  color: var(--color-text-muted);
}

.member-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.member-search-select {
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c4c4a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  font-size: var(--fs-body);
  color: var(--color-text);
  appearance: none;
  cursor: pointer;
  font-family: inherit;
}

.member-search-form > .member-search-multi:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.member-search-form > .member-search-multi:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.member-search-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Member search multi-select component */
.member-search-multi {
  position: relative;
}

.member-search-multi-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  font-size: var(--fs-body);
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  direction: rtl;
  transition: border-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
}

.member-search-multi-trigger:focus,
.member-search-multi-trigger.is-open {
  outline: none;
  border-color: var(--color-primary);
}

.member-search-multi-placeholder {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-search-multi-chips {
  display: flex;
  flex-direction: row;
  gap: 6px;
  overflow: hidden;
  flex-shrink: 1;
  min-width: 0;
}

.member-search-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: var(--fs-body-s);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--color-text);
}

.member-search-chip--more {
  font-weight: var(--fw-medium);
  flex-shrink: 0;
}

.member-search-multi-trigger.has-selection {
  height: 52px;
  padding: 0 14px 0 34px;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.member-search-multi-trigger.has-selection .member-search-multi-placeholder,
.member-search-multi-trigger.has-selection .member-search-multi-chevron {
  display: none;
}

.member-search-multi-clear {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--fs-body-l);
  line-height: var(--lh-h5);
  color: var(--color-text);
  padding: 4px 2px;
  z-index: 1;
  display: flex;
  align-items: center;
}

.member-search-multi-clear[hidden] {
  display: none;
}

.member-search-multi-chevron {
  flex-shrink: 0;
  margin-right: auto;
  margin-left: 0;
  transition: transform 0.2s;
}

.member-search-multi-trigger.is-open .member-search-multi-chevron {
  transform: rotate(180deg);
}

.member-search-multi-dropdown {
  position: fixed;
  z-index: 9999;
  background: var(--color-white);
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 230px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 0;
  direction: rtl;
}

.member-search-multi-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: var(--fs-label);
  color: var(--color-text);
  transition: background 0.15s;
  user-select: none;
}

.member-search-multi-option:hover {
  background: var(--color-bg);
}

.member-search-multi-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.member-search-btn {
  grid-column: 3;
  grid-row: 3;
  justify-self: stretch;
  height: 52px;
  padding: 0 40px;
  background: var(--color-button);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.member-search-btn:hover {
  background: var(--color-button-hover);
}

@media (max-width: 1024px) {
  .member-search-section {
    min-height: auto;
    padding: clamp(30px, 2vw, 120px) clamp(20px, 2vw, 227px)
      clamp(30px, 2vw, 64px);
  }

  .member-search-inner {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }

  .member-search-photo-wrap {
    flex: 0 0 auto;
    width: min(360px, 80vw);
    height: min(360px, 80vw);
    align-self: center;
  }

  .member-search-photo {
    width: 151%;
    max-width: none;
    bottom: -10%;
    transform: translate(-50%, 30%);
  }

  .member-search-content {
    width: 100%;
    text-align: center;
  }

  .member-search-form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .member-search-photo-wrap {
    width: min(280px, 80vw);
    height: min(280px, 80vw);
  }

  .member-search-photo {
    width: 151%;
    max-width: none;
    bottom: -10%;
    transform: translate(-49%, 22%) scale(1.1);
  }

  .member-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .member-search-select,
  .member-search-input-wrap,
  .member-search-multi {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }

  .member-search-btn {
    width: 100%;
  }
}

/* =========================================
   Partners Section
   ========================================= */
.partners-section {
  background-color: white !important;
  padding: 200px 0;
  border-top: 1px solid var(--color-border);
}

.partners-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.partners-title {
  font-size: var(--fs-lead);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: 0;
}

.partners-view-all {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.partners-view-all:hover {
  gap: 8px;
}

/* Mobile-only view-all link (below logos) — hidden on desktop */
.partners-view-all--mobile {
  display: none;
}

.partners-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 40px;
  align-items: center;
}

.partner-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo,
.partner-logo-img {
  height: 56px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  transition:
    opacity 0.2s,
    filter 0.2s;
}

.partner-logo:hover,
.partner-logo-img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.partner-name-text {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  text-align: center;
  display: block;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 100%;
  background: var(--color-white);
  transition: box-shadow 0.2s;
}

.partner-logo-wrap:hover .partner-name-text {
  box-shadow: var(--shadow-sm);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  padding: 10px 0 10px 0;
}

/* Single row: logo | nav | contact | social */
.footer-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
}

/* Logo */
/* Footer brand+contact wrapper */
.footer-brand-contact {
  display: contents; /* invisible on desktop — children behave as direct footer-top children */
}

.footer-brand {
  flex-shrink: 0;
}

.footer-logo-img,
.brand-logo--white .brand-logo__img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

/* Nav links — flat 2-column grid */
.footer-links-grid {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: repeat(3, auto);
  direction: ltr;
  row-gap: 14px;
  column-gap: 40px;
  justify-content: start;
  order: 1; /* comes before footer-social → visually RIGHT in RTL */
}

/* מפת האתר sits at the top of col 2 (visual LEFT in RTL); תקנון הלשכה
   stacks directly under it. The remaining 3 policy links auto-flow into
   col 1 (visual RIGHT in RTL), one per row. */
.footer-links-grid a:nth-child(1) {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}
.footer-links-grid a:nth-child(2) {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.footer-links-grid a {
  display: block;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.15s;
  white-space: nowrap;
  gap: 10px;
}

.footer-links-grid a:hover {
  color: var(--color-accent);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  order: 2; /* same group as footer-social — appears LEFT of footer-links-grid in RTL */
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.15s;
  white-space: nowrap;
}

a.footer-contact-item:hover {
  color: var(--color-accent);
}

.footer-contact-item svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  order: 3; /* moves after footer-links-grid → visually LEFT in RTL */
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: transparent;
  color: rgba(255, 255, 255, 1);
  transition:
    background 0.2s,
    color 0.2s;
}

.social-link:hover {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}

/* Bottom bar */
.footer-bottom {
  padding: 18px 0;
  text-align: center;
}

.footer-copyright {
  font-size: var(--fs-label);
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* =========================================
   Responsive — Tablet
   ========================================= */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    transform: none;
    row-gap: 15%;
    padding: 10%;
  }

  .stat-item {
    width: 100%;
    margin-top: 0;
    justify-self: stretch;
  }

  /* On mobile: single column, calendar shows first (order: -1 not needed,
     it's already item 1 in the grid) */
  .events-grid {
    grid-template-columns: 1fr;
  }

  /* Homepage events: stack vertically + use the swipe carousel like mobile,
     so cards aren't squeezed on iPads */
  .events-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title"
      "cal"
      "cards";
  }
  .front-page .events-calendar-col,
  .dashboard-page .events-calendar-col {
    display: none;
  }
  .events-carousel {
    overflow: hidden;
  }
  .events-layout .events-carousel-track,
  .events-carousel-track {
    display: flex;
    gap: 0;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    grid-template-columns: none;
  }
  .events-layout .events-carousel-track .ymas-card,
  .events-carousel-track .ymas-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
  }
  .events-carousel-arrows {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  .mini-calendar {
    max-width: 340px;
    margin: 0 auto;
  }

  .content-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    flex-wrap: wrap;
    gap: 28px;
  }
}

/* =========================================
   Responsive — Mobile
   ========================================= */
/* Below 1500px viewport, switch to hamburger.
   At ≥1501px the menu is sized so all 8 items fit; size is fixed in px
   so the bar stays constant regardless of user zoom. */
@media (max-width: 1500px) {
  .nav-menu-wrap,
  .nav-actions {
    display: none;
  }

  .nav-inner {
    justify-content: space-between;
  }

  .nav-hamburger {
    display: flex;
    order: -1;
    margin-inline-end: 0;
  }

  .nav-logo {
    order: 1;
  }

  .nav-menu-wrap.is-open {
    display: block;
    position: fixed;
    top: var(--nav-height);
    right: 0;
    left: 0;
    background: var(--color-white);
    padding: 16px;
    z-index: 99;
    box-shadow: var(--shadow-hover);
  }

  .nav-menu-wrap.is-open .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-menu-wrap.is-open .nav-menu li a {
    padding: 12px 16px;
    font-size: var(--fs-body);
  }

  /* Login + Join buttons appear at the bottom of the open hamburger panel */
  .nav-menu-wrap.is-open .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
  }
  .nav-menu-wrap.is-open .nav-actions > * {
    width: 100%;
    justify-content: center;
  }

  /* Sub-menu hidden by default in hamburger; opens when parent has .is-expanded */
  .nav-menu-wrap.is-open .nav-menu .sub-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 0;
  }
  .nav-menu-wrap.is-open
    .nav-menu
    .menu-item-has-children.is-expanded
    > .sub-menu {
    display: flex;
    flex-direction: column;
  }
  .nav-menu-wrap.is-open .nav-menu .sub-menu li a {
    padding: 10px 28px;
    font-size: var(--fs-label);
    color: var(--color-text-muted);
  }
  /* Chevron arrow rotates when expanded */
  .nav-menu-wrap.is-open .nav-menu .menu-item-has-children > a .nav-arrow {
    transition: transform 0.2s;
  }
  .nav-menu-wrap.is-open
    .nav-menu
    .menu-item-has-children.is-expanded
    > a
    .nav-arrow {
    transform: rotate(180deg);
  }
}

@media (max-width: 768px) {
  /* Hero */
  .hero-section {
    min-height: auto;
    flex-direction: column;
  }

  .hero-content {
    order: 1;
    padding: 28px 20px 16px;
    text-align: center;
    align-items: center;
  }

  .hero-title {
    font-size: clamp(var(--fs-h4), 6vw, var(--fs-h2));
    color: var(--color-white);
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
    font-size: var(--fs-body);
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
    order: 2;
  }

  .hero-image {
    order: 3;
    flex: none;
    width: 100%;
    max-width: 100%;
    height: 260px;
    margin-bottom: 0;
    transform: none;
    overflow: visible;
  }

  .hero-img {
    width: 137%;
    height: 114%;
    object-fit: cover;
    object-position: center;
    transform: translate(22%, 0%);
  }

  /* Stats */
  .stats-section {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 40px 0;
  }

  .stats-section-title {
    display: block;
    font-size: var(--fs-h3);
    margin-bottom: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 56px;
    column-gap: 16px;
    margin-top: 8px;
    padding: 0;
    transform: none;
  }

  .stat-item,
  .stat-item--media {
    width: 100%;
    min-height: 180px;
    height: auto;
    margin-top: 36px;
    justify-self: stretch;
    padding: 24px 16px;
  }

  .stat-item--media {
    border-top-left-radius: 68px;
    border-bottom-right-radius: 68px;
  }

  .stat-media-tag {
    width: 44px !important;
    height: 44px !important;
    top: -28px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .stat-media-tag svg {
    width: 44px;
    height: 44px;
  }

  /* Events section */

  .events-header {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
  }

  .events-header .section-title {
    white-space: normal;
    text-align: center;
  }

  .events-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title"
      "cal"
      "cards";
  }

  /* Front page mobile: hide calendar (it's now inside the track) */
  .front-page .events-calendar-col,
  .dashboard-page .events-calendar-col {
    display: none;
  }

  /* Events carousel — one card visible, arrows navigate */
  .events-carousel {
    overflow: hidden;
  }

  /* Use high-specificity selectors to override the desktop .events-layout grid */
  .events-layout .events-carousel-track,
  .events-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
    grid-template-columns: none;
  }

  .events-layout .events-carousel-track .ymas-card,
  .events-carousel-track .ymas-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .events-carousel-arrows {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  .events-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition:
      background 0.2s,
      color 0.2s;
  }

  .events-arrow:hover {
    background: var(--color-primary);
    color: var(--color-white);
  }

  .events-all-link-mobile {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 8px 0;
    background: none;
    color: #133336;
    font-family: "Heebo", sans-serif;
    font-size: var(--fs-h5);
    font-weight: var(--fw-bold);
    line-height: var(--lh-h5);
    text-decoration: none;
    transition: opacity 0.2s;
    transform: translateY(9px);
  }

  .events-all-link-mobile:hover {
    opacity: 0.7;
  }

  /* Event card status tag — keep above body on carousel (matches desktop overlap) */
  .events-carousel-track .event-card-body {
    position: relative;
    overflow: visible;
  }

  .events-carousel-track .event-card-status {
    position: absolute;
    top: -16px;
    inset-inline-start: 58px;
    inset-inline-end: auto;
    z-index: 5;
    transform: none;
    align-self: auto;
  }

  .events-carousel-track .event-card-title-link {
    display: block;
    margin-top: 18px;
  }

  /* Content cards */
  .content-cards-grid {
    grid-template-columns: 1fr;
  }

  /* Partners */
  .partners-section {
    padding: 48px 0;
  }

  .partners-section > .container {
    padding-inline-start: 7px;
    padding-inline-end: var(--container-padding);
  }

  .partners-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    margin-bottom: 24px;
  }

  .partners-title {
    text-align: center;
  }

  /* Hide the header view-all on mobile; show the one after logos */
  .partners-header .partners-view-all {
    display: none;
  }

  .partners-view-all--mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: var(--fs-body);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    margin-top: 24px;
  }

  .partners-logos {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 24px;
  }

  .partner-logo,
  .partner-logo-img {
    height: 40px;
  }

  /* Member Search */
  .member-search-section {
    margin: 40px auto 0px;
    padding: 32px 20px;
    display: grid;
  }

  .member-search-photo-wrap {
    display: block;
    width: 80%;
    text-align: center;
    margin-top: 24px;
    order: 2;
    transform: translateX(-11%) !important;
  }

  .member-search-photo-wrap::after {
    -webkit-mask: radial-gradient(
      farthest-side,
      transparent calc(100% - 45px),
      var(--color-white) calc(100% - 45px)
    );
    mask: radial-gradient(
      farthest-side,
      transparent calc(100% - 45px),
      var(--color-white) calc(100% - 45px)
    );
  }

  .member-search-inner {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }

  .member-search-content {
    width: 100%;
    text-align: center;
  }

  .member-search-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-width: 100%;
  }

  .member-search-input-wrap,
  .member-search-select,
  .member-search-multi {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .member-search-btn {
    width: 100%;
    grid-column: auto;
    grid-row: auto;
  }

  /* Footer — single right-aligned column (RTL: flex-start = visual right) */
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
  }

  .footer-brand-contact {
    display: flex;
    flex-direction: row-reverse; /* logo on LEFT, contact on RIGHT in RTL */
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
  }

  .footer-contact {
    align-items: flex-start; /* RTL: visual right */
  }

  .footer-logo-img {
    height: 48px;
  }

  .footer-contact-list {
    align-items: flex-start;
  }

  .footer-contact-item {
    direction: rtl;
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.95);
  }

  .footer-social {
    justify-content: flex-start;
    gap: 1px;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    justify-content: start;
    gap: 10px 24px;
    text-align: right;
  }

  .footer-links-grid a:nth-child(1),
  .footer-links-grid a:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
  }

  .footer-links-grid a {
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.95);
  }

  .footer-copyright {
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.7);
  }
}

/* =========================================
   Events Archive Page
   ========================================= */

/* --- Hero --- */
/* Page title over hero */
.ea-page-title-section {
  padding: 24px 0 0;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
  transform: translateY(88px);
}

.ea-page-title {
  font-size: clamp(var(--fs-h2), 3.5vw, var(--fs-h1));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0;
}

.events-archive-page {
  background-color: var(--color-text);
  background-image: url("../images/partners/main-background.webp");
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.ea-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: visible;
}

.ea-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: brightness(0.45);
}

.ea-hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.85)),
    url("../images/partners/event-conference.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.ea-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5%;
  padding-top: 1%;
  padding-bottom: 64px;
  width: 100%;
  transform: translateY(100px);
}

/* Member card (right in RTL) */
.ea-hero-content {
  flex: 0 0 35%;
  min-width: 0;
  padding: 36px 0;
  color: var(--color-black);
}

.ea-hero-subtitle {
  font-family: "Heebo", sans-serif;
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-h2);
  letter-spacing: 0;
  text-align: right;
  color: #133336;
  margin: 0 0 12px;
}

.ea-hero-desc {
  font-family: "Heebo", sans-serif;
  font-size: var(--fs-h5);
  font-weight: var(--fw-medium);
  line-height: var(--lh-h5);
  letter-spacing: 0;
  text-align: right;
  color: var(--color-black);
  margin-bottom: 39px;
}

.ea-hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Calendar (left in RTL) */
.ea-hero-calendar {
  flex-shrink: 0;
  width: 450px;
}

.ea-hero-calendar .mini-calendar {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 27px;
  position: relative;
  z-index: 2;
  transform: translateY(29px) translateX(-15px) scale(1.3);
  transform-origin: center top;
  width: 72%;
}

.ea-hero-calendar .mini-calendar-header {
  background: transparent;
  color: var(--color-primary);
  padding: 0;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  text-align: center;
}

.ea-hero-calendar .mini-calendar-table {
  padding: 0;
}

.ea-hero-calendar .mini-calendar-table thead th {
  color: var(--color-text-muted);
  font-weight: var(--fw-bold);
}

.ea-hero-calendar .mini-cal-day,
.ea-hero-calendar .mini-cal-empty {
  color: var(--color-text);
}

.ea-hero-calendar .mini-cal-day span:first-child {
  width: 33px;
  height: 33px;
}

.ea-hero-calendar .mini-cal-day--today {
  opacity: 1;
  color: var(--color-text);
}

.ea-hero-calendar
  .mini-cal-day--active:not(.mini-cal-day--event)
  span:first-child {
  background: transparent;
  color: var(--color-text);
}

.ea-hero-calendar .mini-cal-day--event span:first-child {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
}

.ea-hero-calendar .mini-cal-day--active.mini-cal-day--event span:first-child {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
}

.ea-hero-calendar .mini-cal-day--no-event {
  color: var(--color-text-muted);
  opacity: 0.4;
}

.ea-hero-calendar .mini-cal-day--no-event span:first-child {
  background: transparent;
  color: inherit;
}

.ea-hero-calendar .mini-cal-dot {
  background: var(--color-accent);
}

/* --- Filter + Grid Combined Section --- */
.ea-filter-section {
  background-color: var(--color-white);
  background-image: url("../images/partners/main-background.webp");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center center;
  padding: 90px 0 0;
  width: 100%;
}

/* Shared white box — full bleed, no border-radius on sides */
.ea-combined-box {
  background: transparent;
  overflow: hidden;
  width: 100%;
}

/* Let the filter date-picker popup extend outside the combined box */
.ea-filter-section:has(.ea-filter-date-wrap.is-picker-open) .ea-combined-box {
  overflow: visible;
}

.ea-filter-inner {
  padding: 100px 20% 14px;
}

/* Grid content constrained for readability */
.ea-grid-section > div {
  max-width: var(--container-max);
  margin: 0 auto;
}

.ea-filter-title {
  font-family: "Heebo", sans-serif;
  font-size: var(--fs-h3);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-h3);
  letter-spacing: 0;
  text-align: center;
  color: #133336;
  margin-bottom: 20px;
}

.ea-filter-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ea-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ea-filter-row--top {
  flex-wrap: nowrap;
}

.ea-filter-row--bottom {
  flex-wrap: nowrap;
  direction: ltr;
}

/* Date input wrapper — layout matches .ea-filter-select (RTL text, icon on visual left) */
.ea-filter-date-wrap {
  position: relative;
  display: flex;
  align-items: center;
  direction: rtl;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  height: 52px;
  background: var(--color-white);
  padding: 0 14px;
  gap: 8px;
  flex: 1;
  min-width: 150px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.ea-filter-date-wrap:focus-within {
  border-color: var(--color-primary);
}

.ea-filter-date-wrap svg {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.ea-filter-date-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Hidden value submitted with the filter form */
.ea-filter-date {
  display: none;
}

/* Visible label (shown when empty) — matches .ea-filter-select */
.ea-filter-date-label {
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  text-align: start;
  white-space: nowrap;
  pointer-events: none;
  flex: 1;
}

/* Visible formatted value (shown when has-value) */
.ea-filter-date-display {
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  text-align: start;
  white-space: nowrap;
  pointer-events: none;
  flex: 1;
  display: none;
}

/* Popup mini-calendar — same visual language as hero calendar.
   Horizontal position is clamped to the viewport in ea-date-picker.js */
.ea-date-picker-popup {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  z-index: 50;
  width: 320px;
  max-width: calc(100vw - 16px);
  height: auto;
  flex: none;
  overflow: visible;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.ea-date-picker-popup[hidden] {
  display: none !important;
}

/* Filter picker header: month/year on the right, nav arrows on the left */
.mini-calendar--picker .mini-calendar-header {
  direction: rtl;
}

.mini-calendar--picker .mini-calendar-table {
  direction: rtl;
}

.ea-filter-date-wrap.is-picker-open {
  border-color: var(--color-primary);
  z-index: 51;
}

/* Picker mode: every day is selectable (unlike hero event filter) */
.mini-calendar--picker .mini-cal-day {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  color: var(--color-text);
}

.mini-calendar--picker .mini-cal-day span:first-child {
  width: 33px;
  height: 33px;
}

.mini-calendar--picker .mini-cal-day--active span:first-child {
  border: 1px solid var(--color-black);
  font-weight: var(--fw-bold);
  background: transparent;
  color: var(--color-text);
}

.mini-calendar--picker .mini-cal-day--event span:first-child {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
  font-weight: var(--fw-bold);
}

.mini-calendar--picker
  .mini-cal-day--active.mini-cal-day--event
  span:first-child {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
}

.ea-filter-date-wrap.has-value .ea-filter-date-label {
  display: none;
}
.ea-filter-date-wrap.has-value .ea-filter-date-display {
  display: inline;
}

.ea-filter-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.ea-filter-input-wrap svg {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.ea-filter-input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-white);
  outline: none;
  transition: border-color 0.2s;
  text-align: right;
  direction: rtl;
}

.ea-filter-input:focus {
  border-color: var(--color-primary);
}

.ea-filter-select {
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--color-text);
  background-color: var(--color-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c4c4a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  appearance: none;
  outline: none;
  cursor: pointer;
  flex: 1;
  min-width: 130px;
  transition: border-color 0.2s;
  direction: rtl;
}

.ea-filter-select:focus {
  border-color: var(--color-primary);
}

.ea-filter-btn {
  height: 52px;
  padding: 0 10%;
  background: var(--color-button);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.ea-filter-btn:hover {
  background: var(--color-button-hover);
}

/* --- Events Grid --- */
.ea-grid-section {
  padding: 40px 0 56px;
  background: transparent;
}

.ea-grid-section > .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.events-archive-page .ea-grid-section .events-section-title {
  margin-bottom: 0;
  text-align: center;
}

.events-archive-page .ea-grid-section .events-carousel-wrap {
  min-width: 0;
}

.ea-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
  margin-right: 65px;
  margin-left: 65px;
}

.ea-grid .is-hidden {
  display: none;
}

/* More events button */
.ea-more-btn-wrap {
  text-align: center;
  margin-top: 40px;
}

.ea-more-btn {
  min-width: 180px;
}

/* Load more / pagination */
.ea-load-more {
  text-align: center;
}

.ea-load-more a {
  display: inline-block;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
  transition: color 0.15s;
}

.ea-load-more a:hover {
  color: var(--color-accent);
}

.ea-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  padding: 48px 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .ea-grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 30px;
  }

  /* Events archive: carousel layout on tablet (matches homepage mobile section) */
  .events-archive-page .events-carousel {
    overflow: hidden;
  }

  .events-archive-page .events-layout .events-carousel-track,
  .events-archive-page .events-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
    grid-template-columns: none;
    margin: 0;
    gap: 0;
  }

  .events-archive-page .events-layout .events-carousel-track .ymas-card,
  .events-archive-page .events-carousel-track .ymas-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .events-archive-page .events-carousel-arrows {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  .ea-hero-calendar {
    width: 340px;
  }
  /* Reset the desktop scale(1.3) so the table fits inside the calendar box */
  .ea-hero-calendar .mini-calendar {
    transform: none;
    width: 100%;
  }
  .ea-hero-content {
    flex: 0 0 45%;
    padding: 0 0 10%;
  }
  .ea-filter-inner {
    padding: 48px 8% 14px;
  }
}

@media (max-width: 768px) {
  /* Hero: stack vertically, center everything */
  .ea-hero {
    min-height: auto;
  }
  .ea-hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding-bottom: 40px;
  }
  .ea-hero-content {
    flex: 0 0 auto;
    width: 100%;
    padding: 0 0 10%;
    text-align: center;
  }
  .ea-hero-subtitle {
    font-size: clamp(var(--fs-h5), 6vw, var(--fs-h3));
    line-height: var(--lh-body-scale);
    text-align: center;
  }
  .ea-hero-desc {
    font-size: clamp(var(--fs-body-m), 4vw, var(--fs-h5));
    text-align: center;
  }
  .ea-hero-btns {
    justify-content: center;
  }

  /* Calendar: full width, no transform */
  .ea-hero-calendar {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }
  .ea-hero-calendar .mini-calendar {
    transform: none;
    width: 100%;
  }

  /* Filter: reduce side padding, allow wrapping */
  .ea-filter-inner {
    padding: 32px 5% 14px;
  }
  .ea-filter-row--top,
  .ea-filter-row--bottom {
    flex-wrap: wrap;
  }
  .ea-filter-select,
  .ea-filter-date-wrap {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }
  .ea-filter-input-wrap {
    flex: 1 1 100%;
  }
  .ea-filter-btn {
    width: 100%;
  }

  /* Grid: single column → carousel track (homepage + archive) */
  .ea-grid {
    margin-right: 0;
    margin-left: 0;
    padding: 0;
  }

  .events-archive-page .ea-grid-section .ea-more-btn-wrap {
    margin-top: 8px;
  }
}

/* =========================================
   FAQ / Q&A Page
   ========================================= */

.faq-page {
  background-image: url("../../assets/images/partners/main-background.webp");
  background-size: 100% 55%;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* --- Hero --- */
.faq-hero {
  position: relative;
  background: transparent;
  overflow: hidden;
  padding: 72px 0 56px;
  text-align: center;
}

.faq-hero-blob {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 60%,
    var(--color-accent-light) 0%,
    transparent 70%
  );
  opacity: 0.55;
  pointer-events: none;
}

.faq-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.faq-hero-title {
  font-size: clamp(var(--fs-h4), 3vw, var(--fs-h2));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0;
  max-width: 600px;
}

.faq-hero-sub {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 480px;
  line-height: var(--lh-body-scale);
}

.faq-search-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.faq-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-white);
  outline: none;
  text-align: right;
  direction: rtl;
  transition: border-color 0.2s;
}

.faq-search-input:focus {
  border-color: var(--color-primary);
}

.faq-new-btn {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  text-decoration: none;
  transition: background 0.2s;
  margin-top: 8px;
}

.faq-new-btn:hover {
  background: var(--color-primary-dark);
}

/* --- Topics --- */
.faq-topics-section {
  background: transparent;
  padding: 64px 0 72px;
}

.faq-topics-title {
  text-align: center;
  font-size: var(--fs-h3);
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0 0 48px;
}

.faq-topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.faq-topic-card {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 102.62px 5.13px 102.62px 5.13px;
  padding: 40px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 292.46px;
  height: 181.63px;
  top: 23.6px;
}

.faq-topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.faq-topic-icon {
  position: absolute;
  top: -22px;
  right: 50%;
  transform: translateX(50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-drop);
}

.faq-topic-label {
  position: absolute;
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-top: 8px;
  width: 110px;
  height: 32px;
  top: 70px;
  left: 91.22px;
}

/* --- My Questions --- */
.faq-my-section {
  background: transparent;
  padding: 56px 0 80px;
}

.faq-my-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  text-align: right;
  margin: 0 0 24px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  direction: rtl;
  text-align: right;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.faq-item-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item-date {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
}

.faq-item-category {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
}

.faq-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-lg);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
}

.faq-status--waiting {
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.faq-status--sent {
  background: #4caf50;
  color: var(--color-white);
  border: 1.5px solid #4caf50;
}

.faq-item-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 6px;
}

.faq-item-excerpt {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0 0 10px;
}

.faq-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  direction: rtl;
}

.faq-read-btn:hover {
  color: var(--color-accent);
}

/* Responsive */
@media (max-width: 768px) {
  .faq-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq-item-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .ea-hero-inner {
    flex-direction: column;
    align-items: flex-end;
    gap: 5%;
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .ea-hero-calendar {
    width: 100%;
    max-width: 450px;
  }
  .ea-grid {
    grid-template-columns: 1fr;
  }
  .ea-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ea-filter-row--top {
    flex-wrap: wrap;
    flex-direction: row;
  }
  .ea-filter-row--bottom {
    flex-wrap: wrap;
    direction: ltr;
  }
  .ea-filter-date-wrap,
  .ea-filter-input-wrap,
  .ea-filter-select,
  .ea-filter-btn {
    width: 100%;
  }
}

/* =========================================
   Members Index Page
   ========================================= */

.members-page {
  background-position: 0vw 20vw;
  background-size: 100% 60%;
  min-height: 70vh;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.members-container {
  position: relative;
  z-index: 1;
  padding-top: 48px;
}

/* White floating card wrapping title + filter + list */
.members-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  overflow: visible;
  padding: 28px 28px 25px;
}

.members-page-title {
  font-size: clamp(var(--fs-h3), 3vw, var(--fs-h2));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  text-align: right;
  margin: 0 0 20px;
}

/* --- Filter bar --- */
.members-filter {
  position: relative;
  z-index: 10;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding: 0;
}

.members-filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
  flex-wrap: wrap;
}

.members-filter-sep {
  flex: 0 0 100%;
  height: 2px;
  background: var(--color-border);
  margin-top: 10px;
}

/* Members filter bar: Figma-specified sizes, override member-search-* defaults */
.members-filter-inner .members-filter-input-wrap {
  flex: none;
  width: 351px;
  grid-column: auto;
  grid-row: auto;
}

.members-filter-inner .member-search-input {
  height: 45px;
  border-radius: 8px;
  border-color: #2d5357;
  padding-top: 7px;
  padding-bottom: 7px;
}

.members-filter-inner .members-filter-spec-multi {
  flex: none;
  width: 30%;
}

.members-filter-inner .members-filter-area-multi {
  flex: none;
  width: 226px;
}

.members-filter-inner .member-search-multi-trigger {
  height: 45px;
  border-radius: 8px;
  border-color: #2d5357;
  padding: 7px 12px;
}

.members-filter-inner .member-search-multi-trigger.has-selection {
  height: 45px;
  padding: 7px 12px 7px 34px;
}

.members-filter-btn-inline {
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: auto !important;
  flex: none;
  width: 182px;
  height: 45px;
  border-radius: 8px;
  padding: 7px 39px;
  white-space: nowrap;
}

.members-filter-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.members-filter-search-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.members-filter-input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  color: var(--color-text);
  background: #fff;
  outline: none;
  direction: rtl;
  text-align: right;
  transition: border-color 0.2s;
}

.members-filter-input:focus {
  border-color: var(--color-primary);
}

.members-filter-select {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  color: var(--color-text);
  background: #fff;
  outline: none;
  cursor: pointer;
  min-width: 140px;
  direction: rtl;
  transition: border-color 0.2s;
}

.members-filter-select:focus {
  border-color: var(--color-primary);
}

/* Multi-select spec dropdown */
.members-spec-multi {
  position: relative;
  flex-shrink: 0;
}

.members-spec-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  color: var(--color-text);
  background: #fff;
  cursor: pointer;
  min-width: 160px;
  direction: rtl;
  transition: border-color 0.2s;
  white-space: nowrap;
}

.members-spec-trigger:focus,
.members-spec-trigger.is-open {
  border-color: var(--color-primary);
  outline: none;
}

.members-spec-chevron {
  margin-right: auto;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.members-spec-trigger.is-open .members-spec-chevron {
  transform: rotate(180deg);
}

.members-spec-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0, 0, 0, 0.12));
  min-width: 260px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 0;
  direction: rtl;
}

.members-spec-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: var(--fs-label);
  color: var(--color-text);
  transition: background 0.15s;
  user-select: none;
}

.members-spec-option:hover {
  background: var(--color-bg, #f5f5f5);
}

.members-spec-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.members-filter-btn {
  height: 42px;
  padding: 0 28px;
  background: linear-gradient(135deg, #629498 0%, #2d5357 100%);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.members-filter-btn:hover {
  background: linear-gradient(135deg, #5a8b8f 0%, #25494d 100%);
}

/* --- Members list --- */
.members-list {
  background: transparent;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: none;
  margin: 0;
}

.members-empty {
  padding: 28px 0 48px;
  direction: rtl;
}

.members-empty-title {
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  text-align: right;
  margin: 0 0 36px;
}

.members-empty-img {
  display: block;
  margin: 0 auto;
  max-width: 200px;
  height: auto;
}

/* =========================================
   Useful Links Page
   ========================================= */

.useful-links-page {
  background-position: 0vw 20vw;
  background-size: 100% 60%;
  min-height: 70vh;
  padding-bottom: 80px;
}

.useful-links-card .members-page-title {
  margin-bottom: 0;
}

.useful-links-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
  direction: rtl;
}

.useful-links-title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  min-width: 0;
}

.useful-links-subtitle {
  grid-column: 1;
  grid-row: 2;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  text-align: right;
  margin: 0;
}

.useful-links-search-wrap {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 296px;
  height: auto;
  /* LTR box so the search icon stays on the visual left of the field */
  direction: ltr;
}

.useful-links-header .member-search-input-icon {
  left: 12px;
  right: auto;
}

.useful-links-header .member-search-input {
  direction: rtl;
  text-align: right;
  padding: 0 14px 0 36px;
}

.useful-links-sep {
  height: 2px;
  background: var(--color-border);
  margin: 20px 0 8px;
}

.useful-links-sections {
  direction: rtl;
}

.useful-links-section {
  padding-top: 20px;
}

.useful-links-section:first-child {
  padding-top: 8px;
}

.useful-links-section-title {
  font-size: var(--fs-h5);
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  text-align: right;
  margin: 0 0 4px;
}

.useful-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.useful-link-row {
  border-bottom: 2px solid var(--color-border);
}

.useful-link-row:last-child {
  border-bottom: none;
}

.useful-link-row-link {
  display: block;
  padding: 18px 4px;
  text-align: right;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.useful-link-row-link:hover,
.useful-link-row-link:focus-visible {
  background: var(--color-bg);
  outline: none;
}

.useful-link-row-link--disabled {
  cursor: default;
  opacity: 0.65;
}

.useful-link-row-link--disabled:hover,
.useful-link-row-link--disabled:focus-visible {
  background: transparent;
}

.useful-link-title {
  display: block;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 4px;
}

.useful-link-desc {
  display: block;
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.useful-links-empty {
  padding: 28px 0 48px;
  text-align: right;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  /* Stack: title → subtitle → search (full width under both). */
  .useful-links-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 12px;
  }

  .useful-links-title,
  .useful-links-subtitle,
  .useful-links-search-wrap {
    grid-column: 1;
    grid-row: auto;
  }

  .useful-links-search-wrap {
    max-width: none;
    width: 100%;
    min-width: 0;
    align-self: stretch;
  }

  .useful-links-card {
    padding: 25px 6% 25px;
  }

  .useful-link-row-link {
    padding: 14px 2px;
  }
}

/* Forms & Approvals — row actions (icons on visual left) */
.forms-approval-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  direction: rtl;
}

.forms-approval-row-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.forms-approval-row-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.forms-approval-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.forms-approval-action:hover,
.forms-approval-action:focus-visible {
  background: var(--color-bg);
  outline: none;
}

.forms-approval-action img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .forms-approval-row-inner {
    padding: 14px 2px;
    gap: 12px;
  }

  .forms-approval-row-actions {
    gap: 10px;
  }
}

/* --- Member row --- */
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 2px solid var(--color-border);
  gap: 20px;
  direction: rtl;
  transition: background 0.15s;
}

.member-row:last-child {
  border-bottom: none;
}

.member-row:hover {
  background: var(--color-bg);
}

/* Avatar + name */
.member-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  flex-shrink: 0;
}

.member-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.member-avatar-img,
.member-avatar-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.member-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-body-para);
  font-weight: var(--fw-bold);
  color: var(--color-white);
}

.member-verified-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background: #3cb371;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-info {
  text-align: right;
}

.member-name {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 3px;
}

.member-title {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  margin: 0 0 4px;
}

.member-area {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-label);
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-text);
  border-radius: 4px;
  padding: 2px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Right side meta */
.member-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.member-specs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Member list specialty tags — neutral pill (white fill, black text & border) */
.member-specs .tag,
.member-profile-specs .tag {
  background: var(--color-white);
  color: var(--color-text);
  border-color: var(--color-text);
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.member-badge {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.member-info-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
}

/* Responsive */
@media (max-width: 768px) {
  .members-filter-inner {
    flex-direction: column;
    align-items: stretch;
  }

  /* All filter tabs full width on mobile */
  .members-filter-inner .members-filter-input-wrap,
  .members-filter-inner .members-filter-spec-multi,
  .members-filter-inner .members-filter-area-multi,
  .members-filter-btn-inline {
    flex: 0 0 100%;
    width: 100%;
  }

  /* Separator still spans full width; remove extra top margin (gap handles spacing) */
  .members-filter-sep {
    margin-top: 0;
  }

  .members-card {
    padding: 25px 6% 25px;
  }
  .member-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "identity area"
      "meta meta";
    align-items: start;
    row-gap: 10px;
    column-gap: clamp(8px, 3vw, 16px);
    padding: clamp(12px, 3vw, 18px) clamp(6px, 2vw, 14px);
  }
  .member-identity,
  .member-area,
  .member-meta {
    min-width: 0;
  }
  .member-identity {
    grid-area: identity;
    align-self: center;
    min-width: 0;
    gap: clamp(8px, 2.5vw, 14px);
  }
  .member-identity .member-avatar-wrap {
    flex-shrink: 0;
  }
  .member-identity .member-avatar-img,
  .member-identity .member-avatar-placeholder {
    width: clamp(28px, 9vw, 54px);
    height: clamp(28px, 9vw, 54px);
  }
  .member-identity .member-info {
    min-width: 0;
    flex: 1 1 auto;
  }
  .member-identity .member-name,
  .member-identity .member-title {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    line-height: var(--lh-body-scale);
  }
  .member-identity .member-name {
    font-size: clamp(var(--fs-body-xs), 3.2vw, var(--fs-body-m));
  }
  .member-identity .member-title {
    font-size: clamp(var(--fs-body-xs), 2.8vw, var(--fs-body-m));
  }
  .member-area {
    grid-area: area;
    align-self: center;
    justify-self: end;
    text-align: center;
    margin: 0;
    font-size: clamp(var(--fs-body-xs), 2.8vw, var(--fs-body-m));
    line-height: var(--lh-body-scale);
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }
  .member-meta {
    grid-area: meta;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .member-specs {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
  .member-specs .tag {
    font-size: clamp(var(--fs-body-xs), 2.8vw, var(--fs-body-m));
    padding: 2px 10px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    line-height: var(--lh-body-scale);
  }
}

/* =========================================
   Member Profile Page
   ========================================= */

.member-profile-card {
  --card-px: 32px;
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--card-px) var(--card-px);
  direction: rtl;
}

.member-profile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-h3);
  line-height: 1;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: none;
  transition: color 0.15s;
}

.member-profile-close:hover {
  color: var(--color-text);
}

.member-profile-header {
  position: relative;
  /* LTR flex so the DOM order (button → identity) maps to
     "button on the visual LEFT, identity (name + avatar) pushed to the
     visual RIGHT". Empty space sits between them. */
  direction: ltr;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  /* Full-bleed: span the card from edge to edge by neutralising the parent's
     horizontal padding. Works at every breakpoint because --card-px tracks
     the card's actual padding. */
  margin: 0 calc(var(--card-px, 32px) * -1) 24px;
  padding: 18px 22px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  /* Match the card's top corners; flat at the bottom because more content follows. */
  border-radius: var(--radius-lg) var(--radius-lg);
  box-shadow: 0 4px 16px rgba(28, 76, 74, 0.1);
}

/* Left side (visual left in RTL): the edit / close button, centered in its own column */
.member-profile-edit-wrap {
  display: flex;
  align-items: start;
  justify-content: center;
  flex-shrink: 0; /* never overlap the identity column */
}

/* Right side of the header: name on the left, avatar on the right.
   RTL inside so avatar (first child) sits on the visual RIGHT and the
   name (second child) sits to its left, matching the design. */
.member-profile-header-identity {
  direction: rtl;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 0 1 auto;
  min-width: 0;
}

.member-profile-identity {
  flex: 0 1 auto;
  min-width: 0;
  direction: rtl;
  /* Inside identity-wrap (RTL), avatar is on the right; this text block sits
     to its left. Right-align the text so it hugs the avatar. */
  text-align: right;
  padding-top: 2px;
}

.member-profile-name {
  font-size: var(--fs-h3);
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0 0 4px;
}

.member-profile-office {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin: 0 0 4px;
}

.member-profile-office:empty {
  display: none;
}

.member-profile-title {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  margin: 0;
}

.member-profile-avatar-wrap {
  flex-shrink: 0;
}

.member-profile-avatar-img,
.member-profile-avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
}

.member-profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: #fff;
}

.member-profile-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.member-profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.member-profile-section-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin: 0 0 12px;
}

.member-profile-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-label);
  color: var(--color-text);
  margin-bottom: 8px;
  direction: rtl;
}

.member-profile-meta-row:last-child {
  margin-bottom: 0;
}

.member-profile-meta-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-text-muted);
}

.member-profile-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.member-profile-bio {
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-body-scale);
  white-space: pre-line;
  margin: 0;
}

@media (max-width: 600px) {
  .member-profile-card {
    --card-px: 18px;
    padding: 0 var(--card-px) 24px;
  }
  .member-profile-header {
    padding: 14px 16px;
    gap: 10px;
  }
  .member-profile-header-identity {
    gap: 10px;
  }
  .member-profile-name {
    font-size: var(--fs-h4);
  }
  .member-profile-avatar-img,
  .member-profile-avatar-placeholder {
    width: 56px;
    height: 56px;
  }
  .member-profile-avatar-placeholder {
    font-size: var(--fs-h4);
  }
  .member-profile-edit-btn {
    padding: 6px 12px;
    font-size: var(--fs-body-xs);
  }
}

@media (max-width: 400px) {
  .member-profile-avatar-img,
  .member-profile-avatar-placeholder {
    width: 44px;
    height: 44px;
  }
  .member-profile-name {
    font-size: var(--fs-body);
  }
}

/* =========================================
   Benefits Archive Page
   ========================================= */

.benefits-archive-page {
  background-color: var(--color-bg);
  background-position: 0vw 10vw;
  background-size: 100% 70%;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
}

.benefits-archive-page .container {
  position: relative;
  z-index: 1;
}

.benefits-header {
  text-align: center;
  padding: 64px 0 48px;
}

.benefits-archive-title {
  font-size: clamp(var(--fs-h3), 3vw, var(--fs-h2));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0 0 12px;
}

.benefits-archive-sub {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  margin: 0;
}

/* Shared empty-state card — see also page-component-showcase.php for usage */
.empty-state-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 56px 24px;
  text-align: center;
  overflow: hidden;
}
.empty-state-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.9;
}
.empty-state-deco--side-right {
  right: -36px;
  top: 30%;
  width: 110px;
  transform: rotate(180deg);
}
.empty-state-deco--top-left {
  left: 20%;
  top: -38px;
  width: 90px;
}
.empty-state-deco--bottom-left {
  left: -42px;
  bottom: -32px;
  width: 130px;
}
.empty-state-text {
  font-size: var(--fs-body-l);
  font-weight: var(--fw-medium);
  color: var(--color-primary, #1c4c4a);
  margin: 0 0 18px;
  position: relative;
}
.empty-state-cta {
  display: inline-block;
  padding: 12px 36px;
  background: var(--color-button, linear-gradient(135deg, #629498, #2d5357));
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: var(--fs-body-m);
  font-weight: var(--fw-medium);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.empty-state-cta:hover {
  background: var(
    --color-button-hover,
    linear-gradient(135deg, #5a8b8f, #25494d)
  );
  color: #fff;
}

/* Benefits archive — partner logos: contain (don't crop) on the colored panel */
.benefits-archive-page .event-card-thumbnail--logo .event-thumb-img {
  object-fit: contain;
  padding: 24px;
}
/* Benefits archive — uploaded images: fill the thumbnail, like an event photo */
.benefits-archive-page .event-card-thumbnail--image .event-thumb-img {
  object-fit: cover;
  padding: 0;
}

/* 3-column grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Benefits cards — all card bodies same height, centered content */
.benefits-grid .event-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.benefits-grid .event-card-body {
  flex: 1;
  min-height: 249px;
  padding: clamp(20px, 4vw, 37px) clamp(20px, 5vw, 63px);
  text-align: center;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 101%;
  transform: translateY(-55px);
}

.benefits-grid .event-card-title-link {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
}

.benefits-grid .event-card-title {
  text-align: center;
  font-size: clamp(var(--fs-body-m), 2.4vw, var(--fs-h5));
  line-height: var(--lh-h4);
  margin: 0;
  word-break: normal;
  overflow-wrap: normal;
}

.benefits-grid .event-card-description {
  text-align: start;
  font-size: clamp(var(--fs-body-s), 1.5vw, var(--fs-body-m));
  margin: 0;
  width: 100%;
}

/* Extra breathing room between title and "לפרטים נוספים" */
.benefits-grid .ymas-card__more {
  margin-top: clamp(72px, 9vw, 112px);
}

@media (max-width: 768px) {
  .benefits-grid .ymas-card__more {
    margin-top: clamp(56px, 12vw, 80px);
  }
}

.benefit-partner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #003b7a;
  color: var(--color-white);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

/* =========================================
   Single Benefit Page
   ========================================= */

.site-main.benefit-single-page,
.site-main.press-single-page {
  background: white;
  background-image: none;
  flex: 1 0 auto;
  overflow-x: hidden;
}

/* Hide the cream body band on benefit single pages (same as inner-page pattern). */
body:has(.site-main.benefit-single-page),
body:has(.site-main.press-single-page) {
  background: var(--color-white);
}

.benefit-single-hero {
  background: white;
  padding: 60px 0px;
}

.benefit-single-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  direction: ltr;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 320px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* Content card (right in RTL) */
.benefit-single-content {
  flex: 1;
  padding: 40px 32px 20px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  direction: rtl;
  position: relative;
  z-index: 2;
  border-top-right-radius: 100px;
  border-bottom-left-radius: 100px;
  background-color: white;
  overflow: hidden;
  box-shadow: -14px 0px 13px 2px rgba(0, 0, 0, 0.04);
  transform: translateY(-8px) translatex(102px) scale(0.8);
  transition: all 0.3s;
  width: 98%;
}

.benefit-single-title {
  font-size: clamp(var(--fs-h5), 2.5vw, var(--fs-h3));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  line-height: var(--lh-h4);
  margin: 0 0 20px;
}

.benefit-single-excerpt {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0;
}

.benefit-single-date {
  display: block;
  margin-top: auto;
  padding-top: 8px;
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  text-align: start;
  flex-shrink: 0;
}

/* Press single hero card — desktop date visible, tighter internal spacing */
.press-single-page .benefit-single-content {
  overflow: visible;
  gap: 35px;
}

.press-single-page .benefit-single-content .benefit-single-title {
  margin-bottom: 0;
}

.press-single-page .benefit-single-date {
  margin-top: auto;
  padding-top: 4px;
}

/* Image panel (left in RTL) */
.benefit-single-image-wrap {
  position: relative;
  z-index: 1;
  width: 380px;
  flex-shrink: 0;
  overflow: hidden;
  height: 302px;
  border-radius: 10px;
  direction: rtl;
}

.benefit-single-img {
  width: 100%;
  height: 100%;
  display: block;
}
/* Logo mode — full logo on white plate (matches archive benefit cards) */
.benefit-single-image-wrap--logo {
  background-color: var(--color-white);
}

.benefit-single-image-wrap--logo .benefit-single-img {
  object-fit: contain;
  object-position: center;
  padding: clamp(20px, 8%, 36px);
  box-sizing: border-box;
}

/* Image mode — photo fills the panel */
.benefit-single-image-wrap--image .benefit-single-img {
  object-fit: cover;
  object-position: center;
  padding: 0;
}

.benefit-partner-badge--single {
  top: 14px;
  right: auto;
  left: 14px;
}

/* Body content section */
.benefit-single-body {
  padding: 0px 0 72px;
  background: var(--color-white);
}

.benefit-body-content {
  width: 100%;
  margin: 0 0 100px;
  text-align: right;
  direction: rtl;
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-body-scale);
}

.benefit-body-content p {
  margin-bottom: 24px;
}

/* Press article body — inset matches inner “אודות” pages; padding on container, not each paragraph */
.press-single-page .benefit-body-content {
  padding-inline: 19%;
}

.benefit-cta-wrap {
  text-align: center;
}

.benefit-cta-btn {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 14px 48px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
}

.benefit-cta-btn:hover {
  background: var(--color-primary-dark);
}

/* Responsive */
@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .benefits-grid .event-card-description {
    margin-right: clamp(20px, 8vw, 60px);
  }
  /* Stack image-above-card to match the archive .event-card pattern.
     The PHP template puts .benefit-single-content first in DOM order, so
     column-reverse is required to visually place the image on top.
     Press single has its own hero rules — exclude it here. */
  .benefit-single-page:not(.press-single-page) .benefit-single-inner {
    flex-direction: column-reverse;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    min-height: 0;
    overflow: visible;
  }
  .benefit-single-page:not(.press-single-page) .benefit-single-image-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16/10;
    flex-shrink: 1;
    border-radius: 10px;
  }
  .benefit-single-page:not(.press-single-page) .benefit-single-content {
    width: 100%;
    padding: 40px 32px 20px 32px;
    transform: translateY(-50px);
    border-radius: 100px 5px;
    box-shadow: 8px 8px 30px 0 rgba(50, 50, 50, 0.1);
  }
}

/* =========================================
   Media / Press Archive (page-from-media.php)
   ========================================= */

.media-archive-page {
  background-color: var(--color-bg);
  background-position: 0vw 10vw;
  background-size: 100% 70%;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
}

.media-archive-page .container {
  position: relative;
  z-index: 1;
}

.media-header {
  text-align: center;
  padding: 64px 0 48px;
}

.media-archive-title {
  font-size: clamp(var(--fs-h3), 3vw, var(--fs-h2));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0 0 12px;
}

.media-archive-sub {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  margin: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.media-grid .event-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-grid .event-card-thumbnail--image .event-thumb-img {
  object-fit: cover;
  padding: 0;
}

.media-grid .event-card-body {
  flex: 1;
  min-height: 220px;
  padding: clamp(20px, 4vw, 37px) clamp(20px, 5vw, 48px);
  text-align: right;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  width: 101%;
  box-sizing: border-box;
  overflow: hidden;
  transform: translateY(-55px);
}

/* Keep text inside the rounded card without changing card shape */
.media-grid .event-card-title-link,
.media-grid .event-card-title,
.media-grid .event-card-description,
.media-grid .event-card-meta {
  max-width: 100%;
  min-width: 0;
}

.media-grid .event-card-title {
  font-size: clamp(var(--fs-body-l), 2vw, var(--fs-h4));
}

.media-grid .event-card-description {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.media-grid .event-card-meta {
  display: flex;
  margin-top: auto;
  width: 100%;
  justify-content: flex-start;
}

.media-grid .event-card-meta-item {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-label);
  color: var(--color-text-muted);
}

.empty-state-sub {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0;
  max-width: 420px;
  margin-inline: auto;
  position: relative;
}

.media-empty-state .empty-state-text {
  margin-bottom: 10px;
}

.media-single-back {
  margin-top: 8px;
  padding-bottom: 48px;
  text-align: center;
}

.media-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  text-decoration: none;
  transition: gap 0.2s;
}

.media-back-link:hover {
  gap: 10px;
  color: var(--color-primary-dark);
}

@media (max-width: 1024px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .media-header {
    padding: 48px 0 36px;
  }

  .media-grid .event-card-body {
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    transform: translateY(-48px);
    padding: clamp(18px, 3.5vw, 32px) clamp(18px, 4vw, 40px);
  }

  /* Press single (תקשורת) — stacked hero, full-bleed image, overlapping title card */
  .press-single-page .benefit-single-hero {
    padding: 0 0 40px;
  }

  .press-single-page .benefit-single-hero .container {
    padding-inline: 0;
    max-width: 100%;
  }

  .press-single-page .benefit-single-inner {
    flex-direction: column-reverse;
    max-width: 100%;
    width: 100%;
    margin-inline: 0;
    min-height: 0;
    overflow: visible;
  }

  .press-single-page .benefit-single-image-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    flex-shrink: 1;
    border-radius: 0;
    aspect-ratio: 430 / 289;
    overflow: hidden;
  }

  .press-single-page .benefit-single-image-wrap--image .benefit-single-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .press-single-page .benefit-single-content {
    flex: 0 0 auto;
    width: min(398px, calc(100% - 32px));
    max-width: min(398px, calc(100% - 32px));
    margin-inline: auto;
    padding: 32px;
    gap: 12px;
    justify-content: flex-start;
    transform: translateY(-50px);
    transform-origin: center bottom;
    border-top-right-radius: 60px;
    border-bottom-left-radius: 60px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 2px 2px 15px 0 rgba(50, 50, 50, 0.25);
    overflow: hidden;
  }

  .press-single-page .benefit-single-date {
    margin-top: 0;
    padding-top: 0;
  }

  .press-single-page .benefit-single-body {
    padding-top: 24px;
  }

  /* Tablet only — scale up title card, not the image */
  @media (min-width: 601px) {
    .press-single-page .benefit-single-content {
      transform: translateY(40px) scale(1.7);
    }

    .press-single-page .benefit-single-hero {
      padding-bottom: 80px;
    }

    .press-single-page .benefit-single-body {
      padding-top: 48px;
    }
  }

  .press-single-page .benefit-body-content {
    padding-inline: clamp(16px, 5vw, 48px);
  }

  /* מידע שימושי — tablet */
  .useful-links-page,
  .professional-info-page {
    padding-bottom: 56px;
  }

  .members-container {
    padding-top: 32px;
  }

  .useful-links-card {
    padding: 24px clamp(16px, 4vw, 28px) 12px;
  }
}

@media (max-width: 768px) {
  .media-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .media-header {
    padding: 36px 0 28px;
  }

  .media-archive-page {
    padding-bottom: 48px;
  }

  .media-grid .event-card-body {
    width: 100%;
    min-height: 0;
    transform: translateY(-40px);
    padding: clamp(16px, 4vw, 28px) clamp(16px, 5vw, 32px);
    overflow: hidden;
    box-sizing: border-box;
  }

  .media-grid .event-card-description {
    margin-inline-end: clamp(12px, 6vw, 40px);
  }

  .press-single-page .benefit-single-hero {
    padding-bottom: 72px;
  }

  .press-single-page .benefit-single-body {
    padding: 20px 0 48px;
  }

  .press-single-page .benefit-body-content {
    padding-inline: 16px;
  }

  .press-single-page .benefit-body-content .wp-block-embed,
  .press-single-page .benefit-body-content .wp-block-video,
  .press-single-page .benefit-body-content iframe {
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .press-single-page .media-single-back {
    padding-inline: 16px;
  }
}

@media (max-width: 600px) {
  .media-header {
    padding: 28px 0 24px;
  }

  .media-archive-page .empty-state-card {
    padding: 40px 20px;
  }

  .media-grid .event-card-body {
    transform: translateY(-36px);
    padding: clamp(16px, 4vw, 24px) clamp(14px, 4vw, 28px);
  }

  .press-single-page .benefit-body-content {
    padding-inline: 12px;
  }

  .press-single-page .benefit-single-hero {
    padding-bottom: 40px;
  }

  .press-single-page .media-single-back {
    padding-inline: 12px;
  }
}

@media (max-width: 400px) {
  .media-grid .event-card-body {
    transform: translateY(-30px);
    padding: 16px 14px 14px;
  }

  .media-grid .event-card-description {
    margin-inline-end: clamp(8px, 4vw, 24px);
  }

  .press-single-page .benefit-single-content {
    width: min(398px, calc(100% - 16px));
    max-width: min(398px, calc(100% - 16px));
    padding: 28px 24px;
    transform: translateY(-36px) scale(1);
    border-top-right-radius: 48px;
    border-bottom-left-radius: 48px;
  }

  .press-single-page .benefit-single-hero {
    padding-bottom: 36px;
  }

  .press-single-page .benefit-body-content {
    padding-inline: 8px;
  }

  .press-single-page .media-single-back {
    padding-inline: 8px;
  }
}

/* =========================================
   Professional Info Page (page-professional-info.php)
   ========================================= */
.site-main.professional-info-page {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  background-image: none;
  flex: 1 0 auto;
}

body:has(.site-main.professional-info-page) {
  background: var(--color-white);
}

.professional-info-page .benefit-single-body {
  position: relative;
  z-index: 1;
  padding: 56px 0 72px;
  background: transparent;
}

.professional-info-page .container {
  position: relative;
  z-index: 1;
}

/* Decorative gold rings — page margins, outside the content frame */
.pi-bg-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.pi-bg-circle {
  position: absolute;
  width: 142px;
  height: auto;
  display: block;
}

.pi-bg-circle--1 {
  width: 140px;
  top: 52%;
  left: -40px;
  transform: scaleX(-1);
}

.pi-bg-circle--2 {
  width: 140px;
  top: 22%;
  right: -40px;
}

.pi-bg-circle--3 {
  top: 45%;
  right: 1%;
}

/* Page column — 997px max, title card + body stacked */
.professional-info-layout {
  max-width: 997px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  direction: rtl;
}

/* Title card — Figma 997×302, radius 5/100/5/100, padding 40/32, gap 23, shadow-card */
.professional-info-title-card {
  width: 100%;
  max-width: 997px;
  min-height: 302px;
  margin: 0 auto;
  padding: 40px 32px;
  box-sizing: border-box;
  background: var(--color-white);
  border-radius: 5px 100px 5px 100px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 23px;
  text-align: center;
  direction: rtl;
}

.professional-info-title {
  font-size: clamp(var(--fs-h5), 2.8vw, var(--fs-h3));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  line-height: var(--lh-h4);
  margin: 0;
  max-width: 100%;
}

.professional-info-subtitle {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0;
  max-width: 100%;
}

.professional-info-content {
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-body-scale);
  text-align: right;
  width: 100%;
  margin-bottom: 100px;
}

.professional-info-content p {
  margin: 0 0 23px;
}

.professional-info-content p:last-child {
  margin-bottom: 0;
}

/* Match press single spacing; link centered in the 997px column */
.professional-info-page .media-single-back {
  max-width: 997px;
  margin: 8px auto 0;
  padding-bottom: 48px;
  text-align: center;
}

@media (max-width: 1024px) {
  .professional-info-page .benefit-single-body {
    padding: 40px 0 56px;
  }

  .professional-info-layout {
    padding-inline: clamp(16px, 4vw, 24px);
  }

  .professional-info-title-card {
    min-height: 200px;
    padding: 32px 24px;
    border-radius: 5px 72px 5px 72px;
    gap: 20px;
  }

  .professional-info-content {
    margin-bottom: 72px;
  }

  .pi-bg-circle--1 {
    width: 100px;
    left: -28px;
  }

  .pi-bg-circle--2 {
    width: 100px;
    right: -28px;
  }

  .pi-bg-circle--3 {
    width: 110px;
    right: 0;
  }
}

@media (max-width: 768px) {
  .professional-info-page .benefit-single-body {
    padding: 32px 0 48px;
  }

  .professional-info-layout {
    gap: 28px;
    padding-inline: 16px;
  }

  .professional-info-title-card {
    min-height: 160px;
    padding: 24px 16px;
    border-radius: 5px 48px 5px 48px;
    gap: 16px;
  }

  .professional-info-content {
    margin-bottom: 64px;
    padding-inline: 8px;
  }

  .professional-info-page .media-single-back {
    padding-inline: 16px;
  }

  .pi-bg-circle {
    opacity: 0.7;
  }
}

@media (max-width: 600px) {
  .professional-info-page .benefit-single-body {
    padding: 24px 0 40px;
  }

  .professional-info-layout {
    gap: 24px;
    padding-inline: 8px;
  }

  .professional-info-title-card {
    min-height: 140px;
    padding: 20px 16px;
    border-radius: 5px 40px 5px 40px;
    gap: 12px;
  }

  .professional-info-content {
    margin-bottom: 48px;
    padding-inline: 8px;
  }

  .pi-bg-circle {
    opacity: 0.6;
  }

  .pi-bg-circle--1 {
    width: 72px;
    left: -20px;
    top: 48%;
  }

  .pi-bg-circle--2 {
    width: 72px;
    top: 10%;
    right: -20px;
  }

  .pi-bg-circle--3 {
    width: 72px;
    top: 62%;
    right: -4px;
  }
}

/* =========================================
   Inner Page (page-inner.php)
   ========================================= */
/* Inner pages (אודות הלשכה and its sub-pages) — no global background */
.site-main.inner-page {
  background-image: none;
  background-color: white;
  padding: 4% 19%;
}

/* Hide the cream body band that shows under main when the page is short
   (`.site-footer { margin-top: auto; }` pushes the footer to the viewport bottom). */
body:has(.site-main.inner-page) {
  background: var(--color-white);
}

.inner-hero {
  background: transparent;
  padding: 56px 0 72px;
  direction: rtl;
}

/* Card — contains circles + text, overflow hidden clips circles at card boundary */
.inner-hero-card {
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    linear-gradient(0deg, #e3d2ad 0%, #f2eada 0%);
  border-radius: 8px 100px;
  padding: 40px 132px;
  width: 100%;
  text-align: right;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  direction: rtl;
  min-height: 197px;
}

/* Circles container — anchored to the visual-left inside the card */
.inner-hero-circles {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  height: 100%;
  pointer-events: none;
}

/* Large ring (top) — upper-left, partially cut by the card's top + left edges */
.inner-hero-circle-ring {
  position: absolute;
  width: 220px;
  height: auto;
  top: -20px;
  left: -6px;
  display: block;
}

/* Small arc (bottom) — lower-left, partially cut by the card's bottom + left edges */
.inner-hero-circle-fill {
  position: absolute;
  width: 160px;
  height: auto;
  bottom: -37px;
  left: -30px;
  display: block;
}

/* Text pushed right so circles don't overlap it */
.inner-hero-text {
  padding-left: 20%;
  direction: rtl;
}

.inner-hero-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
  margin-bottom: 16px;
}

.inner-hero-sub {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0;
}

.inner-content {
  direction: rtl;
}

.inner-content-inner {
  margin: 0 auto;
}

.inner-content-inner p {
  font-size: var(--fs-body);
  line-height: var(--lh-body-scale);
  color: var(--color-text);
  margin-bottom: 28px;
  text-align: right;
}

/* About-page topic grid — leaf border + proportional sizing like .ymas-card--quick */
.about-topics {
  padding: clamp(24px, 4vw, 48px) 0;
  direction: rtl;
}

.about-topics-title {
  font-size: clamp(20px, 2.2vw, var(--fs-h3));
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  text-align: right;
  margin: 0 0 clamp(16px, 2.5vw, 28px);
}

.about-topics-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Desktop: one row of 4 topic cards */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  align-items: start;
  width: 100%;
}

.about-topic-card {
  min-width: 0;
  width: 100%;
  aspect-ratio: 314 / 280;
  container-type: inline-size;
  container-name: about-topic;
  background: var(--color-white);
  border: 2px solid var(--color-primary-light);
  /*
   * Softer leaf than homepage quick cards (22% vs 32%) so normal padding
   * and readable type clear the border line without a huge empty inset.
   */
  border-radius: 22% 1.6% 22% 1.6%;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  box-sizing: border-box;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.about-topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
}

.about-topic-link {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 4.5cqi, 14px);
  /* Light inset — clears the 22% leaf curve without eating the card */
  padding: clamp(14px, 7%, 20px) clamp(14px, 8%, 22px);
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
}

.about-topic-title {
  font-size: clamp(16px, 9cqi, 24px);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  margin: 0;
  line-height: 1.25;
  flex: 0 0 auto;
}

.about-topic-excerpt {
  font-size: clamp(13px, 5.8cqi, 16px);
  line-height: 1.45;
  color: var(--color-text-muted);
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.about-topic-cta {
  font-size: clamp(13px, 5.2cqi, 15px);
  font-weight: var(--fw-bold);
  color: var(--color-accent);
  margin-top: auto;
  flex: 0 0 auto;
}

/* Below large desktop: 2×2 so cards stay readable; height follows aspect-ratio */
@media (max-width: 1200px) {
  .about-topics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-topic-excerpt {
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

@media (max-width: 600px) {
  .about-topics-grid {
    gap: 10px;
  }

  .about-topic-excerpt {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

/* =========================================
   Role Holders Page (page-role-holders.php)
   ========================================= */
.role-holders-page,
.inquiries-page {
  direction: rtl;
  position: relative;
  overflow: hidden;
}

/* Decorative half-circle rings scattered across the page background */
.rh-bg-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.rh-bg-circle {
  position: absolute;
  width: 200px;
  height: auto;
  opacity: 0.85;
}
.rh-bg-circle--1 {
  top: 38%;
  right: -3%;
  transform: rotate(90deg);
}
.rh-bg-circle--2 {
  top: 58%;
  left: -3%;
  transform: rotate(270deg);
}
.rh-bg-circle--3 {
  top: 46%;
  left: 92%;
  width: 160px;
}
.role-holders-page > .container,
.role-holders-page > section,
.inquiries-page > .container,
.inquiries-page > section {
  position: relative;
  z-index: 1;
}

/* Gold variant — uses portrait-orientation gold-half-circle.png (118×213)
   and gold-full-circle.png (164×162). The gold half-circles are already
   tall/oriented, so no rotation is needed. */
.rh-bg-circles.is-gold .rh-bg-circle {
  opacity: 1;
}
.rh-bg-circles.is-gold .rh-bg-circle--1 {
  width: 140px;
  top: 6%;
  right: -40px;
  left: auto;
  transform: none;
}
.rh-bg-circles.is-gold .rh-bg-circle--2 {
  width: 140px;
  top: 19%;
  left: -40px;
  right: auto;
  transform: scaleX(-1); /* mirror so the curve faces inward from the left */
}
.rh-bg-circles.is-gold .rh-bg-circle--3 {
  width: 142px;
  top: 3%;
  left: 90%;
  right: auto;
  transform: none;
}

@media (max-width: 900px) {
  .rh-bg-circles.is-gold .rh-bg-circle--1 {
  }
  .rh-bg-circles.is-gold .rh-bg-circle--2 {
    width: 90px;
  }
  .rh-bg-circles.is-gold .rh-bg-circle--3 {
    width: 80px;
  }
}

@media (max-width: 600px) {
  .rh-bg-circles.is-gold .rh-bg-circle--1 {
    width: 64px;
    right: 0px;
  }
  .rh-bg-circles.is-gold .rh-bg-circle--2 {
    width: 64px;
    top: 13%;
    right: 85%;
  }
  .rh-bg-circles.is-gold .rh-bg-circle--3 {
    width: 56px;
  }
}

.rh-hero {
  padding: 60px 0 40px;
  text-align: center;
}

.rh-hero-title {
  font-size: var(--fs-h2-5);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: 16px;
}

.rh-hero-sub {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0;
}

.rh-grid-section {
  padding: 40px 0 80px;
}

.rh-grid-section + .rh-grid-section {
  padding-top: 0;
}

.rh-table-section {
  padding: 0 0 80px;
}

.rh-grid-section + .rh-table-section,
.rh-table-section + .rh-table-section,
.rh-table-section:first-of-type {
  padding-top: 0;
}

.rh-roles-table {
  margin-top: 0;
}

.rh-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 32px;
}

.rh-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rh-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: var(--color-accent-light);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.rh-name {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 4px;
}

.rh-role {
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  margin: 0;
}

.rh-email {
  margin: 6px 0 0;
  font-size: var(--fs-label);
}
.rh-email a {
  color: var(--color-primary);
  text-decoration: none;
}
.rh-email a:hover {
  text-decoration: underline;
}

.rh-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}

/* ---- Branches / institutions table ---- */
.branches-intro {
  font-size: var(--fs-body);
  color: var(--color-text);
  margin: 0 0 24px;
}
.branches-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  background: var(--color-white);
  box-shadow: var(--shadow-sm, 0 1px 8px rgba(28, 76, 74, 0.06));
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}
.branches-table thead th {
  background: var(--color-primary-dark);
  color: var(--color-white);
  font-family: inherit;
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  text-align: right;
  padding: 16px 20px;
  letter-spacing: 0.02em;
}
.branches-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.15s;
}
.branches-table tbody tr:last-child {
  border-bottom: 0;
}
.branches-table tbody tr:nth-child(even) {
  background: var(--color-bg-light);
}
.branches-table tbody tr:hover {
  background: var(--color-bg);
}
.branches-table .branches-cell {
  padding: 14px 20px;
  vertical-align: top;
  font-size: var(--fs-body);
  color: var(--color-text);
  text-align: right;
  line-height: 1.5;
}
.branches-table .branches-cell--name {
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
  white-space: nowrap;
}
.branches-chair-line {
  display: block;
}
.branches-chair-line + .branches-chair-line {
  margin-top: 4px;
}
.branches-email-line {
  display: block;
}
.branches-email-line + .branches-email-line {
  margin-top: 4px;
}
.branches-email-line a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.branches-email-line a:hover {
  border-bottom-color: var(--color-primary);
}
@media (max-width: 640px) {
  .branches-table thead {
    display: none;
  }
  .branches-table,
  .branches-table tbody,
  .branches-table tr,
  .branches-table td,
  .branches-table th {
    display: block;
    width: 100%;
  }
  .branches-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .branches-table .branches-cell {
    padding: 4px 0;
    white-space: normal;
  }
  .branches-table .branches-cell--name {
    font-size: 17px;
    margin-bottom: 4px;
  }
}

/* ---- President feature block ---- */
.rh-president-section {
  padding: 32px 0 8px;
}
.rh-president {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.rh-president-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: var(--color-accent-light);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 16px;
}
.rh-president-body {
  max-width: 760px;
}
.rh-president-name {
  margin: 0 0 4px;
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}
.rh-president-role {
  margin: 0 0 16px;
  font-size: var(--fs-label);
  color: var(--color-text-muted);
}
.rh-president-intro {
  margin: 0 0 16px;
  color: var(--color-text);
  font-weight: var(--fw-medium);
}
@media (min-width: 1025px) {
  .rh-president-intro {
    padding: 18px 110px 43px;
  }
}
.rh-president-bio {
  color: var(--color-text);
  font-size: var(--fs-body);
  line-height: 1.7;
  text-align: right;
}
.rh-president-bio > :last-child {
  margin-bottom: 0;
}
.rh-president-bio p {
  margin: 0 0 1em;
}
.rh-president-bio ul {
  list-style-type: disc;
  margin: 0 0 1em;
  padding-inline-start: 1.4em;
}
.rh-president-bio ol {
  list-style-type: decimal;
  margin: 0 0 1em;
  padding-inline-start: 1.4em;
}
.rh-president-bio ul ul,
.rh-president-bio ol ol,
.rh-president-bio ul ol,
.rh-president-bio ol ul {
  margin-top: 0.35em;
  margin-bottom: 0;
}
.rh-president-bio li {
  margin-bottom: 0.35em;
}
.rh-president-bio li:last-child {
  margin-bottom: 0;
}
.rh-president-bio blockquote {
  margin: 0 0 1em;
  padding-inline-start: 1em;
  border-inline-start: 3px solid var(--color-border);
  color: var(--color-text-muted);
}
.rh-president-bio strong {
  font-weight: var(--fw-bold);
}
.rh-president-bio em {
  font-style: italic;
}
.rh-president-bio h2,
.rh-president-bio h3,
.rh-president-bio h4 {
  margin: 0 0 1em;
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
}
.rh-president-bio h2 {
  font-size: var(--fs-h3);
}
.rh-president-bio h3 {
  font-size: var(--fs-h4);
}
.rh-president-bio h4 {
  font-size: var(--fs-body);
}
.rh-president-bio a {
  color: var(--color-primary);
  text-decoration: underline;
}
.rh-president-bio a:hover {
  text-decoration: none;
}
.rh-president-email {
  margin-top: 12px;
}
.rh-president-email a {
  color: var(--color-primary);
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.rh-president-email a:hover {
  text-decoration: underline;
}

.rh-grid-title {
  margin: 48px 0 24px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary-dark);
  text-align: center;
}

@media (max-width: 520px) {
  .rh-president-photo {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 900px) {
  .rh-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .inner-hero-text {
    padding-left: 0;
  }
  /* Shrink the half-circle decorations so they keep appearing on mobile
     without overpowering the card content. */
  .inner-hero-circles {
    width: 130px;
  }
  .inner-hero-circle-ring {
    width: 130px;
    top: -15px;
    left: -10px;
  }
  .inner-hero-circle-fill {
    width: 90px;
    bottom: -24px;
    left: -18px;
  }
}

@media (max-width: 600px) {
  .inner-hero-circles {
    width: 90px;
  }
  .inner-hero-circle-ring {
    width: 95px;
    top: -10px;
    left: -8px;
  }
  .inner-hero-circle-fill {
    width: 65px;
    bottom: -18px;
    left: -14px;
  }
}

@media (max-width: 520px) {
  .rh-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }
  .rh-avatar {
    width: 100px;
    height: 100px;
  }
}

/* =========================================
   Mobile / tablet adjustments for all
   inner pages under "אודות" + role-holders
   ========================================= */
@media (max-width: 1024px) {
  .site-main.inner-page {
    padding: 24px 20px;
  }
  .inner-hero {
    padding: 24px 0 32px;
  }
  .inner-hero-card {
    padding: 28px 28px;
    border-radius: 8px 60px;
    min-height: 0;
  }
  .inner-hero-title {
    font-size: var(--fs-h3);
  }
  .inner-content {
    padding: 32px 0 40px;
  }
  .about-topics {
    padding: 24px 0 48px;
  }
  .about-topics-title {
    font-size: var(--fs-h3);
    margin: 0 0 20px;
  }
  /* Role-holders page decorations: shrink and dim so they don't overpower
     the small viewport. */
  .rh-bg-circle {
    width: 120px;
    opacity: 0.55;
  }
  .rh-bg-circle--3 {
    width: 90px;
  }
  .rh-hero {
    padding: 24px 0 16px;
  }
  .rh-hero-title {
    font-size: var(--fs-h2-5);
  }
}

@media (max-width: 600px) {
  .site-main.inner-page {
    padding: 16px 14px;
  }
  .inner-hero-card {
    padding: 20px 20px;
    border-radius: 8px 40px;
  }
  .inner-hero-title {
    font-size: var(--fs-h4);
    line-height: 1.25;
  }
  .inner-hero-sub {
    font-size: var(--fs-body-s);
  }
  .inner-content {
    padding: 24px 0 32px;
  }
  .inner-content-inner p {
    font-size: var(--fs-body-s);
    margin-bottom: 18px;
  }
  .about-topics-title {
    font-size: var(--fs-h4);
    margin: 0 0 16px;
  }
  /* Branches table cells in compact stacked layout */
  .branches-table tbody td,
  .branches-table tbody th {
    padding-inline: 0;
  }
  /* Role-holders */
  .rh-bg-circle {
    width: 90px;
    opacity: 0.45;
  }
  .rh-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 14px;
  }
  .rh-avatar {
    width: 88px;
    height: 88px;
  }
  .rh-president-photo {
    width: 120px;
    height: 120px;
  }
  .rh-hero-title {
    font-size: var(--fs-h3);
  }
  .rh-grid-title {
    margin: 24px 0 16px;
    font-size: var(--fs-h3);
  }
}

@media (max-width: 400px) {
  .rh-grid {
    grid-template-columns: 1fr;
  }
  .inner-hero-card {
    padding: 16px 16px;
  }
}

/* =========================================
   Membership Page (page-membership.php)
   ========================================= */
.membership-page {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  background: var(--color-white);
  direction: rtl;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px 80px;
}

/* Diagonal gold-stripe background — left side */
.membership-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  pointer-events: none;
}

.membership-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
}

/* The "paper" card */
.membership-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-drop);
  padding: 32px 40px 40px;
  position: relative;
  direction: rtl;
}

.membership-close {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: var(--fs-body-para);
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: var(--lh-h5);
  padding: 4px 8px;
}

.membership-close:hover {
  color: var(--color-text);
}

.membership-card-title {
  font-size: var(--fs-lead);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  text-align: right;
  margin-bottom: 28px;
}

/* Form sections */
.mf-section {
  margin-bottom: 28px;
}

.mf-section-title {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  text-align: right;
  margin-bottom: 6px;
}

.mf-divider {
  height: 1px;
  background: var(--color-border);
  margin-bottom: 20px;
}

/* Rows */
.mf-row {
  display: grid;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.mf-cols-1 {
  grid-template-columns: 1fr;
}
.mf-cols-2 {
  grid-template-columns: 1fr 1fr;
}
.mf-cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Right-only row: only fills the right column */
.mf-right-only {
  grid-template-columns: 1fr 1fr;
}

.mf-right-only .mf-col-right {
  grid-column: 2 / 3;
}

/* Fields */
.mf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mf-field label {
  font-size: var(--fs-label);
  color: var(--color-text);
  text-align: right;
}

.mf-star {
  color: var(--color-text);
}

.mf-field input,
.mf-field select {
  height: 38px;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: var(--fs-label);
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-white);
  text-align: right;
  direction: rtl;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.mf-field input:focus,
.mf-field select:focus {
  border-color: var(--color-primary-light);
}

/* Red on invalid */
.mf-field.is-invalid input,
.mf-field.is-invalid select,
.mf-field.is-invalid .mf-multiselect,
.mf-field.is-invalid .mf-multiselect-wrap > .mf-multiselect {
  border: 2px solid #d94040;
}

.mf-field-error {
  display: inline-block;
  font-size: var(--fs-body-xs);
  color: #d94040;
  font-weight: var(--fw-medium);
  margin-inline-start: 6px;
}

/* Select wrapper with custom arrow */
.mf-select-wrap {
  position: relative;
}

.mf-select-arrow {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Date placeholder style */
.mf-date::placeholder {
  color: var(--color-text-muted);
  letter-spacing: 1px;
}

/* Multi-select */
.mf-multiselect-wrap {
  position: relative;
}

.mf-multiselect {
  min-height: 38px;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: var(--fs-label);
  color: var(--color-text);
  background: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  position: relative;
  direction: rtl;
  user-select: none;
}

.mf-multiselect-placeholder {
  color: var(--color-text-muted);
  font-size: var(--fs-label);
  flex: 1;
  text-align: right;
}

.mf-multiselect-arrow {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  transition: transform 0.2s;
}

.mf-multiselect.is-open .mf-multiselect-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Selected tags inside trigger */
.mf-multiselect-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}

.mf-tag {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: var(--fs-label);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.mf-tag-remove {
  cursor: pointer;
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  line-height: var(--lh-h5);
}

.mf-tag-remove:hover {
  color: var(--color-text);
}

/* +N overflow badge */
.mf-tag-more {
  background: var(--color-primary-light);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: var(--fs-label);
}

/* Dropdown panel */
.mf-multiselect-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  background: var(--color-white);
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  direction: rtl;
}

.mf-multiselect-dropdown.is-open {
  display: block;
}

.mf-multiselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: var(--fs-label);
  color: var(--color-text);
  text-align: right;
  direction: rtl;
}

.mf-multiselect-option:hover {
  background: var(--color-bg);
}

.mf-multiselect-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary-light);
  cursor: pointer;
  border-radius: 3px;
}

/* Submit */
.mf-submit-row {
  text-align: center;
  margin-top: 28px;
}

.mf-submit {
  min-width: 140px;
  padding: 11px 36px;
  font-size: var(--fs-body);
}

.mf-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mf-success {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-primary);
}

.mf-success p:first-child {
  font-size: var(--fs-h3);
  font-weight: var(--fw-extrabold);
  margin-bottom: 8px;
}

.mf-error-banner {
  background: #fff0f0;
  border: 1px solid #e53935;
  color: #c62828;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: var(--fs-body);
  text-align: right;
  direction: rtl;
}

/* Membership fee summary */
.mf-fee-summary {
  margin-top: 8px;
}

.mf-fee-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 12px;
  font-size: var(--fs-body);
  color: var(--color-text);
}

.mf-fee-label {
  color: var(--color-text-muted, #5a5a5a);
}

.mf-fee-hint {
  margin: 8px 0 0;
  font-size: var(--fs-small, 14px);
  color: var(--color-text-muted, #5a5a5a);
  line-height: 1.4;
}

.mf-fee-hint--error {
  color: #a02020;
}

.membership-form .event-reg-payment {
  margin-top: 0;
}

@media (max-width: 680px) {
  .membership-card {
    padding: 24px 20px 32px;
  }
  .mf-cols-2,
  .mf-right-only {
    grid-template-columns: 1fr;
  }
  .mf-right-only .mf-col-right {
    grid-column: auto;
  }
  .mf-cols-3 {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================
   Contact Page (page-contact.php)
   ========================================= */
.contact-page {
  flex: 1;
  background-color: var(--color-primary-dark);
  background-image: url("../images/partners/hero-background-dark.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.contact-hero {
  padding: 52px 27% 39px 2%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-inner {
  width: 100%;
  max-width: var(--container-max);
}

.contact-title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  text-align: right;
  direction: rtl;
  margin: 0 0 24px;
}

/* Two columns: contact info (left) + form (right) */
.contact-body {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  direction: ltr;
  align-items: start;
  gap: 48px;
  width: 100%;
  max-width: 760px;
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.contact-body-col--details {
  min-width: 0;
}

.contact-body-col--form {
  min-width: 0;
  width: 100%;
}

.contact-details {
  width: 100%;
  padding-top: 4px;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(98%);
}

.contact-info-list li {
  margin: 0;
}

.contact-info-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  direction: rtl;
  text-decoration: none;
  transition: opacity 0.15s;
}

a.contact-info-link:hover {
  opacity: 0.8;
}

.contact-info-link svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.contact-social {
  display: flex;
  gap: 14px;
  transform: translateY(370%);
}

.contact-social-link {
  color: var(--color-white);
  transition: opacity 0.15s;
}

.contact-social-link:hover {
  opacity: 0.75;
}

.contact-form {
  width: 100%;
  max-width: 100%;
}

.cf-row {
  display: grid;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.cf-cols-2 {
  grid-template-columns: 1fr 1fr;
}

.cf-row-mixed {
  align-items: stretch;
}

.cf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cf-field label {
  font-size: var(--fs-label);
  color: var(--color-white);
  text-align: right;
  font-weight: var(--fw-bold);
}

.cf-star {
  color: var(--color-white);
  font-weight: var(--fw-bold);
}

/* All contact fields — transparent fill, bold white text & border */
.cf-field input[type="text"],
.cf-field input[type="email"],
.cf-field input[type="tel"],
.cf-field textarea {
  background: transparent;
  border: 1px solid var(--color-white);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  font-family: inherit;
  font-weight: var(--fw-bold);
  color: var(--color-white);
  text-align: right;
  direction: rtl;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.cf-field input[type="text"],
.cf-field input[type="email"],
.cf-field input[type="tel"] {
  min-height: 52px;
  height: 52px;
  padding-block: 7px;
  padding-inline: 16px 20px;
}

.cf-field textarea {
  padding: 12px 16px;
  resize: none;
  min-height: 140px;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
  color: var(--color-white);
  font-weight: var(--fw-bold);
  opacity: 0.85;
}

.cf-field-textarea textarea {
  height: 140px;
}

.cf-field.is-invalid input,
.cf-field.is-invalid textarea,
.cf-field.is-invalid .cf-select-inner {
  border-color: #f87171;
}

.cf-select-inner {
  position: relative;
  border: 1px solid var(--color-white);
  border-radius: var(--radius-sm);
  background: transparent;
}

.cf-custom-select {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 52px;
  height: 52px;
  padding-block: 7px;
  padding-inline: 16px 20px;
  gap: 10px;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.cf-custom-select.has-value {
  color: var(--color-white);
}

.cf-custom-select:focus {
  outline: none;
}

.cf-select-arrow {
  flex-shrink: 0;
  font-size: var(--fs-body-s);
  line-height: 1;
  color: var(--color-white);
  font-weight: var(--fw-bold);
  transition: transform 0.2s;
}

.cf-select-inner.is-open .cf-select-arrow {
  transform: rotate(180deg);
}

.cf-select-dropdown {
  display: none;
  border-top: 1px solid var(--color-white);
}

.cf-select-dropdown.is-open {
  display: block;
}

.cf-select-option {
  padding: 11px 20px 11px 16px;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  cursor: pointer;
  text-align: right;
  direction: rtl;
  transition: background 0.12s;
}

.cf-select-option:hover,
.cf-select-option.is-selected {
  background: rgba(255, 255, 255, 0.08);
}

.cf-submit-row {
  margin-top: 20px;
  text-align: right;
}

.cf-submit {
  min-width: 100px;
  padding: 10px 32px;
}

.cf-status {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  display: none;
}
.cf-status.is-success,
.cf-status.is-error {
  display: block;
}
.cf-status.is-success {
  background: rgba(46, 160, 67, 0.15);
  color: #b6f0c2;
  border: 1px solid rgba(46, 160, 67, 0.45);
}
.cf-status.is-error {
  background: rgba(220, 53, 69, 0.15);
  color: #f5b8be;
  border: 1px solid rgba(220, 53, 69, 0.45);
}

/* Tablet — single-column stack starts here */
@media (max-width: 1024px) {
  .contact-hero {
    padding: 44px 6% 40px;
  }

  .contact-body {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 640px;
    margin-inline: auto;
    padding: 0;
  }

  /* On stacked layouts the form is the primary action — show it first. */
  .contact-body-col--form {
    order: 1;
  }
  .contact-body-col--details {
    order: 2;
  }

  /* Desktop offsets used to vertically distribute the details column —
     reset them so items don't overlap the form when stacked. */
  .contact-info-list,
  .contact-social {
    transform: none;
  }

  /* On stacked layouts the details block is centered on the page. */
  .contact-body-col--details {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .contact-details {
    direction: rtl;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .contact-info-list {
    align-items: center;
  }

  .contact-social {
    justify-content: center;
  }

  .contact-body-col--form,
  .contact-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .contact-title {
    margin: 0 0 18px;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .contact-hero {
    padding: 32px 16px 120px; /* extra bottom for the sticky mobile CTA bar */
  }

  .contact-body {
    gap: 24px;
    padding: 0 4px;
  }

  /* Two-up rows collapse to single column */
  .cf-cols-2,
  .cf-row-mixed {
    grid-template-columns: 1fr;
  }

  /* iOS Safari zooms on focus when font-size < 16px */
  .cf-field input[type="text"],
  .cf-field input[type="email"],
  .cf-field input[type="tel"],
  .cf-field textarea,
  .cf-custom-select,
  .cf-select-option {
    font-size: 16px;
  }

  .cf-submit {
    width: 100%;
    padding: 12px 24px;
  }
  .cf-submit-row {
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .contact-hero {
    padding-inline: 12px;
  }

  .contact-title {
    font-size: var(--fs-h2);
  }

  .cf-field input[type="text"],
  .cf-field input[type="email"],
  .cf-field input[type="tel"] {
    min-height: 48px;
    height: 48px;
  }

  .cf-custom-select {
    min-height: 48px;
    height: 48px;
  }
}

/* =====================================================
   SINGLE EVENT PAGE
   ===================================================== */

.event-single-page {
  background-color: var(--color-bg-light);
  background-image: url("../images/partners/main-background.webp");
  background-repeat: no-repeat;
  background-position: top left;
  background-size: 100% auto;
}

/* --- Hero --- */
.event-single-hero {
  padding: 60px 0 0px;
}

.event-single-hero > .container,
.event-single-body > .container {
  max-width: none;
  margin: 0 auto 0 84px;
  width: 93%;
  padding: 0 var(--container-padding);
}

/* Hero row: separate content card + image panel — card stacks above image at overlap */
.event-single-hero-inner {
  display: flex;
  align-items: stretch;
  direction: ltr;
  overflow: visible;
}

/* Content panel (left) — own card; sits above the image panel when they overlap */
.event-single-content-card {
  position: relative;
  z-index: 2;
  flex: 0 0 65%;
  width: 65%;
  padding: 48px 7% 48px 69px;
  text-align: right;
  direction: rtl;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-white);
  border-radius: 7px 146px 7px 146px;
  box-shadow: var(--shadow-md);
  min-height: 340px;
}

.event-single-title {
  font-size: clamp(var(--fs-h5), 2.4vw, var(--fs-h2));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 14px 0 16px;
  line-height: var(--lh-body-scale);
}

.event-single-desc {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: var(--lh-body-scale);
}

/* Register button — uses .btn.btn--green from style.css; align to content start */
.event-register-btn {
  align-self: flex-start;
}

a.event-register-btn {
  text-decoration: none;
}

/* Image panel (right) — separate sibling; clipping stays on the image, not the wrap */
.event-single-img-wrap {
  --event-hero-img-overlap: 40px;
  position: relative;
  z-index: 1;
  flex: 1 0 35%;
  margin-inline-start: calc(-1 * var(--event-hero-img-overlap));
  min-width: 0;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}

.event-single-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 7px;
  box-shadow: var(--shadow-md);
}

.event-single-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 340px;
  background: var(--color-border);
  border-radius: 7px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Event card status tag positioning — visual right in RTL */
.event-card-status {
  align-self: flex-start;
  transform: translateY(-10px);
}

/* --- Body --- */
.event-single-body {
  padding: 48px 0 80px;
}

.event-single-body-inner {
  display: grid;
  grid-template-columns: 1fr min(658px, 38%);
  gap: 24px;
  align-items: start;
  direction: ltr;
}

/* Schedule card (left, wide) */
.event-schedule-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  padding: 36px 40px;
  direction: rtl;
}

.event-schedule-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  margin-bottom: 24px;
  padding-bottom: 14px;
}

.event-schedule-content {
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-body-scale);
  direction: rtl;
}

.event-schedule-empty {
  color: var(--color-text-muted);
  font-style: italic;
}

.event-schedule-slots {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.event-schedule-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: clamp(24px, 5vw, 64px);
}

.event-schedule-time {
  font-weight: var(--fw-bold);
  color: var(--color-text);
  white-space: nowrap;
  text-align: start;
  min-width: 7.5rem;
}

.event-schedule-desc {
  min-width: 0;
  color: var(--color-text);
  line-height: var(--lh-body-scale);
  text-align: right;
}

.event-schedule-desc p {
  margin: 0;
}

.event-schedule-row--comments {
  margin-top: 0;
}

.event-schedule-time--spacer {
  visibility: hidden;
  user-select: none;
  pointer-events: none;
}

/* Details card (right sidebar) */
.event-details-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 16px 8px;
  top: 24px;
  direction: rtl;
}

.event-details-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-details-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-body);
  color: var(--color-text);
  direction: rtl;
}

.event-details-item svg,
.event-details-icon {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-primary);
  opacity: 0.75;
}

.event-details-icon--shekel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 14px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

.event-details-item--notes {
  padding-top: 14px;
  color: var(--color-text-muted);
  font-size: var(--fs-label);
}

.event-details-item a {
  color: var(--color-primary-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.event-details-item a:hover {
  color: var(--color-primary);
}

/* --- Registration Modal --- */
.event-reg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.event-reg-overlay[hidden] {
  display: none;
}

.event-reg-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-drop);
  padding: 70px 56px;
  width: 100%;
  max-width: 60%;
  max-height: 80%;
  overflow-y: auto;
  direction: rtl;
  position: relative;
  box-sizing: border-box;
}

.event-reg-card-inner {
  max-width: 587px;
  width: 100%;
  margin-inline: auto;
}

.event-reg-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  background: none;
  border: none;
  font-size: var(--fs-h5);
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: var(--lh-h5);
  padding: 4px;
  transition: color 0.15s;
}

.event-reg-close:hover {
  color: var(--color-text);
}

.event-reg-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  margin: 0 0 24px;
  text-align: center;
}

.event-reg-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.event-reg-card .mf-row {
  margin-bottom: 0;
  gap: 23px;
}

.event-reg-card .mf-field input,
.event-reg-card .mf-field select {
  height: 52px;
  padding: 0 16px;
  border: 1px solid #133336;
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: var(--fs-body-m);
}

.event-reg-card .mf-field input:focus,
.event-reg-card .mf-field select:focus {
  border-color: var(--color-primary);
}

.event-reg-card .mf-select-arrow {
  bottom: 18px;
}

.event-reg-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.event-reg-submit {
  width: 282px;
  height: 52px;
}

.event-reg-success {
  padding: 24px 8px;
  text-align: center;
}

.event-reg-success p {
  margin: 0;
  font-size: var(--fs-body-m);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

/* CardCom payment iframe (paid events) */
.event-reg-payment {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-reg-payment-title {
  margin: 0;
  text-align: center;
  font-size: var(--fs-h5);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
}

.event-reg-payment-status {
  margin: 0;
  text-align: center;
  font-size: var(--fs-body-s);
  color: var(--color-text-muted);
}

.event-reg-payment-frame {
  width: 100%;
  min-height: 560px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
}

.mf-error-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff5f5;
  color: #d94040;
  font-size: var(--fs-body-s);
  text-align: center;
}

/* --- Tablet & mobile (≤1024px) --- */
@media (max-width: 1024px) {
  .event-single-hero {
    padding: 0 0 48px;
    overflow: visible;
  }

  .event-single-hero > .container,
  .event-single-body > .container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding-inline: 0;
    overflow: visible;
  }

  /* Image on top, title card floats above it — same stack as benefit-single-hero */
  .event-single-hero-inner {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0;
    overflow: visible;
  }

  .event-single-img-wrap {
    flex: none;
    width: 100%;
    margin-inline-start: 0;
    z-index: 1;
  }

  .event-single-img,
  .event-single-img-placeholder {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 430 / 289;
    border-radius: 0;
    box-shadow: none;
  }

  .event-single-content-card {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    margin-inline: 16px;
    padding: 32px;
    min-height: 0;
    transform: translateY(-50px);
    transform-origin: center bottom;
    border-top-right-radius: 60px;
    border-bottom-left-radius: 60px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 2px 2px 15px 0 rgba(50, 50, 50, 0.25);
  }

  .event-single-body {
    padding: 0 0 64px;
  }

  .event-single-body-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* DOM: schedule then details — visual order: details, then schedule */
  .event-details-card {
    order: 1;
    position: static;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    margin-inline: 16px;
    padding: 20px 16px;
  }

  .event-schedule-card {
    order: 2;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    margin-inline: 16px;
    padding: 28px 20px;
  }
}

@media (max-width: 768px) {
  .event-single-hero {
    padding-bottom: 40px;
  }

  .event-single-content-card {
    padding: 28px 24px;
  }

  .event-single-body {
    padding-bottom: 48px;
  }

  /* Tablet: keep desktop-like width (60%), shorter scrolling card */
  .event-reg-card {
    max-height: 70dvh;
    padding: 48px 28px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .event-reg-card .mf-cols-2 {
    grid-template-columns: 1fr;
  }

  .event-reg-title {
    margin-bottom: 16px;
    font-size: var(--fs-h5);
  }

  .event-reg-form {
    gap: 16px;
  }

  .event-reg-payment-frame {
    min-height: 520px;
    height: 520px;
  }
}

@media (max-width: 600px) {
  .event-single-hero {
    padding-bottom: 32px;
  }

  .event-single-content-card {
    padding: 24px 20px;
    border-top-right-radius: 48px;
    border-bottom-left-radius: 48px;
  }

  .event-schedule-card {
    padding: 24px 16px;
  }

  /* Mobile only: full viewport width + scrolling card (not full-screen height) */
  .event-reg-overlay {
    padding: 16px 12px;
    align-items: center;
  }

  .event-reg-card {
    width: 100%;
    max-width: 100%;
    max-height: 68dvh;
    height: auto;
    margin-block: auto;
    padding: 44px 14px 16px;
  }

  .event-reg-card-inner {
    max-width: 100%;
  }

  .event-reg-submit {
    width: 100%;
    max-width: 100%;
  }

  .event-reg-payment-frame {
    min-height: 480px;
    height: 480px;
  }
}

@media (max-width: 400px) {
  .event-single-content-card {
    transform: translateY(-40px);
  }

  .event-single-title {
    font-size: var(--fs-h5);
  }

  .event-reg-card {
    max-height: 66dvh;
    padding: 40px 12px 14px;
  }

  .event-reg-payment-frame {
    min-height: 460px;
    height: 460px;
  }
}

/* =========================================
   Registered Events (אירועים שנרשמתי אליהם)
   ========================================= */
.registered-events-section {
  padding: 40px 0;
}

.registered-events-title {
  text-align: center;
  margin-bottom: 32px;
}

.registered-events-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.registered-event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 34px 44px 40px;
}

.registered-event-info {
  flex: 1;
  min-width: 0;
}

.registered-event-title-link {
  color: inherit;
}

.registered-event-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-h4);
  color: var(--color-primary);
  margin: 0 0 10px;
}

.registered-event-desc {
  font-size: var(--fs-body-m);
  color: var(--color-text-muted);
  line-height: var(--lh-body-scale);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.registered-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--color-text);
}

.registered-event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-body-s);
  font-weight: var(--fw-medium);
}

.registered-event-meta-item svg {
  color: var(--color-accent);
}

.registered-event-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
  width: 200px;
}

.registered-event-view,
.registered-event-cancel {
  width: 100%;
}

.registered-event-cancel-note {
  text-align: center;
  font-size: var(--fs-body-s);
  color: var(--color-text-muted);
  padding: 8px 0;
}

.registered-event-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.registered-event-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-body-xs);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}

.registered-event-tool:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.registered-event-tool svg {
  color: var(--color-accent);
}

.registered-events-empty {
  text-align: center;
  font-size: var(--fs-body-m);
  color: var(--color-text-muted);
  padding: 24px 0;
}

@media (max-width: 768px) {
  .registered-event-card {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
  }

  .registered-event-actions {
    width: 100%;
  }
}

/* =========================================
   Member Dashboard Page
   ========================================= */

.site-main.dashboard-page {
  background-color: var(--color-bg-light);
  background-image: url("../images/partners/main-background.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 33%;
  min-height: 100vh;
}

/* Greeting */
.dashboard-greeting-section {
  padding: 40px 0 48px;
}

.dashboard-hello {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  text-align: right;
  margin: 0;
}

/* Profile card */
.dashboard-profile-section {
  margin-top: -28px;
  padding-bottom: 32px;
}

.dashboard-profile-card {
  padding: 28px 32px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  direction: rtl;
}

.dashboard-profile-photo {
  flex: 0 0 auto;
}

.dashboard-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary-light);
  display: block;
}

.dashboard-profile-info {
  flex: 1;
  text-align: start;
}

.dashboard-profile-name {
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: 4px;
}

.dashboard-profile-office {
  font-size: var(--fs-body);
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.dashboard-profile-status {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-white);
  font-size: var(--fs-body-xs);
  font-weight: var(--fw-medium);
  padding: 2px 10px;
  border-radius: 20px;
}

.dashboard-profile-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  font-family: inherit;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.dashboard-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.dashboard-action-btn--edit {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.dashboard-action-btn--edit:hover {
  opacity: 0.9;
  color: var(--color-white);
}

/* Details card */
.dashboard-details-section {
  padding-bottom: 20px;
}

.dashboard-details-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 40px 150px 40px 150px;
  direction: rtl;
}

.dashboard-details-title {
  font-family: "Heebo", sans-serif;
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  line-height: 30px;
  color: var(--color-black);
  text-align: right;
  margin: 0 0 16px;
  padding-bottom: 0;
}

.dashboard-details-title + .member-contact-grid,
.dashboard-details-title + .dashboard-contact-row,
.dashboard-details-title + .dashboard-tags,
.dashboard-details-title + .dashboard-details-bio,
.dashboard-details-title + .dashboard-receipts-list,
.dashboard-details-title + .dashboard-receipts-empty {
  margin-bottom: 32px;
}

/* Membership receipts (קבלות) list inside details card */
.dashboard-receipts-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  text-align: right;
}

.dashboard-receipts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  direction: rtl;
}

.dashboard-receipts-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 0.8fr);
  gap: 12px 24px;
  align-items: center;
  padding-block: 14px;
  border-bottom: 1px solid var(--color-border);
  text-align: right;
}

.dashboard-receipts-row:last-child {
  border-bottom: none;
}

.dashboard-receipts-row--head {
  padding-block: 0 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
}

.dashboard-receipts-col {
  min-width: 0;
  font-size: var(--fs-body);
  color: var(--color-text);
  word-break: break-word;
}

.dashboard-receipts-col--name {
  font-weight: var(--fw-medium);
  color: var(--color-primary);
}

.dashboard-receipts-pdf-link {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-receipts-pdf-link:hover {
  color: var(--color-primary);
}

.dashboard-receipts-pdf-missing {
  color: var(--color-text-muted);
  font-size: var(--fs-label);
}

.member-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 48px;
  margin-bottom: 60px !important;
  direction: rtl;
  text-align: right;
}

.member-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  font-size: var(--fs-body);
  color: var(--color-text);
  direction: rtl;
  text-align: right;
}

.member-contact-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.member-contact-label {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.member-contact-value {
  word-break: break-word;
}

.member-contact-item--link {
  color: inherit;
  text-decoration: none;
}

.member-contact-item--link:hover {
  color: var(--color-primary);
}

.member-contact-item--link:hover .member-contact-label {
  color: var(--color-primary);
}

.member-contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary-light);
}

.member-contact-card-mask {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  unicode-bidi: isolate;
}

.dashboard-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 60px !important;
  direction: rtl;
}

.dashboard-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-body);
  color: var(--color-text);
}

.dashboard-contact-item svg {
  flex-shrink: 0;
  color: var(--color-primary-light);
}

/* Specialty tags */
.dashboard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 60px !important;
}

.dashboard-tag {
  display: inline-block;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: var(--fs-body-s);
  color: var(--color-text);
}

.dashboard-details-bio {
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-body-scale);
  margin: 0 0 32px;
  text-align: right;
}

/* Events section */
.dashboard-events-section {
  padding: 16px 0 40px;
}

.dashboard-section-title {
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  text-align: right;
  margin-bottom: 20px;
}

.dashboard-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Make event cards in dashboard look like proper cards */
.dashboard-events-grid .dashboard-event-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-events-grid .event-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard-events-grid .event-card-link {
  display: flex;
  flex-direction: column;
  height: auto;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.dashboard-events-grid .event-card-img-placeholder {
  width: 100%;
  height: 140px;
  background: var(--color-bg-light);
}

.dashboard-events-grid .event-card-body {
  padding: 16px;
  direction: rtl;
  text-align: right;
  flex: 1;
  transform: none;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  background-color: var(--color-white);
  box-shadow: none;
  overflow: visible;
  width: 98%;
}

.dashboard-events-grid .event-card-title {
  font-size: var(--fs-body-m);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 10px;
  line-height: var(--lh-body-scale);
}

.dashboard-events-grid .event-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-events-grid .event-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-body-xs);
  color: var(--color-text-light);
  direction: rtl;
}

@media (max-width: 900px) {
  .dashboard-profile-card {
    /* Stay as a horizontal row on mobile too — photo on the right (RTL),
       name + office on its left. Just tighten gap/padding so it fits. */
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 20px;
  }
  .dashboard-profile-info {
    text-align: right;
  }
  .dashboard-avatar {
    width: 72px;
    height: 72px;
  }

  .dashboard-profile-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .dashboard-action-btn {
    flex: 1 1 auto;
  }

  .dashboard-events-grid {
    grid-template-columns: 1fr;
  }

  .member-contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .dashboard-hello {
    font-size: var(--fs-h2);
  }

  .dashboard-details-card {
    padding: 20px 16px;
  }

  .dashboard-receipts-row--head {
    display: none;
  }

  .dashboard-receipts-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-block: 16px;
  }

  .dashboard-receipts-col::before {
    content: attr(data-label) ": ";
    color: var(--color-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-bold);
  }

  .dashboard-contact-row {
    flex-direction: column;
    gap: 12px;
  }

  .member-contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* =========================================
   Benefit Auth Modal
   ========================================= */
.benefit-auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.benefit-auth-overlay.is-open {
  display: flex;
}

.benefit-auth-modal {
  position: relative;
  background: var(--color-white);
  border: 1.5px solid #a8d0d0;
  border-radius: 20px;
  width: 100%;
  max-width: 65%;
  padding: 52px 48px 40px;
  text-align: center;
  overflow: hidden;
  direction: rtl;
}

/* Decorative gold ring circles */
.benefit-auth-circle {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 14px solid var(--color-accent);
  opacity: 0.55;
  pointer-events: none;
}
.benefit-auth-circle--tl {
  top: -40px;
  right: -30px;
}
.benefit-auth-circle--tr {
  top: -30px;
  left: -40px;
  width: 80px;
  height: 80px;
}
.benefit-auth-circle--bl {
  bottom: -35px;
  right: -25px;
  width: 90px;
  height: 90px;
}
.benefit-auth-circle--br {
  bottom: -40px;
  left: -35px;
}

.benefit-auth-close {
  position: absolute;
  top: 16px;
  left: 18px;
  background: none;
  border: none;
  font-size: var(--fs-h4);
  line-height: var(--lh-h5);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.benefit-auth-close:hover {
  color: var(--color-text);
}

.benefit-auth-body {
  position: relative;
  z-index: 1;
}

.benefit-auth-title {
  font-size: clamp(var(--fs-body-l), 2.5vw, var(--fs-h5));
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: 0 0 10px;
}

.benefit-auth-subtitle {
  font-size: var(--fs-body-para);
  color: var(--color-text-muted);
  margin: 0 0 28px;
}

.benefit-auth-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.benefit-auth-btn--join {
  background: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
  padding: 12px 40px;
  border-radius: 8px;
  font-weight: var(--fw-bold);
  font-size: var(--fs-body-para);
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.benefit-auth-btn--join:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.benefit-auth-btn--login {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 12px 40px;
  border-radius: 8px;
  font-weight: var(--fw-bold);
  font-size: var(--fs-body-para);
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}
.benefit-auth-btn--login:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.benefit-auth-link {
  display: inline-block;
  color: var(--color-text);
  font-size: var(--fs-body-small, 0.9rem);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================
   Fixed Mobile Bottom Bar
   ========================================= */
.ymas-mobile-bar {
  display: none;
}

@media (max-width: 768px) {
  .ymas-mobile-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.92);
    padding: 12px 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .ymas-mobile-bar-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
  }

  .ymas-mobile-bar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 8px;
    font-size: var(--fs-body-s);
    font-weight: var(--fw-bold);
    font-family: var(--font-primary, "Heebo", sans-serif);
    text-decoration: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
    white-space: nowrap;
  }

  .ymas-mobile-bar-btn:active {
    opacity: 0.82;
    transform: scale(0.96);
  }

  .ymas-mobile-bar-btn--phone {
    background: var(--color-primary);
    color: var(--color-white);
  }

  .ymas-mobile-bar-btn--whatsapp {
    background: var(--color-accent);
    color: var(--color-primary-dark);
  }

  .ymas-mobile-bar-btn--join {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
  }

  /* Prevent page content from being hidden behind the bar */
  body {
    padding-bottom: 76px;
  }
}

/* =========================================
   Event Card Body — Mobile
   ========================================= */
@media (max-width: 768px) {
  .event-card-body {
    padding: 24px 20px 16px 20px;
    gap: 14px;
    border-top-right-radius: 60px;
    border-bottom-left-radius: 60px;
    transform: translateY(-30px);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .event-card-body {
    padding: 20px 16px 14px 16px;
    gap: 12px;
    border-top-right-radius: 40px;
    border-bottom-left-radius: 40px;
    transform: translateY(-24px);
    overflow: hidden;
    box-sizing: border-box;
  }
}
.benefit-auth-link:hover {
  color: var(--color-primary);
}

/* =========================================================================
   Shared Stitch header — the Stitch navigation is the site-wide header
   (template-parts/site-header.php) on every page, so these tokens are exposed
   globally. The header/drawer and footer rules below are un-scoped for the
   same reason; the homepage *section* styles stay scoped to .home-stitch-page.
   ========================================================================= */
:root {
  /* Aliased to global Tax 3.3 tokens in style.css */
  --hs-primary: var(--color-primary);
  --hs-on-primary: var(--color-white);
  --hs-body-bg: var(--color-white);
  /* Soft surface for about band — not flat grey (keeps section readable) */
  --hs-surface-low: color-mix(
    in srgb,
    var(--color-primary-light) 14%,
    var(--color-white)
  );
  --hs-text: var(--color-text);
  --hs-secondary: var(--color-text-muted);
  --hs-on-surface-variant: var(--color-text-muted);
  --hs-outline-variant: var(--color-border);
  --hs-margin: clamp(16px, 4vw, 80px);
}

/* =========================================================================
   Unified card (.ymas-card) — Figma "כרטיסית אירוע" + modifiers.
   Default: photo + overlapping leaf-shaped body (Tax 3.3).
   Driven by template-parts/card.php.
   ========================================================================= */
.ymas-card {
  --ymas-card-body-radius: var(--radius-sm) var(--radius-leaf) var(--radius-sm)
    var(--radius-leaf);
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transition: transform 0.25s ease;
  font-family: var(--font-primary);
  color: var(--color-primary);
}

.ymas-card:hover {
  transform: translateY(-2px);
}

/* Media — photo plane under the overlapping body */
.ymas-card__media {
  position: relative;
  display: block;
  aspect-ratio: 367 / 246;
  overflow: hidden;
  border-radius: var(--radius-card-media);
  background: var(--color-bg-light);
}

.ymas-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ymas-card:hover .ymas-card__media img {
  transform: scale(1.03);
}

.ymas-card__media-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  font-size: 64px;
  color: var(--color-white);
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.ymas-card--media:hover .ymas-card__media-icon {
  transform: scale(1.1);
}

/* Decorative icon image (quick tiles) */
.ymas-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.ymas-card__icon img {
  display: block;
  width: auto;
  height: 34px;
  max-width: 48px;
  object-fit: contain;
}

/* Floating badge — sits on the top edge of the body panel (visual right in RTL) */
.ymas-card__badge {
  position: absolute;
  top: 0;
  inset-inline-start: 16px;
  z-index: 2;
  transform: translateY(-50%) translateX(-60%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: #437275;
  color: var(--color-white);
  font-size: 14px;
  font-weight: var(--fw-medium);
  line-height: 1;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.ymas-card__badge--free {
  background: var(--tag-event-free-bg);
  color: var(--tag-event-free-text);
}

.ymas-card__badge--members-only {
  background: var(--tag-event-members-bg);
  color: var(--tag-event-members-text);
}

.ymas-card__badge--discount {
  background: var(--tag-event-discount-bg);
  color: var(--tag-event-discount-text);
}

.ymas-card__badge--default {
  background: #437275;
  color: var(--color-white);
}

/* Body — leaf panel overlapping the image (Figma).
   Radius stays on TR + BL (--radius-leaf); padding clears those curves so
   text never sits on top of the border arc. Physical L/R match the shape. */
.ymas-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  padding-top: max(clamp(20px, 3vw, 28px), calc(var(--radius-leaf) * 0.24));
  padding-right: max(clamp(18px, 2.5vw, 32px), calc(var(--radius-leaf) * 0.4));
  padding-bottom: max(
    clamp(18px, 2.5vw, 24px),
    calc(var(--radius-leaf) * 0.24)
  );
  padding-left: max(clamp(18px, 2.5vw, 32px), calc(var(--radius-leaf) * 0.4));
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  border-radius: var(--ymas-card-body-radius);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  text-align: start;
}

.ymas-card--has-media .ymas-card__body {
  margin-top: clamp(-96px, -18%, -72px);
  margin-inline: 1.78%;
  margin-bottom: 0;
  z-index: 1;
}

.ymas-card__eyebrow {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.ymas-card__title {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  margin: 0;
  color: var(--color-primary);
}

.ymas-card__title a {
  color: inherit;
  text-decoration: none;
}

.ymas-card__title a:hover {
  opacity: 0.85;
}

/* Gradient clipped title (quick nav) */
.ymas-card__title--gradient,
.ymas-card__title--gradient a {
  background-image: var(--gradient-green-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.ymas-card__title--gradient a:hover {
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
}

.ymas-card__desc {
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--fw-regular);
  color: var(--color-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.92;
}

/* Meta — horizontal row (date / time / location) */
.ymas-card__meta {
  list-style: none;
  margin: 0;
  margin-top: auto;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ymas-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  line-height: 34px;
  color: var(--color-primary);
  white-space: nowrap;
}

.ymas-card__meta-item .material-symbols-outlined {
  font-size: 17px;
  color: var(--color-primary);
}

/*
 * Figma event card has no CTA inside the panel — title/media are the links.
 * Keep markup for callers that pass cta_label, but do not show the old full-width bar.
 */
.ymas-card:not(.ymas-card--quick) > .ymas-card__body > .ymas-card__cta.btn {
  display: none;
}

/* Plain arrow text link (news "read more") */
.ymas-card__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  font-size: var(--fs-body-s);
  font-weight: var(--fw-medium);
  color: var(--color-primary);
  text-decoration: none;
}

.ymas-card__more .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.ymas-card__more:hover .material-symbols-outlined {
  transform: translateX(-4px);
}

/* ---- Modifiers ---- */

/* Media / press tile — Figma Tax 3.3: flat thumb + title + source (no leaf overlap) */
.ymas-card--media {
  max-width: 434px;
  width: 100%;
}

.ymas-card--media.ymas-card--has-media .ymas-card__body {
  margin-top: 0;
  margin-inline: 0;
  padding: 12px 0 0;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.ymas-card--media .ymas-card__media {
  aspect-ratio: 419 / 201;
  border: 1px solid var(--color-primary);
  /* Physical TR + BL (visual right + bottom-left in RTL) */
  border-radius: var(--radius-sm) var(--radius-media-leaf) var(--radius-sm)
    var(--radius-media-leaf);
  background: var(--color-primary);
}

.ymas-card--media .ymas-card__media img {
  opacity: 0.85;
}

.ymas-card--media:hover .ymas-card__media img {
  opacity: 1;
}

.ymas-card--media .ymas-card__media-icon {
  width: 48px;
  height: 48px;
  font-size: 48px;
  color: var(--color-gold);
  opacity: 1;
}

.ymas-card--media .ymas-card__title {
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ymas-card--media .ymas-card__meta {
  margin-top: 0;
}

.ymas-card--media .ymas-card__meta-item {
  font-size: 14px;
  line-height: 21px;
  color: var(--color-text-muted);
  white-space: normal;
}

/* Benefit / partner logo tiles — full logo on a white plate (contain).
   Admin crop profile `benefit-logo` matches .ymas-card__media (367/246). */
.ymas-card--benefit .ymas-card__media {
  background: var(--color-white);
}

.ymas-card--benefit .ymas-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: clamp(20px, 8%, 36px);
  box-sizing: border-box;
}

/* Quick navigation leaf tile (no photo overlap).
   Aspect ratio locks proportions. Card is the container; descendants use cqi. */
.ymas-card--quick {
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 314px;
  height: auto;
  min-height: 0;
  aspect-ratio: 314 / 266;
  container-type: inline-size;
  container-name: quick-card;
  /* % padding is relative to card width — works on the card itself */
  padding: clamp(10px, 8%, 32px);
  background: var(--color-white);
  border: 2px solid var(--color-primary-light);
  /* Leaf corners (top-left + bottom-right) + sharp pair — % of card box (~100/314 & 5/314) */
  border-radius: 32% 1.6% 32% 1.6%;
  box-shadow: var(--shadow-card);
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.ymas-card--quick:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-hover);
}

.ymas-card--quick .ymas-card__body {
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 5cqi, 21px);
  padding: 0;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  /* Override default body text-align:start so wrapped RTL titles stay centered */
  text-align: center;
}

.ymas-card--quick .ymas-card__icon {
  order: -1;
  flex: 0 1 auto;
  min-height: 0;
}

.ymas-card--quick .ymas-card__icon img {
  height: clamp(18px, 12cqi, 34px);
  max-width: clamp(24px, 16cqi, 48px);
  width: auto;
}

.ymas-card--quick .ymas-card__title {
  font-size: clamp(12px, 9.5cqi, 33px);
  font-weight: var(--fw-extrabold);
  line-height: 1.2;
  width: 100%;
  max-width: 100%;
  text-align: center;
  flex: 0 1 auto;
  min-height: 0;
  overflow-wrap: anywhere;
}

.ymas-card--quick .ymas-card__title a {
  display: inline-block;
  width: 100%;
  text-align: center;
}

.ymas-card--quick .ymas-card__cta.btn--pill-arrow {
  display: inline-flex;
  width: clamp(40px, 26cqi, 89px);
  max-width: 100%;
  height: clamp(22px, 11cqi, 36px);
  min-height: 0;
  margin-inline: auto;
  flex: 0 0 auto;
  box-shadow: 4px 4px 10px rgba(50, 50, 50, 0.18);
}

.ymas-card--quick .ymas-card__cta.btn--pill-arrow .material-symbols-outlined {
  font-size: clamp(14px, 7cqi, 22px);
}

.ymas-card--agenda .ymas-card__media {
  aspect-ratio: 4 / 3;
}

@media (max-width: 768px) {
  .ymas-card--has-media .ymas-card__body {
    margin-top: -64px;
    margin-inline: 8px;
    gap: 12px;
    /* Same leaf radius; tighter screen → keep content inside the curves */
    padding-top: max(20px, calc(var(--radius-leaf) * 0.28));
    padding-right: max(20px, calc(var(--radius-leaf) * 0.45));
    padding-bottom: max(18px, calc(var(--radius-leaf) * 0.28));
    padding-left: max(20px, calc(var(--radius-leaf) * 0.45));
  }

  .ymas-card--has-media .ymas-card__title {
    font-size: clamp(16px, 4.4vw, 20px);
  }

  .ymas-card--has-media .ymas-card__desc {
    font-size: clamp(13px, 3.6vw, 16px);
    line-height: 1.35;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .ymas-card__meta {
    gap: 8px 12px;
  }

  .ymas-card__meta-item {
    font-size: 13px;
    line-height: 1.4;
  }

  .ymas-card--quick {
    max-width: 100%;
  }
}

/* =========================================================================
   Stitch Homepage — faithful rebuild of the Google Stitch artboard.
   All tokens below are scoped to .home-stitch-page so the rest of the
   site (Heebo, gold/green palette) is untouched.
   ========================================================================= */
.home-stitch-page {
  /* Aliased to global Tax 3.3 tokens in style.css */
  --hs-primary: var(--color-primary);
  --hs-on-primary: var(--color-white);
  --hs-body-bg: var(--color-white);
  --hs-surface-low: color-mix(
    in srgb,
    var(--color-primary-light) 14%,
    var(--color-white)
  );
  --hs-text: var(--color-text);
  --hs-secondary: var(--color-text-muted);
  --hs-on-surface-variant: var(--color-text-muted);
  --hs-outline-variant: var(--color-border);
  --hs-outline: var(--color-text-muted);
  --hs-margin: clamp(16px, 4vw, 80px);

  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--hs-body-bg);
  color: var(--hs-text);
  font-family: var(--font-primary);
  font-size: var(--fs-body-m);
  line-height: 1.6;
}

.home-stitch-page * {
  box-sizing: border-box;
}

.home-stitch-page .hs-main {
  margin: 0;
  padding: 0;
}

.home-stitch-page img {
  display: block;
  max-width: 100%;
}

.home-stitch-page .hs-hero__img,
.home-stitch-page .hs-hero__overlay-img,
.home-stitch-page .hs-about__member-img {
  max-width: none;
}

/* Keep sticky CTA bar + .btn variant colors (e.g. white on green CTA);
   do not force inherit on those. */
.home-stitch-page a:not(.ymas-mobile-bar-btn):not(.btn) {
  text-decoration: none;
  color: inherit;
}

/* Material Symbols base (global — used by the shared Stitch header icons) */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

/* ---- Section scaffolding (max-w-[1920px] mx-auto px py-xl) ---- */
.home-stitch-page .hs-about__inner,
.home-stitch-page .hs-quick__grid,
.home-stitch-page .hs-events__inner,
.home-stitch-page .hs-agenda__inner,
.home-stitch-page .hs-media__inner {
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: var(--hs-margin);
}

.home-stitch-page .hs-quick,
.home-stitch-page .hs-events,
.home-stitch-page .hs-media {
  padding-block: 64px;
  background: var(--hs-body-bg);
}

.home-stitch-page .hs-about {
  padding-block: 64px;
  background: color-mix(
    in srgb,
    var(--color-grey-light) 30%,
    var(--color-white)
  );
  border-block: 1px solid var(--color-grey-light);
}

.home-stitch-page .hs-agenda {
  padding-block: 64px;
  background: var(--color-grey-light);
  color: var(--color-primary);
}

/* ---- Section title + heads ---- */
.home-stitch-page .hs-section-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
  margin: 0;
  padding-inline-start: 16px;
  border-inline-start: 4px solid var(--hs-primary);
}

.home-stitch-page .hs-section-title--light {
  border-inline-start-color: var(--hs-on-primary);
}

.home-stitch-page .hs-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.home-stitch-page .hs-section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--hs-primary);
}

.home-stitch-page .hs-section-link .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.home-stitch-page .hs-section-link:hover .material-symbols-outlined {
  transform: translateX(4px);
}

/* ---- Buttons: .hs-btn* aliases onto unified .btn system (style.css) ---- */
.hs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px clamp(16px, 1.5vw, 28px);
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1.48px solid transparent;
  font-family: var(--font-primary);
  font-size: clamp(14px, 1.1vw, var(--btn-fs-lg));
  font-weight: var(--btn-fw);
  line-height: var(--btn-lh);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}

/* Header / drawer — Join CTA matches Figma gold button */
.hs-btn--join {
  background: var(--gradient-gold-light-button);
  color: var(--color-primary) !important;
  border-color: var(--color-primary);
  min-height: 52px;
  padding-inline: clamp(16px, 2vw, 39px);
}

.hs-btn--join:hover {
  box-shadow: var(--shadow-hover);
  color: var(--color-primary);
}

/* Footer newsletter — light button on dark footer (legacy footer) */
.hs-btn--submit {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.hs-btn--submit:hover {
  box-shadow: var(--shadow-md);
}

.hs-btn--outline {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.hs-btn--outline:hover {
  background: var(--hs-surface-low);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* =========================================
   Shared header — Figma Tax 3.3 Navbar (global)
   ========================================= */
.hs-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-grey-mid);
  font-family: var(--font-primary);
  width: 100%;
}

.hs-header__inner {
  max-width: 1920px;
  width: 100%;
  margin-inline: auto;
  min-height: 96px;
  height: auto;
  padding-block: 8px;
  padding-inline: clamp(24px, 3.5vw, 55px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 34px);
}

.hs-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  position: relative;
  z-index: 2; /* keep logo above nav if space gets very tight */
  background: var(--color-white);
}

.hs-header__logo-img,
.hs-header__logo img,
.hs-header__logo-symbol {
  height: clamp(64px, 6vw, 96px);
  width: auto;
  max-width: min(298px, 22vw);
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.hs-header__nav {
  position: relative; /* anchor for the sliding underline */
  display: flex;
  align-items: center;
  /* --hs-nav-* set by main.js so labels shrink before covering the logo */
  gap: var(--hs-nav-gap, 32px);
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  flex-wrap: nowrap;
}

/* A nav item is a hoverable wrapper so dropdown parents can show their list. */
.hs-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  /* Do not shrink below label width — that painted text over the logo */
  flex-shrink: 0;
}

.hs-header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--hs-nav-link-gap, 8px);
  font-size: var(--hs-nav-fs, 22px);
  font-weight: var(--fw-regular);
  line-height: 1.25;
  color: var(--color-primary);
  padding-block: 0;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.hs-header__nav-link:hover,
.hs-nav-item:hover > .hs-header__nav-link {
  opacity: 0.75;
  color: var(--color-primary);
}

.hs-header__nav-link.is-active {
  color: var(--color-primary);
  font-weight: var(--fw-medium);
}

.hs-header__nav-link.hs-header__nav-toggle {
  cursor: pointer;
}

.hs-header__nav-link .hs-nav-caret {
  font-size: var(--hs-nav-caret-fs, 1.05em);
  transition: transform 0.2s ease;
}

.hs-nav-item:hover > .hs-header__nav-link .hs-nav-caret {
  transform: rotate(180deg);
}

/* Sliding underline indicator (positioned in main.js) */
.hs-header__underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  opacity: 0;
  pointer-events: none;
  transition:
    left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}

/* Desktop dropdown "open list" */
.hs-submenu {
  position: absolute;
  top: 100%;
  inset-inline-start: 50%;
  transform: translateX(50%) translateY(6px);
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-grey-mid);
  box-shadow: var(--shadow-hover);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
  z-index: 200;
}

/* Hover opens the list. :focus-visible keeps keyboard access without
   freezing the menu open after a mouse click (click focus ≠ focus-visible). */
.hs-nav-item:hover .hs-submenu,
.hs-nav-item:has(.hs-header__nav-link:focus-visible) .hs-submenu,
.hs-nav-item:has(.hs-submenu__link:focus-visible) .hs-submenu {
  opacity: 1;
  visibility: visible;
}

.hs-submenu__link {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: var(--fw-regular);
  color: var(--color-primary);
  white-space: nowrap;
  text-align: start;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.hs-submenu__link:hover,
.hs-submenu__link.is-active {
  background: color-mix(in srgb, var(--color-primary) 6%, transparent);
  color: var(--color-primary);
}

.hs-header__actions {
  display: flex;
  align-items: center;
  gap: 32px;
  /* Allow the account block to shrink; keep login/join unclipped */
  flex: 0 1 auto;
  min-width: 0;
}

.hs-header__login {
  font-size: 18px;
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.hs-header__login:hover {
  opacity: 0.75;
  color: var(--color-primary);
}

.hs-header__join.btn,
.hs-header__actions .btn--gold {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Logged-in account (greeting + personal area; replaces login/join) */
.hs-account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  /* Cap width so a long name wraps before covering the nav */
  max-width: min(240px, 20vw);
}

.hs-header__greeting {
  font-size: clamp(16px, 1.15vw, 21px);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  /* Wrap long names before they cover the nav menu */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  flex: 1 1 auto;
  /* RTL: start = visual right, so wrapped lines stay right-aligned */
  text-align: start;
  background-image: var(--gradient-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hs-header__personal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.hs-header__personal-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hs-header__personal-arrow {
  text-decoration: none;
  font-size: 1.05em;
  line-height: 1;
}

.hs-header__personal:hover {
  opacity: 0.8;
  color: var(--color-primary);
}

.hs-account__menu {
  position: absolute;
  top: 100%;
  inset-inline-end: 0;
  margin-top: 8px;
  min-width: 180px;
  background: var(--hs-body-bg);
  border: 1px solid var(--hs-outline-variant);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease;
  z-index: 200;
}

.hs-account:hover .hs-account__menu,
.hs-account:focus-within .hs-account__menu {
  opacity: 1;
  visibility: visible;
}

.hs-account__item {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--hs-text);
  white-space: nowrap;
  text-align: start;
}

.hs-account__item:hover {
  background: rgba(19, 51, 54, 0.06);
  color: var(--hs-primary);
}

.hs-account__item--logout {
  color: #a02020;
}

/* Mobile header + drawer (hidden on desktop) */
.hs-mobile-header {
  display: none;
  font-family: var(--font-primary);
}

.home-stitch-page .hs-bottom-nav {
  display: none;
}

.hs-drawer[hidden] {
  display: none;
}

.hs-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  font-family:
    "IBM Plex Sans Hebrew",
    "Heebo",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.hs-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 51, 54, 0.45);
}

.hs-drawer__panel {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--hs-body-bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
  animation: hs-drawer-in 0.3s ease;
}

@keyframes hs-drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.hs-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hs-drawer__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.hs-drawer__brand img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.hs-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
}

.hs-drawer__link {
  padding: 12px 8px;
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-grey-mid);
  text-decoration: none;
}

/* Drawer expandable sub-list */
.hs-drawer__group .hs-drawer__sublist {
  display: none;
  flex-direction: column;
  padding-inline-start: 14px;
}

.hs-drawer__group.is-open .hs-drawer__sublist {
  display: flex;
}

.hs-drawer__group > .hs-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hs-outline-variant);
  cursor: pointer;
  font: inherit;
  text-align: start;
}

.hs-drawer__group > .hs-drawer__link .hs-nav-caret {
  transition: transform 0.2s ease;
}

.hs-drawer__group.is-open > .hs-drawer__link .hs-nav-caret {
  transform: rotate(180deg);
}

.hs-drawer__sublink {
  padding: 10px 8px;
  font-size: 14px;
  color: var(--hs-on-surface-variant);
}

.hs-drawer__actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.hs-drawer__actions .hs-header__greeting {
  text-align: center;
}

.hs-drawer__actions .hs-header__login,
.hs-drawer__actions .hs-header__personal {
  text-align: center;
  justify-content: center;
  padding-block: 8px;
}

.hs-drawer__actions .btn {
  width: 100%;
  justify-content: center;
}

.hs-drawer__actions .hs-btn {
  width: 100%;
}

/* =========================================
   Hero accordion (3 panels)
   ========================================= */
.home-stitch-page .hs-hero {
  position: relative;
  border-bottom: 1px solid var(--hs-primary);
}

.home-stitch-page .hs-hero__track {
  display: flex;
  height: 600px;
  overflow: hidden;
}

.home-stitch-page .hs-hero__panel {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  /* Default: 3 equal grayscale panels. Hover expands + colorizes. */
  transition: flex-grow 0.7s ease;
}

.home-stitch-page .hs-hero__panel + .hs-hero__panel {
  border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
}

.home-stitch-page .hs-hero__panel:hover {
  flex-grow: 2.4;
}

.home-stitch-page .hs-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1);
  transition:
    filter 0.7s ease,
    transform 0.7s ease;
}

.home-stitch-page .hs-hero__panel:hover .hs-hero__img {
  filter: grayscale(0);
}

.home-stitch-page .hs-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 51, 54, 0.4);
  transition: background 0.5s ease;
}

.home-stitch-page .hs-hero__overlay--photo {
  overflow: hidden;
}

.home-stitch-page .hs-hero__overlay--photo picture,
.home-stitch-page .hs-hero__overlay--photo .hs-hero__overlay-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.home-stitch-page .hs-hero__overlay-img {
  object-fit: cover;
  object-position: center;
  filter: grayscale(1);
  transition: filter 0.7s ease;
}

.home-stitch-page .hs-hero__overlay-tint {
  position: absolute;
  inset: 0;
  background: rgba(19, 51, 54, 0.4);
  transition: background 0.5s ease;
  pointer-events: none;
}

.home-stitch-page .hs-hero__panel:hover .hs-hero__overlay-img {
  filter: grayscale(0);
}

.home-stitch-page .hs-hero__panel:hover .hs-hero__overlay-tint {
  background: rgba(19, 51, 54, 0);
}

.home-stitch-page
  .hs-hero__panel:hover
  .hs-hero__overlay:not(.hs-hero__overlay--photo) {
  background: rgba(19, 51, 54, 0);
}

.home-stitch-page .hs-hero__content {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 32px;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(19, 51, 54, 0.9),
    rgba(19, 51, 54, 0)
  );
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* visual right in RTL */
  gap: 16px;
}

.home-stitch-page .hs-hero__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* “קרא עוד” sits under the title, visual-right aligned */
.home-stitch-page .hs-hero__cta {
  position: static;
  flex-shrink: 0;
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.home-stitch-page .hs-hero__cta .material-symbols-outlined {
  font-size: 1.1em;
  line-height: 1;
}

/* Gold fill when the user hovers the hero panel / image */
.home-stitch-page .hs-hero__panel:hover .hs-hero__cta {
  background: var(--gradient-gold-light-button);
  color: var(--color-primary);
  border-color: transparent;
  box-shadow: var(--shadow-drop);
}

.home-stitch-page .hs-hero__panel:hover .hs-hero__cta:hover {
  box-shadow: var(--shadow-hover);
}

/* Mobile carousel dots — hidden on desktop */
.home-stitch-page .hs-hero__dots {
  display: none;
}

/* =========================================
   Quick links — Figma leaf cards (.ymas-card--quick)
   ========================================= */
.home-stitch-page .hs-quick__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
  justify-items: center;
}

.home-stitch-page .hs-quick__grid .ymas-card--quick {
  width: 100%;
  max-width: 314px;
  height: auto;
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.home-stitch-page .hs-quick__grid .ymas-card--quick:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* =========================================
   About — Figma “אנחנו כאן בשבילך”
   Keep 4 management tiles + names under each.
   ========================================= */
.home-stitch-page .hs-about__title {
  margin-bottom: 48px;
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: var(--fw-extrabold);
  line-height: 1.33;
  padding-inline-start: 28px;
  border-inline-start: 4px solid var(--color-gold);
  color: var(--color-primary);
}

.home-stitch-page .hs-about__grid {
  display: grid;
  /* President (DOM first) = visual right in RTL; 4 tiles on visual left */
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: flex-start;
}

.home-stitch-page .hs-about__president {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 20px;
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-leaf) var(--radius-sm) var(--radius-leaf)
    var(--radius-sm);
  /*
   * Padding keeps copy clear of the 100px leaf corners. overflow:hidden clips
   * children to the rounded border so text never paints over the curve.
   */
  padding: 28px 32px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  min-height: 0;
  max-height: none;
  align-items: center;
  overflow: hidden;
}

.home-stitch-page .hs-about__president-media {
  min-width: 0;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  height: 100%;
  max-height: 250px;
  border-radius: 0 0 var(--radius-leaf) 0;
  overflow: hidden;
  align-self: center;
  flex-shrink: 0;
}

.home-stitch-page .hs-about__president-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center top;
}

/*
 * Fallback when LiteSpeed serves stale HTML without .hs-about__president-media
 * (img is a direct child of .hs-about__president). Keep the same inset frame.
 */
.home-stitch-page .hs-about__president > .hs-about__president-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  align-self: center;
}

.home-stitch-page .hs-about__president-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* visual right in RTL */
  gap: 0;
  min-width: 0;
  min-height: 0;
  /* Extra inset so lines never sit on the leaf border curve */
  padding-block: 8px 12px;
  padding-inline: 4px 12px;
  overflow: visible;
}

.home-stitch-page .hs-about__president-name {
  margin: 0;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: var(--fw-extrabold);
  line-height: 1.2;
  color: var(--color-primary);
}

.home-stitch-page .hs-about__president-role {
  margin: 0 0 10px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--color-gold);
}

.home-stitch-page .hs-about__quote {
  margin: 0;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.5;
  font-weight: var(--fw-regular);
  color: #475569;
  max-width: 100%;
  /* Full quote always visible — card grows instead of clipping */
  display: block;
  overflow: visible;
}

.home-stitch-page .hs-about__management {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px) clamp(12px, 1.5vw, 24px);
  justify-items: center;
  align-content: center;
}

.home-stitch-page .hs-about__member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  max-width: 195px;
  width: 100%;
  transition: transform 0.25s ease;
}

a.hs-about__member:hover {
  transform: translateY(-2px);
}

.home-stitch-page .hs-about__member-img {
  width: min(100%, 160px);
  aspect-ratio: 195 / 203;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  margin: 0 0 12px;
  filter: none;
}

.home-stitch-page .hs-about__member-name {
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  margin: 0;
  color: var(--color-primary);
}

.home-stitch-page .hs-about__member-role {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

.home-stitch-page .hs-about__cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 4vw, 56px);
}

.home-stitch-page .hs-about__cta {
  background: var(--gradient-green-2);
  border-color: transparent;
  color: var(--color-white);
  min-height: 64px;
  padding-inline: clamp(32px, 5vw, 64px);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: var(--fw-bold);
  border-radius: 0;
}

.home-stitch-page .hs-about__cta:hover {
  background: var(--btn-bg-hover);
  box-shadow: var(--shadow-hover);
}

.home-stitch-page .hs-about__cta .material-symbols-outlined {
  font-size: 1.1em;
}

/* =========================================
   Events — Figma Tax 3.3 section chrome + cards
   ========================================= */
.home-stitch-page .hs-events .hs-section-head {
  margin-bottom: 56px;
}

.home-stitch-page .hs-events .hs-section-title {
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: var(--fw-extrabold);
  line-height: 1.33;
  padding-inline-start: 28px;
  border-inline-start: 4px solid var(--color-gold);
  color: var(--color-primary);
}

.home-stitch-page .hs-events .hs-section-link {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: var(--fw-bold);
  line-height: 30px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-stitch-page .hs-events .hs-section-link:hover {
  opacity: 0.8;
}

/* Events — desktop/tablet: multi-card grid (carousel only on mobile) */
.home-stitch-page .hs-events__carousel {
  width: 100%;
}

.home-stitch-page .hs-events__viewport {
  overflow: visible;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.home-stitch-page .hs-events__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  justify-items: center;
  padding-bottom: 16px;
  overflow: visible;
}

.home-stitch-page .hs-events__grid .ymas-card {
  max-width: 450px;
  width: 100%;
  min-width: 0;
  flex: unset;
}

.home-stitch-page .hs-events__arrows {
  display: none;
}

.home-stitch-page .hs-events__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.home-stitch-page .hs-events__arrow:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.home-stitch-page .hs-events__arrow:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* =========================================
   Agenda — Figma “על סדר היום” (light)
   Featured (DOM first) = visual right in RTL; news list = visual left.
   ========================================= */
.home-stitch-page .hs-agenda .hs-section-head {
  margin-bottom: 48px;
}

.home-stitch-page .hs-agenda .hs-section-title {
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: var(--fw-extrabold);
  line-height: 1.33;
  padding-inline-start: 28px;
  border-inline-start: 4px solid var(--color-gold);
  color: var(--color-primary);
}

.home-stitch-page .hs-agenda .hs-section-link {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: var(--fw-bold);
  line-height: 30px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-stitch-page .hs-agenda .hs-section-link:hover {
  opacity: 0.8;
}

.home-stitch-page .hs-agenda__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: start;
  padding: 0% 5%;
}

.home-stitch-page .hs-agenda__featured {
  min-width: 0;
}

/* News column — clipped to featured height; JS auto-scrolls when overflowing */
.home-stitch-page .hs-agenda__news-wrap {
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.home-stitch-page .hs-agenda__news-wrap.is-scrolling .hs-agenda__news {
  will-change: transform;
}

.home-stitch-page .hs-agenda__news-wrap.is-paused .hs-agenda__news {
  /* pause handled in JS; class kept for styling hooks */
}

.home-stitch-page .hs-agenda__featured-media {
  display: block;
  aspect-ratio: 21 / 9;
  /* Leaf corners: physical TR + BL (matches Figma featured image) */
  border-radius: var(--radius-sm) var(--radius-leaf) var(--radius-sm)
    var(--radius-leaf);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--color-white);
}

.home-stitch-page .hs-agenda__featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.home-stitch-page .hs-agenda__featured-media:hover img {
  transform: scale(1.05);
}

.home-stitch-page .hs-agenda__featured-title {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: var(--fw-extrabold);
  line-height: 1.35;
  margin: 0 0 12px;
}

.home-stitch-page .hs-agenda__featured-title a {
  background-image: var(--gradient-green-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.home-stitch-page .hs-agenda__featured-title a:hover {
  opacity: 0.9;
}

.home-stitch-page .hs-agenda__featured-excerpt {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  color: var(--color-text);
  margin: 0 0 16px;
}

.home-stitch-page .hs-agenda__featured-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: var(--fw-bold);
  color: var(--color-gold);
}

.home-stitch-page .hs-agenda__featured-link .material-symbols-outlined {
  font-size: 1.15em;
  transition: transform 0.3s ease;
}

.home-stitch-page .hs-agenda__featured-link:hover .material-symbols-outlined {
  transform: translateX(-4px);
}

.home-stitch-page .hs-agenda__news {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Featured-as-row is for mobile only (desktop keeps the image card) */
.home-stitch-page .hs-agenda__news-item--from-featured {
  display: none;
}

.home-stitch-page .hs-agenda__news-item a {
  display: block;
  padding-block: 16px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--color-primary) 12%, transparent);
  transition: opacity 0.2s ease;
}

.home-stitch-page .hs-agenda__news-item:first-child a {
  padding-top: 0;
}

.home-stitch-page .hs-agenda__news-item:last-child a {
  border-bottom: none;
}

.home-stitch-page .hs-agenda__news-item a:hover {
  opacity: 0.8;
}

.home-stitch-page .hs-agenda__news-date {
  display: block;
  font-size: 13px;
  font-weight: var(--fw-regular);
  color: var(--color-text-muted, var(--color-primary));
  opacity: 0.65;
  margin-bottom: 6px;
}

.home-stitch-page .hs-agenda__news-title {
  display: block;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  background-image: var(--gradient-green-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   Media — Figma Tax 3.3 Section 6 (2×3 press cards)
   ========================================= */
.home-stitch-page .hs-media .hs-section-head {
  margin-bottom: 40px;
}

.home-stitch-page .hs-media .hs-section-title {
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: var(--fw-extrabold);
  line-height: 1.33;
  padding-inline-start: 28px;
  border-inline-start: 4px solid var(--color-gold);
  color: var(--color-primary);
}

.home-stitch-page .hs-media .hs-section-link {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: var(--fw-bold);
  line-height: 30px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-stitch-page .hs-media .hs-section-link:hover {
  opacity: 0.8;
}

/* Media — desktop/tablet: multi-card grid (carousel only on mobile) */
.home-stitch-page .hs-media__carousel {
  width: 100%;
}

.home-stitch-page .hs-media__viewport {
  overflow: visible;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.home-stitch-page .hs-media__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(32px, 3vw, 55px);
  max-width: 1414px;
  margin-inline: auto;
  justify-items: center;
  padding-bottom: 0;
  overflow: visible;
}

/* Desktop/tablet: never leave a carousel translate on the grids */
@media (min-width: 769px) {
  .home-stitch-page .hs-events__grid,
  .home-stitch-page .hs-media__grid {
    transform: none !important;
  }
}

.home-stitch-page .hs-media__grid .ymas-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: unset;
}

.home-stitch-page .hs-media__arrows {
  display: none;
}

.home-stitch-page .hs-media__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.home-stitch-page .hs-media__arrow:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.home-stitch-page .hs-media__arrow:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* =========================================
   Footer — Figma Tax 3.3 (light grey, sitewide)
   ========================================= */
.hs-footer {
  background: var(--color-grey-light);
  color: var(--color-primary);
  font-family: var(--font-primary);
  padding-block: 32px;
  opacity: 0.98;
  direction: rtl;
  text-align: right;
}

.hs-footer__inner {
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 80px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(32px, 6vw, 120px);
  padding-block: 16px 48px;
  direction: rtl;
}

.hs-footer__logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
  text-decoration: none;
}

.hs-footer__logo img {
  height: clamp(56px, 6vw, 88px);
  width: auto;
  max-width: 228px;
  object-fit: contain;
  display: block;
}

.hs-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(32px, 5vw, 120px);
}

.hs-footer__nav-link,
.hs-footer__legal a {
  font-size: 16px;
  font-weight: var(--fw-regular);
  line-height: 1.3;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.hs-footer__nav-link:hover,
.hs-footer__legal a:hover,
.hs-footer__contact-item:hover {
  opacity: 0.75;
  color: var(--color-primary);
}

.hs-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* In RTL, start = visual right */
  align-items: start;
  text-align: right;
}

.hs-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: start;
  text-align: right;
}

.hs-footer__contact-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: var(--fw-regular);
  line-height: 1.3;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  direction: rtl;
}

.hs-footer__contact-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--color-primary);
  /* Keep icon on the visual right of the line */
  order: -1;
}

.hs-footer__social {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.hs-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  transition: opacity 0.2s ease;
}

.hs-footer__social-link:hover {
  opacity: 0.7;
  color: var(--color-primary);
}

.hs-footer__social-link svg {
  display: block;
  width: 20px;
  height: 20px;
}

.hs-footer__copy {
  margin: 0;
  padding-inline: clamp(16px, 4vw, 80px);
  text-align: center;
  font-size: 16px;
  font-weight: var(--fw-regular);
  line-height: 1.3;
  color: var(--color-primary);
}

/* =========================================
   Bottom nav (mobile)
   ========================================= */
.home-stitch-page .hs-bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 900;
  background: var(--hs-body-bg);
  border-top: 1px solid var(--hs-outline-variant);
  padding-block: 8px;
}

.home-stitch-page .hs-bottom-nav__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--hs-secondary);
}

.home-stitch-page .hs-bottom-nav__tab .material-symbols-outlined {
  font-size: 24px;
}

.home-stitch-page .hs-bottom-nav__tab.is-active {
  color: var(--hs-primary);
  font-weight: 700;
}

/* =========================================
   Scroll reveal
   ========================================= */
/* Only hide reveal targets once JS has flagged it can reveal them again,
   so content is never permanently invisible if JS fails to load. */
.home-stitch-page.hs-reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.home-stitch-page.hs-reveal-on [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* =========================================
   Elements toggled by viewport (base = desktop)
   ========================================= */
/* About: 2 nav tiles are mobile-only; portraits show on desktop. */
.home-stitch-page .hs-about__nav {
  display: none;
}

.home-stitch-page .hs-about__nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px;
  background: #fff;
  border: 1px solid var(--hs-outline-variant);
  border-radius: 0;
  color: var(--hs-primary);
  text-align: center;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.home-stitch-page .hs-about__nav-tile:hover {
  border-color: var(--hs-primary);
  box-shadow: 0 2px 8px rgba(19, 51, 54, 0.08);
}

.home-stitch-page .hs-about__nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--hs-surface-low);
  border: 1px solid var(--hs-primary);
  border-radius: 0;
}

.home-stitch-page .hs-about__nav-icon .material-symbols-outlined {
  font-size: 28px;
  color: var(--hs-primary);
}

.home-stitch-page .hs-about__nav-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hs-primary);
}

/* Section "view all" link: desktop label by default, mobile label hidden. */
.home-stitch-page .hs-section-link__mobile {
  display: none;
}

/* =========================================
   Responsive — desktop nav shrink, then hamburger ≤1024 (tablet/phone)
   ========================================= */
/* Laptops / smaller desktops: keep full nav, tighten metrics so it fits. */
@media (max-width: 1440px) {
  .hs-header__inner {
    padding-inline: 20px;
    gap: 14px;
    min-height: 80px;
  }
  /* Nav type size stays on cqi so it can still shrink when the greeting is long */
  .hs-header__actions {
    gap: 16px;
  }
  .hs-header__login {
    font-size: 15px;
  }
  .hs-header__logo-img,
  .hs-header__logo img {
    height: 64px;
    max-width: 180px;
  }
  .hs-header__join.btn,
  .hs-header__actions .btn--gold {
    min-height: 44px;
    padding-inline: 20px;
    font-size: 15px;
  }
}

@media (max-width: 1200px) {
  .hs-header__inner {
    padding-inline: 16px;
    gap: 10px;
  }
  .hs-header__logo-img,
  .hs-header__logo img {
    height: 56px;
    max-width: 150px;
  }
  .hs-header__actions {
    gap: 12px;
  }
  .hs-account {
    gap: 12px;
    max-width: min(240px, 22vw);
  }
  .hs-header__greeting {
    font-size: 16px;
  }
  .hs-header__personal {
    font-size: 15px;
  }
}

/* Tablets + phones only: hamburger + drawer */
@media (max-width: 1024px) {
  .hs-header {
    display: none;
  }
  .hs-mobile-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    height: 64px;
    padding-inline: 16px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-grey-mid);
  }
  .hs-mobile-header__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    line-height: 0;
    max-width: 100%;
  }
  .hs-mobile-header__logo {
    height: 44px;
    width: auto;
    max-width: min(200px, 50vw);
    object-fit: contain;
    display: block;
  }
  .hs-mobile-header__btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    text-decoration: none;
  }
  .hs-mobile-header__btn .material-symbols-outlined {
    font-size: 28px;
  }
}

/* =========================================
   Responsive — laptop / tablet layouts
   ========================================= */
/* Below common laptop width: 2x2 quick tiles */
@media (max-width: 1280px) {
  .home-stitch-page .hs-quick__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .home-stitch-page {
    --hs-margin: 40px;
  }
  .home-stitch-page .hs-quick__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-stitch-page .hs-about__grid,
  .home-stitch-page .hs-agenda__grid {
    grid-template-columns: 1fr;
  }
  /* About is full-width here — keep president side-by-side but capped/centered */
  .home-stitch-page .hs-about__president {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  }
  .home-stitch-page .hs-about__president-media {
    max-width: 220px;
    max-height: 220px;
  }
  .home-stitch-page .hs-events__grid,
  .home-stitch-page .hs-media__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hs-footer__inner {
    gap: 40px 48px;
  }
}

/* =========================================
   Responsive — mobile (390px artboard)
   ========================================= */
@media (max-width: 768px) {
  .home-stitch-page {
    --hs-margin: 16px;
  }

  /* Hero: horizontal swipe carousel (3 slides) + dots under CTA */
  .home-stitch-page .hs-hero__track {
    height: 400px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    direction: ltr; /* stable scrollLeft math; panel content stays RTL */
  }
  .home-stitch-page .hs-hero__track::-webkit-scrollbar {
    display: none;
  }
  .home-stitch-page .hs-hero__panel {
    display: block;
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    border-inline-start: none;
    direction: rtl;
  }
  .home-stitch-page .hs-hero__panel .hs-hero__img,
  .home-stitch-page .hs-hero__panel .hs-hero__overlay-img {
    filter: grayscale(0);
  }
  .home-stitch-page .hs-hero__panel .hs-hero__overlay-tint {
    background: rgba(19, 51, 54, 0);
  }
  /* Fill CTA on the visible (active) slide */
  .home-stitch-page .hs-hero__panel.is-active .hs-hero__cta {
    background: var(--gradient-gold-light-button);
    color: var(--color-primary);
    border-color: transparent;
    box-shadow: var(--shadow-drop);
  }
  .home-stitch-page .hs-hero__title {
    font-size: 22px;
    white-space: normal;
  }
  /* Fixed dots overlay — stay put while slides scroll underneath */
  .home-stitch-page .hs-hero__content {
    padding-bottom: 48px; /* leave room under CTA for fixed dots */
  }
  .home-stitch-page .hs-hero__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: absolute;
    inset-inline: 0;
    bottom: 20px;
    z-index: 3;
    width: 100%;
    margin: 0;
    padding: 0;
    pointer-events: none; /* only dots receive clicks */
    /* Match LTR slide track: leftmost dot = first/left slide, rightmost = last. */
    direction: ltr;
  }
  .home-stitch-page .hs-hero__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
    transition:
      background 0.2s ease,
      transform 0.2s ease;
  }
  .home-stitch-page .hs-hero__dot.is-active {
    background: var(--color-gold);
    transform: scale(1.15);
  }

  /* Quick links: 2x2 leaf cards */
  .home-stitch-page .hs-quick__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .home-stitch-page .hs-quick__grid .ymas-card--quick {
    max-width: none;
  }

  .home-stitch-page .hs-section-title {
    font-size: 24px;
    line-height: 32px;
  }

  .home-stitch-page .hs-about__title {
    margin-bottom: 32px;
    padding-inline-start: 16px;
  }
  .home-stitch-page .hs-about__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  /* Stacked president: photo on top, centered copy, square image (no leaf radius) */
  .home-stitch-page .hs-about__president {
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
    padding: 24px 28px 28px;
    gap: 16px;
  }
  .home-stitch-page .hs-about__president-media {
    max-width: 200px;
    width: min(200px, 56%);
    max-height: none;
    margin-inline: auto;
    order: -1;
    border-radius: 0;
  }
  .home-stitch-page .hs-about__president > .hs-about__president-img {
    border-radius: 0;
  }
  .home-stitch-page .hs-about__president-body {
    align-items: center;
    text-align: center;
    width: 100%;
    padding-inline: 8px;
  }
  .home-stitch-page .hs-about__quote {
    max-width: none;
    text-align: center;
  }
  .home-stitch-page .hs-about__management {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .home-stitch-page .hs-about__member-img {
    width: min(100%, 120px);
  }
  .home-stitch-page .hs-about__cta {
    width: 100%;
    max-width: 420px;
    min-height: 56px;
    padding-inline: 24px;
  }

  /* Agenda: news rows only — hide featured card; 6-row infinite scroll */
  .home-stitch-page .hs-agenda .hs-section-head {
    margin-bottom: 32px;
  }
  .home-stitch-page .hs-agenda .hs-section-title {
    padding-inline-start: 16px;
  }
  .home-stitch-page .hs-agenda__grid {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }
  .home-stitch-page .hs-agenda__featured {
    display: none;
  }
  .home-stitch-page .hs-agenda__news-wrap {
    overflow: hidden;
  }
  .home-stitch-page .hs-agenda__news-item--from-featured {
    display: list-item;
  }

  /* Events + Media: one-card carousel with arrows (mobile only) */
  .home-stitch-page .hs-events .hs-section-head {
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .home-stitch-page .hs-events .hs-section-title {
    padding-inline-start: 16px;
  }
  .home-stitch-page .hs-events__viewport {
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    margin-inline: auto;
  }
  .home-stitch-page .hs-events__grid {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    padding-bottom: 0;
    justify-items: stretch;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
  }
  .home-stitch-page .hs-events__grid .ymas-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
  }
  .home-stitch-page .hs-events__arrows {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
  }
  /* Events "view all" link -> mobile label */
  .home-stitch-page .hs-events .hs-section-link__desktop {
    display: none;
  }
  .home-stitch-page .hs-events .hs-section-link__mobile {
    display: inline;
  }

  .home-stitch-page .hs-media .hs-section-head {
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .home-stitch-page .hs-media .hs-section-title {
    padding-inline-start: 16px;
  }
  .home-stitch-page .hs-media__viewport {
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    margin-inline: auto;
  }
  .home-stitch-page .hs-media__grid {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    max-width: none;
    margin-inline: 0;
    justify-items: stretch;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
  }
  .home-stitch-page .hs-media__grid .ymas-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
  }
  .home-stitch-page .hs-media__arrows {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
  }
  /* Footer: stack Figma columns on small screens */
  .hs-footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding-block: 8px 32px;
  }
  .hs-footer__nav {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .hs-footer__legal,
  .hs-footer__contact {
    align-items: center;
    text-align: center;
  }
  .hs-footer__social {
    padding-top: 0;
  }
  .hs-footer__copy {
    font-size: 14px;
  }

  /* Show bottom nav */
  .home-stitch-page .hs-bottom-nav {
    display: flex;
    justify-content: space-around;
  }
}

/* =========================================
   Responsive — mobile phones (≤600px)
   ========================================= */
@media (max-width: 600px) {
  .home-stitch-page .hs-quick,
  .home-stitch-page .hs-about,
  .home-stitch-page .hs-events,
  .home-stitch-page .hs-agenda,
  .home-stitch-page .hs-media {
    padding-block: 40px;
  }
  .home-stitch-page .hs-hero__track {
    height: 340px;
  }
  /* Tap targets stay comfortable */
  .home-stitch-page .hs-bottom-nav__tab {
    min-height: 44px;
    justify-content: center;
  }
}

/* =========================================
   Responsive — small phones (≤400px)
   ========================================= */
@media (max-width: 400px) {
  .home-stitch-page .hs-section-title {
    font-size: 22px;
    line-height: 28px;
  }
  .home-stitch-page .hs-quick__grid {
    gap: 10px;
  }
}
