/* ==========================================================================
   DESTINOS ARCHIVE
   AC VIAJES — Premium Modern Layout
   Color principal: var(--color-primary)
   ========================================================================== */

/* ==========================================================================
   BASE
   ========================================================================== */

.destino-archive-page {
  background: #f8fafc;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  line-height: 1.625;
  color: #334155;
}

.destino-archive-page .container {
  width: min(100% - 48px, 1200px);
  margin-inline: auto;
}

/* ==========================================================================
   ICON BOX
   ========================================================================== */

.destino-archive-page .icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  flex-shrink: 0;

  background: color-mix(in srgb, var(--color-primary) 8%, #ffffff);

  color: var(--color-primary);

  border: 1px solid color-mix(in srgb, var(--color-primary) 15%, transparent);

  border-radius: 10px;

  font-size: 14px;
}

.destino-archive-page .icon-box--lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 20px;
}

/* ==========================================================================
   DESTINO POPULAR
   ========================================================================== */

.popular-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

  width: min(100% - 48px, 1200px);
  margin: 0 auto;

  gap: 55px;
  align-items: center;
}

/* ==========================================================================
   POPULAR — TEXT
   ========================================================================== */

.popular-text {
  max-width: 480px;
}

.popular-eyebrow {
  display: inline-block;
  margin-bottom: 10px;

  color: var(--color-primary);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
}

.popular-heading {
  margin: 0 0 18px;

  color: #0f172a;

  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.popular-desc {
  margin: 0;

  color: #475569;

  font-size: 16px;
  line-height: 1.7;
}

/* ==========================================================================
   POPULAR — CARD
   ========================================================================== */

.popular-card {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 10;

  overflow: hidden;

  background-size: cover;
  background-position: center;

  border-radius: 18px;

  box-shadow: 0 12px 35px rgba(9, 13, 22, 0.08);

  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.popular-card:hover {
  transform: translateY(-5px);

  box-shadow: 0 20px 45px rgba(9, 13, 22, 0.13);
}

/* ==========================================================================
   POPULAR — OVERLAY
   ========================================================================== */

.popular-card__overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(9, 13, 22, 0.84) 0%,
    rgba(9, 13, 22, 0.32) 52%,
    rgba(9, 13, 22, 0.08) 100%
  );
}

/* ==========================================================================
   POPULAR — CONTENT
   ========================================================================== */

.popular-card__content {
  position: absolute;

  right: 0;
  bottom: 0;
  left: 0;

  z-index: 2;

  padding: 30px;

  color: #ffffff;

  box-sizing: border-box;
}

