/**
 * Segulot listing template â€” fluid type & spacing.
 * Desktop caps match Figma; mobile floors ~390px (Figma node 360:1020).
 */

 .page-segulot {
  --segulot-fluid-levi: clamp(2.1875rem, 1.15rem + 2.6vw, 3.75rem);
  --segulot-fluid-card-title: clamp(1.5625rem, 1.28rem + 0.95vw, 2.5rem);
  --segulot-fluid-quote: clamp(1.125rem, 1rem + 0.55vw, 1.5rem);
  --segulot-fluid-body: clamp(1rem, 0.92rem + 0.42vw, 1.375rem);
  --segulot-fluid-hero-min: clamp(26rem, 42vw + 14rem, 41.8125rem);
  --segulot-card-pad-y: clamp(1.5rem, 4vw, 2.5rem);
  --segulot-card-pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --segulot-card-gap: clamp(0.65rem, 1.8vw, 1.25rem);
  --segulot-card-radius: clamp(0.648rem, 1.5vw, 1.25rem);
  --segulot-grid-gap-x: clamp(1rem, 2.5vw, 1.875rem);
  --segulot-grid-gap-y: clamp(0.75rem, 2vw, 1.1875rem);
  --segulot-heading-margin-b: clamp(2rem, 6vw, 4.5rem);
  --segulot-faq-pad-y: clamp(2.75rem, 8vw, 4.5rem);
}

.page-segulot .hero {
  min-height: var(--segulot-fluid-hero-min);
  background-image:
    linear-gradient(rgba(17, 27, 22, 0.56), rgba(17, 27, 22, 0.56)),
    url("../images/dark-texture.jpg");
  background-size: cover;
  background-position: center;
}

.page-segulot .hero__content {
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.page-segulot .hero__title {
  max-width: min(100%, 57.5rem);
}

.page-segulot .hero__text {
  max-width: min(100%, 38.75rem);
}

.page-segulot .tab-row {
  width: min(100%, 33.75rem);
}

.page-segulot .segulot-cards-section {
  padding-top: clamp(1.5rem, 3.2vw, 2rem);
  padding-bottom: clamp(2.25rem, 6vw, 3.5rem);
}

.page-segulot .segulot-cards-section .section-heading {
  width: min(100%, 32.4375rem);
  margin: 0 auto var(--segulot-heading-margin-b);
  font-family: "Levi DL v1 AAA", var(--font-display);
  font-size: var(--segulot-fluid-levi);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
}

.page-segulot .segulot-filter-panel {
  width: min(100%, 980px);
  margin: calc(var(--segulot-heading-margin-b) * -0.45) auto clamp(1.25rem, 3vw, 2rem);
  padding: clamp(0.95rem, 2.2vw, 1.25rem) clamp(0.95rem, 2.8vw, 1.75rem);
  border: 1px solid rgba(178, 138, 59, 0.22);
  border-radius: clamp(1rem, 2.2vw, 1.35rem);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(247, 240, 225, 0.76)),
    rgba(248, 244, 235, 0.72);
  box-shadow: 0 14px 32px rgba(24, 36, 30, 0.055);
  direction: rtl;
}

.page-segulot .segulot-filter-panel__title {
  margin: 0 0 0.85rem;
  color: rgba(24, 36, 30, 0.72);
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: clamp(0.95rem, 0.9rem + 0.18vw, 1.08rem);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.page-segulot .segulot-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.5rem, 1.4vw, 0.75rem);
}

.page-segulot .segulot-filter__button {
  appearance: none;
  min-height: 2.45rem;
  border: 1px solid rgba(139, 115, 75, 0.26);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.84);
  color: rgba(24, 36, 30, 0.82);
  cursor: pointer;
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: clamp(0.92rem, 0.87rem + 0.2vw, 1.05rem);
  font-weight: 500;
  line-height: 1;
  padding: 0.68rem 1.08rem;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.page-segulot .segulot-filter__button:hover,
.page-segulot .segulot-filter__button:focus-visible {
  border-color: rgba(178, 138, 59, 0.5);
  background: rgba(255, 249, 235, 0.96);
  box-shadow: 0 8px 18px rgba(24, 36, 30, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.68);
  outline: none;
  transform: translateY(-1px);
}

