/* Destination guides — "מדריכי יעדים" country carousel on the blog hub (Pages/laya/blog.html, js/blog-guides.js)
   + guide cards reused at the end of the guide articles (Pages/laya/blog-posts/guide-*.html) */

:root {
  --blog-guides-interval: 8s;
  --blog-guides-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --blog-guides-card-w: clamp(200px, 17vw, 232px);
}

/* ---------- section ---------- */
.blog-guides.section.section-stack {
  padding-block: var(--section-stack-padding-y) 0;
}

.blog-guides__inner {
  display: flex;
  flex-direction: column;
  gap: var(--padding);
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  box-sizing: border-box;
}

.blog-guides__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.blog-guides__title {
  margin: 0;
  font-size: var(--font-main);
  font-weight: 700;
  line-height: normal;
  color: var(--color-black);
}

.blog-guides__subtitle {
  margin: 0;
  max-width: 62ch;
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--color-dark-grey);
}

.blog-guides__carousel {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
}

/* All slides share one grid cell: the section keeps one height while countries cross-fade (no layout shift) */
.blog-guides__slides {
  display: grid;
}

.blog-guides__slide {
  grid-area: 1 / 1;
  display: flex;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s var(--blog-guides-ease),
    visibility 0s linear 0.8s;
}

.blog-guides__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition:
    opacity 0.8s var(--blog-guides-ease),
    visibility 0s;
}

/* ---------- the country container ---------- */
.blog-guides__stage {
  --tint-a: rgba(199, 235, 242, 0.55);
  --tint-b: rgba(221, 199, 227, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 18px);
  width: 100%;
  padding: clamp(14px, 2vw, 26px);
  border-radius: clamp(24px, 2.6vw, 34px);
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
  background: var(--color-bg);
  box-shadow:
    0 24px 60px -28px rgba(70, 82, 120, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  direction: rtl;
}

.blog-guides__slide--thailand .blog-guides__stage {
  --tint-a: rgba(199, 235, 242, 0.6);
  --tint-b: rgba(222, 241, 192, 0.55);
}

.blog-guides__slide--greece .blog-guides__stage {
  --tint-a: rgba(193, 214, 241, 0.6);
  --tint-b: rgba(221, 199, 227, 0.5);
}

.blog-guides__slide--japan .blog-guides__stage {
  --tint-a: rgba(221, 199, 227, 0.6);
  --tint-b: rgba(193, 214, 241, 0.5);
}

/* blurred colour mesh made from the country's own artwork */
.blog-guides__mesh {
  position: absolute;
  inset: -12%;
  z-index: -2;
  pointer-events: none;
}

.blog-guides__mesh img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(46px) saturate(1.7) brightness(1.04);
  transform: scale(1.25);
}

.blog-guides__slide.is-active .blog-guides__mesh img {
  animation: blog-guides-mesh 14s ease-in-out infinite alternate;
}

@keyframes blog-guides-mesh {
  from {
    transform: scale(1.25) translate(0, 0) rotate(0deg);
  }
  to {
    transform: scale(1.38) translate(-3%, 2%) rotate(4deg);
  }
}

/* soft veil: keeps text crisp, adds the brand pastel glow */
.blog-guides__stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(50% 70% at 0% 100%, var(--tint-a) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(45% 60% at 100% 100%, var(--tint-b) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(250, 253, 252, 0.28) 0%, rgba(250, 253, 252, 0.5) 100%);
}

.blog-guides__top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
}

.blog-guides__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 1vw, 12px);
  min-width: 0;
  text-align: right;
}

.blog-guides__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 4px 14px rgba(19, 24, 26, 0.06);
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-black);
}

.blog-guides__chip img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: block;
}

.blog-guides__country {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-black);
}

.blog-guides__text {
  margin: 0;
  max-width: 46ch;
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--color-light-black);
}

.blog-guides__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 4px;
}

.blog-guides__cta svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.blog-guides__count {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}