.popular-card__title {
  margin: 0 0 8px;

  color: #ffffff;

  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.popular-card__desc {
  max-width: 580px;

  margin: 0 0 18px;

  color: rgba(255, 255, 255, 0.92);

  font-size: 14.5px;
  line-height: 1.6;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   CABECERA — TODOS LOS DESTINOS
   ========================================================================== */

.destinos-list-header {
  padding: 55px 0 35px;

  background: #f8fafc;
}

.destinos-list-header .container {
  width: min(100% - 48px, 1200px);
  margin: 0 auto;

  text-align: center;
}

.destinos-list-header__title {
  margin: 0;

  color: #0f172a;

  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.destinos-list-header__title::after {
  content: "";

  display: block;

  width: 48px;
  height: 3px;

  margin: 16px auto 0;

  background: var(--color-primary);

  border-radius: 999px;
}

.destinos-list-header__description {
  max-width: 650px;

  margin: 16px auto 0;

  color: #64748b;

  font-size: 16px;
  line-height: 1.7;
}

/* ==========================================================================
   DESTINOS — SCROLL WRAPPER
   ========================================================================== */

.destinos-scroll-wrapper {
  position: relative;
}

.destinos-scroll-sticky {
  position: sticky;
  top: 0;

  height: 100vh;

  overflow: hidden;
}

.destinos-track {
  display: flex;

  width: max-content;
  height: 100%;

  will-change: transform;
}

/* ==========================================================================
   DESTINO PANEL
   ========================================================================== */

.destino-panel {
  position: relative;

  display: flex;
  align-items: flex-end;

  flex: 0 0 100vw;

  width: 100vw;
  height: 100%;

  overflow: hidden;
}

.destino-panel__bg {
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;

  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   DESTINO PANEL — OVERLAY
   ========================================================================== */

.destino-panel__overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.76) 0%,
    rgba(0, 0, 0, 0.16) 45%,
    rgba(0, 0, 0, 0.34) 100%
  );
}

/* ==========================================================================
   DESTINO PANEL — CONTENT
   ========================================================================== */

.destino-panel__content {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 640px;

  padding: 0 70px 70px;

  box-sizing: border-box;

  opacity: 0.5;

  transform: translateY(20px);

  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.destino-panel.is-active .destino-panel__content {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   DESTINO PANEL — EYEBROW
   ========================================================================== */

.destino-panel__eyebrow {
  margin-bottom: 8px;

  color: var(--color-primary);

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1.3;

  text-transform: uppercase;
}

/* ==========================================================================
   DESTINO PANEL — TITLE
   ========================================================================== */

.destino-panel__title {
  margin: 0 0 10px;

  color: #eef4f1;

  font-size: clamp(30px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   DESTINO PANEL — EXCERPT
   ========================================================================== */

.destino-panel__excerpt {
  max-width: 480px;

  margin: 0 0 20px;

  color: #d7ded9;

  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   BOTÓN — INTEGRACIÓN CON PRIMARY
   ========================================================================== */

.destino-archive-page .ac__button {
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.destino-archive-page .ac__button:hover {
  transform: translateY(-2px);

  box-shadow: 0 8px 22px
    color-mix(in srgb, var(--color-primary) 28%, transparent);
}

/* ==========================================================================
   DESTINOS NAVIGATION
   ========================================================================== */

.destinos-nav {
  position: fixed;

  top: 50%;
  right: 28px;

  z-index: 50;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  gap: 10px;

  transform: translateY(-50%);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;
}

.destinos-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   NAV ITEM
   ========================================================================== */

.nav-item {
  display: flex;
  align-items: center;

  gap: 12px;

  cursor: pointer;
}

/* ==========================================================================
   NAV — DOT
   ========================================================================== */

.nav-item__dot {
  width: 8px;
  height: 8px;

  flex-shrink: 0;

  background: rgba(255, 255, 255, 0.32);

  border-radius: 999px;

  transition:
    width 0.35s ease,
    height 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* ==========================================================================
   NAV — LABEL
   ========================================================================== */

.nav-item__label {
  max-width: 0;

  overflow: hidden;

  color: #cfd6d2;

  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.08em;

  white-space: nowrap;

  opacity: 0;

  transform: translateX(6px);

  transition:
    max-width 0.35s ease,
    opacity 0.35s ease,
    transform 0.35s ease,
    color 0.35s ease;
}

/* ==========================================================================
   NAV — NEAR
   ========================================================================== */

.nav-item.is-near .nav-item__dot {
  width: 10px;
  height: 10px;

  background: color-mix(in srgb, var(--color-primary) 60%, #ffffff);
}

.nav-item.is-near .nav-item__label {
  max-width: 160px;

  opacity: 0.6;

  transform: translateX(0);
}

/* ==========================================================================
   NAV — ACTIVE
   ========================================================================== */

.nav-item.is-active .nav-item__dot {
  width: 14px;
  height: 14px;

  background: var(--color-primary);

  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent),
    0 0 18px color-mix(in srgb, var(--color-primary) 65%, transparent);
}

.nav-item.is-active .nav-item__label {
  max-width: 220px;

  color: #ffffff;

  font-weight: 600;

  opacity: 1;

  transform: translateX(0);
}

/* ==========================================================================
   NAV — ACTIVATION
   ========================================================================== */

.nav-item.is-active.just-activated .nav-item__dot {
  animation: dotPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dotPop {
  0% {
    transform: scale(0.3);
  }

  55% {
    transform: scale(1.5);
  }

  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   TABLET
   769px — 1024px
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
  .destino-archive-page .container {
    width: min(100% - 48px, 1000px);
  }

  /* ----------------------------------------------------------------------
       Popular
       ---------------------------------------------------------------------- */

  .popular-container {
    width: min(100% - 48px, 1000px);
    gap: 40px;
  }

  .popular-heading {
    font-size: 34px;
  }

  .popular-desc {
    font-size: 15px;
  }

  /* ----------------------------------------------------------------------
       Título listado
       ---------------------------------------------------------------------- */

  .destinos-list-header {
    padding: 45px 0 30px;
  }

  .destinos-list-header .container {
    width: min(100% - 48px, 1000px);
  }

  .destinos-list-header__title {
    font-size: 38px;
  }

  /* ----------------------------------------------------------------------
       Destinos
       ---------------------------------------------------------------------- */

  .destino-panel__content {
    padding: 0 45px 55px;
  }

  .destino-panel__title {
    font-size: clamp(30px, 5vw, 46px);
  }

  /* ----------------------------------------------------------------------
       Navigation
       ---------------------------------------------------------------------- */

  .destinos-nav {
    right: 20px;
  }
}

/* ==========================================================================
   TABLET PEQUEÑA
   769px — 900px
   ========================================================================== */

@media (min-width: 769px) and (max-width: 900px) {
  /* ----------------------------------------------------------------------
       Popular
       ---------------------------------------------------------------------- */

  .popular-container {
    grid-template-columns: 1fr;

    width: min(100% - 56px, 850px);

    gap: 30px;
  }

  .popular-text {
    max-width: 700px;

    margin: 0 auto;

    text-align: center;
  }

  .popular-card {
    max-width: 850px;

    margin: 0 auto;
  }

  /* ----------------------------------------------------------------------
       Título listado
       ---------------------------------------------------------------------- */

  .destinos-list-header {
    padding: 40px 0 28px;
  }

  .destinos-list-header__title {
    font-size: 34px;
  }

  /* ----------------------------------------------------------------------
       Navigation
       ---------------------------------------------------------------------- */

  .destinos-nav {
    display: none;
  }

  /* ----------------------------------------------------------------------
       Scroll
       ---------------------------------------------------------------------- */

  .destinos-scroll-sticky {
    height: 70vh;
  }

  .destino-panel__content {
    padding: 0 40px 50px;
  }
}

/* ==========================================================================
   MOBILE
   0 — 768px
   ========================================================================== */

@media (max-width: 768px) {
  /* ----------------------------------------------------------------------
       Container
       ---------------------------------------------------------------------- */

  .destino-archive-page .container {
    width: calc(100% - 32px);
  }

  /* ----------------------------------------------------------------------
       Popular
       ---------------------------------------------------------------------- */

  .popular-container {
    grid-template-columns: 1fr;

    width: calc(100% - 32px);

    gap: 28px;
  }

  .popular-text {
    max-width: 100%;

    text-align: center;
  }

  .popular-eyebrow {
    margin-bottom: 8px;

    font-size: 11px;
  }

  .popular-heading {
    margin-bottom: 14px;

    font-size: clamp(25px, 6vw, 34px);
  }

  .popular-desc {
    font-size: 14px;
    line-height: 1.65;
  }

  .popular-card {
    border-radius: 16px;
  }

  .popular-card__content {
    padding: 22px;
  }

  .popular-card__title {
    font-size: 25px;
  }

  /* ----------------------------------------------------------------------
       Título — todos los destinos
       ---------------------------------------------------------------------- */

  .destinos-list-header {
    padding: 38px 20px 25px;
  }

  .destinos-list-header .container {
    width: 100%;
    padding: 0;
  }

  .destinos-list-header__title {
    font-size: 32px;
    letter-spacing: -0.025em;
  }

  .destinos-list-header__title::after {
    width: 42px;
    height: 3px;

    margin-top: 13px;
  }

  .destinos-list-header__description {
    margin-top: 13px;

    font-size: 14px;
    line-height: 1.6;
  }

  /* ----------------------------------------------------------------------
       DESTINOS
       Mobile = Cards
       ---------------------------------------------------------------------- */

  .destinos-scroll-wrapper {
    height: auto !important;
  }

  .destinos-scroll-sticky {
    position: static !important;

    height: auto !important;

    overflow: visible !important;
  }

  .destinos-track {
    display: grid;

    grid-template-columns: 1fr;

    width: 100%;
    height: auto !important;

    gap: 18px;

    padding: 0 20px 35px;

    box-sizing: border-box;

    will-change: auto;
  }

  /* ----------------------------------------------------------------------
       DESTINO CARD
       ---------------------------------------------------------------------- */

  .destino-panel {
    position: relative;

    display: flex;
    align-items: flex-end;

    width: 100% !important;
    height: 300px !important;

    flex: none !important;

    overflow: hidden;

    border-radius: 17px;
  }

  .destino-panel__bg {
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;

    transition: transform 0.4s ease;
  }

  .destino-panel:hover .destino-panel__bg {
    transform: scale(1.04);
  }

  /* ----------------------------------------------------------------------
       Overlay
       ---------------------------------------------------------------------- */

  .destino-panel__overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
      0deg,
      rgba(9, 13, 22, 0.84) 0%,
      rgba(9, 13, 22, 0.28) 55%,
      rgba(9, 13, 22, 0.08) 100%
    );
  }

  /* ----------------------------------------------------------------------
       Content
       ---------------------------------------------------------------------- */

  .destino-panel__content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 100%;

    padding: 0 22px 23px;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    gap: 7px;

    opacity: 1 !important;

    transform: none !important;
  }

  /* ----------------------------------------------------------------------
       Eyebrow
       ---------------------------------------------------------------------- */

  .destino-panel__eyebrow {
    margin-bottom: 2px;

    font-size: 11px;
    letter-spacing: 0.18em;
  }

  /* ----------------------------------------------------------------------
       Title
       ---------------------------------------------------------------------- */

  .destino-panel__title {
    margin: 0;

    font-size: clamp(21px, 5.5vw, 28px);
    line-height: 1.15;
  }

  /* ----------------------------------------------------------------------
       Excerpt
       ---------------------------------------------------------------------- */

  .destino-panel__excerpt {
    max-width: 100%;

    margin: 0;

    font-size: 13px;
    line-height: 1.5;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  /* ----------------------------------------------------------------------
       Button
       ---------------------------------------------------------------------- */

  .destino-panel__content .ac__button {
    align-self: flex-start;

    --main-size: 13px;

    margin-top: 4px;
  }

  /* ----------------------------------------------------------------------
       Navigation
       ---------------------------------------------------------------------- */

  .destinos-nav {
    display: none;
  }
}

/* ==========================================================================
   SMALL MOBILE
   0 — 480px
   ========================================================================== */

@media (max-width: 480px) {
  /* ----------------------------------------------------------------------
       Container
       ---------------------------------------------------------------------- */

  .destino-archive-page .container {
    width: calc(100% - 24px);
  }

  /* ----------------------------------------------------------------------
       Popular
       ---------------------------------------------------------------------- */

  .popular-container {
    width: calc(100% - 24px);

    gap: 24px;
  }

  .popular-heading {
    font-size: 27px;
  }

  .popular-desc {
    font-size: 13.5px;
  }

  .popular-card {
    aspect-ratio: 4 / 3;

    border-radius: 14px;
  }

  .popular-card__content {
    padding: 19px;
  }

  .popular-card__title {
    font-size: 22px;
  }

  /* ----------------------------------------------------------------------
       Título listado
       ---------------------------------------------------------------------- */

  .destinos-list-header {
    padding: 32px 18px 22px;
  }

  .destinos-list-header__title {
    font-size: 28px;
  }

  .destinos-list-header__description {
    font-size: 13.5px;
  }

  /* ----------------------------------------------------------------------
       Destinos
       ---------------------------------------------------------------------- */

  .destinos-track {
    gap: 15px;

    padding: 0 16px 30px;
  }

  .destino-panel {
    height: 260px !important;

    border-radius: 14px;
  }

  .destino-panel__content {
    padding: 0 18px 20px;

    gap: 6px;
  }

  .destino-panel__eyebrow {
    font-size: 10px;
  }

  .destino-panel__title {
    font-size: 23px;
  }

  .destino-panel__excerpt {
    font-size: 12.5px;

    -webkit-line-clamp: 2;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .destino-archive-page *,
  .destino-archive-page *::before,
  .destino-archive-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