.page-segulot .segulot-filter__button.is-active {
  border-color: rgba(157, 117, 44, 0.82);
  background: linear-gradient(180deg, #c49a48, #a77a2f);
  color: #fffaf0;
  box-shadow: 0 10px 22px rgba(139, 115, 75, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.page-segulot .segulot-filter-select-wrap {
  position: relative;
  display: none;
  width: 100%;
}

.page-segulot .segulot-filter-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 0.48rem;
  height: 0.48rem;
  border-inline-end: 2px solid rgba(24, 36, 30, 0.58);
  border-block-end: 2px solid rgba(24, 36, 30, 0.58);
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.page-segulot .segulot-filter-select {
  appearance: none;
  width: 100%;
  min-height: 3.25rem;
  border: 1px solid rgba(139, 115, 75, 0.28);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.92);
  color: #18241e;
  direction: rtl;
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.75rem 1rem 0.75rem 2.7rem;
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 18px rgba(24, 36, 30, 0.045);
}

.page-segulot .segulot-filter-select:focus-visible {
  border-color: rgba(178, 138, 59, 0.64);
  outline: none;
  box-shadow: 0 0 0 3px rgba(178, 138, 59, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.page-segulot .segulot-filter__empty {
  width: min(100%, 900px);
  margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(139, 115, 75, 0.22);
  border-radius: 14px;
  background: rgba(248, 244, 235, 0.72);
  color: rgba(24, 36, 30, 0.78);
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: clamp(1rem, 0.92rem + 0.25vw, 1.125rem);
  line-height: 1.45;
  text-align: center;
}

.page-segulot .segulot-cards-section .segula-card[hidden] {
  display: none !important;
}

.page-segulot .segulot-grid .segula-card.is-filter-last-visible:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 690px;
  justify-self: center;
}

.page-segulot .segulot-cards-section .segulot-grid {
  width: min(100%, 1410px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(min-content, auto);
  column-gap: var(--segulot-grid-gap-x);
  row-gap: var(--segulot-grid-gap-y);
  justify-content: stretch;
  align-items: start;
  min-width: 0;
}

.page-segulot .segulot-cards-section .segula-card {
  position: relative;
  box-sizing: border-box;
  justify-self: center;
  width: 100%;
  max-width: 690px;
  min-width: 0;
  height: auto;
  min-height: clamp(20rem, 52vw, 25.625rem);
  padding: var(--segulot-card-pad-y) var(--segulot-card-pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--segulot-card-gap);
  text-align: center;
  border-radius: var(--segulot-card-radius);
  background: none;
  isolation: isolate;
}

.page-segulot .segulot-cards-section .segula-card__status-badge {
  top: 14px;
  right: 14px;
  z-index: 2;
}

.page-segulot .segulot-cards-section .segula-card::before,
.page-segulot .segulot-cards-section .segula-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.page-segulot .segulot-cards-section .segula-card::before {
  background: url("../images/parchment-bg.jpg") center / cover no-repeat;
}

.page-segulot .segulot-cards-section .segula-card::after {
  background: rgba(244, 239, 229, 0.72);
}

.page-segulot .segulot-cards-section .segula-card > * {
  /* position: relative; */
  z-index: 1;
}

.page-segulot .segulot-cards-section .segula-card__header {
  position: relative;
  width: min(100%, 24.25rem);
  aspect-ratio: 388 / 154;
  height: auto;
  min-height: 0;
  display: grid;
  place-items: start;
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 0;
  justify-content: center;
  align-items: center;
}

.page-segulot .segulot-cards-section .card-ornament {
  position: absolute;
  width: 100%;
  max-width: none;
  height: 170%;
  object-fit: fill;
}

.page-segulot .segulot-cards-section .segula-card__title {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Levi DL v1 AAA", var(--font-display);
  font-size: var(--segulot-fluid-card-title);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  display: inline-block;
}

.page-segulot .segulot-cards-section .segula-card__copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  gap: var(--segulot-card-gap);
  flex: 1 1 auto;
  color: #18241e;
  line-height: 1.45;
}

.page-segulot .segulot-cards-section .segula-card__verse-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4em;
  width: 100%;
  min-width: 0;
}

.page-segulot .segulot-cards-section .segula-card__quote {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font-family: "Almoni ML v5 AAA DemiBold", "Almoni ML v5 AAA", var(--font-body);
  font-size: var(--segulot-fluid-quote);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  color: rgba(24, 36, 30, 0.68);
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.page-segulot .segulot-cards-section .segula-card__source {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font-family: "Almoni ML v5 AAA DemiBold", "Almoni ML v5 AAA", var(--font-body);
  font-size: calc(var(--segulot-fluid-quote) * 0.88);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  color: rgba(61, 74, 66, 0.75);
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.page-segulot .segulot-cards-section .segula-card__description {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: var(--segulot-fluid-body);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.page-segulot .segulot-cards-section .segula-card .btn--gold {
  /* display: inline-flex; */
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(0.5rem, 1.2vw, 0.625rem) clamp(1.5rem, 4vw, 2rem);
  border-radius: 50px;
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.25rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.page-segulot .segulot-cards-section .segula-card:has(.btn[disabled]){
  opacity: 0.7;
}

.page-segulot .segulot-cards-section .segula-card .btn[disabled][data-tooltip] {
  position: relative;
  cursor: not-allowed;
  display: block;
}

.page-segulot .segulot-cards-section .segula-card .btn[disabled][data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  inset-inline-start: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(50%);
  background: rgba(24, 36, 30, 0.92);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 5;
}

.page-segulot .segulot-cards-section .segula-card .btn[disabled][data-tooltip]:hover::after {
  opacity: 1;
}

@media (max-width: 640px) {
  .page-segulot .segulot-cards-section .segula-card .btn[disabled][data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 8px);
    white-space: normal;
    min-width: 120px;
    max-width: 220px;
    text-align: center;
  }
}

/* Center lone card on last row only when count is odd (1,3,5â€¦). Even counts stay 2-up. */
.page-segulot .segulot-grid .segula-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 690px;
  justify-self: center;
}

.segulot-runtime-notice {
  width: min(100%, 900px);
  margin: 0 auto 24px;
  padding: 12px 18px;
  border-radius: 12px;
  text-align: center;
}

.segulot-runtime-notice--error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

.segulot-runtime-notice--empty {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7f6000;
}

.page-segulot .segulot-faq-section {
  direction: rtl;
  padding-top: var(--segulot-faq-pad-y);
  padding-bottom: var(--segulot-faq-pad-y);
}

.page-segulot .segulot-faq-section .section-heading {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  font-size: var(--segulot-fluid-levi);
  line-height: 1.08;
  text-align: center;
}

.page-segulot .segulot-faq-section .faq-columns {
  width: min(100%, 1411px);
  margin: 0 auto;
  direction: rtl;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.875rem);
  align-items: start;
}

.page-segulot .segulot-faq-section .faq-stack {
  gap: clamp(0.875rem, 2vw, 1.25rem);
  align-content: start;
}

.page-segulot .segulot-faq-section .faq-item {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: clamp(1.25rem, 3vw, 1.875rem);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(24, 36, 30, 0.05);
  overflow: hidden;
}

.page-segulot .segulot-faq-section .faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 2vw, 1.125rem);
  min-height: 52px;
  padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.875rem, 2.5vw, 1.25rem);
  cursor: pointer;
  list-style: none;
}

