#section-hero {
  position: relative;
}

/* Сам блок hero — «картка» з фото всередині білої секції, як на zp.edu.ua */
.hero-frame {
  position: relative;
  isolation: isolate;
  background-color: var(--color-blue-200);
  overflow: hidden;
}

.hero-parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* вище за секцію: паралакс (hero-strip.js) зсуває фон униз при прокрутці */
  height: 120%;
  background-image: 
    linear-gradient(to bottom, rgba(22, 41, 91, 0.90) 0%, rgba(22, 41, 91, 0.80) 100%),
    url(../../../img/hero-bg-photo.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

/* Діагональний градієнт як на zp.edu.ua: темніше під текстом зліва,
   справа фото видно краще. На вузьких екранах текст по центру — лишається суцільний. */
@media (min-width: 1025px) {
  .hero-parallax-bg {
    background-image:
      linear-gradient(135deg, rgba(10, 19, 45, 0.92) 0%, rgba(22, 41, 91, 0.72) 50%, rgba(22, 41, 91, 0.38) 100%),
      url(../../../img/hero-bg-photo.webp);
  }
}

/* Окремий шар для фону потрібен лише там, де паралакс справді рухається */
@media (min-width: 900px) {
  .hero-parallax-bg {
    will-change: transform;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  position: relative;
  margin: 0 auto;
  max-width: 1800px;
  padding: 0;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-grey-100);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

/* гасло — абзац, але виглядає як колишній заголовок */
#section-hero .hero-display {
  max-width: none;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 700;
  color: white;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

#section-hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
  max-width: 520px;
  line-height: 1.6;
}

.cta-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--color-grey-050);
  padding-top: 24px;
  max-width: 600px;
}

.stat-item strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.stat-item strong span {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
}

.stat-item span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  width: 100%;
  height: 600px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-video-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}



.hero-video {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.15);
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  object-fit: contain;
}


.stat-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background-color: rgba(12, 25, 60, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  width: auto;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 10px 10px 0px var(--color-highlight);
  z-index: 10;
}

.stat-header {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.7;
  color: var(--color-white);
  margin-bottom: 0;
}

.stat-content-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-big-num {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  color: var(--color-white);
  letter-spacing: -2px;
}

.stat-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-sub {
  font-size: 13px;
  color: var(--color-grey-100);
  line-height: 1.3;
  font-weight: 500;
  text-transform: uppercase;
}

.stat-sub.highlight {
  color: var(--color-highlight);
  font-weight: 700;
}

.hero-tags-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-tag {
  position: absolute;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;

  color: rgba(255, 255, 255, 0.15);
  -webkit-text-stroke: 0;
  opacity: 1;
}

.tag-top-left {
  top: 30px;
  left: 30px;
  font-size: 48px;
}

.tag-bottom-left {
  bottom: 20px;
  left: 30px;
  font-size: 56px;
}

.tag-bottom-right {
  bottom: 120px;
  right: 0px;
  font-size: 32px;
  transform: rotate(-45deg);
}

.scroll-text {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rotateText 10s linear infinite;
  will-change: transform;
}

.scroll-icon {
  width: 24px;
  height: 24px;
  color: var(--color-blue-200);
  animation: bounce 2s infinite;
  will-change: transform;
}

@keyframes rotateText {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}



