/* =========================================================
   MUNDOS PAGE
   ========================================================= */

.gmr-worlds-page,
.gmr-worlds-page * {
  box-sizing: border-box;
}

.gmr-worlds-page {
  padding: 34px 0 70px;
  background: #f7f9fb;
  font-family: var(--gmr-font-ui);
}

.gmr-worlds-page__layout {
  display: grid;
  grid-template-columns: var(--gmr-directory-sidebar-width) minmax(0, 1fr);
  gap: var(--gmr-directory-layout-gap);
  width: min(
    var(--gmr-directory-shell-max),
    calc(100% - (var(--gmr-directory-page-gutter) * 2))
  );
  min-width: 0;
  margin: 0 auto;
}

.gmr-worlds-page__sidebar,
.gmr-worlds-page__main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 1101px) {
  .gmr-worlds-page__sidebar {
    position: sticky;
    top: 116px;
    align-self: start;
  }
}

/* =========================================================
   WORLD EXPLORER
   ========================================================= */

.gmr-world-explorer {
  padding: 22px 16px 18px;
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(17, 48, 80, .045);
}

.gmr-world-explorer__head {
  padding: 0 10px 15px;
}

.gmr-world-explorer__title {
  margin: 0 0 5px;
  color: #184570;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.gmr-world-explorer__intro {
  margin: 0;
  color: #6a7d91;
  font-size: 12px;
  line-height: 1.45;
}

.gmr-world-explorer__nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gmr-world-explorer__item,
.gmr-world-explorer__gallery {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 7px 10px;
  gap: 9px;
  border-radius: 10px;
  color: #365a7e;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.gmr-world-explorer__item--group-start {
  margin-top: 7px;
}

.gmr-world-explorer__item:hover,
.gmr-world-explorer__gallery:hover {
  background: #f5f8fb;
  color: #184570;
}

.gmr-world-explorer__item:focus-visible,
.gmr-world-explorer__gallery:focus-visible {
  outline: 3px solid rgba(230, 30, 120, .18);
  outline-offset: 2px;
}

.gmr-world-explorer__item.is-active {
  background: #fff0f6;
  color: #e61e78;
}

.gmr-world-explorer__icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  color: #184570;
}

.gmr-world-explorer__icon svg {
  display: block;
  width: 21px;
  height: 21px;
}

.gmr-world-explorer__item.is-active .gmr-world-explorer__icon {
  color: #e61e78;
}