.page-segulot .segulot-faq-section .faq-question::-webkit-details-marker {
  display: none;
}

.page-segulot .segulot-faq-section .faq-question__text {
  flex: 1 1 auto;
  margin: 0;
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.375rem);
  font-weight: 500;
  line-height: 1.2;
  color: #18241e;
  text-align: right;
}

.page-segulot .segulot-faq-section .faq-toggle {
  position: relative;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
}

.page-segulot .segulot-faq-section .faq-toggle::before,
.page-segulot .segulot-faq-section .faq-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: #18241e;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-segulot .segulot-faq-section .faq-toggle::before {
  width: 12px;
  height: 2px;
}

.page-segulot .segulot-faq-section .faq-toggle::after {
  width: 2px;
  height: 12px;
}

.page-segulot .segulot-faq-section .faq-item[open] .faq-question {
  padding-bottom: 6px;
}

.page-segulot .segulot-faq-section .faq-item[open] .faq-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0);
}

.page-segulot .segulot-faq-section .faq-answer {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0 clamp(0.875rem, 2.5vw, 1.25rem) clamp(0.875rem, 2vw, 1.125rem);
}

.page-segulot .segulot-faq-section .faq-answer p {
  margin: 0;
  font-family: "Almoni ML v5 AAA", var(--font-body);
  font-size: clamp(1rem, 0.92rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  color: rgba(24, 36, 30, 0.82);
  text-align: right;
}

@media (max-width: 1100px) {
  .page-segulot .segulot-cards-section .segulot-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(0.75rem, 2vw, 1.5rem);
    row-gap: clamp(0.625rem, 1.8vw, 1.125rem);
  }

  .page-segulot .segulot-cards-section .segula-card {
    min-height: clamp(18rem, 48vw, 22rem);
  }
}