@media (max-width: 1440px) {
  #section-hero .hero-display {
    font-size: 46px;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding: 0 40px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    order: 2;
    max-width: 700px;
    margin: 0 auto;
  }

  .hero-visual {
    order: 1;
    height: 450px;
    margin-bottom: 0;
  }

  #section-hero .hero-display {
    font-size: 40px;
    margin-bottom: 20px;
  }

  .section-hero p {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .cta-wrapper {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    width: 100%;
    gap: 30px;
    padding-top: 20px;
  }

  .stat-card,
  .tag-bottom-left,
  .tag-bottom-right {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    gap: 30px;
    padding: 0 20px;
  }

  .hero-visual {
    height: 460px;
  }

  #section-hero .hero-display {
    font-size: 34px;
  }

  .status-bar {
    margin-bottom: 24px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  #section-hero {
    min-height: calc(100dvh - 70px);
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  #section-hero .container {
    margin-top: 0 !important;
  }

  .hero-grid {
    gap: 10px;
    padding: 0;
  }

  .hero-video {
    transform: translate(-50%, -50%) scale(1.25);
  }

  #section-hero .hero-display {
    font-size: 28px;
    margin-bottom: 16px;
    line-height: 1.2;
  }

  #section-hero p {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .cta-wrapper {
    flex-direction: row;
    width: 100%;
    gap: 10px;
    margin-bottom: 20px;
  }

  .cta-wrapper .btn-outline {
    flex: 1;
    height: 48px;
    padding: 0 16px;
  }

  .map-trigger-btn {
    width: 48px !important;
    height: 48px !important;
  }

  .status-bar {
    margin-bottom: 20px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .stat-item {
    min-width: 100px;
    flex: 1 1 40%;
  }

  .stat-item strong {
    font-size: 26px;
  }

  .hero-tag {
    font-size: 24px;
  }

  .logo {
    gap: 10px;
    padding: 0;
  }

  .emblem-img {
    height: 48px;
    width: auto;
  }

  .logo-img {
    display: none;
  }

  .header-actions {
    gap: 10px;
  }
}

.stat-card {
  position: absolute;
  bottom: 20px;
  left: 0;

  background-color: rgba(12, 25, 60, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px 32px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 12px 12px 0px var(--color-highlight);
  z-index: 20;
  transform: translateZ(0);
}

.stat-header {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.8;
  color: var(--color-white);
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 700;
}

.stat-content-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-big-num {
  font-size: 68px;
  font-weight: 900;
  line-height: 0.9;
  color: var(--color-white);
  letter-spacing: -3px;
}

.stat-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.stat-sub {
  font-size: 14px;
  color: var(--color-grey-100);
  line-height: 1.2;
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-sub.highlight {
  color: var(--color-grey-100);
  font-weight: 700;
}

@media (max-width: 1440px) {
  .stat-card {
    bottom: 20px;
    left: -10px;
    padding: 20px 24px;
    min-width: 240px;
  }

  .stat-big-num {
    font-size: 56px;
  }

  .stat-sub {
    font-size: 12px;
  }
}

@media (max-width: 1024px) {
  .stat-card {
    display: none;
  }
}
.smart-map-container {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  z-index: 20;
}

.map-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background-color: transparent;
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  position: relative;
}

@media (hover: hover) {
  .map-trigger-btn:hover {
    background-color: var(--color-white);
    color: var(--color-blue-200);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  }
  .map-trigger-btn:hover .map-icon-state {
    transform: scale(1.1);
  }
}

.map-icon-state {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.map-label-hidden {
  display: none;
}

.map-popup-window {
  position: absolute;
  top: -10%;
  left: calc(100% + 20px);
  transform: translateY(-50%) translateX(10px);
  width: 300px;
  height: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-grey-050);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  border-radius: 12px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 100;
}

@media (hover: hover) {
  .smart-map-container:focus-within .map-popup-window,
  .smart-map-container:hover .map-popup-window {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
  }
}

@media (max-width: 900px) {
  .map-popup-window {
    display: none;
  }
  .map-trigger-btn {
    width: 50px;
    height: 50px;
  }
}

#section-hero .btn-outline {
  color: var(--color-white);
  background-color: transparent;
  border-color: var(--color-white);
}

@media (hover: hover) {
  #section-hero .btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-blue-200);
  }
}





#section-hero .blue-underline {
  border-bottom-color: var(--color-highlight);
}

@media (max-width: 768px) {
  .hero-visual {
    height: 400px;
    margin-top: -20px;
  }
}

@media (max-width: 600px) {
  .hero-visual {
    height: 180px;
    margin-top: 20px;
    margin-bottom: 10px;
  }
} 
.map-popup-window iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}










/* ── Телефони: компактніший hero, щоб він вміщався в перший екран ──
   Емблему (відео/APNG) не зменшуємо — стискаємо лише відступи та блок статистики. */
