/* Destinations section: cinematic full-bleed backdrop */
#dest {
  position: relative;
  max-width: none;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}
#dest::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: url("../../assets/images/destinations/destinations-bg.webp") center 45% / cover no-repeat;
  filter: blur(6px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 60px,
    black calc(100% - 60px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 60px,
    black calc(100% - 60px),
    transparent 100%
  );
}
#dest > h2,
#dest > p,
#dest > .rw {
  position: relative;
  z-index: 2;
  max-width: calc(1300px - 14vw);
  margin-left: auto;
  margin-right: auto;
}
#dest h2,
#dest p {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* Destination cards rail and arrows */
.rw {
  position: relative;
}
.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.dc {
  flex: 0 0 280px;
  height: 400px;
  transition:
    height 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    margin 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  cursor: pointer;
  overflow: hidden;
}
.dc img,
.dc i {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.dc:hover img,
.dc:hover i {
  transform: scale(1.07);
}
.dc::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(4, 18, 11, 0.94) 0%,
    rgba(4, 18, 11, 0.5) 45%,
    transparent 75%
  );
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.dc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #04120bcc, transparent 55%);
  z-index: 1;
  pointer-events: none;
}
.dc-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.dc h3,
.dc small {
  position: relative;
  z-index: 2;
}
.dc h3 {
  font-size: 2rem;
  margin: 0;
}
.dc-desc {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.45;
  color: #e5ece6;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(6px);
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    max-height 0.35s ease,
    margin-top 0.35s ease;
}
.dc small {
  opacity: 0.8;
}
.rar {
  display: none;
}

/* Mobile (< 768px): Small consistent left inset for comfortable breathing room */
@media (max-width: 767px) {
  #dest {
    padding: 76px 20px;
  }
  #dest > h2,
  #dest > p,
  #dest > .rw {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  #rail {
    width: calc(100% + 20px);
    margin-left: 0;
    margin-right: -20px;
    margin-top: 13px;
    margin-bottom: 0;
    padding: 25px 0;
    gap: 18px;
  }
  .dc {
    flex: 0 0 230px;
    height: 380px;
  }
  .dc.hv {
    height: 430px;
    margin: -25px 0;
  }
  .dc.hv i,
  .dc.hv img {
    transform: scale(1.07);
  }
  .dc.hv::before {
    opacity: 1;
  }
  .dc.hv .dc-desc {
    opacity: 0.95;
    max-height: 120px;
    transform: translateY(0);
    margin-top: 8px;
  }
  .rar {
    display: none;
  }
}

/* Tablet (768px - 1199px): 24px left inset so Hampi does not touch viewport edge; arrows inside outermost cards */
@media (min-width: 768px) and (max-width: 1199px) {
  #dest {
    padding: 80px 24px;
  }
  #dest > h2,
  #dest > p,
  #dest > .rw {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  #rail {
    width: 100%;
    margin-top: 23px;
    margin-bottom: 0;
    padding: 25px 0;
    gap: 18px;
  }
  .dc {
    flex: 0 0 calc((100% - 36px) / 2.35);
    height: 400px;
  }
  .dc.hv {
    height: 450px;
    margin: -25px 0;
  }
  .dc.hv i,
  .dc.hv img {
    transform: scale(1.07);
  }
  .dc.hv::before {
    opacity: 1;
  }
  .dc.hv .dc-desc {
    opacity: 0.95;
    max-height: 120px;
    transform: translateY(0);
    margin-top: 8px;
  }
  .rar {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: #fff;
    font: 300 3.2rem/1 Manrope, sans-serif;
    cursor: pointer;
    opacity: 0.8;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    border-radius: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  }
  .rar:hover {
    opacity: 1;
  }
  #arl {
    left: 16px;
  }
  #arr {
    right: 16px;
  }
}

/* Desktop (>= 1200px): Original layout; arrows sit INSIDE outermost visible cards (left edge of Hampi, right edge of partial card) */
@media (min-width: 1200px) {
  #dest > h2,
  #dest > p,
  #dest > .rw {
    max-width: calc(1300px - 14vw);
    margin-left: auto;
    margin-right: auto;
  }
  #rail {
    width: 100%;
    margin-top: 21px;
    margin-bottom: -5px;
    padding: 25px 0;
    gap: 18px;
  }
  .dc {
    flex: 0 0 280px;
    height: 400px;
  }
  .rar {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: #fff;
    font: 300 3.6rem/1 Manrope, sans-serif;
    cursor: pointer;
    opacity: 0.8;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    border-radius: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  }
  .rar:hover {
    opacity: 1;
  }
  #arl {
    left: 16px;
  }
  #arr {
    right: 16px;
  }
}
@media (min-width: 1200px) and (hover: hover) {
  .dc:hover,
  .dc.hv {
    height: 450px;
    margin: -25px 0;
  }
  .dc.hv i,
  .dc.hv img,
  .dc:hover img {
    transform: scale(1.07);
  }
  .dc:hover::before,
  .dc.hv::before {
    opacity: 1;
  }
  .dc:hover .dc-desc,
  .dc.hv .dc-desc {
    opacity: 0.95;
    max-height: 120px;
    transform: translateY(0);
    margin-top: 8px;
  }
}
