:root {
    color-scheme: dark;
    --grad-a: linear-gradient(86deg, #51FF00 0%, #00FFD4 100%);
    --grad-b: linear-gradient(86deg, #00FFD4 0%, #51FF00 100%);
    --glow: 0 0 25px rgba(0, 255, 212, .35);
    --glowH: 0 0 32px rgba(0, 255, 212, .45);
    --plyr-color-main: rgba(61, 61, 61, 0.71);
}

html {
    scroll-behavior: smooth;
    background-color: black;
}

body {
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden;
}

.content {
    position: relative;
    z-index: 10;
    color: white;
    text-align: center;
    margin-top: 20%;
    font-size: 2rem;
}


.title {
    font-family: 'RF Dewi Expanded', sans-serif;
    font-style: normal;
    font-weight: 400;
}

.gradient-green {
    background: linear-gradient(86deg, #51FF00 0%, #00FFD4 53.56%, #51FF00 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

}

/* Стили для навигации */
header a {
    transition: color 0.3s, background 0.3s;
}


/* Анимация для плавного появления */
.fadeIn {
    animation: fadeIn 1.5s ease-in-out forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px); /* Поднимем элемент немного снизу */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.btn-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 0.9rem;
    color: #000;
    padding: 15px 55px;
    height: 60px;
    border-radius: 50px;
    background: var(--grad-a);
    box-shadow: var(--glow);
    background-size: 200% 200%; /* для бегающего градиента */
    transition: box-shadow .25s ease, filter .25s ease;
}

.btn-arrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 23px;
    height: 60px;
    border-radius: 50px;
    background: var(--grad-b);
    box-shadow: var(--glow);
    background-size: 200% 200%;
    transition: box-shadow .25s ease, filter .25s ease;
}

.btn_gr .btn-label, .btn_gr .btn-arrow {
    background: white;
    box-shadow: none;
}

.btn-arrow .arrow {
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    transform-box: fill-box; /* важливо для Safari */
    transition: transform .35s cubic-bezier(.22, .71, .24, 1);
}

/* ховер/фокус: → */
a:hover .btn-arrow .arrow,
a:focus-visible .btn-arrow .arrow {
    transform: rotate(45deg);
}

a:hover .btn-label,
a:hover .btn-arrow,
a:focus-visible .btn-label,
a:focus-visible .btn-arrow {
    animation: gradientShift 2s linear infinite;
    box-shadow: var(--glowH);
}

/* доступность клавиатурой */
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 212, .35);
}


/* анимация градиента */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* уважение к reduce-motion */
@media (prefers-reduced-motion: reduce) {
    .btn-arrow .arrow {
        transition: none;
    }

    .btn-label, .btn-arrow {
        animation: none !important;
    }
}

.marquee {
    width: max-content;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-33.333%);
    }
}

/* Плавный переход для кнопок */
button {
    transition: all 0.3s ease;
}

/* Добавляем эффект для фокуса на кнопке */
button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(61, 61, 61, 0.71);
}

/* Скрываем чекбокс */
#checkbox {
    display: none;
}

/* From Uiverse.io by JulanDeAlb */
.hamburger {
    cursor: pointer;
}

.hamburger input {
    display: none;
}

.hamburger svg {
    /* The size of the SVG defines the overall size */
    height: 2.3em;
    /* Define the transition for transforming the SVG */
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
    fill: none;
    stroke: white;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    /* Define the transition for transforming the Stroke */
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line-top-bottom {
    stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
    transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42;
}

/* Mobile Menu styles */
#mobileMenu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    padding: 20px;
}

#mobileMenu a {
    text-align: center;
    display: block;
    width: 100%;
    padding: 10px 0;
}

#why-us {
    background-image: url('img/why-we-back.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#cases {
    background-image: url('img/projects-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tab-group input {
    display: none;
}

.tab-group .glider {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    background-color: white;
    border-radius: 9999px;
    transition: transform 0.3s ease;
    z-index: -1;
}

#tab-static:checked ~ .glider {
    transform: translateX(calc(100%));
}

#tab-static:checked ~ label[for="tab-static"],
#tab-video:checked ~ label[for="tab-video"] {
    color: black;
}

.custom-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    width: 80%;
    margin: 2rem auto;
}