@media (max-width: 600px) {
  #section-hero {
    /* hero не розтягується примусово на весь екран: висота = контент,
       а знизу видно початок наступного блоку — зрозуміло, що далі є ще */
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 24px;
  }

  .hero-visual {
    margin-top: 8px;
    margin-bottom: 0;
  }

  .status-bar {
    margin-bottom: 12px;
  }

  #section-hero .hero-display {
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  .cta-wrapper {
    margin-bottom: 16px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    padding-top: 14px;
  }

  .stat-item {
    min-width: 0;
  }

  .stat-item strong {
    font-size: 24px;
    line-height: 1.15;
  }

  .stat-item span {
    font-size: 11px;
    letter-spacing: 0.04em;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   Смуга посилань унизу hero — у стилі zp.edu.ua.
   Крайні комірки на десктопі займають кнопки чату (зліва) і Telegram
   (справа): hero-strip.js ставить їх туди, поки сторінку не прокручено.
   ═════════════════════════════════════════════════════════════════════ */

/* Відступи робить .hero-frame */
#section-hero {
  display: block;
  min-height: 0;
  padding: 0;
}

.hero-frame {
  display: flex;
  flex-direction: column;
}

.hero-frame > .container {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding-top: clamp(2rem, 1rem + 3vw, 5.5rem);
  padding-bottom: clamp(1.5rem, 1rem + 2vw, 3.5rem);
}

#section-hero .hero-grid {
  width: 100%;
}

/* Перший екран на десктопі: смуга стоїть біля нижнього краю вікна */
@media (min-width: 1025px) {
  .hero-frame {
    min-height: calc(100svh - 70px);
  }

}


.hero-strip {
  --strip-slot: 70px;
  position: relative;
  z-index: 15;
  width: 100%;
}

.hero-strip__inner {
  display: grid;
  grid-template-columns: var(--strip-slot) repeat(var(--strip-count, 4), 1fr) var(--strip-slot);
  /* hero на всю ширину, тож і смуга від краю до краю: кнопки стають у самі кути */
  transition: grid-template-columns calc(var(--dock-leg) * 2) var(--dock-ease);
}

.hero-strip.is-scrolled {
  --strip-slot: 0px;
}

.hero-strip__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 1.1rem 20px;
  color: var(--color-white);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  /* верхня половина — суцільний синій, нижня — напівпрозора; при наведенні фон «виїжджає» вгору */
  background: linear-gradient(to bottom, var(--color-blue-200) 0%, var(--color-blue-200) 50%, rgba(10, 19, 45, 0.5) 50%, rgba(10, 19, 45, 0.8) 100%);
  background-size: 100% 200%;
  background-position: bottom;
  transition: color 0.4s ease, background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-strip__item:not(:last-of-type)::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 40%;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.hero-strip__item:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: -4px;
}

@media (hover: hover) {
  .hero-strip__item:hover {
    color: var(--color-white);
    background-position: top;
  }
}

.hero-strip__slot {
  position: relative;
  overflow: hidden;
  background: rgba(10, 19, 45, 0.65);
  transition: opacity 0.3s ease;
}

.hero-strip.is-scrolled .hero-strip__slot {
  opacity: 0;
}

