/* v3 section: offices. Figma desktop 12205:33292, mobile 12229:27564. */

.v3-offices {
  --off-line: repeating-linear-gradient(to bottom, var(--v3-gray-50) 0 3px, transparent 3px 5px);
  background: var(--v3-bg-gray);
  isolation: isolate;
}
.v3-offices::before {              /* paper noise, 4% */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 256px;
  opacity: 0.04;
  pointer-events: none;
}
.v3-offices::after {               /* bottom divider */
  content: "";
  position: absolute;
  inset: auto 50% 0;
  z-index: -1;
  width: min(100%, 1440px);
  height: 1px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(to right, var(--v3-gray-50) 0 3px, transparent 3px 5px);
  pointer-events: none;
}
.v3-offices__vlines {
  position: absolute;
  inset: 0 50%;
  z-index: -1;
  width: min(100%, 1440px);
  transform: translateX(-50%);
  pointer-events: none;
}
.v3-offices__vlines span { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--off-line); }
.v3-offices__vlines span:nth-child(1) { left: 3.472%; }
.v3-offices__vlines span:nth-child(2) { left: 26.94%; }
.v3-offices__vlines span:nth-child(3) { left: 50%; }
.v3-offices__vlines span:nth-child(4) { left: 73.06%; }
.v3-offices__vlines span:nth-child(5) { left: 96.528%; }

/* ---- header ---- */
.v3-offices__header {
  display: grid;
  grid-template-columns: 320px minmax(0, 652px);
  column-gap: 12px;
  align-items: start;
}
.v3-offices__label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: var(--v3-fs-caption);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  text-transform: uppercase;
}
.v3-offices__label::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--v3-primary); }
.v3-offices__title { grid-column: 2; grid-row: 1; color: var(--v3-dark); }
.v3-offices__muted { color: var(--v3-gray-200); }

/* ---- body: stat column + dark card ---- */
.v3-offices__body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  margin-top: 80px;
}
.v3-offices__stat { display: flex; flex-direction: column; max-width: 271px; color: var(--v3-dark); }
.v3-offices__value { font-size: 80px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.v3-offices__stat-label { font-size: var(--v3-fs-h3); font-weight: 700; line-height: var(--v3-lh-tight); }
.v3-offices__note { max-width: 242px; margin-top: 20px; color: var(--v3-gray-200); }

.v3-offices__card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--v3-radius-lg);
  background: var(--v3-dark);
  color: var(--v3-white);
}
.v3-offices__card::before {        /* paper noise, 4% */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 256px;
  opacity: 0.04;
  pointer-events: none;
}
.v3-offices__globe {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 56%;
  height: 330px;
  max-height: 100%;
  object-fit: cover;
  object-position: right top;      /* Figma crops the left 11% of the picture */
  border-radius: 21px;
  pointer-events: none;
}
.v3-offices__panel {
  display: flex;
  flex-direction: column;
  margin-left: 37%;                /* 364 of 984 */
  padding: 32px 32px 32px 0;
}
.v3-offices__panel-title,
.v3-offices__list,
.v3-offices__contact { position: relative; z-index: 1; }
.v3-offices__panel-title { margin-bottom: 20px; }

.v3-offices__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.v3-offices__tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 24px;
  border-radius: var(--v3-radius-sm);
  background: var(--v3-bg-light);
  color: var(--v3-dark);
  text-decoration: none;
}
a.v3-offices__tile { transition: box-shadow 0.2s ease, transform 0.2s ease; }
a.v3-offices__tile:hover { box-shadow: var(--v3-shadow-glow); transform: translateY(-2px); }
a.v3-offices__tile:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 2px; }
.v3-offices__city { font-size: var(--v3-fs-h3); font-weight: 700; line-height: var(--v3-lh-tight); min-height: 31px; }
.v3-offices__address { font-weight: 500; line-height: var(--v3-lh-body-m); }

.v3-offices__contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}
.v3-offices__contact-text { max-width: 242px; color: var(--v3-gray-50); }
.v3-offices__call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v3-white);
  text-decoration: none;
}
.v3-offices__call:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 4px; border-radius: var(--v3-radius-sm); }
.v3-offices__phone { font-size: var(--v3-fs-h3); font-weight: 700; line-height: var(--v3-lh-tight); white-space: nowrap; }
.v3-offices__arrow { flex: none; display: block; width: 46px; height: 46px; transition: transform 0.2s ease; }
a.v3-offices__call:hover .v3-offices__arrow { transform: translateX(4px); }

@media (max-width: 1280px) {
  .v3-offices__header,
  .v3-offices__body { grid-template-columns: 250px minmax(0, 1fr); }
  .v3-offices__tile { padding: 20px; }
  .v3-offices__panel { margin-left: 28%; }
}

@media (max-width: 1100px) {
  .v3-offices__tile { padding: 16px; }
  .v3-offices__address { font-size: var(--v3-fs-body-s); }
}

@media (max-width: 1024px) {
  .v3-offices__header { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .v3-offices__title { grid-column: 1; grid-row: auto; }
  .v3-offices__body { grid-template-columns: minmax(0, 1fr); row-gap: 36px; margin-top: 56px; }
}

@media (max-width: 768px) {
  .v3-offices__vlines span { display: none; }
  .v3-offices__vlines span:nth-child(1) { display: block; left: 16px; }
  .v3-offices__vlines span:nth-child(5) { display: block; left: auto; right: 16px; }
  .v3-offices__vlines { inset: 0; width: auto; transform: none; }
  .v3-offices__label { min-height: 20px; }
  .v3-offices__body { margin-top: 36px; }
  .v3-offices__stat { max-width: none; }
  .v3-offices__value { font-size: 62px; }
  .v3-offices__note { max-width: none; margin-top: 16px; }
  .v3-offices__card { border-radius: var(--v3-radius-md); padding: 24px; }
  .v3-offices__panel { margin-left: 0; padding: 0; gap: 24px; }
  .v3-offices__panel-title { margin-bottom: 0; }
  .v3-offices__list { gap: 8px; }
  .v3-offices__address { font-size: var(--v3-fs-body-m); }
  .v3-offices__tile { padding: 20px; }
  .v3-offices__globe { position: static; width: 100%; height: auto; max-height: none; aspect-ratio: 342 / 206; border-radius: 0; }
  .v3-offices__contact { display: flex; flex-direction: column; align-items: stretch; gap: 20px; margin-top: 0; }
  .v3-offices__contact-text { max-width: 249px; }
}

@media (max-width: 480px) {
  .v3-offices__list { grid-template-columns: minmax(0, 1fr); }
  .v3-offices__city { font-size: 20px; }
  .v3-offices__call { flex-wrap: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  a.v3-offices__tile,
  .v3-offices__arrow { transition: none; }
  a.v3-offices__tile:hover,
  .v3-offices__call:hover .v3-offices__arrow { transform: none; }
}
