/* ══════════════════════════════════════════
   Rotary Ukraine – for Children of Heroes
   Brand colors: Blue #17458F · Gold #F7A81B
   ══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Rotary brand colors (per brandcenter.rotary.org) ─── */
  --blue:        #17458F;  /* Rotary Royal Blue */
  --gold:        #F7A81B;  /* Rotary Gold       */
  --cranberry:   #d41367;  /* Rotary Cranberry  */
  --azure:       #0067c8;  /* Rotary Azure      */
  --sky:         #00a2e0;  /* Rotary Sky Blue   */
  --powder-blue: #b9d9eb;  /* Rotary Powder Blue */
  --slate:       #657f99;  /* Rotary Slate (neutral) */
  --stone:       #9ba4b4;  /* Rotary Stone (neutral) */
  --silver:      #d0cfcd;  /* Rotary Silver (neutral) */
  --charcoal:    #54565a;  /* Rotary Charcoal */

  /* ── Derived / UI tints ─── */
  --blue-dark:   #0f3068;  /* darker Royal Blue (hover/footer) */
  --blue-light:  #e8eef8;
  --gold-soft:   #fef3d7;
  --cranberry-soft: #fde6f0;

  /* ── UI neutrals ─── */
  --text:        #1a1a2e;
  --muted:       var(--slate);
  --bg:          #ffffff;
  --bg-alt:      #f7f8fc;
  --line:        #e5e9f2;

  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.2s ease;
  --shadow:      0 4px 24px rgba(23,69,143,0.08);
  --shadow-lg:   0 8px 40px rgba(23,69,143,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.hidden { display: none !important; }

/* ─── Header ────────────────────────────────────────────── */
.site-header {
  background: var(--blue);
  padding: 24px 0 48px;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: rgba(247,168,27,0.08);
  pointer-events: none;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -60px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: relative;
  z-index: 1;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo { flex-shrink: 0; }

.header-logo-img {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-title {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  color: rgba(255,255,255,0.90);
  line-height: 1.3;
  margin: 0;
}

.site-subtitle {
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin: 0;
}

.header-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ─── Language dropdown ────────────────────────────────── */
.lang-dropdown {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 50;
}

.lang-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.lang-dropdown-trigger:hover,
.lang-dropdown-trigger[aria-expanded="true"] {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.32);
}

.lang-flag { font-size: 16px; line-height: 1; }
.lang-code { color: #fff; }
.lang-chevron { transition: transform var(--transition); color: rgba(255,255,255,0.85); }
.lang-dropdown-trigger[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }

.lang-dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition);
}

.lang-dropdown-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lang-option:hover { background: var(--bg-alt); }

.lang-option.is-active {
  background: var(--blue-light);
  color: var(--blue);
}

.lang-option.is-active::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: auto;
}

/* ─── Section base ────────────────────────────────────── */
.section { padding: 80px 0; }

.section-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  line-height: 1.2;
}

.section-title-light { color: #fff; }

/* ─── 2. Why this matters ─────────────────────────────── */
.section-why { background: var(--bg-alt); }

/* Quote-style emotional lead card */
.why-lead {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 56px 44px 48px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.why-lead::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 5px;
  background: var(--cranberry);
}

.why-lead-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(80px, 9vw, 130px);
  line-height: 0.8;
  color: var(--cranberry);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: -8px;
}

.why-lead-text {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Horizontal stat rows */
.why-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.why-stat-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.why-stat-row::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--cranberry);
}

.why-stat-row:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.why-stat-num {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  color: var(--cranberry);
  line-height: 1;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.why-stat-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── 3. About the project ────────────────────────────── */
.section-about { background: var(--bg-alt); }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.75;
  text-align: justify;
}

.about-content p:first-child::first-letter {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--blue);
}

/* ─── 4. Areas of activity (directions) ────────────────── */
.section-directions {
  background: var(--blue);
  position: relative;
  overflow: hidden;
}

.section-directions::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(247,168,27,0.06);
  pointer-events: none;
}

.section-directions::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.directions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.direction-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.direction-card:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(247,168,27,0.4);
  transform: translateY(-4px);
}