.hero-strip__slot--left {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-strip__slot--right {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Один темп і одна крива для всього польоту: два відрізки по --dock-leg і згортання
   комірок смуги за той самий час, тож кнопки й посилання рухаються разом. Крива — та сама
   «пружна», що в чаті (wp-rag-assistant). hero-strip.js чекає 2 × --dock-leg. */
:root {
  --dock-leg: 0.24s;
  --dock-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ── Кнопки, що «виїжджають» зі смуги ──
   Назад у кут: спершу по горизонталі, потім по вертикалі. */
.tg-side-widget,
.cw-widget-wrapper {
  transition: left var(--dock-leg) var(--dock-ease) 0s, right var(--dock-leg) var(--dock-ease) 0s,
    bottom var(--dock-leg) var(--dock-ease) var(--dock-leg),
    width var(--dock-leg) var(--dock-ease), height var(--dock-leg) var(--dock-ease) !important;
}

.cw-widget-wrapper .cw-floating-btn {
  transition: width var(--dock-leg) var(--dock-ease), height var(--dock-leg) var(--dock-ease), background-color var(--dock-leg) ease !important;
}

.tg-side-trigger {
  transition: width 0.3s ease, height 0.3s ease, border-radius 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* У смугу: спершу по вертикалі, потім по горизонталі */
.cw-widget-wrapper.in-strip {
  position: fixed !important;
  left: var(--strip-left) !important;
  bottom: var(--strip-bottom) !important;
  width: var(--strip-slot-w) !important;
  height: var(--strip-height) !important;
  margin: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  z-index: 999 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transition: left var(--dock-leg) var(--dock-ease) var(--dock-leg), right var(--dock-leg) var(--dock-ease) var(--dock-leg),
    bottom var(--dock-leg) var(--dock-ease) 0s,
    width var(--dock-leg) var(--dock-ease) 0s, height var(--dock-leg) var(--dock-ease) 0s !important;
}

.cw-widget-wrapper.in-strip .cw-floating-btn {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--color-white) !important;
  box-sizing: border-box !important;
  transition: none !important;
}

.cw-widget-wrapper.in-strip .cw-floating-btn::before,
.tg-side-widget.in-strip .tg-side-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, var(--color-blue-200) 0%, var(--color-blue-200) 50%, rgba(10, 19, 45, 0.5) 50%, rgba(10, 19, 45, 0.8) 100%);
  background-size: 100% 200%;
  background-position: bottom;
  transition: background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@media (hover: hover) {
  .cw-widget-wrapper.in-strip .cw-floating-btn:hover::before,
  .tg-side-widget.in-strip .tg-side-trigger:hover::before {
    background-position: top;
  }

  .cw-widget-wrapper.in-strip .cw-floating-btn:hover {
    width: 100% !important;
  }
}

.cw-widget-wrapper.in-strip .cw-floating-btn svg {
  left: 50% !important;
  margin-left: -13px !important;
  width: 26px !important;
  height: 26px !important;
  z-index: 2;
}

.cw-widget-wrapper.in-strip .cw-btn-text {
  display: none !important;
}

/* роздільники між кнопками й посиланнями */
.cw-widget-wrapper.in-strip .cw-floating-btn::after,
.tg-side-widget.in-strip .tg-side-trigger::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 40%;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  z-index: 2;
}

.cw-widget-wrapper.in-strip .cw-floating-btn::after {
  right: 0;
}

.tg-side-widget.in-strip .tg-side-trigger::after {
  left: 0;
}

.tg-side-widget.in-strip {
  position: fixed;
  right: var(--strip-right);
  bottom: var(--strip-bottom);
  width: var(--strip-slot-w);
  height: var(--strip-height);
  z-index: 999;
  transition: left var(--dock-leg) var(--dock-ease) var(--dock-leg), right var(--dock-leg) var(--dock-ease) var(--dock-leg),
    bottom var(--dock-leg) var(--dock-ease) 0s,
    width var(--dock-leg) var(--dock-ease) 0s, height var(--dock-leg) var(--dock-ease) 0s !important;
}

.tg-side-widget.in-strip .tg-side-trigger {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  transform: none;
  /* літачок при наведенні вилітає за край комірки й повертається з іншого боку */
  overflow: hidden;
}

.tg-side-widget.in-strip .tg-side-trigger svg {
  position: relative;
  z-index: 2;
}

.tg-side-widget.in-strip .tg-side-badge {
  top: calc(50% - 20px);
  right: 14px;
  border-color: #0b142d;
}

/* У смузі підказка відкривається над нею, а не поверх посилань */
.tg-side-widget.in-strip .tg-side-bubble {
  right: 8px;
  bottom: calc(100% + 12px);
  transform: translateY(10px);
}

.tg-side-widget.in-strip.is-open .tg-side-bubble {
  transform: translateY(0);
}

.tg-side-widget.in-strip .tg-side-bubble::after,
.tg-side-widget.in-strip .tg-side-bubble::before {
  right: 27px;
  border-width: 7px 7px 0 7px;
}

.tg-side-widget.in-strip .tg-side-bubble::after {
  bottom: -7px;
  border-color: var(--color-grey-050) transparent transparent transparent;
}

.tg-side-widget.in-strip .tg-side-bubble::before {
  bottom: -6px;
  border-color: var(--color-white) transparent transparent transparent;
}

/* ── До 1200px смуга без комірок для кнопок: вони лишаються в кутах ── */
@media (max-width: 1200px) {
  .hero-strip__slot {
    display: none;
  }

  .hero-strip__inner {
    grid-template-columns: repeat(var(--strip-count, 4), 1fr);
  }
}

/* ── Планшети й телефони, як на zp.edu.ua: сітка 2 × N світлих плиток під фото ── */
@media (max-width: 1024px) {
  .hero-strip {
    /* лінії між плитками — суцільні: напівпрозорі просвічували б темний фон hero */
    background: #e8eaef;
  }

  .hero-strip__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    max-width: none;
    padding: 0;
    transition: none;
  }

  .hero-strip__item {
    min-height: 0;
    padding: 18px 10px;
    font-size: 0.9rem;
    line-height: 1.25;
    color: var(--color-blue-200);
    background: var(--color-white);
    transition: background-color 0.2s ease;
  }

  /* непарна остання плитка — на всю ширину */
  .hero-strip__item:last-of-type:nth-of-type(odd) {
    grid-column: 1 / -1;
  }

  .hero-strip__item::before {
    display: none;
  }

  .hero-strip__item:active {
    background: var(--color-grey-010);
  }

  .hero-strip__item:focus-visible {
    outline-color: var(--color-blue-100);
  }

  /* Калькулятор — окремим рядком на всю ширину, жовтою плиткою-кнопкою: синя
     зливалася б із синьою секцією нижче. Решта посилань стають парами над ним. */
  .hero-strip .hero-strip__item--accent {
    order: 1;
    grid-column: 1 / -1;
    color: var(--color-blue-200);
    background: var(--color-highlight);
    font-weight: 600;
  }

  .hero-strip .hero-strip__item--accent:active {
    background: #f5b33c;
  }

  .hero-strip .hero-strip__item--accent:focus-visible {
    outline-color: var(--color-blue-200);
  }

  /* плитка калькулятора займає свій рядок, тож остання з решти стає в пару */
  .hero-strip__inner:has(.hero-strip__item--accent) .hero-strip__item:last-of-type:nth-of-type(odd):not(.hero-strip__item--accent) {
    grid-column: auto;
  }
}

