.site-footer {
    background-color: var(--color-blue-200);
    color: var(--color-white);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 5rem var(--wrap) 2rem;
    position: relative;
    overflow: hidden;
}
.site-footer__bg-logo {
    position: absolute;
    right: 1%;
    bottom: -5%;
    width: 35vw;
    max-width: 400px;
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}
.site-footer__bg-logo img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) brightness(200%);
}
.site-footer__container {
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}
.site-footer__logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 30px;
    display: block;
}
.site-footer__action-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 280px;
}
.site-footer__btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    gap: 10px;
}
.site-footer__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.site-footer__btn--primary {
    background: var(--color-blue-100);
    color: var(--color-white);
}
@media (hover: hover) {
  .site-footer__btn--primary:hover {
      background: var(--color-white);
      color: var(--color-blue-200);
  }
}
.site-footer__btn--outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.2);
}
@media (hover: hover) {
  .site-footer__btn--outline:hover {
      border-color: var(--color-white);
      color: var(--color-white);
  }
}
.site-footer__btn--video {
    background: transparent;
    color: var(--color-white);
    opacity: 0.8;
}
@media (hover: hover) {
  .site-footer__btn--video:hover {
      opacity: 1;
  }
}
.site-footer__col-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Кнопка акордеона всередині заголовка (≤900px, її додає скрипт у footer.php) —
   виглядає як сам заголовок і займає весь рядок */
.site-footer__col-btn {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: start;
    cursor: pointer;
}
.site-footer__toggle {
    display: none;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}
.site-footer__menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.site-footer__link {
    color: var(--color-white);
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-size: 0.85rem;
}
@media (hover: hover) {
  .site-footer__link:hover {
      opacity: 1;
      color: var(--color-white);
  }
}
.site-footer__contact-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 280px;
    margin-bottom: 24px;
}
.site-footer__contact-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--color-white);
    opacity: 0.8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.2s;
    line-height: 1.4;
}
@media (hover: hover) {
  a.site-footer__contact-card:hover {
      opacity: 1;
      color: var(--color-white);
  }
}
.site-footer__contact-card svg {
    width: 18px;
    height: 18px;
    color: var(--color-white);
    flex-shrink: 0;
}
.site-footer__contact-text {
    display: flex;
    flex-direction: column;
}
/* Телефони — окремі tel:-посилання, зручна зона натискання на мобільних */
.site-footer__contact-text a {
    color: inherit;
    text-decoration: none;
    padding: 4px 0;
}
.site-footer__contact-card--phones {
    opacity: 1;
}
.site-footer__contact-card--phones .site-footer__contact-text a {
    opacity: 0.8;
    transition: opacity 0.2s;
}
@media (hover: hover) {
    .site-footer__contact-card--phones .site-footer__contact-text a:hover {
        opacity: 1;
    }
}
.site-footer__brand-bottom {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.site-footer__sitemap-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    opacity: 0.7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .site-footer__sitemap-link:hover {
      opacity: 1;
      color: var(--color-white);
  }
}
.site-footer__socials-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.site-footer__socials-label {
    opacity: 0.7;
    font-size: 0.75rem;
    color: var(--color-white);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.site-footer__socials {
    display: flex;
    gap: 16px;
}
.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.site-footer__social-link svg {
    width: 18px;
    height: 18px;
}
/* Зона натискання ~40px без зміни візуальної відстані між іконками */
.site-footer__social-link {
    padding: 11px;
    margin: -11px;
}
@media (hover: hover) {
  .site-footer__social-link:hover {
      opacity: 1;
      color: var(--color-white);
  }
}
.footer-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
/* При відкритті visibility вмикається одразу, щоб фокус можна було перенести всередину;
   при закритті — чекає кінця fade-out */
.footer-video-modal.is-open {
    transition: opacity 0.4s ease, visibility 0s;
    opacity: 1;
    visibility: visible;
}
.footer-video-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}
.footer-video-modal__content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    z-index: 2;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.footer-video-modal.is-open .footer-video-modal__content {
    transform: scale(1);
}
.footer-video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--color-white);
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 0;
}
@media (hover: hover) {
  .footer-video-modal__close:hover {
      opacity: 1;
  }
}
.footer-video-modal__close svg {
    width: 24px;
    height: 24px;
}
.footer-video-modal__iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-black, #000);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.footer-video-modal__iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.back-to-top, .tg-side-trigger {
    color: var(--color-white);
}
.back-to-top {
    /* квадратні кнопки з білою рамкою — як на zp.edu.ua; того ж розміру, що й кнопка Telegram під нею */
    position: fixed;
    bottom: 75px;
    right: 15px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--color-white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s, background-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--color-blue-200);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