.direction-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(247,168,27,0.15);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.direction-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.45;
}

/* ─── 5. Project results ──────────────────────────────── */
.section-results { background: var(--bg); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.result-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gold);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.result-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.result-num {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.result-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── 6. Reach / map ──────────────────────────────────── */
.section-reach { background: var(--bg-alt); }

.section-reach .section-title { margin-bottom: 20px; }

.reach-body {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text);
  line-height: 1.6;
  max-width: 780px;
  margin-bottom: 12px;
}

.reach-cta {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 24px;
}

.map-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--muted);
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.map-legend-dot--active   { background: var(--gold); }
.map-legend-dot--inactive { background: var(--powder-blue); }

.map-wrapper {
  background: transparent;
  padding: 8px 0 0;
}

.ukraine-map {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.ukraine-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
}

/* Region paths — default state: "no project" */
.region {
  fill: var(--powder-blue);
  stroke: #fff;
  stroke-width: 0.6;
  cursor: default;
  outline: none;
  transition: fill var(--transition), filter var(--transition);
}

/* Project regions: highlighted in Rotary Gold */
.region.is-active {
  fill: var(--gold);
  cursor: pointer;
}

/* Hover on a project region → darker gold + soft shadow */
.region.is-active:hover {
  fill: #c8870c;
  filter: drop-shadow(0 4px 10px rgba(247,168,27,0.45));
}

/* Selected project region after click — Royal Blue with gold outline */
.region.is-active.is-selected {
  fill: var(--blue);
  stroke: var(--gold);
  stroke-width: 1.5;
}

.region:focus-visible {
  stroke: var(--blue);
  stroke-width: 1.5;
}

.region-panel {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  min-height: 120px;
  transition: background var(--transition);
}

/* ─── Empty state ─── */
.region-panel--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  box-shadow: none;
  border-style: dashed;
}

.region-panel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}

.region-panel-empty-icon {
  flex-shrink: 0;
  color: var(--gold);
}

.region-panel-empty-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

/* ─── Region view ─── */
.region-panel-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.region-panel-title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

.region-panel-clubs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.club-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}

.club-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.club-name {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 700;
  color: var(--blue);
  margin: 0;
  letter-spacing: -0.005em;
}

.club-detail {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.club-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 9px 18px;
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), gap var(--transition), transform var(--transition);
}

.club-cta:hover {
  background: var(--gold);
  color: var(--blue-dark);
  gap: 12px;
  transform: translateY(-1px);
}

.club-cta span:last-child { font-size: 16px; line-height: 1; }

@media (max-width: 520px) {
  .region-panel { padding: 22px 20px; }
  .region-panel-empty { flex-direction: column; gap: 10px; text-align: center; }
}

/* ─── Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--blue-dark);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-logo { flex-shrink: 0; }

.footer-logo img {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  display: block;
}

.footer-tagline {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  min-width: 200px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.footer-social-btn:hover {
  background: var(--gold);
  color: var(--blue-dark);
}

.footer-contacts {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-align: right;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin-top: 24px;
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 960px) {
  .why-stats       { grid-template-columns: 1fr; }
  .about-layout    { grid-template-columns: 1fr; gap: 32px; }
  .results-grid    { grid-template-columns: 1fr 1fr; }
  .directions-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .why-lead       { padding: 32px 28px; gap: 16px; flex-direction: column; }
  .why-lead-mark  { font-size: 64px; }
  .why-stat-row   { padding: 22px 24px; gap: 18px; }
  .results-grid   { grid-template-columns: 1fr 1fr; gap: 12px; }
  .result-card    { padding: 24px 16px; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-right { align-items: center; }
  .footer-contacts { text-align: center; }
}

@media (max-width: 520px) {
  .directions-grid { grid-template-columns: 1fr; }
  .results-grid    { grid-template-columns: 1fr; }
  .lang-dropdown   { top: 12px; right: 16px; }
  .header-top      { flex-direction: column; align-items: flex-start; gap: 14px; }
  .map-wrapper     { padding: 16px; }
}
