/* BOSFORUS prototype — порты, о компании, контакты, служебные страницы. */

/* ---------- контакты: список (главная, контакты) ---------- */
.contact-list { list-style: none; display: grid; gap: 18px; margin: 0 0 32px; padding: 0; }
.contact { display: grid; grid-template-columns: 40px minmax(0, 150px) 1fr; gap: 6px 16px; align-items: start; }
.contact .icon { align-self: center; justify-self: center; color: var(--sky); }
/* иконка и подпись - по центру первой строки значения (строка 18px × 1.65), а не по середине многострочного адреса;
   подпись 13px × 1.4, иконка 24px (11.11) */
.contact > .icon { align-self: start; margin-top: calc((18px * 1.65 - 24px) / 2); }
.contact__label { margin-top: calc((18px * 1.65 - 13px * 1.4) / 2); }
.contact > .icon-link { align-self: center; margin: -6px 0; }
.contact--bare .contact__value { grid-column: 2 / -1; align-self: center; }   /* мессенджер: иконка и значение, без названия (R88) */
.contact__value--icons { display: grid; gap: 4px; }  /* номера строками, у каждого свои иконки (.phone-line — base.css, 16.11) */
.contact__value--icons .icon-row { margin: -6px 0; }
.section--light a.icon-link { border-color: var(--line); color: var(--navy); }                    /* светлый фон: синие, не белые */
.section--light a.icon-link:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.contact__label { font: 500 13px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact__value { overflow-wrap: anywhere; }
.contact__value a { text-decoration-color: var(--sky); }
.section--navy .contact__label { color: var(--sky); }
.section--navy .contact__value a { color: var(--white); }
.section--navy .contact__value a.icon-link:hover { color: var(--navy-deep); text-decoration: none; }  /* как в футере: белый круг, синяя иконка (05.11) */
@media (max-width: 767px) {
  .contact { grid-template-columns: 40px 1fr; }
  .contact__value, .contact--bare .contact__value { grid-column: 2; }
  /* подпись над значением: иконка - по центру строки подписи (11.11) */
  .contact > .icon { margin-top: calc((13px * 1.4 - 24px) / 2); }
  .contact__label { margin-top: 0; }
}
.contact:target { outline: 2px solid var(--sky); outline-offset: 8px; }
.map-wrap { margin: 0; }
.map-stage { aspect-ratio: 16 / 10; }
.map-note { margin: 10px 0 0; font-size: 16px; }
.map-link { margin-top: 16px; }  /* ссылка на офис во внешних картах под картой контактов (02.11) */
.office-pin { cursor: default; }
.office-pin .port-pin__dot .icon { width: 18px; height: 18px; color: var(--navy); }
.map-stage:not(.is-gl) .office-pin { display: none; }  /* на запасной схеме моря офис не разглядеть */
.section--navy .map-stage { border-color: rgba(214, 228, 236, .3); }

/* ---------- карты: OpenStreetMap (MapLibre GL JS, подключает ports.js) поверх запасной SVG-схемы ----------
   Схема лежит в разметке и занимает всё поле; когда карта загрузилась (is-gl), схема скрыта. */
.ports { position: relative; }
.ports__stage { position: relative; aspect-ratio: 1000 / 573; overflow: hidden; border: 1px solid var(--line); background: var(--ice); }
.pmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.ports__stage .gl-map { position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease); }
.ports__stage.is-gl .gl-map { opacity: 1; }
.ports__stage.is-gl .pmap { visibility: hidden; }
.ports__stage .maplibregl-canvas { outline: 0; }
.ports__stage .maplibregl-ctrl-attrib { font: 12px/1.4 var(--sans); color: var(--navy); }
.ports__stage .maplibregl-ctrl-attrib a { color: var(--navy); }
.ports__stage .maplibregl-ctrl-group { border-radius: 0; box-shadow: 0 2px 10px rgba(12, 34, 51, .18); }
.ports__stage .maplibregl-ctrl-group button { width: 40px; height: 40px; }
.pmap__land { fill: var(--cream); }
.pmap__sea { fill: var(--ice); stroke: var(--sky); stroke-width: 1.6; stroke-linejoin: round; }
.pmap__grid { fill: none; stroke: var(--navy); stroke-opacity: .07; stroke-width: 1; }
.pmap__label { font: italic 500 26px var(--serif); letter-spacing: .12em; fill: var(--muted); }
.ports--preview .ports__stage { box-shadow: 0 18px 40px rgba(12, 34, 51, .08); }

.port-pin {
  position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  margin: -24px 0 0 -24px; padding: 0; border: 0; background: none; color: var(--navy); text-decoration: none; cursor: pointer;
}
.port-pin__dot { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 10px rgba(12, 34, 51, .25); transition: transform .2s var(--ease); }
.port-pin__dot::after {  /* мягкое кольцо вокруг метки */
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--sky); animation: pin-ring 2.6s ease-out infinite;
}
.port-pin__dot .mark { width: 20px; height: 20px; }
.port-pin:hover .port-pin__dot, .port-pin.is-active .port-pin__dot { transform: scale(1.12); }
.port-pin.is-active .port-pin__dot { background: var(--navy); color: var(--white); }
.port-pin__label {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 4px; white-space: nowrap;
  font: 500 15px/1 var(--sans); letter-spacing: .06em; padding: 5px 8px; background: rgba(255, 255, 255, .88);
}
.port-pin--left .port-pin__label { left: auto; right: 100%; margin: 0 4px 0 0; }
@keyframes pin-ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

