/* Sea Maritime Group — interactive port map (smg-port-map) */
.smg-pm {
  --smg-pm-sky: #7CC6F4;
  --smg-pm-amber: #F2A516;
  --smg-pm-action: #1668C7;
  --smg-pm-ink: #0B1B2B;
  --smg-pm-line: rgba(255, 255, 255, 0.12);
  --smg-pm-soft: rgba(255, 255, 255, 0.72);
  --smg-pm-heading: var(--wp--preset--font-family--heading, "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --smg-pm-body: var(--wp--preset--font-family--body, "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  position: relative;
  color: #fff;
  font-family: var(--smg-pm-body);
  scroll-margin-top: 110px;
  margin-top: 8px;
}
.smg-pm *, .smg-pm *::before, .smg-pm *::after { box-sizing: border-box; }

/* ---------- country tabs ---------- */
.smg-pm__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
}
.smg-pm__tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: 700 15px/1.2 var(--smg-pm-heading);
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.smg-pm__tab:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(124, 198, 244, 0.55); }
.smg-pm__tab:active { transform: translateY(1px); }
.smg-pm__tab:focus-visible { outline: 2px solid var(--smg-pm-sky); outline-offset: 3px; }
.smg-pm__tab[aria-selected="true"] {
  background: #fff;
  border-color: #fff;
  color: var(--smg-pm-ink);
  box-shadow: 0 12px 30px -14px rgba(124, 198, 244, 0.75);
}
.smg-pm__flag {
  display: block;
  flex: none;
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.smg-pm__tab[aria-selected="true"] .smg-pm__flag { box-shadow: 0 0 0 1px rgba(11, 27, 43, 0.14); }
.smg-pm__flag--sm { width: 20px; height: 15px; border-radius: 2px; }
.smg-pm__globe { width: 20px; height: 20px; flex: none; color: var(--smg-pm-sky); }
.smg-pm__tab[aria-selected="true"] .smg-pm__globe { color: var(--smg-pm-action); }
.smg-pm__tab-count {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124, 198, 244, 0.16);
  color: var(--smg-pm-sky);
  font: 600 12px/1 var(--smg-pm-body);
}
.smg-pm__tab[aria-selected="true"] .smg-pm__tab-count { background: rgba(22, 104, 199, 0.1); color: var(--smg-pm-action); }