@media (max-width: 1024px) and (hover: hover) {
  .hero-strip__item:hover {
    color: var(--color-blue-100);
    background: var(--color-grey-010);
  }

  .hero-strip .hero-strip__item--accent:hover {
    color: var(--color-blue-200);
    background: #f5b33c;
  }
}

/* ── Компактний перший екран на планшетах і телефонах, як на zp.edu.ua:
   фото з текстом і кнопками, одразу під ним плитки, нижче видно наступний блок.
   Герб менший, великі теги не показуються — вони розтягували hero на весь екран. ── */
@media (max-width: 1024px) {
  .hero-frame > .container {
    padding-top: clamp(16px, 4vw, 40px);
    padding-bottom: clamp(24px, 5vw, 40px);
  }

  .hero-grid {
    gap: 8px;
  }

  .hero-visual {
    height: 260px;
    margin: 0;
  }

  .hero-parallax-bg {
    height: 100%;
    background-image:
      linear-gradient(135deg, rgba(10, 19, 45, 0.9) 0%, rgba(22, 41, 91, 0.72) 55%, rgba(22, 41, 91, 0.45) 100%),
      url(../../../img/hero-bg-photo.webp);
  }

  .cta-wrapper {
    margin-bottom: 24px;
  }

  .hero-stats {
    padding-top: 16px;
  }
}

@media (max-width: 600px) {
  .hero-visual {
    height: 170px;
  }

  /* На телефоні hero вужчий за фото втричі: cover показує лише середину кадру.
     Тож телефону — середина того самого фото в повній роздільності (55 КБ замість
     285 КБ). Межа 600px збігається з preload у inc/enqueue.php. */
  .hero-parallax-bg {
    background-image:
      linear-gradient(135deg, rgba(10, 19, 45, 0.9) 0%, rgba(22, 41, 91, 0.72) 55%, rgba(22, 41, 91, 0.45) 100%),
      url(../../../img/hero-bg-photo-phone.webp);
  }

  #section-hero .hero-display {
    font-size: 26px;
  }

  #section-hero p {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 18px;
  }

  .cta-wrapper {
    margin-bottom: 18px;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   Перший екран: гасло → кнопки → цифри → смуга посилань.
   ═════════════════════════════════════════════════════════════════════ */

/* Підпис у H1 оформлений як колишній рядок «Вступна кампанія 2026» */
#section-hero .hero-title .status-bar {
  line-height: 1.4;
}