@media (max-width: 900px) {
  .page-segulot .hero {
    min-height: clamp(32rem, 38vw + 12rem, 37.5rem);
  }

  .page-segulot .hero__content {
    padding-top: clamp(1.5rem, 4vw, 2.125rem);
  }

  .page-segulot .hero__title,
  .page-segulot .hero__text,
  .page-segulot .tab-row {
    max-width: 100%;
    width: 100%;
  }

  .page-segulot .segulot-cards-section {
    padding-top: clamp(1rem, 3vw, 1.5rem);
    padding-bottom: clamp(1.75rem, 5vw, 2.75rem);
  }

  .page-segulot .segulot-cards-section .section-heading {
    width: auto;
    margin-bottom: clamp(2rem, 6vw, 2.5rem);
    font-size: var(--segulot-fluid-levi);
  }

  .page-segulot .segulot-cards-section .segulot-grid {
    width: 100%;
    grid-template-columns: 1fr;
    row-gap: clamp(1rem, 3vw, 1.25rem);
  }

  .page-segulot .segulot-faq-section {
    padding-top: clamp(2.25rem, 6vw, 3rem);
    padding-bottom: clamp(2.5rem, 7vw, 3.5rem);
  }

  .page-segulot .segulot-faq-section .section-heading {
    margin-bottom: clamp(2rem, 6vw, 2.5rem);
    font-size: var(--segulot-fluid-levi);
  }

  .page-segulot .segulot-faq-section .faq-columns {
    width: 100%;
    grid-template-columns: 1fr;
    gap: clamp(0.875rem, 2.5vw, 1.25rem);
  }

  .page-segulot .segulot-faq-section .faq-stack:nth-child(2) {
    display: none;
  }

  .page-segulot .segulot-faq-section .faq-question__text {
    font-size: clamp(0.9375rem, 0.88rem + 0.4vw, 1.25rem);
  }

  .page-segulot .segulot-faq-section .faq-answer p {
    font-size: clamp(0.9375rem, 0.88rem + 0.35vw, 1.0625rem);
  }

  .page-segulot .segulot-cards-section .segula-card {
    width: 100%;
    min-height: clamp(17.5rem, 48vw, 20.5rem);
    padding: var(--segulot-card-pad-y) var(--segulot-card-pad-x);
    gap: var(--segulot-card-gap);
    border-radius: var(--segulot-card-radius);
    position: relative;
  }

  .page-segulot .segulot-cards-section .segula-card__header {
    /* width: min(100%, 12.58rem); */
    /* aspect-ratio: 388 / 154; */
  }

  .page-segulot .segulot-cards-section .segula-card__title {
    margin-top: 0;
    padding-inline: 0;
  }

  .page-segulot .segulot-cards-section .segula-card__copy {
    gap: var(--segulot-card-gap);
  }

  .page-segulot .segulot-cards-section .segula-card__quote {
    font-size: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
    text-align: center;
  }

  .page-segulot .segulot-cards-section .segula-card__source {
    font-size: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  }

  .page-segulot .segulot-cards-section .segula-card__description {
    font-size: clamp(0.9375rem, 0.88rem + 0.35vw, 1.125rem);
  }

  .page-segulot .segulot-cards-section .segula-card .btn--gold {
    font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
    margin-top: 0;
  }

  .page-segulot .segulot-grid .segula-card:last-child:nth-child(odd) { 
    
    grid-column: auto;
    /* max-width: none; */
  }
}

@media (max-width: 620px) {
  .page-segulot .hero {
    min-height: clamp(28rem, 52vw + 10rem, 34rem);
  }

  .page-segulot .tab-row {
    flex-wrap: nowrap;
    width: min(100%, 26.25rem);
  }

  .page-segulot .segulot-filter-panel {
    width: 100%;
    margin: 0 auto clamp(1.5rem, 5vw, 2rem);
    padding: 0.9rem;
    border-radius: 1rem;
  }

  .page-segulot .segulot-filter-panel__title {
    margin-bottom: 0.65rem;
    font-size: 0.98rem;
  }

  .page-segulot .segulot-filter--chips {
    display: none;
  }

  .page-segulot .segulot-filter-select-wrap {
    display: block;
  }

  .page-segulot .tab-row .tab-pill {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: clamp(0.65rem, 2vw, 0.75rem) clamp(0.5rem, 2.5vw, 0.625rem);
    font-size: clamp(0.78rem, 3.4vw, 0.95rem);
    white-space: nowrap;
  }

  .page-segulot .segulot-cards-section .segula-card__header {
    /* width: min(100%, 51.5%); */
    /* max-width: 12.58rem; */
  }

  .page-segulot .segulot-cards-section .segula-card__title {
    font-size: clamp(1.25rem, 1.05rem + 1vw, 1.45rem);
  }

  .page-segulot .segulot-faq-section .faq-item {
    border-radius: clamp(1rem, 2.5vw, 1.5rem);
  }

  .page-segulot .segulot-faq-section .faq-question__text {
    font-size: clamp(0.875rem, 0.82rem + 0.45vw, 1rem);
  }

  .page-segulot .segulot-faq-section .faq-toggle {
    width: 10px;
    height: 10px;
    flex-basis: 10px;
  }

  .page-segulot .segulot-faq-section .faq-toggle::before {
    width: 10px;
  }

  .page-segulot .segulot-faq-section .faq-toggle::after {
    height: 10px;
  }
}
