/* Net Universe contact page — built from Figma "Contac us" (60:9812): offices map + shared contact form.
   Header, contact section and footer come from partials and styles.css; section pieces from home.css. */

/* ---------- Offices section (60:9814) ---------- */

.ct-offices {
  padding: 64px 0;
  overflow-x: clip;
}

.ct-head {
  margin-bottom: 56px;
}

.ct-badge {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 4.8px;
}

.ct-title {
  font-size: clamp(32px, 3.4vw, 48px);
}

.ct-sub {
  margin-top: 0;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 32px;
}

/* ---------- Dotted world map with pins (60:9821) ---------- */

.ct-map {
  --pin: clamp(24px, 2.78vw, 40px);
  position: relative;
  max-width: 1250px;
  margin: 0 auto;
}

.ct-map-img {
  width: 100%;
  height: auto;
}

/* Pin centres, as % of the 1250 × 582 map (Figma pin x/y + 20). Shared by the pin and its card. */
.ct-map [data-office="usa"] { --x: 24.68%; --y: 46.77%; }
.ct-map [data-office="mexico"] { --x: 19.392%; --y: 50.893%; }
.ct-map [data-office="colombia"] { --x: 26.352%; --y: 59.845%; }
.ct-map [data-office="ecuador"] { --x: 25.144%; --y: 62.749%; }
.ct-map [data-office="peru"] { --x: 25.544%; --y: 69.897%; }
.ct-map [data-office="brazil"] { --x: 34.288%; --y: 76.615%; }
.ct-map [data-office="chile"] { --x: 27.344%; --y: 83.333%; }
.ct-map [data-office="argentina"] { --x: 30.728%; --y: 84.124%; }
/* Montevideo sits 8px from Buenos Aires in the design; nudged east so both pins can be hovered. */
.ct-map [data-office="uruguay"] { --x: 32.3%; --y: 83.7%; }
.ct-map [data-office="spain"] { --x: 47.544%; --y: 36.443%; }
.ct-map [data-office="india"] { --x: 68.496%; --y: 54.863%; }
.ct-map [data-office="philippines"] { --x: 80.568%; --y: 53.9%; }

.ct-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  width: var(--pin);
  height: var(--pin);
  border: 0;
  border-radius: 50%;
  background: url("/assets/contact/pin.svg") center / 100% 100% no-repeat;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 150ms ease-out;
}

.ct-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.ct-pin.is-active {
  z-index: 2;
  background-image: url("/assets/contact/pin-active.svg");
  transform: translate(-50%, -50%);
}

.ct-pin:focus-visible {
  border-radius: 50%;
  outline-offset: 0;
}

/* ---------- Office card (tooltip on the map, list item below it) ---------- */

.ct-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(5, 13, 31, 0.35);
  text-align: center;
  overflow-wrap: break-word;
}

.ct-card-name {
  width: 100%;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-deep);
}

.ct-card-addr {
  width: 100%;
  font-size: 12px;
  line-height: 18px;
  color: var(--gray);
}

.ct-card-tel {
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-on-light);
}

.ct-card-tel:hover {
  text-decoration: underline;
}

/* White cards: the default pale-blue focus ring would not show. */
.ct-card :focus-visible {
  outline-color: var(--blue);
}

.ct-tip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: 232px;
  transform: translate(-50%, calc(-100% - var(--pin) / 2 - 6px));
}

/* All offices: a 4x3 grid of cards under the map (Figma "Contac us-lista" 64:1420).
   Softer shadow than the map tooltip, which floats over the dots (DEV-496). */
.ct-list {
  display: grid;
  grid-template-columns: repeat(4, 232px);
  justify-content: center;
  gap: 50px;
  margin-top: 104px;
}

.ct-list .ct-card {
  box-shadow: 0 4px 16px rgba(5, 13, 31, 0.14);
  outline: 2px solid transparent;
  transition: outline-color 150ms ease-out, box-shadow 150ms ease-out;
}

.ct-list .ct-card:hover {
  box-shadow: 0 8px 22px rgba(5, 13, 31, 0.2);
}

.is-enhanced .ct-list .ct-card.is-active {
  outline-color: var(--green);
}

/* The shared contact section follows straight on, as in the design. */
.ct-offices + .contact {
  border-top: 0;
}

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
  .ct-list {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 64px;
  }

  .ct-head {
    margin-bottom: 40px;
  }

  .ct-sub {
    font-size: 18px;
    line-height: 1.6;
  }
}

/* ---------- Mobile: pins too small for cards, so the list shows the offices ---------- */

@media (max-width: 760px) {
  .ct-offices {
    padding: 48px 0;
  }

  .ct-head {
    margin-bottom: 32px;
  }

  .ct-sub {
    font-size: 16px;
  }

  .ct-map {
    --pin: 22px;
  }

  .ct-pin:hover {
    transform: translate(-50%, -50%);
  }

  .ct-tip {
    display: none;
  }

  .ct-list {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-pin,
  .ct-list .ct-card {
    transition: none;
  }
}