/* artwork card */
.blog-guides__art {
  position: relative;
  aspect-ratio: 1172 / 624;
  border-radius: clamp(18px, 2vw, 26px);
  overflow: hidden;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.5),
    0 28px 50px -24px rgba(60, 70, 110, 0.45);
}

.blog-guides__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- entrance choreography when a country becomes active
   (the outgoing country keeps its content and simply fades with its slide) ---------- */
.blog-guides__slide.is-active .blog-guides__rise {
  animation: blog-guides-rise 0.7s var(--blog-guides-ease) both;
  animation-delay: calc(0.08s + var(--i, 0) * 0.07s);
}

.blog-guides__slide.is-active .blog-guides__art {
  animation: blog-guides-art 0.9s var(--blog-guides-ease) both;
}

.blog-guides__slide.is-active .blog-guides__art img {
  animation: blog-guides-zoom calc(var(--blog-guides-interval) + 1.2s) ease-out both;
}

.blog-guides__slide.is-active .blog-guides__list--row .blog-guides__item {
  animation: blog-guides-rise 0.6s var(--blog-guides-ease) both;
  animation-delay: calc(0.22s + min(var(--i, 0), 6) * 0.05s);
}

@keyframes blog-guides-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes blog-guides-art {
  from {
    opacity: 0;
    transform: translateX(-28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes blog-guides-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

/* ---------- guide cards ---------- */
.blog-guides__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  direction: rtl;
}

/* inside the country container: a horizontal row of glass cards */
.blog-guides__list--row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 4px 2px 8px;
  margin-inline: -2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(19, 24, 26, 0.18) transparent;
}

/* edge fades: only on the side where more cards are hidden — js/blog-guides.js toggles
   .is-more-left / .is-more-right from the scroll position, so the first/last card is never faded */
@property --blog-guides-fade-l {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

@property --blog-guides-fade-r {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

.blog-guides__list--row {
  --blog-guides-fade-l: 0px;
  --blog-guides-fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--blog-guides-fade-l), #000 calc(100% - var(--blog-guides-fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--blog-guides-fade-l), #000 calc(100% - var(--blog-guides-fade-r)), transparent 100%);
  transition:
    --blog-guides-fade-l 0.3s ease,
    --blog-guides-fade-r 0.3s ease;
}

.blog-guides__list--row.is-more-left {
  --blog-guides-fade-l: clamp(48px, 7vw, 96px);
}

.blog-guides__list--row.is-more-right {
  --blog-guides-fade-r: clamp(48px, 7vw, 96px);
}

.blog-guides__list--row .blog-guides__item {
  flex: 0 0 var(--blog-guides-card-w);
  scroll-snap-align: start;
}

.blog-guides__item {
  margin: 0;
  min-width: 0;
}

.blog-guides__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  min-height: 168px;
  padding: 18px 18px 48px;
  border-radius: var(--radius-card);
  background: var(--color-light-grey-opacity);
  border: 1px solid var(--color-light-grey);
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  text-align: right;
  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--cta-transition),
    box-shadow var(--transition);
}

.blog-guides__list--row .blog-guides__link {
  min-height: 0;
  gap: 6px;
  padding: 14px 14px 36px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 8px 24px -16px rgba(60, 70, 110, 0.4);
}

.blog-guides__link:hover {
  background: var(--color-light-grey);
  border-color: var(--color-natural-grey);
  transform: translateY(-3px);
}

.blog-guides__list--row .blog-guides__link:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 14px 30px -16px rgba(60, 70, 110, 0.45);
}

.blog-guides__link:focus-visible {
  outline: 2px solid var(--color-blue-dark);
  outline-offset: 3px;
}

.blog-guides__kind {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-white);
  font-size: var(--font-smallest);
  line-height: 1.4;
  color: var(--color-dark-grey);
}

.blog-guides__name {
  font-size: var(--font-subtitle);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-black);
}

.blog-guides__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-dark-grey);
}

.blog-guides__arrow {
  position: absolute;
  left: 18px;
  bottom: 16px;
  width: 20px;
  height: 20px;
  transition: transform var(--cta-transition);
}

