/*
 * WOW ATLAS Global 2.0 — Visual Polish U1.
 * Additive frontend overrides for the installed Home Map H1 / Media M1.2.
 * No API, auth, router, WordPress or Angular bundle changes.
 */

:root {
  --u1-green: #103f38;
  --u1-green-soft: #1d554b;
  --u1-coral: #f45a48;
  --u1-paper: #fbf7ee;
  --u1-mint: #cce5dd;
  --u1-mint-light: #e4f0ec;
  --u1-yellow: #f2cf61;
  --u1-lilac: #d9d1e8;
  --u1-peach: #efcdbd;
  --u1-blue: #d9e7f1;
}

/*
 * WordPress category artwork must be shown in its original colour.
 * Unmanaged/native cards retain their original wash and fallback styling.
 */
.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > .g2-editorial-card__wash {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"]::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > small,
.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > em,
.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > strong,
.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > p {
  position: relative;
  z-index: 1;
  text-shadow:
    0 1px 0 rgba(251, 247, 238, .96),
    0 0 8px rgba(251, 247, 238, .9),
    0 3px 16px rgba(251, 247, 238, .72);
}

/* Preserve the native absolute positions of the corner number and arrow. */
.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > .g2-editorial-card__number,
.wa-global2-media-m1 .g2-catalog .g2-editorial-grid >
.g2-editorial-card[data-wa-media-category-cover="true"] > b {
  z-index: 1;
  text-shadow:
    0 1px 0 rgba(251, 247, 238, .96),
    0 0 8px rgba(251, 247, 238, .9),
    0 3px 16px rgba(251, 247, 238, .72);
}

/* Premium, asymmetric menu mosaic — native buttons and handlers stay intact. */
.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] {
  border: 1px solid rgba(255, 255, 255, .78);
  background:
    radial-gradient(circle at 100% 0, rgba(204, 229, 221, .34) 0 18%, transparent 18.5%),
    radial-gradient(circle at 0 100%, rgba(242, 207, 97, .12) 0 25%, transparent 25.5%),
    var(--u1-paper) !important;
  box-shadow: 0 28px 70px rgba(7, 30, 27, .28) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] > [data-r3-menu-grid="true"] {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-flow: row dense;
  align-items: stretch;
  gap: 11px !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button {
  --u1-menu-ink: var(--u1-green);
  position: relative !important;
  min-width: 0;
  min-height: 126px !important;
  overflow: hidden;
  isolation: isolate;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  padding: 16px 17px !important;
  color: var(--u1-menu-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 14px 28px rgba(16, 63, 56, .1) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button::after {
  position: absolute;
  z-index: 0;
  right: 14px;
  top: 10px;
  color: currentColor;
  opacity: .14;
  font: 500 clamp(25px, 4.8vw, 40px) / 1 var(--wow-serif, Georgia, serif);
  letter-spacing: -.06em;
  pointer-events: none;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button > * {
  position: relative;
  z-index: 1;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button > span:first-child {
  width: 49px;
  height: 49px;
  flex: 0 0 49px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 17px 21px 18px 16px;
  background: rgba(255, 253, 247, .82);
  color: var(--u1-green);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .9),
    0 9px 20px rgba(16, 63, 56, .11);
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button > strong {
  max-width: 100%;
  color: inherit !important;
  font-size: clamp(18px, 3.4vw, 23px) !important;
  line-height: .98 !important;
  text-wrap: balance;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(1) {
  grid-column: span 3;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .72) 0 20%, transparent 20.5%),
    linear-gradient(145deg, #e8f3ef, #cfe7df) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(1)::after { content: "01"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(2) {
  grid-column: span 3;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, .56) 0 25%, transparent 25.5%),
    linear-gradient(145deg, #f5dfd2, var(--u1-peach)) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(2)::after { content: "02"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(3) {
  --u1-menu-ink: #fff;
  grid-column: span 4;
  min-height: 152px !important;
  background:
    radial-gradient(circle at 92% 13%, rgba(255, 255, 255, .18) 0 18%, transparent 18.5%),
    linear-gradient(145deg, #fa6856, var(--u1-coral)) !important;
  box-shadow: 0 18px 34px rgba(244, 90, 72, .23) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(3)::after { content: "03"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(3) > span:first-child {
  background: var(--u1-yellow);
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(4) {
  grid-column: span 2;
  min-height: 152px !important;
  background:
    radial-gradient(circle at 95% 5%, rgba(255, 255, 255, .48) 0 21%, transparent 21.5%),
    linear-gradient(150deg, #e6e0f0, var(--u1-lilac)) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(4)::after { content: "04"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(5) {
  grid-column: span 2;
  min-height: 142px !important;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, .45) 0 25%, transparent 25.5%),
    linear-gradient(145deg, #f6dc82, var(--u1-yellow)) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(5)::after { content: "05"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(6) {
  grid-column: span 4;
  min-height: 142px !important;
  background:
    radial-gradient(circle at 96% 3%, rgba(255, 255, 255, .65) 0 20%, transparent 20.5%),
    linear-gradient(145deg, #e4eff7, var(--u1-blue)) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(6)::after { content: "06"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(7) {
  grid-column: span 3;
  background:
    radial-gradient(circle at 100% 0, rgba(239, 205, 189, .52) 0 24%, transparent 24.5%),
    linear-gradient(145deg, #fffdf7, #f7eee4) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(7)::after { content: "07"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(8) {
  grid-column: span 3;
  background:
    radial-gradient(circle at 96% 6%, rgba(255, 255, 255, .55) 0 23%, transparent 23.5%),
    linear-gradient(145deg, #f7ded1, #efc9b7) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(8)::after { content: "08"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(9) {
  --u1-menu-ink: #fff;
  grid-column: span 6;
  min-height: 148px !important;
  background:
    radial-gradient(circle at 92% 18%, rgba(242, 207, 97, .2) 0 16%, transparent 16.5%),
    linear-gradient(145deg, var(--u1-green-soft), var(--u1-green)) !important;
  box-shadow: 0 20px 38px rgba(16, 63, 56, .24) !important;
}

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(9)::after { content: "09"; }

.r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
[data-r3-menu-grid="true"] > button:nth-child(9) > span:first-child {
  background: var(--u1-yellow);
}

/* One stable canvas ratio for country and city previews; artwork is never cropped. */
.wa-home-map-h1 .g2-home .g2-city-card__map[data-wa-home-preview] {
  width: 100%;
  background-color: rgba(204, 229, 221, .38) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

@supports (aspect-ratio: 30 / 19) {
  .wa-home-map-h1 .g2-home .g2-city-card__map[data-wa-home-preview] {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 30 / 19;
  }
}

/* The H1 plane keeps its native vector path and gains angle plus slow drift. */
.p1-country-home svg.g2-plane[data-p1-plane="h1-clean"] {
  width: clamp(58px, 10vw, 68px) !important;
  height: auto !important;
  right: clamp(10px, 2.2vw, 14px) !important;
  top: clamp(14px, 2.5vw, 18px) !important;
  transform: none !important;
  animation: none !important;
}

.p1-country-home svg.g2-plane[data-p1-plane="h1-clean"] > .p1-plane-body {
  transform: rotate(38deg);
  transform-box: view-box;
  transform-origin: center;
  animation: wa-u1-plane-drift 7.6s ease-in-out infinite;
  will-change: transform;
}

@keyframes wa-u1-plane-drift {
  0%, 100% { transform: translate3d(0, 1px, 0) rotate(38deg); }
  50% { transform: translate3d(5px, -6px, 0) rotate(40deg); }
}

@media (max-width: 520px) {
  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] > [data-r3-menu-grid="true"] {
    gap: 8px !important;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button {
    min-height: 116px !important;
    gap: 10px;
    padding: 13px 12px !important;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button:nth-child(3),
  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button:nth-child(4) {
    min-height: 142px !important;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button:nth-child(5),
  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button:nth-child(6) {
    min-height: 132px !important;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button:nth-child(9) {
    min-height: 138px !important;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button > span:first-child {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button > strong {
    font-size: clamp(16px, 5vw, 19px) !important;
  }

  .r3-ui-overlay .g2-menu[data-r3-menu="tiles-first"] >
  [data-r3-menu-grid="true"] > button::after {
    right: 10px;
    top: 8px;
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p1-country-home svg.g2-plane[data-p1-plane="h1-clean"] > .p1-plane-body {
    animation: none !important;
    transform: rotate(38deg);
  }
}