@media (hover: hover) {
    .back-to-top.is-visible:hover {
        background-color: var(--color-blue-100);
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(38, 90, 166, 0.15);
    }
}
.tg-side-widget {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 990;
    display: flex;
    align-items: center;
    font-family: inherit;
}
.tg-side-trigger {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 0;
    border: 1px solid var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    flex-shrink: 0;
    background-color: var(--color-blue-200);
    box-shadow: 0 5px 15px rgba(22, 41, 91, 0.15);
}
@media (hover: hover) {
    .tg-side-trigger:hover {
        box-shadow: 0 10px 20px rgba(22, 41, 91, 0.25);
    }
}
.tg-side-trigger svg {
    width: 26px;
    height: 26px;
    transform: translateX(-1px) translateY(1px);
}
@media (hover: hover) {
  .tg-side-trigger:hover svg {
      animation: mainPlaneTakeoff 0.6s ease-in-out forwards;
  }
}
@keyframes mainPlaneTakeoff {
    0% { transform: translate(-1px, 1px) scale(1); opacity: 1; }
    40% { transform: translate(30px, -30px) scale(0.5); opacity: 0; }
    41% { transform: translate(-30px, 30px) scale(0.5); opacity: 0; }
    100% { transform: translate(-1px, 1px) scale(1); opacity: 1; }
}
.tg-side-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #e11d48;
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border: 2px solid var(--color-blue-200);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    z-index: 999;
}
.tg-side-bubble {
    position: absolute;
    right: 64px;
    bottom: 0;
    width: 260px;
    background: var(--color-white);
    border: 1px solid var(--color-grey-050);
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.tg-side-bubble::after,
.tg-side-bubble::before {
    content: '';
    position: absolute;
    bottom: 18px;
    border-width: 7px 0 7px 7px;
    border-style: solid;
}
/* хвостик з рамкою, як на zp.edu.ua: сірий трикутник під білим */
.tg-side-bubble::after {
    right: -7px;
    border-color: transparent transparent transparent var(--color-grey-050);
}
.tg-side-bubble::before {
    right: -6px;
    z-index: 1;
    border-color: transparent transparent transparent var(--color-white);
}
.tg-side-widget.is-open .tg-side-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.tg-side-widget.is-open .tg-side-trigger {
    animation: none;
}
.tg-side-widget.is-open .tg-side-badge {
    display: none;
}
.tg-side-bubble__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--color-grey-400);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.3s;
}
/* Невидима зона натискання 44×44 навколо маленького хрестика */
.tg-side-bubble__close::after {
    content: "";
    position: absolute;
    inset: -12px;
}
@media (hover: hover) {
  .tg-side-bubble__close:hover {
      color: var(--color-black);
  }
}
.tg-side-bubble__close svg {
    width: 14px;
    height: 14px;
}
.tg-side-bubble__content p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--color-black);
    line-height: 1.4;
    padding-right: 16px;
}
.tg-side-bubble__content p strong {
    color: var(--color-blue-200);
    font-weight: 700;
}
.tg-side-bubble__link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--color-white);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    background: var(--color-blue-200);
    padding: 8px 14px;
    border-radius: 0;
    transition: all 0.3s ease;
    width: 100%;
}
.tg-side-bubble__link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}
@media (hover: hover) {
  .tg-side-bubble__link:hover {
      background: var(--color-blue-100);
      color: var(--color-white);
  }
}
@media (hover: hover) {
  .tg-side-bubble__link:hover svg {
      transform: translateX(4px);
  }
}
@media (max-width: 1024px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
    .site-footer__col--brand {
        grid-column: 1 / -1;
        margin-bottom: 10px;
    }
    .site-footer__action-group {
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .site-footer__btn {
        flex: 1 1 calc(33.333% - 10px);
        justify-content: center;
    }
}
@media (max-width: 900px) {
    .site-footer {
        padding: 3rem 1.5rem 100px;
    }
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 30px;
    }
    .site-footer__bg-logo {
        right: -20%;
        width: 80vw;
    }
    .site-footer__btn {
        flex: 1 1 100%;
    }
    .site-footer__col {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .site-footer__col--brand {
        border-bottom: none;
    }
    .site-footer__col-title {
        margin: 0;
        padding: 18px 0;
        cursor: pointer;
        font-size: 0.85rem;
    }
    .site-footer__col--contacts .site-footer__col-title {
        cursor: default;
        padding-bottom: 18px;
    }
    .site-footer__toggle {
        display: block;
    }
    .site-footer__col-content {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    .site-footer__col-content > * {
        min-height: 0;
        overflow: hidden;
        opacity: 0;
        padding-bottom: 0;
        transition: opacity 0.3s ease, padding 0.35s ease;
    }
    .site-footer__col--contacts .site-footer__col-content {
        grid-template-rows: 1fr;
    }
    .site-footer__col--contacts .site-footer__col-content > * {
        padding-bottom: 18px;
        opacity: 1;
        overflow: visible;
    }
    .site-footer__col.is-active .site-footer__col-content {
        grid-template-rows: 1fr;
    }
    .site-footer__col.is-active .site-footer__col-content > * {
        padding-bottom: 20px;
        opacity: 1;
    }
    .site-footer__link {
        padding: 8px 0;
        display: block;
    }
    .site-footer__col.is-active .site-footer__toggle {
        transform: rotate(180deg);
    }
    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-left: 0;
        padding-right: 0;
    }
    .site-footer__socials-wrapper {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tg-side-widget {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: auto;
        left: 70px; /* after cw-widget: 16px + ~46px + 8px gap */
        width: calc(100% - 86px); /* 70px left + 16px right */
        padding: 0;
        box-sizing: border-box;
        pointer-events: none;
        transition: width 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    /* when back-to-top appears, shrink TG banner from right */
    body.has-scrolled .tg-side-widget {
        width: calc(100% - 140px); /* 70px left + 8px gap + 46px btt + 16px right */
    }
    
    .tg-side-widget.is-closed {
        display: none !important;
    }
    
    .tg-side-trigger {
        display: none !important;
    }
    
    .tg-side-bubble {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
        min-height: 42px;
        height: 42px;
        box-sizing: border-box;
        border: 1px solid var(--color-grey-050);
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .tg-side-bubble::before,
    .tg-side-bubble::after {
        display: none;
    }
    
    .tg-side-bubble__content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-right: 0;
        margin-left: 28px;
        gap: 8px;
        min-width: 0; /* MAGIC FIX: Allows flex item to shrink below content width */
    }
    
    .tg-side-bubble__content p {
        margin: 0;
        padding: 0;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: normal;
    }
    
    .tg-side-bubble__link {
        margin-top: 0;
        padding: 0 8px 0 4px;
        width: auto;
        height: auto;
        justify-content: center;
        border-radius: 0;
        flex-shrink: 0;
        background: transparent;
        color: var(--color-blue-200);
    }
    
    .tg-side-bubble__link::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
    }

    .tg-side-bubble__link svg {
        width: 18px;
        height: 18px;
    }

    .tg-link-text {
        display: none;
    }
    
    .tg-side-bubble__close {
        top: 50%;
        transform: translateY(-50%);
        right: auto;
        left: 12px;
        z-index: 2;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        border-radius: 0;
        transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .footer-video-modal__close {
        top: -45px;
        right: 10px;
    }

    /* Force cw-widget to same height and position as our elements */
    .cw-widget-wrapper {
        position: fixed !important;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        left: 16px !important;
        right: auto !important;
        width: 42px !important;
        height: 42px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        z-index: 991 !important;
    }
}

/* ═════════════════════════════════════════════════════════════════════
   Модалка «Етапи вступу» — фірмова синя картка: тонка жовта смуга згори,
   ледь помітний герб у куті, рівні освіти — напівпрозорі плитки на синьому.
   На телефоні — шторка знизу на всю ширину.
   ═════════════════════════════════════════════════════════════════════ */

.stages-modal {
    --stages-ease: cubic-bezier(0.32, 0.72, 0, 1);
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.stages-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s;
}

.stages-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 19, 45, 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.stages-modal__container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    max-height: calc(100dvh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 48px 48px 44px;
    background: var(--color-blue-200);
    color: var(--color-white);
    border-top: 4px solid var(--color-highlight);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    isolation: isolate;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.32s var(--stages-ease);
}

.stages-modal.is-open .stages-modal__container {
    transform: none;
}

/* герб — тим самим водяним знаком, що й на синіх секціях головної. Шар стоїть у межах
   вікна, а сам малюнок більший і зсунутий, тож край герба обрізається, а вікно не
   отримує зайвої прокрутки. */
.stages-modal__container::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: -1;
    width: 320px;
    height: 340px;
    background: url("../../img/bg/gerb-watermark.webp") 0 0 / 380px auto no-repeat;
    opacity: 0.06;
    pointer-events: none;
}

.stages-modal__handle {
    display: none;
}

.stages-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {
    .stages-modal__close:hover {
        color: var(--color-white);
        background: rgba(255, 255, 255, 0.08);
    }
}

.stages-modal__close svg {
    width: 22px;
    height: 22px;
}

.stages-modal__header {
    margin-bottom: 32px;
    padding-right: 48px;
}

.stages-modal__eyebrow {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-highlight);
}

.stages-modal__header h2 {
    margin: 0 0 10px;
    font-size: clamp(26px, 2.2vw + 12px, 34px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-white);
}

.stages-modal__header p {
    margin: 0;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.stages-modal__grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stages-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--stages-ease);
}