#section-hero .hero-cta {
  line-height: 1;
}

/* у великих літер немає виносних елементів, тож центрований текст здається вищим
   за стрілку — піднімаємо стрілку на піксель */
#section-hero .hero-cta svg {
  position: relative;
  top: -1px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  #section-hero .hero-cta:hover svg {
    transform: translateX(4px);
  }
}

/* Хештеги — фактура фону, а не текст: ледь помітні */
.hero-tag {
  color: rgba(255, 255, 255, 0.07);
}

/* Нижні хештеги не ховаються під смугою */
.tag-bottom-left {
  bottom: 84px;
}

.tag-bottom-right {
  bottom: 190px;
}

/* ═════════════════════════════════════════════════════════════════════
   Спокійніший перший екран у мові zp.edu.ua: менший і легший,
   смуга не притиснута до низу вікна.
   ═════════════════════════════════════════════════════════════════════ */

@media (min-width: 1025px) {
  /* під смугою лишається біле поле, і видно початок наступного блоку */
  .hero-frame {
    min-height: calc(100svh - 70px - 32px);
  }

  .hero-frame > .container {
    padding-top: clamp(2rem, 1rem + 2.5vw, 4.5rem);
    padding-bottom: clamp(2rem, 1rem + 2vw, 3.5rem);
  }

  .hero-visual {
    height: 500px;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .hero-visual {
    height: 440px;
  }
}

#section-hero .hero-title .status-bar {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.14em;
}

#section-hero .hero-display {
  font-size: clamp(36px, 3vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

/* Акценти гасла, як були спочатку: «майбутнє» — на жовтій плашці (чорним — синій на жовтому
   читається гірше), «Запорізькою політехнікою» — з жовтим підкресленням (#section-hero .blue-underline вище) */
#section-hero .hero-display .highlight-text {
  padding: 0 0.18em;
  background-color: var(--color-highlight);
  color: var(--color-black);
}

/* H1 складається з двох рядків-блоків; розміри задають .status-bar і .hero-display */
#section-hero .hero-title {
  margin: 0 0 24px;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
}

#section-hero .hero-title .status-bar,
#section-hero .hero-title .hero-display {
  display: block;
}

#section-hero .hero-title .hero-display {
  margin-bottom: 0;
}

#section-hero .hero-lead {
  /* на десктопі — один рядок; вужче переноситься рівними рядками */
  max-width: 820px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 32px;
  text-wrap: balance;
}

@media (min-width: 1025px) {
  .cta-wrapper {
    margin-bottom: 40px;
  }
}

/* ── Телефони: як на zp.edu.ua — компактно, одразу видно плитки ── */
@media (max-width: 600px) {
  .hero-frame > .container {
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .hero-visual {
    height: 150px;
  }

  #section-hero .hero-title .status-bar {
    margin-bottom: 10px;
    font-size: 10.5px;
    letter-spacing: 0.06em;
  }

  #section-hero .hero-display {
    font-size: 27px;
    margin-bottom: 18px;
  }

  /* абзац про вступ лишається і на телефоні: Google оцінює насамперед мобільну версію */
  #section-hero .hero-lead {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 18px;
  }

  .cta-wrapper .btn-outline {
    height: 48px;
  }

  .tag-top-left {
    display: none;
  }
}

/* Картка «Лідерство»: вихідна, акуратніше — щільний синій, тонка рамка, менша жовта тінь */
#section-hero .stat-card {
  padding: 20px 26px;
  gap: 6px;
  background-color: rgba(12, 25, 60, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--color-highlight);
}

#section-hero .stat-card .stat-big-num {
  font-size: 56px;
  font-weight: 800;
}

#section-hero .stat-card .stat-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

#section-hero .stat-card .stat-sub.highlight {
  color: var(--color-white);
}

