/* ==========================================================================
   UNICOM Centers — landing page styles
   Palette: Ukrainian blue + gold as accents on a calm, light academic base.
   ========================================================================== */

:root {
  --blue: #0057b7;        /* Ukrainian flag blue */
  --uni-navy: #0b3e9f;    /* UNICOM logo dark blue */
  --uni-blue: #1673fa;    /* UNICOM logo bright blue */
  --blue-deep: #0b2545;   /* ink / headings */
  --blue-mid: #13315c;
  --gold: #ffd500;        /* Ukrainian flag gold */
  --gold-deep: #e5b900;
  --paper: #f6f9fc;
  --card: #ffffff;
  --line: #dfe7f1;
  --text: #24344d;
  --muted: #5c6e88;
  --coast: #2a66ad;
  --shadow-lg: 0 24px 60px -24px rgba(11, 37, 69, 0.25);
  --shadow-sm: 0 6px 18px -8px rgba(11, 37, 69, 0.18);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { color: var(--blue-deep); line-height: 1.18; margin: 0 0 0.5em; }
a { color: var(--blue); }

/* ------------------------------- header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo { display: block; height: 44px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 26px; }

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--blue-mid);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--blue); border-bottom-color: var(--gold); }

.site-nav .btn-nav {
  background: var(--blue);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  border-bottom: none;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.site-nav .btn-nav:hover {
  background: var(--blue-mid);
  color: #fff;
  border-bottom: none;
  transform: translateY(-1px);
}

/* -------------------------------- hero --------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  /* UNICOM logo palette (navy base, azure glow) with Ukrainian gold accents */
  background:
    radial-gradient(90rem 40rem at 110% -30%, rgba(22, 115, 250, 0.5), transparent 60%),
    radial-gradient(70rem 36rem at -20% 130%, rgba(255, 213, 0, 0.16), transparent 55%),
    linear-gradient(155deg, #061e56 0%, #0b3e9f 62%, #1150c4 100%);
}

.hero-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-map svg {
  position: absolute;
  right: -12%;
  top: 50%;
  transform: translateY(-50%);
  width: 62%;
  min-width: 560px;
  opacity: 0.85;
}
.hero-land {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(255, 213, 0, 0.35);
  stroke-width: 1.6;
}
.hero-dot { fill: rgba(255, 213, 0, 0.8); }

.hero-inner {
  position: relative;
  padding: 96px 24px 80px;
  max-width: 1120px;
}

.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 13ch;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  color: #fff;
}

.hero-lede {
  max-width: 54ch;
  margin: 0 0 30px;
  font-size: 1.1rem;
  color: rgba(233, 242, 252, 0.92);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--gold);
  color: #14213d;
  box-shadow: 0 10px 26px -10px rgba(255, 213, 0, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); background: #ffe14d; }
.btn-ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-stats {
  display: flex;
  gap: 46px;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 560px;
}
.hero-stats dt {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: rgba(233, 242, 252, 0.85);
}

/* ----------------------------- sections -------------------------------- */

.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { margin: 0; color: var(--muted); }
.section-head .note { display: block; font-size: 0.88rem; margin-top: 4px; }

.map-section { padding: 84px 0 40px; }
.centers-section { padding: 64px 0 30px; }
.about-section { padding: 64px 0 90px; }

/* UNICOM key visual (circle/quarter-disc motif) as a subtle ornament in the
   light sections — rebuilt as an inline SVG so it stays crisp and tiny. */
.map-section,
.about-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.map-section::before,
.about-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 768 880'%3E%3Ccircle cx='300' cy='235' r='185' fill='%230B3E9F'/%3E%3Cpath d='M535 55a187 187 0 0 1 0 374Z' fill='%231673FA'/%3E%3Cpath d='M128 455h175a175 175 0 0 1-175 175Z' fill='%230B3E9F'/%3E%3Cpath d='M328 455h175a175 175 0 0 1-175 175Z' fill='%231673FA'/%3E%3Cpath d='M128 660h175a175 175 0 0 1-175 175Z' fill='%231673FA'/%3E%3Cpath d='M330 660h380a190 190 0 0 1-380 0Z' fill='%230B3E9F'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
}
.map-section::before {
  width: 380px;
  height: 436px;
  top: -60px;
  right: -110px;
  opacity: 0.08;
}
.about-section::before {
  width: 460px;
  height: 527px;
  right: -130px;
  bottom: -80px;
  opacity: 0.07;
}

/* -------------------------------- map ---------------------------------- */

.map-panel {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(10px, 3vw, 30px);
  box-shadow: var(--shadow-lg);
}

.map-wrap { position: relative; }

.map-canvas svg { display: block; width: 100%; height: auto; }