.gmr-world-explorer__label {
  min-width: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.gmr-world-explorer__divider {
  height: 1px;
  margin: 12px 10px;
  background: #e5ebf0;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */

.gmr-worlds-header {
  margin-bottom: 24px;
}

.gmr-worlds-header__breadcrumb {
  min-height: 18px;
  color: #74869a;
  font-size: 12px;
}

.gmr-worlds-header__breadcrumb .ct-breadcrumbs {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.gmr-worlds-header__title {
  margin: 8px 0 7px;
  color: #184570;
  font-family: var(--gmr-font-ui);
  font-size: clamp(34px, 3vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.gmr-worlds-header__intro {
  max-width: 850px;
  margin: 0;
  color: #5f7389;
  font-size: 15px;
  line-height: 1.55;
}

/* =========================================================
   WORLD CARD
   ========================================================= */

.gmr-world-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 5px 17px rgba(15, 43, 72, .045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gmr-world-card:hover {
  transform: translateY(-2px);
  border-color: #ccd8e3;
  box-shadow: 0 10px 25px rgba(15, 43, 72, .08);
}

.gmr-world-card:focus-visible,
.gmr-galleries-bridge:focus-visible {
  outline: 3px solid rgba(230, 30, 120, .20);
  outline-offset: 3px;
}

.gmr-world-card__media {
  position: relative;
  overflow: hidden;
  background: #edf1f5;
}

.gmr-world-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.gmr-world-card:hover .gmr-world-card__media img {
  transform: scale(1.018);
}

.gmr-world-card__body {
  flex: 1;
  padding: 15px 17px 17px;
}

.gmr-world-card__title {
  margin: 0 0 5px;
  color: #184570;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.01em;
}

.gmr-world-card__description {
  margin: 0;
  color: #63778d;
  font-size: 13px;
  line-height: 1.45;
}

/* Primary Worlds */

.gmr-worlds-primary {
  margin-bottom: 30px;
}

.gmr-worlds-primary__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gmr-worlds-primary .gmr-world-card__media {
  aspect-ratio: 16 / 7;
}

.gmr-worlds-primary .gmr-world-card__title {
  font-size: 21px;
}

.gmr-worlds-primary .gmr-world-card__description {
  font-size: 14px;
}

/* Productive ecosystem */

.gmr-worlds-section-head {
  margin: 0 0 12px;
}

.gmr-worlds-section-head__title {
  margin: 0 0 3px;
  color: #184570;
  font-family: var(--gmr-font-ui);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.gmr-worlds-section-head__text {
  margin: 0;
  color: #667a90;
  font-size: 13px;
  line-height: 1.45;
}

.gmr-worlds-production {
  margin-bottom: 16px;
}

.gmr-worlds-production__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.gmr-worlds-production .gmr-world-card__media {
  aspect-ratio: 16 / 9;
}

.gmr-worlds-production .gmr-world-card__body {
  padding: 12px 13px 14px;
}

.gmr-worlds-production .gmr-world-card__title {
  font-size: 15px;
}

.gmr-worlds-production .gmr-world-card__description {
  font-size: 12px;
}

/* Complementary World */

.gmr-worlds-closing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-top: 16px;
}

.gmr-worlds-complementary {
  display: flex;
  min-width: 0;
  margin: 0;
}

.gmr-world-card--horizontal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.gmr-world-card--horizontal .gmr-world-card__media {
  min-height: 0;
  aspect-ratio: 4 / 1;
}

.gmr-world-card--horizontal .gmr-world-card__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 14px 14px;
}

.gmr-world-card--horizontal .gmr-world-card__title {
  font-size: 17px;
}

.gmr-world-card--horizontal .gmr-world-card__description {
  font-size: 12.5px;
  line-height: 1.4;
}

/* Galleries bridge */

.gmr-worlds-galleries {
  display: flex;
  min-width: 0;
  margin: 0;
}

.gmr-galleries-bridge {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  gap: 0 10px;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #fff6fa 0%, #fff 58%);
  border: 1px solid #f1dfe8;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gmr-galleries-bridge:hover {
  transform: translateY(-2px);
  border-color: #ebcbdc;
  box-shadow: 0 10px 25px rgba(15, 43, 72, .07);
}

.gmr-galleries-bridge__icon {
  display: grid;
  grid-column: 1;
  margin-left: 14px;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #e61e78;
}

.gmr-galleries-bridge__icon svg {
  width: 20px;
  height: 20px;
}

.gmr-galleries-bridge__content {
  grid-column: 2;
  padding: 12px 0 14px;
}

.gmr-galleries-bridge__title {
  margin: 0 0 3px;
  color: #184570;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.18;
}

.gmr-galleries-bridge__text {
  max-width: 600px;
  margin: 0;
  color: #65798f;
  font-size: 12.5px;
  line-height: 1.4;
}

.gmr-galleries-bridge__media {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
  overflow: hidden;
  background: #edf1f5;
}

.gmr-galleries-bridge__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gmr-galleries-bridge__cta {
  grid-column: 3;
  margin-right: 14px;
  white-space: nowrap;
  color: #e61e78;
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .gmr-worlds-page__layout {
    grid-template-columns: 1fr;
  }

  .gmr-worlds-page__sidebar {
    position: static;
  }

  .gmr-world-explorer__nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 8px;
  }

  .gmr-world-explorer__item--group-start {
    margin-top: 0;
  }

  .gmr-worlds-primary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gmr-worlds-production__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gmr-worlds-page {
    padding: 24px 0 48px;
  }

  .gmr-worlds-page__layout {
    gap: 22px;
  }

  .gmr-worlds-header__title {
    font-size: 32px;
  }

  .gmr-world-explorer {
    padding: 16px 12px;
  }

  .gmr-world-explorer__nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .gmr-world-explorer__nav::-webkit-scrollbar {
    display: none;
  }

  .gmr-world-explorer__item {
    flex: 0 0 auto;
    min-height: 44px;
    margin-top: 0;
    padding: 6px 11px;
    border: 1px solid #e2e8ef;
    scroll-snap-align: start;
  }

  .gmr-world-explorer__item .gmr-world-explorer__icon {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .gmr-world-explorer__item .gmr-world-explorer__icon svg {
    width: 18px;
    height: 18px;
  }

  .gmr-world-explorer__divider {
    margin: 10px 4px;
  }

  .gmr-worlds-primary__grid,
  .gmr-worlds-production__grid {
    grid-template-columns: 1fr;
  }

  .gmr-worlds-closing {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gmr-worlds-primary .gmr-world-card__media,
  .gmr-worlds-production .gmr-world-card__media {
    aspect-ratio: 16 / 8;
  }

  .gmr-world-card--horizontal .gmr-world-card__media {
    min-height: 0;
    aspect-ratio: 4 / 1;
  }

  .gmr-galleries-bridge {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0 10px;
  }

  .gmr-galleries-bridge__media {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 1;
  }

  .gmr-galleries-bridge__icon {
    grid-row: 2 / 4;
    align-self: center;
  }

  .gmr-galleries-bridge__content {
    padding: 12px 14px 4px 0;
  }

  .gmr-galleries-bridge__cta {
    grid-column: 2;
    justify-self: start;
    margin: 0;
    padding: 0 14px 14px 0;
    white-space: normal;
  }
}
