@font-face {
  font-family: 'eUkraineHead';
  src: url('fonts/e-UkraineHead-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'eUkraineHead';
  src: url('fonts/e-UkraineHead-UltraLight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'eUkraineHead';
  src: url('fonts/e-UkraineHead-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'eUkraineHead';
  src: url('fonts/e-UkraineHead-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'eUkraineHead';
  src: url('fonts/e-UkraineHead-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'eUkraineHead';
  src: url('fonts/e-UkraineHead-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'eUkraineHeadLOGO';
  src: url('fonts/e-UkraineHead-LOGO.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2f8ff;
  --border: #d8e7ff;
  --fg: #0d1b2a;
  --muted: #4a5b70;
  --brand: #18c7ba;
  --tile: #c9f3ee;
  --card: #ffffff;
  --flip: #e6fbf7;
  --tile-h: 200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
}

body,
button,
input,
select,
textarea {
  font-family: 'eUkraineHead', Inter, Segoe UI, Roboto, system-ui, sans-serif;
  color: var(--fg);
  line-height: 1.6;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  color: #0aa9a0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  text-align: left;
  margin-bottom: 12px;
  width: 100%;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header h1 {
  font-family: 'eUkraineHeadLOGO', 'eUkraineHead', sans-serif;
  color: #000;
  font-weight: 800;
  font-size: 2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.social-link:hover {
  opacity: 0.8;
}

.social-icon {
  height: 28px;
  width: auto;
  border-radius: 6px;
}

.logo {
  height: 70px;
  width: auto;
  transform: translateY(-2px);
}

.lang-switch {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  width: 38px;
  height: 38px;
}

.lang-btn img {
  height: 20px;
  width: auto;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: none;
  z-index: 20;
  min-width: 60px;
}

.lang-switch.open .lang-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.lang-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lang-flag {
  height: 24px;
  width: auto;
}

.carousel-intro {
  width: 100%;
  max-width: 1000px;
  text-align: left;
  margin-bottom: 4px;
}

.carousel-title {
  font-size: 1.1rem;
  color: var(--muted);
  margin-left: 4px;
}

.carousel {
  width: 100%;
  max-width: 1000px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg);
  padding: 8px 6px;
  margin-bottom: 24px;
  min-height: 90px;
}

.track {
  display: flex;
  width: max-content;
  align-items: center;
  will-change: transform;
  animation: scroll var(--duration, 40s) linear infinite;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.slide {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px;
  padding: 10px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px var(--border);
  min-height: 68px;
  transition: background-color 0.2s ease;
}

.slide:hover {
  background: rgba(0, 0, 0, 0.06);
}

.slide img {
  height: 56px;
  width: auto;
  object-fit: contain;
  transition: transform 0.22s ease, filter 0.22s ease;
  filter: brightness(1);
}

.slide:hover img {
  transform: scale(1.08);
  filter: brightness(0.95);
}

main {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tile {
  background: var(--flip);
  border: 1px solid #a8e9e2;
  border-radius: 16px;
  padding: 20px;
  min-height: var(--tile-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
}

.important {
  background: var(--flip);
  border-color: #a8e9e2;
}

.tile h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
  color: #0e8f86;
}

.tile p {
  color: var(--fg);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1000px;
}

.stat-card {
  background: transparent;
  border: none;
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: var(--tile-h);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.stat-card:hover .card-inner,
.stat-card:focus-within .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  backface-visibility: hidden;
}

.card-front h3 {
  font-size: 1.1rem;
  color: #0e8f86;
}

.card-front img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--flip);
  border: 1px solid #a8e9e2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
}

.card-back p {
  font-size: 1rem;
  color: var(--fg);
}

.support {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.support h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #0e8f86;
}

.support ul {
  list-style: none;
  line-height: 1.9;
}

.support code {
  background: #edfaff;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: 'eUkraineHead', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.support-list {
  list-style: none;
  line-height: 1.9;
  padding-left: 0;
}

.support-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.support-list img.emoji {
  height: 18px;
  width: auto;
  margin-right: 4px;
  vertical-align: middle;
}

footer {
  width: 100%;
  max-width: 1000px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 26px;
}

@media (max-width: 900px) {
  body {
    padding: 16px;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .slide {
    padding: 8px 14px;
  }
  .slide img {
    height: 44px;
  }
}

.reports {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.report-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--tile);
  border: 1px solid #a8e9e2;
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.report-tile:hover {
  background-color: #bdf1ea;
  transform: translateY(-3px);
}

.report-tile h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0e8f86;
  margin-bottom: 6px;
}

.report-tile p {
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.4;
}

/* === Кахель "Звіти" як 8-й елемент у .stats === */
.report-link,
.report-link:hover {
  text-decoration: none;
}

.report-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
}

.report-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-header h2 {
  font-size: 1.25rem;
  color: #0e8f86;
  margin: 0;
  line-height: 1;
}

.link-icon {
  height: 22px;
  width: 22px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.report-link:hover .link-icon {
  transform: translateX(2px);
  opacity: 1;
}

.report-link:focus-visible {
  outline: 2px solid #0e8f86;
  outline-offset: 3px;
  border-radius: 12px;
}