.ports__intro { margin-bottom: 28px; max-width: none; }  /* на всю ширину, легенды нет (11.11) */

/* карточка порта: поверх схемы на компьютере, под схемой на телефоне */
/* справа внизу: слева внизу — метка Стамбула (R78), карточка не должна её закрывать */
.ports__cards { position: absolute; z-index: 3; right: 24px; bottom: 40px; width: min(380px, 44%); }
.port-card { position: relative; padding: 28px 28px 24px; background: var(--white); border: 1px solid var(--line); border-top: 2px solid var(--sky); box-shadow: 0 18px 40px rgba(12, 34, 51, .16); }
.port-card__close { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; }
.port-card__close .icon { width: 22px; height: 22px; }
.port-card__title { margin-bottom: 4px; padding-right: 40px; font-size: 34px; }
.port-card__cats { margin: 0 0 10px; font: 500 13px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.port-card__note { margin: 0 0 18px; font-size: 17px; }
.port-card__sub { margin: 0 0 6px; font: 500 13px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.port-card__list { list-style: none; padding: 0; margin: 0; }
.port-card__list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.port-card__list a:hover { color: var(--muted); }
.port-card__list .icon { width: 18px; height: 18px; }
@media (max-width: 767px) {
  /* G02: квадрат под карту занят с самого начала — страница не прыгает, когда карта загрузилась; пока её нет, схема 1000:573
     стоит посередине квадрата между полосами цвета моря (верхняя и нижняя рамка), метки на ней на своих местах */
  .ports__stage, .ports__stage.is-gl { aspect-ratio: 1 / 1; }
  .ports__stage:not(.is-gl) { border-width: calc((100vw - 2 * var(--gutter)) * .2135) 1px; border-color: var(--ice) var(--line); }
  .map-stage, .map-stage.is-gl { aspect-ratio: 4 / 3; }
  .ports__cards { position: static; width: auto; margin-top: 16px; }
  .port-card { padding: 24px 20px 20px; }
  .pmap__label { font-size: 34px; }
  .port-pin__label { font-size: 14px; }
}

.regions { list-style: none; display: grid; gap: 0; margin: 56px 0 0; padding: 0; max-width: 760px; }
.regions li { padding: 16px 0; border-top: 1px solid var(--line); }
.regions li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- о компании ---------- */
.prose { max-width: 820px; }
.prose .lead { max-width: none; }
.comps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 32px; margin: 48px 0 0; padding: 0; }
.comp { display: flex; flex-direction: column; gap: 18px; padding-top: 28px; border-top: 1px solid var(--line); font: 500 26px/1.15 var(--serif); }
.comp .icon { width: 40px; height: 40px; color: var(--sky); stroke-width: 1.25; }
@media (max-width: 1023px) { .comps { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; } }
@media (max-width: 767px) {
  .comps { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .comp { flex-direction: row; align-items: center; gap: 16px; padding: 18px 0; font-size: 24px; }
  .comp .icon { width: 32px; height: 32px; }
}

/* ---------- контакты: текст и список в две колонки, под ними крупная карта на всю ширину (R84) ---------- */
.contacts-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; align-items: start; margin-bottom: 56px; }
.contacts-split .lead { margin: 0; }
.contacts-split .contact-list { margin-bottom: 0; }
.contacts__note { margin: 20px 0 0; }
.map-stage--wide, .map-stage--wide.is-gl { aspect-ratio: auto; height: 520px; }
.requisites { margin: 0; max-width: 820px; }
.requisites__row { display: grid; grid-template-columns: 220px 1fr; gap: 4px 32px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.requisites__row:first-child { border-top: 1px solid var(--line); }
.requisites dt { color: var(--muted); }
.requisites dd { margin: 0; }
@media (max-width: 767px) { .requisites__row { grid-template-columns: 1fr; } }
@media (max-width: 1023px) { .contacts-split { grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; } }
@media (max-width: 767px) { .map-stage--wide, .map-stage--wide.is-gl { height: 380px; } }

/* ---------- политика, согласие ---------- */
.legal { max-width: none; }  /* на всю ширину контейнера, без пустой колонки справа (02.11) */
.legal__section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal__section:first-child { padding-top: 0; border-top: 0; }
.legal__title { margin-bottom: 12px; font-size: 32px; }
.legal__section p:last-child { margin-bottom: 0; }
.legal__num { margin-right: .35em; color: var(--muted); }
.legal__meta { margin-bottom: 28px; font-size: 15px; color: var(--muted); }
.legal__intro { margin-bottom: 1em; }
.legal__clause { margin-bottom: .8em; }
.legal__n { margin-right: .3em; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.legal__list { margin: -.3em 0 1em 1.6em; padding: 0; }
.legal__list li { margin-bottom: .35em; }
.legal__note { margin-top: 32px; font-size: 15px; color: var(--muted); }

/* ---------- «Спасибо», 404 ---------- */
.thanks .container { min-height: 46vh; }
.thanks__form { margin-bottom: 8px; }
.thanks__form .thanks-form { display: block; margin-bottom: 18px; font-size: clamp(26px, 3vw, 38px); color: var(--muted); }
.thanks h1 { margin-bottom: 24px; }