/* ---------- views ---------- */
.smg-pm__stage { position: relative; }
.smg-pm__view[hidden] { display: none !important; }
.smg-pm__view.is-entering { animation: smg-pm-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes smg-pm-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.smg-pm__svg { display: block; width: 100%; height: auto; overflow: visible; }
.smg-pm__land { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 2.6; stroke-linecap: round; }
.smg-pm__hl { fill: none; stroke: var(--smg-pm-sky); stroke-width: 3.2; stroke-linecap: round; opacity: .95; }
.smg-pm__view--all .smg-pm__land { stroke-width: 2.4; stroke: rgba(255, 255, 255, 0.22); }
.smg-pm__view--all .smg-pm__hl { stroke-width: 3; }

/* overview routes and hubs */
.smg-pm__route-base { fill: none; stroke: rgba(124, 198, 244, 0.16); stroke-width: 2; }
.smg-pm__route { fill: none; stroke: url(#smg-pm-grad); stroke-width: 2.4; stroke-dasharray: 7 9; stroke-linecap: round; animation: smg-pm-dash 1.6s linear infinite; }
@keyframes smg-pm-dash { to { stroke-dashoffset: -32; } }
.smg-pm__waypoint circle { fill: rgba(255, 255, 255, 0.5); }
.smg-pm__waypoint text { fill: rgba(255, 255, 255, 0.45); font: 500 13px var(--smg-pm-body); }
.smg-pm__hub { cursor: pointer; outline: none; }
.smg-pm__hit { fill: transparent; }
.smg-pm__pulse { fill: none; stroke: var(--smg-pm-sky); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; }
.smg-pm__pulse--hub { animation: smg-pm-pulse 2.8s ease-out infinite; }
.smg-pm__hub--ae .smg-pm__pulse--hub { animation-delay: .9s; }
.smg-pm__hub--lk .smg-pm__pulse--hub { animation-delay: 1.8s; }
@keyframes smg-pm-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }
.smg-pm__ring { fill: rgba(124, 198, 244, 0.18); stroke: var(--smg-pm-sky); stroke-width: 1.5; transition: fill .2s ease, stroke .2s ease; }
.smg-pm__dot { fill: #fff; transition: fill .2s ease; }
.smg-pm__hlabel { fill: #fff; font: 800 16px var(--smg-pm-heading); letter-spacing: .14em; }
.smg-pm__hsub { fill: rgba(255, 255, 255, 0.62); font: 500 13px var(--smg-pm-body); }
.smg-pm__hub:hover .smg-pm__ring, .smg-pm__hub:focus-visible .smg-pm__ring { fill: rgba(242, 165, 22, 0.25); stroke: var(--smg-pm-amber); }
.smg-pm__hub:hover .smg-pm__hlabel, .smg-pm__hub:focus-visible .smg-pm__hlabel { fill: var(--smg-pm-amber); }
.smg-pm__hub:focus-visible .smg-pm__hit { stroke: var(--smg-pm-sky); stroke-width: 2; stroke-dasharray: 3 4; }
.smg-pm__hint { margin: 18px 0 0; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 14px; }

/* ---------- country view ---------- */
.smg-pm__view--country {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: stretch;
}
.smg-pm__map {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(420px 300px at 70% 30%, rgba(22, 104, 199, 0.22), transparent 70%),
    rgba(4, 18, 31, 0.38);
  overflow: hidden;
}
.smg-pm__map .smg-pm__svg { overflow: hidden; }
.smg-pm__map-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(4, 18, 31, 0.7);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  pointer-events: none;
}
.smg-pm__map-hint-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(124, 198, 244, 0.35); }

/* port markers */
.smg-pm__port { cursor: pointer; }
.smg-pm__port .smg-pm__ring { fill: rgba(124, 198, 244, 0.2); }
.smg-pm__plabel {
  fill: #fff;
  font: 700 12.5px var(--smg-pm-heading);
  letter-spacing: .01em;
  paint-order: stroke;
  stroke: rgba(4, 18, 31, 0.85);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.smg-pm__port.is-labelled .smg-pm__plabel { opacity: .9; }
.smg-pm__port:hover .smg-pm__plabel,
.smg-pm__port.is-hover .smg-pm__plabel,
.smg-pm__port.is-active .smg-pm__plabel { opacity: 1; }
.smg-pm__port:hover .smg-pm__ring, .smg-pm__port.is-hover .smg-pm__ring { stroke: #fff; fill: rgba(124, 198, 244, 0.38); }
.smg-pm__port.is-active .smg-pm__ring { stroke: var(--smg-pm-amber); fill: rgba(242, 165, 22, 0.3); }
.smg-pm__port.is-active .smg-pm__dot { fill: var(--smg-pm-amber); }
.smg-pm__port.is-active .smg-pm__plabel { fill: var(--smg-pm-amber); }
.smg-pm__port.is-active .smg-pm__pulse { stroke: var(--smg-pm-amber); animation: smg-pm-pulse 2.2s ease-out infinite; }
.smg-pm__port.is-hover .smg-pm__pulse { animation: smg-pm-pulse 1.6s ease-out infinite; }

/* side panel */
.smg-pm__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  contain: size;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}
.smg-pm__list, .smg-pm__card { display: flex; flex-direction: column; min-height: 0; height: 100%; padding: 24px 22px 18px; }
.smg-pm__list[hidden], .smg-pm__card[hidden] { display: none; }
.smg-pm__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--smg-pm-sky);
  font: 700 12px/1.2 var(--smg-pm-body);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.smg-pm__title {
  margin: 0 0 8px;
  color: #fff;
  font: 800 26px/1.15 var(--smg-pm-heading);
  letter-spacing: -0.01em;
}
.smg-pm__blurb { margin: 0 0 14px; color: var(--smg-pm-soft); font-size: 14.5px; line-height: 1.55; }
.smg-pm__count-line { margin: 0 0 8px; color: rgba(255, 255, 255, 0.55); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.smg-pm__ports {
  list-style: none;
  margin: 0 -8px;
  padding: 0 8px 4px;
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 198, 244, .35) transparent;
}
.smg-pm__ports li { margin: 0; padding: 0; }
.smg-pm__port-btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.smg-pm__port-btn:hover, .smg-pm__port-btn.is-hover { background: rgba(124, 198, 244, 0.09); border-color: rgba(124, 198, 244, 0.28); }
.smg-pm__port-btn:focus-visible { outline: 2px solid var(--smg-pm-sky); outline-offset: 1px; }
.smg-pm__port-pin { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(124, 198, 244, 0.3); }
.smg-pm__port-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.smg-pm__port-name { font: 700 15px/1.25 var(--smg-pm-heading); color: #fff; }
.smg-pm__port-meta { font-size: 12.5px; color: rgba(255, 255, 255, 0.58); }
.smg-pm__chev { width: 16px; height: 16px; flex: none; color: rgba(255, 255, 255, 0.45); transition: transform .15s ease, color .15s ease; }
.smg-pm__port-btn:hover .smg-pm__chev { transform: translateX(2px); color: var(--smg-pm-sky); }

/* port card */
.smg-pm__card { overflow-y: auto; scroll-margin-top: 96px; animation: smg-pm-in .35s cubic-bezier(.2, .7, .2, 1) both; }
.smg-pm__back {
  appearance: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 6px 10px 6px 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font: 600 13px/1 var(--smg-pm-body);
  cursor: pointer;
}
.smg-pm__back:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.smg-pm__back:focus-visible { outline: 2px solid var(--smg-pm-sky); outline-offset: 2px; }
.smg-pm__back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.smg-pm__card-title { margin: 0 0 6px; color: #fff; font: 800 28px/1.12 var(--smg-pm-heading); letter-spacing: -0.01em; outline: none; }
.smg-pm__card-meta { margin: 0 0 18px; color: rgba(255, 255, 255, 0.62); font-size: 14px; }
.smg-pm__label { margin: 0 0 8px; color: rgba(255, 255, 255, 0.5); font: 700 11.5px/1.2 var(--smg-pm-body); letter-spacing: .14em; text-transform: uppercase; }
.smg-pm__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; }
.smg-pm__chips li { margin: 0; }
.smg-pm__chips a {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(124, 198, 244, 0.35);
  color: var(--smg-pm-sky);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.smg-pm__chips a:hover { background: rgba(124, 198, 244, 0.14); color: #fff; }
.smg-pm__office { margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; background: rgba(4, 18, 31, 0.45); border: 1px solid rgba(255, 255, 255, 0.07); }
.smg-pm__office-name { margin: 0 0 2px; color: #fff; font: 700 15px/1.3 var(--smg-pm-heading); }
.smg-pm__office-place { margin: 0 0 8px; color: rgba(255, 255, 255, 0.6); font-size: 13px; line-height: 1.45; }
.smg-pm__office-tel { color: #fff; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.smg-pm__office-tel:hover { color: var(--smg-pm-sky); }
.smg-pm__office-note { color: rgba(255, 255, 255, 0.5); font-size: 12.5px; margin-left: 6px; }
.smg-pm__actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.smg-pm__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 10px;
  font: 700 15px/1.2 var(--smg-pm-heading);
  text-decoration: none;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.smg-pm__btn:active { transform: translateY(1px); }
.smg-pm__btn:focus-visible { outline: 2px solid var(--smg-pm-sky); outline-offset: 2px; }
.smg-pm__btn--primary { background: var(--smg-pm-action); color: #fff; box-shadow: 0 12px 24px -12px rgba(22, 104, 199, 0.9); }
.smg-pm__btn--primary:hover { background: #1b78e0; color: #fff; }
.smg-pm__btn--ghost { border: 1px solid rgba(255, 255, 255, 0.24); color: #fff; background: transparent; }
.smg-pm__btn--ghost:hover { border-color: #25D366; background: rgba(37, 211, 102, 0.12); color: #fff; }
.smg-pm__btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .smg-pm__view--country { grid-template-columns: 1fr; gap: 16px; }
  .smg-pm__panel { contain: none; }
  .smg-pm__list, .smg-pm__card { height: auto; padding: 20px 18px 18px; }
  .smg-pm__ports { overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smg-pm__actions { margin-top: 4px; }
}
@media (max-width: 640px) {
  .smg-pm__tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 20px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .smg-pm__tabs::-webkit-scrollbar { display: none; }
  .smg-pm__tab { min-height: 42px; padding: 7px 13px 7px 10px; font-size: 14px; }
  .smg-pm__tab-count { display: none; }
  .smg-pm__ports { grid-template-columns: 1fr; }
  .smg-pm__title { font-size: 22px; }
  .smg-pm__card-title { font-size: 24px; }
  .smg-pm__map-hint { left: 10px; bottom: 10px; font-size: 11px; }
  /* the SVGs scale down a lot on phones: enlarge markers, keep only the active label */
  .smg-pm__mk { transform: scale(1.7); }
  .smg-pm__view--country .smg-pm__hl { stroke-width: 4.4; }
  .smg-pm__view--country .smg-pm__land { stroke-width: 3.4; }
  .smg-pm__port.is-labelled .smg-pm__plabel { opacity: 0; }
  .smg-pm__port.is-active .smg-pm__plabel { opacity: 1; }
  .smg-pm__hub-mk { transform: scale(2); }
  .smg-pm__hsub { display: none; }
  .smg-pm__waypoint text { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .smg-pm__route, .smg-pm__pulse, .smg-pm__pulse--hub, .smg-pm__port.is-active .smg-pm__pulse, .smg-pm__port.is-hover .smg-pm__pulse { animation: none !important; }
  .smg-pm__view.is-entering, .smg-pm__card { animation: none !important; }
}
