/* =========================
   ЗМІННІ І БАЗОВІ СТИЛІ
   ========================= */
   :root {
    --navy: #14213d;
    --blue: #1b6ec2;
    --electric: #2d8cff;
    --white: #ffffff;
    --grey: #f3f6fa;
    --text: #3d4a5c;
    --radius: 16px;
    --header-h: 96px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    color: var(--navy);
    line-height: 1.15;
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

section {
    padding: 90px 0;
}

.section-head {
    max-width: 620px;
    margin-bottom: 50px;
}

.section-head p {
    margin-top: 14px;
    font-size: 1.05rem;
}

/* =========================
   КНОПКИ
   ========================= */
.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--blue);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--blue);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--electric);
    border-color: var(--electric);
    transform: translateX(4px);
    box-shadow: 0 10px 25px rgba(45, 140, 255, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    box-shadow: none;
}

.btn-small {
    padding: 12px 26px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--navy);
    border-color: var(--navy);
}
.btn-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: callPulse 2.5s infinite;
}

@keyframes callPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(20, 33, 61, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(20, 33, 61, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(20, 33, 61, 0);
    }
}
.btn-full {
    width: 100%;
}

/* =========================
   HEADER
   ========================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 24px rgba(20, 33, 61, 0.1);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: block;
    height: 76px;
}

.logo img {
    width: auto;
    height: 100%;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 44px;
}

.nav-link {
    position: relative;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--electric);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--blue);
}

.nav-link:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Бургер (мобільне меню) */
.burger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: var(--grey);
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.burger span {
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   HERO
   ========================= */
.hero {
    padding: calc(var(--header-h) + 50px) 0 80px;
    background: linear-gradient(180deg, var(--grey) 0%, var(--white) 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 16px;
    background: rgba(45, 140, 255, 0.12);
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    letter-spacing: -1px;
}

.hero-text p {
    margin: 22px 0 32px;
    font-size: 1.1rem;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Асиметрична сітка фото */
.hero-gallery {
    position: relative;
    height: 420px;
}

.hero-img {
    position: absolute;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(20, 33, 61, 0.18);
    background: var(--navy);
}

.hero-img-1 {
    top: 0;
    right: 0;
    width: 62%;
    height: 64%;
}

.hero-img-2 {
    bottom: 0;
    left: 0;
    width: 48%;
    height: 52%;
}

.hero-img-3 {
    bottom: 6%;
    right: 4%;
    width: 40%;
    height: 40%;
}

/* =========================
   ABOUT (цифри)
   ========================= */
.about {
    background: var(--navy);
}

.about h2,
.about .stat-number {
    color: var(--white);
}

.about .section-head p {
    color: #b8c4d8;
}

.stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.stat {
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

.stat-number {
    font-size: clamp(2.8rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    margin-top: 10px;
    color: var(--electric);
    font-weight: 700;
}

/* =========================
   SERVICES
   ========================= */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid #e3e9f1;
    border-radius: var(--radius);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--electric);
    box-shadow: 0 25px 50px rgba(27, 110, 194, 0.22);
}
.card-img {
    height: 200px;
    overflow: hidden;
    background: var(--navy);
}

.card-img img {
    transition: transform 0.6s ease;
}

.card:hover .card-img img {
    transform: scale(1.08);
}

.card-body {
    padding: 28px 26px 32px;
}
.card-img,
.feature-img {
    cursor: zoom-in;
}
/* FEATURE (головна послуга) */
.feature {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 24px;
    overflow: hidden;
    background: var(--navy);
    border-radius: var(--radius);
}

.feature-img {
    height: 260px;
    overflow: hidden;
    background: var(--blue);
}

.feature-img img {
    transition: transform 0.6s ease;
}

.feature:hover .feature-img img {
    transform: scale(1.05);
}

.feature-body {
    padding: 36px 30px;
}

.feature-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 16px;
    background: rgba(45, 140, 255, 0.18);
    color: var(--electric);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 50px;
}

.feature-body h3 {
    margin-bottom: 14px;
    color: var(--white);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.feature-body p {
    margin-bottom: 26px;
    color: #b8c4d8;
}
.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    background: var(--grey);
    color: var(--blue);
    font-weight: 800;
    border-radius: 14px;
    transition: all 0.35s ease;
}

.card:hover .card-icon {
    background: var(--blue);
    color: var(--white);
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* =========================
   PORTFOLIO
   ========================= */
.portfolio {
    background: var(--grey);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 10px 22px;
    background: var(--white);
    color: var(--navy);
    font-family: inherit;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--electric);
}

.filter-btn.active {
    background: var(--navy);
    color: var(--white);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    grid-auto-flow: dense;
    gap: 14px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--navy);
    cursor: zoom-in;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item img {
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item.hide {
    display: none;
}

.item-big {
    grid-column: span 2;
    grid-row: span 2;
}

.item-wide {
    grid-column: span 2;
}

/* =========================
   LIGHTBOX
   ========================= */
.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(10, 18, 36, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 200;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* =========================
   PROCESS (таймлайн)
   ========================= */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}
.process {
    background: var(--navy);
}

.process h2 {
    color: var(--white);
}
/* Вертикальна лінія */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Яскрава лінія, яка росте при скролі */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 24px;
    width: 3px;
    height: 0;
    background: linear-gradient(var(--electric), #8cc4ff);
    box-shadow: 0 0 14px rgba(45, 140, 255, 0.8);
    border-radius: 3px;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    padding: 0 0 40px 70px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-dot {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--navy);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    font-weight: 800;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.5s ease;
}
/* Кружечок засвічується, коли лінія до нього дійшла */
.step-dot.active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--electric);
    box-shadow: 0 0 22px rgba(45, 140, 255, 0.8);
}
.step-box {
    position: relative;
    overflow: hidden;
    padding: 26px 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.step-box:hover {
    transform: translateY(-6px);
    border-color: var(--electric);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Великий прозорий номер на фоні */
/* Фото на фоні картки */
.step-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 0;
    transition: opacity 0.5s ease, transform 0.8s ease;
}
.step-box:hover .step-bg {
    opacity: 0.12;
    transform: scale(1.06);
}
/* Темний градієнт під текстом */
.step-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(20, 33, 61, 0.75) 0%, rgba(20, 33, 61, 0.35) 100%);
    z-index: 1;
}
.step-box h3 {
    position: relative;
    z-index: 2;
    margin-bottom: 6px;
    font-size: 1.2rem;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.step-box p {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

/* =========================
   CONTACT
   ========================= */
.contact {
    background: var(--grey);
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.contact-info p {
    margin: 14px 0 28px;
}

.contact-list li {
    margin-bottom: 12px;
}

.contact-list a:hover {
    color: var(--blue);
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.socials a {
    padding: 10px 20px;
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.socials a:hover {
    background: var(--blue);
    color: var(--white);
    transform: translateX(4px);
}
.socials a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.socials a::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
    transition: background 0.3s ease;
}

.socials .wa::before {
    background: #25d366;
}

.socials .vb::before {
    background: #7360f2;
}

.socials .fb::before {
    background: #1877f2;
}

.socials .wa:hover {
    background: #25d366;
}

.socials .vb:hover {
    background: #7360f2;
}

.socials .fb:hover {
    background: #1877f2;
}

.socials a:hover::before {
    background: var(--white);
}
/* Форма */
.form {
    padding: 36px 30px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(20, 33, 61, 0.08);
}

.field {
    position: relative;
    margin-bottom: 22px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 18px 0 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--navy);
    background: transparent;
    border: none;
    border-bottom: 2px solid #d5dce8;
    outline: none;
    resize: none;
    transition: border-color 0.3s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--electric);
}

.field label {
    position: absolute;
    top: 18px;
    left: 0;
    color: #8793a6;
    pointer-events: none;
    transition: all 0.25s ease;
}

/* Label "спливає" вгору */
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--blue);
}