.ava-ring {
    background: conic-gradient(#22c55e, #a3e635, #22c55e);
}

button[aria-pressed="false"] .ava-ring {
    background: transparent;
}

/* --- Swiper Carousel Styles --- */
.swiper-slide {
    opacity: 0.4;
    transition: opacity 1.5s ease;
}

.swiper-slide-active {
    opacity: 1;
}

/* Text Carousel */
.text-carousel .swiper-slide {
    width: 450px;
    /* Overlay-підхід замість opacity — зберігає контраст тексту для a11y */
    opacity: 1 !important;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.text-carousel .swiper-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #0d0d0d;
    opacity: 0.6;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

.text-carousel .swiper-slide-active::after {
    opacity: 0;
}

@media (max-width: 640px) {
    .text-carousel .swiper-slide {
        width: 90%;
    }
}

/* Video Carousel */
.video-carousel .swiper-slide {
    width: 320px; /* A good width for 9:16 aspect ratio */
    height: 568px;
}

@media (max-width: 640px) {
    .video-carousel .swiper-slide {
        width: 70%;
        aspect-ratio: 9 / 16; /* <--- This is the fix */
        height: auto; /* You can keep or remove this line, aspect-ratio will take priority */
    }
}

.t-kw {
    color: #2D91CD;;
}

/* ключевые слова: const, let, return */
.t-obj {
    color: #B02A62;;
}

/* document, window (как на скрине — красные акценты) */
.t-fn {
    color: #7CD5FF;
}

/* имена функций, если нужно */
.t-var {
    color: #fffafa;
}

/* переменные/ссылки */
.t-str {
    color: #03936F;
}

/* строки */
.t-num {
    color: #F22C3D;
}

/* числа (если встретятся) */
.t-com {
    color: #767D86;
}

#clients .embla__slide {
    opacity: 1 !important;
}


.card {
    position: sticky;
    top: 70px;
}

.card__inner {
    will-change: transform;
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px hsla(265.3, 20%, 10%, 35%);
    transform-origin: center top;
}

/* Основной контейнер */
.cards {
    width: 100%;
    margin: 0 auto;
    /* Обязательно Grid, как в примере */
    display: grid;
    /* Переменные будут заполнены JS-скриптом автоматически */
    grid-template-rows: repeat(var(--cards-count), var(--card-height));
    gap: 40px 0;
}

/* Сама карточка */
.card {
    position: sticky;
    /* В примере 0, но у вас есть Хедер. Ставим 90px, чтобы не залезало под меню */
    top: 90px;
}
.card__image-container {
    display: flex;
    width: 40%;
    flex-shrink: 0;
}


.space {
    height: 5vh;
}

.space--small {
    height: 20vh;
}

@media (max-width: 600px) {
    .card__inner {
        flex-direction: column;
    }

    .card__image-container {
        width: 100%;
    }

    .card__image {
        aspect-ratio: 16 / 9;
    }

    .card__title {
        font-size: 32px;
    }

    .card__description {
        font-size: 16px;
    }

    .card__content {
        padding: 30px 20px;
    }
    /* Основной контейнер */
    .cards {
        gap: 60px 0;
    }

}

.clients-carousel {
    /* Прибираємо padding, щоб Swiper міг контролювати відступи */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.clients-carousel .swiper-wrapper {
    transition-timing-function: linear !important;
}

.clients-carousel .swiper-slide {
    flex-shrink: 0;
    max-width: 440px;
    margin-right: 24px;
    opacity: 1;
}

.iti__country-list {
    max-width: 490%;

    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}


/* Исправление для intl-tel-input + Tailwind */
.iti {
    width: 100%;
    display: block;
}

.iti__country {
    color: #e5e5e5 !important;
    padding: 10px 6px 10px 45px !important;
    transition: background-color 0.2s;
}


.iti__country:hover,
.iti__country.iti__highlight {
    background-color: #333333 !important;
    color: #fff !important;
}

#testimonials .hidden { display: none !important; }

/* Поворот стрелочки при открытии */
.custom-select-container.is-open .arrow {
    transform: rotate(180deg);
}

/* Стили для активного пункта (чтобы пользователь видел, какой язык выбран) */
.option-item.active {
    background: rgba(0, 0, 0, 0.62);
    font-weight: 500;
}

/* Убираем синее выделение при клике на мобилках */
.custom-select-trigger {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.custom-select-container.is-open .arrow { transform: rotate(180deg); }
#menuBtn.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
#menuBtn.active span:nth-child(2) { opacity: 0; }
#menuBtn.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }