/* Shared section: Locations (world map). Used on index.html and about.html */
/* =========================================================
   LOCATIONS — dark section (the 30%)
   Dotted world map; a lime pin per country with a landmark card
   on a thin leader line. Hover / focus expands the card to show
   the representative, location and phone.
   ========================================================= */
.ws-world {
  position: relative;
  padding: var(--section-padding) 0;
  font-family: var(--font);
  color: var(--text-on-dark);
  background: var(--glow-corner), var(--color-dark);
}
.ws-world *,
.ws-world *::before,
.ws-world *::after { box-sizing: border-box; }
.ws-world__head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--space-8);
  margin-bottom: var(--space-9);
}
.ws-world__eyebrow { color: var(--text-on-dark-muted); }
.ws-world__title {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text-on-dark);
}
.ws-world__intro {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-on-dark-muted);
}

/* ---------- Map ---------- */
.ws-world__map { position: relative; }
.ws-world__dots { display: block; width: 100%; height: auto; }
.ws-world__locs { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }

/* one location: positioned on the map by --x / --y */
.ws-loc {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
  margin: 0;
  z-index: 1;
}
.ws-loc:hover,
.ws-loc:focus-within { z-index: 5; }

/* pin: tip sits exactly on the location */
.ws-loc__pin {
  position: absolute;
  left: -11px;
  bottom: -2px;
  width: 22px;
  height: 30px;
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}
.ws-loc__pin svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ws-loc__drop { fill: var(--color-accent); }
.ws-loc__hole { fill: var(--color-dark); }
.ws-loc__ring {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: ws-ring 2.4s ease-out infinite;
}
@keyframes ws-ring {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* leader line from the pin to its card */
.ws-loc__line {
  position: absolute;
  left: 0;
  top: 0;
  width: hypot(var(--dx), var(--dy));
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), rgba(207, 245, 90, 0.25));
  transform: rotate(atan2(var(--dy), var(--dx)));
  transform-origin: 0 0;
  pointer-events: none;
}

/* card: anchored at pin + (dx, dy); above the pin it grows upward, below it grows downward */
.ws-loc__card {
  position: absolute;
  left: var(--dx);
  top: var(--dy);
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2) var(--space-2) var(--space-3);
  text-align: center;
  background: rgba(6, 43, 38, 0.82);
  -webkit-backdrop-filter: blur(var(--glass-blur));
          backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  cursor: default;
  outline: none;
  transition: width var(--dur-fill) var(--ease), box-shadow var(--dur-fill) var(--ease), background-color var(--dur-fill) var(--ease);
}
.ws-loc--up .ws-loc__card   { transform: translate(-50%, -100%); }
.ws-loc--down .ws-loc__card { transform: translate(-50%, 0); }
.ws-loc__card:hover,
.ws-loc__card:focus,
.ws-loc__card:focus-within {
  width: 250px;
  background-color: var(--color-dark);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(207, 245, 90, 0.18);
}
.ws-loc__card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.ws-loc__art {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.ws-loc__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-fill) var(--ease);
}
.ws-loc__card:hover .ws-loc__art img,
.ws-loc__card:focus-within .ws-loc__art img { transform: scale(1.05); }
.ws-loc__country {
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-on-dark);
  white-space: nowrap;
}

/* details: collapsed until hover / focus */
.ws-loc__more {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  transition: grid-template-rows var(--dur-fill) var(--ease);
}
.ws-loc__more-inner {
  min-height: 0;
  padding: 0 var(--space-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}
.ws-loc__card:hover .ws-loc__more,
.ws-loc__card:focus .ws-loc__more,
.ws-loc__card:focus-within .ws-loc__more { grid-template-rows: 1fr; }
.ws-loc__rep {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--line-on-dark);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-on-dark);
}
.ws-loc__role {
  margin-top: calc(-1 * var(--space-2));
  font-size: var(--fs-small);
  color: var(--text-on-dark-muted);
}
.ws-loc__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  color: var(--text-on-dark-muted);
  text-decoration: none;
}
.ws-loc__row .ws-icon { width: 16px; height: 16px; color: var(--color-accent); }
.ws-loc__tel {
  margin-bottom: var(--space-1);
  color: var(--link-on-dark);
  transition: color var(--dur-fast) var(--ease), text-shadow var(--dur-fast) var(--ease);
}
.ws-loc__tel:hover { color: var(--text-on-dark); text-shadow: var(--shadow-link-hover); }

@media (prefers-reduced-motion: reduce) {
  .ws-loc__ring { animation: none; opacity: 0.6; }
  .ws-loc__card,
  .ws-loc__more { transition: none; }
}

/* ---------- Tablet + mobile (≤ 1024px): the map stays as a picture,
   the location cards become a grid below it with details shown ---------- */
@media (max-width: 1024px) {
  .ws-world__head { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
  .ws-world__locs { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
  .ws-loc { position: static; width: auto; height: auto; }
  .ws-loc__pin,
  .ws-loc__line { display: none; }
  .ws-loc__card,
  .ws-loc--up .ws-loc__card,
  .ws-loc--down .ws-loc__card,
  .ws-loc__card:hover,
  .ws-loc__card:focus,
  .ws-loc__card:focus-within { position: static; width: 100%; height: 100%; transform: none; }
  .ws-loc__more { grid-template-rows: 1fr; }
}
@media (max-width: 767px) {
  .ws-world__locs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
}