.form-success {
    display: none;
    margin-top: 16px;
    color: var(--blue);
    font-weight: 700;
    text-align: center;
}

.form-success.show {
    display: block;
}

/* =========================
   FOOTER
   ========================= */
   .footer {
    padding: 60px 0 0;
    background: var(--navy);
    color: #b8c4d8;
    font-size: 0.95rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 16px;
    color: var(--white);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.footer-col p,
.footer-col a {
    display: block;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: var(--electric);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 22px;
    padding-bottom: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
}

/* =========================
   АНІМАЦІЯ ПОЯВИ (Intersection Observer)
   ========================= */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Для карток: hover перебиває transform після появи */
.card.fade-up.visible:hover {
    transform: translateY(-8px) scale(1.03);
}

/* =========================
   АДАПТИВ: ПЛАНШЕТ (від 768px)
   ========================= */
@media (min-width: 768px) {

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
    }
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
    }

}

/* =========================
   АДАПТИВ: ПК (від 992px)
   ========================= */
@media (min-width: 992px) {

    .hero-inner {
        grid-template-columns: 1.25fr 1fr;
    }

    .hero-gallery {
        height: 540px;
    }

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature {
        grid-template-columns: 1.1fr 1fr;
    }

    .feature-img {
        height: auto;
        min-height: 380px;
    }

    .feature-body {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 50px;
    }

    .contact-inner {
        grid-template-columns: 1fr 1fr;
    }

    .gallery {
        grid-auto-rows: 230px;
    }

    /* Зигзагоподібний таймлайн */
    .timeline::before,
    .timeline-progress {
        left: 50%;
        transform: translateX(-50%);
    }

    .step {
        width: 50%;
        padding: 0 50px 40px 0;
    }

    .step-dot {
        left: auto;
        right: -25px;
    }

    .step:nth-child(even) {
        margin-left: 50%;
        padding: 0 0 40px 50px;
    }

    .step:nth-child(even) .step-dot {
        right: auto;
        left: -25px;
    }

}