.map-land { stroke: none; }
.map-coast {
  fill: none;
  stroke: var(--coast);
  stroke-width: 1.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 14px 22px rgba(17, 74, 134, 0.16));
}
.map-regions {
  fill: none;
  stroke: #ffffff;
  stroke-width: 0.9;
  stroke-linejoin: round;
  opacity: 0.65;
}
.map-island { fill: #b9d4ef; stroke: var(--coast); stroke-width: 0.6; }

/* pins */

.hub { cursor: pointer; text-decoration: none; outline: none; }

.hub .dot {
  fill: var(--gold);
  stroke: var(--blue-deep);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.18s ease, fill 0.18s ease;
}

.hub .halo {
  fill: var(--gold);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: haloPulse 2.8s ease-out infinite;
}
.hub:nth-child(odd) .halo { animation-delay: 1.4s; }

@keyframes haloPulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(2.7); opacity: 0; }
  100% { transform: scale(2.7); opacity: 0; }
}

.hub .focus-ring {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 4 3;
  opacity: 0;
}
.hub:focus-visible .focus-ring { opacity: 1; }

.hub .caption {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--blue-mid);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3.2px;
  stroke-linejoin: round;
  transition: fill 0.15s ease;
}

.hub:hover .dot,
.hub:focus-visible .dot { transform: scale(1.35); fill: #ffe14d; }
.hub:hover .caption,
.hub:focus-visible .caption { fill: var(--blue); }

.hub.flash .dot { animation: pinFlash 0.85s ease 3; }

@keyframes pinFlash {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.8); fill: #ffe985; }
}

/* tooltip */

.map-tooltip {
  position: absolute;
  z-index: 5;
  display: none;
  flex-direction: column;
  gap: 2px;
  max-width: 270px;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(-100% - 16px));
  pointer-events: none;
}
.map-tooltip.visible { display: flex; }
.map-tooltip strong {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.map-tooltip span { font-size: 0.95rem; font-weight: 600; color: var(--blue-deep); line-height: 1.35; }
.map-tooltip em { font-style: normal; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.map-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}

.map-attribution {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------- cards --------------------------------- */

.center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}

.center-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.center-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #c8d8ec;
}

.card-eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.card-eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid var(--blue-deep);
  vertical-align: 1px;
}

.center-card h3 {
  margin: 0 0 14px;
  font-size: 1.02rem;
  line-height: 1.4;
  flex-grow: 1;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.card-locate {
  border: 1.5px solid var(--blue);
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.card-locate:hover { background: var(--blue); color: #fff; }

.card-soon { font-size: 0.78rem; color: var(--muted); }

.center-card.card-flash { animation: cardFlash 1.3s ease 2; }

@keyframes cardFlash {
  0%, 100% { border-color: var(--line); box-shadow: var(--shadow-sm); }
  50% { border-color: var(--gold-deep); box-shadow: 0 0 0 5px rgba(255, 213, 0, 0.35); }
}

/* ------------------------------- about --------------------------------- */

.about-inner p { max-width: 74ch; }

/* ------------------------------- footer -------------------------------- */

.site-footer {
  background: var(--blue-deep);
  color: rgba(226, 236, 248, 0.85);
  padding: 40px 0;
  font-size: 0.9rem;
}
.footer-funding {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-eu-logo {
  height: 56px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  flex-shrink: 0;
}
.footer-disclaimer {
  margin: 0;
  flex: 1 1 380px;
  max-width: 72ch;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(226, 236, 248, 0.7);
}

.footer-inner p { margin: 0 0 8px; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.05rem; }
.footer-note { color: rgba(226, 236, 248, 0.6); font-size: 0.8rem; max-width: 62ch; }

/* ----------------------------- responsive ------------------------------ */

@media (max-width: 860px) {
  .hero-map svg { right: -35%; width: 95%; opacity: 0.45; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero-inner { padding: 72px 18px 60px; }
  .hero-stats { gap: 28px; }
  .brand-logo { height: 34px; }
  .footer-eu-logo { height: 46px; }

  /* header wraps to two rows so the UNICOM Website button always fits */
  .header-inner { flex-wrap: wrap; padding: 10px 18px; row-gap: 4px; }
  .site-nav { gap: 12px; flex-wrap: wrap; }
  .site-nav a { font-size: 0.85rem; }
  .site-nav .btn-nav { padding: 7px 13px; font-size: 0.8rem; }
  html { scroll-padding-top: 130px; }

  /* On small screens the captions would be unreadably tiny — pins stay
     tappable and the card list right below is the readable index. */
  .hub .caption { display: none; }
  .hub .dot { stroke-width: 1.6; r: 11; }
  .hub .hit { r: 26; }
  .map-panel { border-radius: 16px; }
}

/* ------------------------- reduced motion ------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hub .halo { animation: none; }
  .btn, .center-card, .hub .dot { transition: none; }
  .hub.flash .dot, .center-card.card-flash { animation: none; }
}
