/* Mera Destinations Gallery — section#comp-m23o0z0r / comp-m23odm1e.
   Origen: propuesta/pages/destinos.html (titulo + galeria masonry 3 columnas).
   Las posiciones de los items salen de la geometria exacta del HTML Wix. */

@font-face {
  font-family: 'wf_c784586d5d024719ba9f8124372fe010';
  src: url('../fonts/wf_c784586d5d024719ba9f8124372fe010.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'wf_de9117530fbb4eec807a1c166dfba25e';
  src: url('../fonts/wf_de9117530fbb4eec807a1c166dfba25e.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'helvetica-w01-roman';
  src: url('../fonts/helvetica-w01-roman.woff2') format('woff2');
  font-display: swap;
}

.elementor-widget-mera_destinations_gallery,
.elementor-widget-mera_destinations_gallery > .elementor-widget-container {
  width: 100%;
  max-width: 100%;
}

.mera-destinations-gallery {
  /* Tokens Wix de la seccion. */
  --mera-dest-gallery-navy: #152a42;
  --mera-dest-gallery-font-light: 'wf_c784586d5d024719ba9f8124372fe010', 'Montserrat', sans-serif;
  --mera-dest-gallery-font-black: 'wf_de9117530fbb4eec807a1c166dfba25e', 'Montserrat', sans-serif;
  --mera-dest-gallery-font-regular: 'helvetica-w01-roman', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  position: relative;
  left: 0;
  width: 100%;
  min-width: 980px;
  margin-left: 0;
  overflow: hidden;
  box-sizing: border-box;
  background-color: rgb(232, 230, 230);
}

.mera-destinations-gallery--international {
  background-color: rgb(255, 255, 255);
}

.mera-destinations-gallery *,
.mera-destinations-gallery *::before,
.mera-destinations-gallery *::after {
  box-sizing: border-box;
}

/* Contenedor de malla: 2 hijos (titulo, galeria). */
.mera-destinations-gallery__grid {
  position: static;
  display: grid;
  width: 100%;
  min-height: auto;
  grid-template-rows: repeat(2, min-content) 1fr;
  grid-template-columns: 100%;
}

/* 1) Titulo decorativo (comp-m23o0z19 / comp-m23odm25). */
.mera-destinations-gallery__title-wrap {
  position: relative;
  grid-area: 1 / 1 / 2 / 2;
  justify-self: start;
  align-self: start;
  width: 556px;
  margin: 20px 0 12px calc((100% - 980px) * 0.5);
  left: 212px;
  text-align: center;
}

.mera-destinations-gallery__title-1 {
  margin: 0;
  color: var(--mera-dest-gallery-navy);
  font-family: var(--mera-dest-gallery-font-light);
  font-size: 40px;
  font-weight: 700;
  line-height: 0.5em;
  letter-spacing: 0.55em;
  text-align: center;
}

.mera-destinations-gallery__title-2 {
  margin: 0;
  color: var(--mera-dest-gallery-navy);
  font-family: var(--mera-dest-gallery-font-black);
  font-size: 60px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
}

/* 2) Galeria masonry (comp-m23qe70e / comp-m23qdmhi, 980x1304). */
.mera-destinations-gallery__gallery {
  position: relative;
  grid-area: 2 / 1 / 3 / 2;
  justify-self: start;
  align-self: start;
  z-index: 0;
  width: 980px;
  margin: 0 0 44px calc((100% - 980px) * 0.5);
}

.mera-destinations-gallery__items {
  position: relative;
  width: 980px;
  height: 1304px;
  margin: 0;
  overflow: visible;
}

.mera-destinations-gallery__item {
  position: absolute;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

/* Geometria exacta del masonry (3 columnas: 0/333/667; anchos 313/314). */
.mera-destinations-gallery__item:nth-child(1)  { left: 0;   top: 0;   width: 313px; }
.mera-destinations-gallery__item:nth-child(2)  { left: 333px; top: 0;   width: 314px; }
.mera-destinations-gallery__item:nth-child(3)  { left: 667px; top: 0;   width: 313px; }
.mera-destinations-gallery__item:nth-child(4)  { left: 0;   top: 173px;  width: 313px; }
.mera-destinations-gallery__item:nth-child(5)  { left: 667px; top: 448px;  width: 313px; }
.mera-destinations-gallery__item:nth-child(6)  { left: 333px; top: 449px;  width: 314px; }
.mera-destinations-gallery__item:nth-child(7)  { left: 0;   top: 662px;  width: 313px; }
.mera-destinations-gallery__item:nth-child(8)  { left: 333px; top: 681px;  width: 314px; }
.mera-destinations-gallery__item:nth-child(9)  { left: 667px; top: 820px;  width: 313px; }
.mera-destinations-gallery__item:nth-child(10) { left: 0;   top: 835px;  width: 313px; }
.mera-destinations-gallery__item:nth-child(11) { left: 333px; top: 913px;  width: 314px; }

.mera-destinations-gallery__item-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.mera-destinations-gallery__image-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.mera-destinations-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Hover con titulo y gradiente (style del pro-gallery: linear-gradient 180deg, transparente -> rgba(0,0,0,0.6)). */
.mera-destinations-gallery__hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mera-destinations-gallery__hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
}

.mera-destinations-gallery__item:hover .mera-destinations-gallery__hover,
.mera-destinations-gallery__item:focus-within .mera-destinations-gallery__hover {
  opacity: 1;
}

.mera-destinations-gallery__hover-inner {
  position: relative;
  padding: 5px;
}

.mera-destinations-gallery__item-title {
  color: #fff;
  font-family: var(--mera-dest-gallery-font-regular);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4em;
  white-space: normal;
}

/* Tablet / movil: 2 columnas fluidas sin overflow. */
@media (max-width: 768px) {
  .mera-destinations-gallery {
    min-width: 0;
  }

  .mera-destinations-gallery__grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 24px 16px;
  }

  .mera-destinations-gallery__title-wrap,
  .mera-destinations-gallery__gallery {
    grid-area: auto;
    justify-self: auto;
    align-self: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
  }

  .mera-destinations-gallery__title-1 {
    font-size: 30px;
  }

  .mera-destinations-gallery__title-2 {
    font-size: 44px;
  }

  .mera-destinations-gallery__gallery {
    height: auto;
    margin: 0;
  }

  .mera-destinations-gallery__items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    height: auto;
  }

  .mera-destinations-gallery__item,
  .mera-destinations-gallery__item:nth-child(n) {
    position: relative;
    left: auto;
    top: auto;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 313 / 212;
  }

  .mera-destinations-gallery__item-link,
  .mera-destinations-gallery__image-wrap,
  .mera-destinations-gallery__img {
    position: relative;
    width: 100%;
    height: 100%;
  }
}

/* Movil pequeno: 1 columna. */
@media (max-width: 480px) {
  .mera-destinations-gallery__grid {
    padding: 20px 12px;
  }

  .mera-destinations-gallery__items {
    grid-template-columns: 1fr;
  }

  .mera-destinations-gallery__title-1 {
    font-size: 26px;
  }

  .mera-destinations-gallery__title-2 {
    font-size: 38px;
  }
}
