/* World Map component */

/* ---- Section wrapper ---- */
.world-map {
  position: relative;
  isolation: isolate;
  padding: 1.875rem 0;
}

@media (min-width: 768px) {
  .world-map {
    padding: 3rem 0;
  }
}

/* ---- Breakpoint toggle ---- */
.world-map__desktop {
  display: none;
}

@media (min-width: 768px) {
  .world-map__desktop {
    display: block;
  }

  .world-map__mobile {
    display: none;
  }
}

/* ---- Frame (gradient outer wrapper) ---- */
.world-map__frame {
  background: linear-gradient(321deg, #2D2E83 -40.98%, #0D1532 157.1%);
  border-radius: 0.875rem;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .world-map__frame {
    border-radius: 2.375rem;
    padding: 3.4375rem;
  }
}

/* ---- Title: inherits section-header__title sizing, override color for dark bg ---- */
.world-map__title {
  color: #FBFBFB;
  text-align: center;
}

/* ---- Desktop: white inner card ---- */
.world-map__desktop .world-map__card {
  background: #fbfbfb;
  border-radius: 1rem;
  overflow: hidden;
  isolation: isolate;
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  .world-map__desktop .world-map__card {
    border-radius: 1.3125rem;
  }
}

/* ---- Desktop: Leaflet map container ---- */
.world-map__svg-container {
  position: relative;
  width: 100%;
}

.world-map .leaflet-container {
  background: transparent !important;
}

/* ---- Leaflet tooltip ---- */
.world-map__leaflet-tooltip {
  background: #0D1532 !important;
  color: #FBFBFB !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding: 0.375rem 0.75rem !important;
  border-radius: 0.375rem !important;
  border: none !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.world-map__leaflet-tooltip::before {
  display: none !important;
}

/* ---- Mobile: Embla structure ---- */
.world-map__viewport {
  overflow: hidden;
}

.world-map__container {
  --world-map-per-page: 2;
  --world-map-gap: 12px;
  display: flex;
  margin: 0 calc(var(--world-map-gap) / -2);
}

.world-map__slide {
  flex: 0 0 calc(100% / var(--world-map-per-page));
  padding: 0 calc(var(--world-map-gap) / 2);
  box-sizing: border-box;
}

/* ---- Mobile: Country card ---- */
.world-map__card-item {
  position: relative;
  height: 14rem;
  background: #F2F2F5;
  border-radius: 1.125rem;
  overflow: hidden;
}

.world-map__card-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem 0;
  z-index: 1;
}

.world-map__card-number {
  display: block;
  font-family: "Carmen Sans", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  background: linear-gradient(180deg, rgba(13, 21, 50, 0.12) 0%, rgba(13, 21, 50, 0) 94.59%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.world-map__card-name {
  margin: 0;
  margin-top: -0.25rem;
  color: #0D1532;
  font-family: "Carmen Sans", sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Country shape container */
.world-map__card-shape {
  position: absolute;
  top: 40%;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5625rem 1.125rem;
  z-index: 0;
  overflow: hidden;
}

.world-map__country-svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* ---- Mobile: Controls ---- */
.world-map__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}

/* Nav buttons */
.world-map__nav {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FBFBFB;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0D1532;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.world-map__nav:hover {
  opacity: 0.8;
}


/* ---- Connection lines: fade in/out on hover ---- */
.world-map__connection {
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ---- Moldova image overlay ---- */
.world-map__moldova {
  overflow: visible !important;
}

.world-map__moldova img {
  transform: rotate(-17deg);
  transform-origin: center;
}

/* ---- Connections variation: no frame/card on desktop ---- */
.world-map--connections .world-map__desktop .world-map__frame {
  background: none;
  padding: 0;
  border-radius: 0;
}

.world-map--connections .world-map__desktop .world-map__card {
  background: none;
  padding: 0;
  border-radius: 0;
  overflow: visible;
}

.world-map--connections .world-map__desktop .world-map__title {
  color: #0D1532;
  text-align: center;
}