/* =========================
   АДАПТИВ: МОБІЛЬНЕ МЕНЮ (до 900px)
   ========================= */
@media (max-width: 900px) {

    .burger {
        display: flex;
    }

    .nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 10px 20px 20px;
        background: var(--white);
        box-shadow: 0 20px 30px rgba(20, 33, 61, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        padding: 14px 0;
        border-bottom: 1px solid #eef1f6;
    }
}
/* SOCIALS: компактні кнопки на телефоні */
@media (max-width: 600px) {

    .socials {
        gap: 8px;
    }

    .socials a {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

}
/* FOOTER: планшет і ПК */
@media (min-width: 768px) {

    .footer-top {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }

}
/* HEADER: кнопка дзвінка на телефоні */
@media (max-width: 600px) {

    .btn-call span {
        display: none;
    }

    .btn-call {
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
    }

}
/* SECTIONS: менші відступи на телефоні */
@media (max-width: 600px) {

    section {
        padding: 50px 0;
    }

    .section-head {
        margin-bottom: 30px;
    }

}
/* HERO: менший відступ перед фото на телефоні */
@media (max-width: 600px) {

    .hero-inner {
        gap: 30px;
    }

    .hero-gallery {
        height: 380px;
    }

}
/* FORM: пастка для ботів, згода, помилка */
.botcheck {
    display: none;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 0.85rem;
    cursor: pointer;
}

.consent input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--blue);
}

.form-error {
    display: none;
    margin-top: 16px;
    color: #d93025;
    font-weight: 700;
    text-align: center;
}

.form-error.show {
    display: block;
}

.btn:disabled {
    opacity: 0.6;
    cursor: wait;
}