/* ── Телефони: щільніший hero — ширші заголовки, цифри в один рядок ── */
@media (max-width: 600px) {
  #section-hero .hero-frame > .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-visual {
    height: 120px;
  }

  #section-hero .hero-title .status-bar {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  #section-hero .hero-display {
    font-size: 25px;
    line-height: 1.18;
  }

  #section-hero .hero-frame > .container {
    padding-top: 20px;
  }

  /* трохи повітря над і під гербом */
  .hero-visual {
    margin: 0 0 14px;
  }

  #section-hero .hero-lead {
    max-width: none;
    margin-bottom: 16px;
    text-wrap: wrap;
  }

  .cta-wrapper {
    margin-bottom: 16px;
  }

  .cta-wrapper .btn-outline {
    height: 42px;
    font-size: 13px;
  }

  .map-trigger-btn {
    width: 42px !important;
    height: 42px !important;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding-top: 12px;
  }

  .stat-item strong {
    font-size: 20px;
  }

  /* «СПЕЦІАЛЬНОСТЕЙ» великими літерами не вміщається в чверть екрана */
  .stat-item > span {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
  }
}

/* Менше руху — системне налаштування або «Без анімацій» у панелі доступності:
   кнопки стають у смугу й повертаються в кути миттєво, без польоту. Правила польоту
   вище — з !important і точнішими селекторами, тож загальне вимкнення анімацій
   з base.css їх не перебиває; тут — так само. */
@media (prefers-reduced-motion: reduce) {
  .tg-side-widget,
  .cw-widget-wrapper,
  .tg-side-widget.in-strip,
  .cw-widget-wrapper.in-strip,
  .cw-widget-wrapper .cw-floating-btn,
  .hero-strip__inner {
    transition: none !important;
  }
}

html.accessibility-no-anim .tg-side-widget,
html.accessibility-no-anim .cw-widget-wrapper,
html.accessibility-no-anim .tg-side-widget.in-strip,
html.accessibility-no-anim .cw-widget-wrapper.in-strip,
html.accessibility-no-anim .cw-widget-wrapper .cw-floating-btn,
html.accessibility-no-anim .hero-strip__inner {
  transition: none !important;
}

/* Відгук на натискання посилань смуги: заливка — одразу, без 0.4s переходу */
@media (min-width: 1025px) {
  .hero-strip__item:active {
    background-position: top;
    transition-duration: 0s;
  }
}

/* Кнопки hero без плавного переходу кольору: загальний стиль кнопок (components.css)
   приходить раніше за цей файл, і білий колір «допливав» би з чорного після кожного
   завантаження. Заливка при наведенні лишається плавною. */
#section-hero .btn-outline,
#section-hero .map-trigger-btn {
  transition-property: background-color, transform, box-shadow;
}

/* Телефони: ті самі плитки, лише нижчі й дрібнішим шрифтом, щоб перший екран
   не розтягувався; калькулятор — кнопкою на всю ширину під ними. */
@media (max-width: 768px) {
  .hero-strip__item {
    padding: 13px 8px;
    font-size: 0.875rem;
  }

  /* Плитки — окремими кнопками в рамці, з проміжками, а не сіткою з ліній.
     #section-hero — щоб перебити і світлі правила вище, і dark-theme.css. */
  #section-hero .hero-strip {
    background: var(--color-white);
  }

  #section-hero .hero-strip__inner {
    gap: 8px;
    padding: 12px 16px;
  }

  #section-hero .hero-strip__item {
    border: 1px solid #c9d0de;
    border-radius: 10px;
  }

  html[data-theme="dark"] #section-hero .hero-strip {
    background: var(--color-surface-card);
  }

  html[data-theme="dark"] #section-hero .hero-strip__item {
    border-color: var(--color-border);
  }

  .hero-strip .hero-strip__item--accent {
    padding: 14px 8px;
    font-size: 0.9375rem;
  }
}

/* Телефони: кнопки hero одразу білі (на тачскріні немає наведення, яке їх зафарбовує) */
@media (max-width: 768px) {
  #section-hero .cta-wrapper .btn-outline,
  #section-hero .cta-wrapper .map-trigger-btn {
    background-color: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-blue-200);
  }
}