@media (hover: hover) {
    .stages-card:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--color-highlight);
        color: var(--color-white);
    }
}

.stages-card:focus-visible {
    outline: 2px solid var(--color-highlight);
    outline-offset: 2px;
}

.stages-card:active {
    transform: scale(0.98);
    transition-duration: 80ms;
}

.stages-card__icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-highlight);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.stages-card:focus-visible .stages-card__icon,
.stages-card:hover .stages-card__icon {
    background: var(--color-highlight);
    border-color: var(--color-highlight);
    color: var(--color-blue-200);
}

.stages-card__icon svg {
    width: 26px;
    height: 26px;
}

.stages-card__content {
    flex-grow: 1;
    min-width: 0;
}

.stages-card__content h3 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--color-white);
}

.stages-card__content span {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.68);
}

.stages-card__arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease, transform 0.2s var(--stages-ease);
}

.stages-card__arrow svg {
    width: 22px;
    height: 22px;
}

@media (hover: hover) {
    .stages-card:hover .stages-card__arrow {
        color: var(--color-highlight);
        transform: translateX(4px);
    }
}

/* ── Телефон: шторка знизу на всю ширину, виїжджає пружно; ручка згори — підказка ── */
@media (max-width: 768px) {
    .stages-modal {
        align-items: flex-end;
        padding: 0;
    }

    .stages-modal__container {
        max-width: none;
        max-height: 88dvh;
        padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
        border-top-width: 3px;
        transform: translateY(100%);
        transition: transform 0.38s var(--stages-ease);
    }

    .stages-modal__container::before {
        width: 220px;
        height: 270px;
        background-size: 300px auto;
    }

    .stages-modal__handle {
        display: block;
        position: absolute;
        top: 10px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        background: rgba(255, 255, 255, 0.3);
    }

    .stages-modal__close {
        top: 8px;
        right: 8px;
    }

    .stages-modal__header {
        margin: 8px 0 20px;
        padding-right: 40px;
    }

    .stages-modal__eyebrow {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .stages-modal__header p {
        font-size: 14px;
    }

    .stages-modal__grid {
        gap: 10px;
    }

    .stages-card {
        gap: 14px;
        padding: 14px 16px;
    }

    .stages-card__icon {
        width: 44px;
        height: 44px;
    }

    .stages-card__icon svg {
        width: 22px;
        height: 22px;
    }

    .stages-card__content h3 {
        font-size: 17px;
        margin-bottom: 2px;
    }

    .stages-card__content span {
        font-size: 13px;
        line-height: 1.35;
    }

    .stages-card__arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stages-modal__container {
        transition: none;
    }
}

.footer-video-modal__note {
    background-color: var(--color-grey-010);
    border-left: 8px solid var(--color-blue-200);
    padding: 16px 20px;
    margin-top: 16px;
    font-size: 15px;
    color: var(--color-black, #333);
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
    text-align: left;
}

.footer-video-modal__note strong {
    color: var(--color-blue-200, #004d99);
}

.footer-video-modal__content {
    max-height: 90vh;
    overflow-y: auto;
}

.footer-video-modal__close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

@media (hover: hover) {
  .footer-video-modal__close:hover {
      background: rgba(0, 0, 0, 0.8);
  }
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Відгук на натискання плаваючих кнопок */
.back-to-top.is-visible:active,
.tg-side-trigger:active {
    transform: scale(0.94);
    transition-duration: 80ms;
}

/* Телефон: дрібні посилання футера отримують зону натискання 44px. Відступ, а не більший
   шрифт: вигляд колонок той самий, а палець влучає. */
@media (max-width: 768px) {
    .site-footer__contact-text a {
        display: inline-block;
        padding: 10px 0;
    }

    a.site-footer__contact-card {
        padding-block: 10px;
    }

    .site-footer__sitemap-link {
        padding-block: 12px;
    }

    .site-footer__social-link {
        width: 44px;
        height: 44px;
    }
}