.blog-guides__link:hover .blog-guides__arrow,
.blog-guides__link:focus-visible .blog-guides__arrow {
  transform: translateX(-3px);
}

.blog-guides-related .blog-guides__list {
  width: 100%;
}

/* ---------- controls: next · dots · prev · pause (shared site components) ---------- */
.blog-guides__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  direction: ltr;
}

.blog-guides__arrow-btn,
.blog-guides__toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 9999px;
}

.blog-guides__arrow-btn svg {
  width: 20px;
  height: 20px;
  color: var(--color-black);
}

.blog-guides__toggle {
  margin-inline-start: 6px;
}

.blog-guides__toggle-icon {
  width: 24px;
  height: 24px;
}

.blog-guides__toggle[aria-pressed='false'] .blog-guides__toggle-icon--play,
.blog-guides__toggle[aria-pressed='true'] .blog-guides__toggle-icon--pause {
  display: none;
}

.blog-guides__toggle[aria-pressed='true'] {
  background: var(--color-green);
}

.blog-guides__arrow-btn:focus-visible,
.blog-guides__toggle:focus-visible {
  outline: 2px solid var(--color-blue-dark);
  outline-offset: 2px;
}

/* dots: the homepage reviews pill pagination, with a progress fill on the active one */
.blog-guides__dots {
  display: flex;
  align-items: center;
  gap: var(--kpi-reviews-dot-gap, 5px);
  direction: rtl;
}

.blog-guides__dot {
  position: relative;
  width: var(--kpi-reviews-dot-size, 10px);
  height: var(--kpi-reviews-dot-size, 10px);
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--color-blue);
  cursor: pointer;
  transition:
    width 0.38s var(--blog-guides-ease),
    background-color 0.28s ease;
}

.blog-guides__dot::before {
  /* larger hit area without changing the look */
  content: '';
  position: absolute;
  inset: -10px -4px;
}

.blog-guides__dot.is-active {
  width: var(--kpi-reviews-dot-active-w, 50px);
  background: var(--color-blue); /* track — the dark-blue fill grows over it */
  overflow: hidden;
}

/* progress of the 3s timer — js/blog-guides.js sets scaleX(0…1) every frame (grows from the right, RTL) */
.blog-guides__dot-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-blue-dark);
  transform: scaleX(0);
  transform-origin: right center;
}

/* paused / reduced motion: the selected pill is solid dark blue */
.blog-guides__carousel:not(.is-autoplay) .blog-guides__dot.is-active .blog-guides__dot-fill {
  transform: scaleX(1) !important;
}

.blog-guides__dot:focus-visible {
  outline: 2px solid var(--color-blue-dark);
  outline-offset: 3px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .blog-guides__top {
    grid-template-columns: 1fr;
  }

  .blog-guides__art {
    order: -1;
    aspect-ratio: 16 / 7; /* shorter on phones; the centred artwork crops cleanly */
  }

  .blog-guides__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .blog-guides__list {
    grid-template-columns: 1fr;
  }

  .blog-guides__text {
    font-size: var(--font-body);
  }

  .blog-guides__chip {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-guides__slide,
  .blog-guides__slide.is-active {
    transition: none;
  }

  .blog-guides__slide.is-active .blog-guides__rise,
  .blog-guides__slide.is-active .blog-guides__art,
  .blog-guides__slide.is-active .blog-guides__art img,
  .blog-guides__slide.is-active .blog-guides__mesh img,
  .blog-guides__slide.is-active .blog-guides__list--row .blog-guides__item {
    animation: none;
  }

  .blog-guides__link,
  .blog-guides__arrow,
  .blog-guides__dot {
    transition: none;
  }

  .blog-guides__link:hover {
    transform: none;
  }
}

/* compact cards inside the country container */
.blog-guides__list--row .blog-guides__name {
  font-size: var(--font-body);
}

.blog-guides__list--row .blog-guides__desc {
  -webkit-line-clamp: 2;
  font-size: 13px;
}

.blog-guides__list--row .blog-guides__arrow {
  left: 14px;
  bottom: 12px;
  width: 18px;
  height: 18px;
}
