/* style.css */

/* =========================
   БАЗОВІ НАЛАШТУВАННЯ
   ========================= */

:root {
    --color-bg: #ffffff;
    --color-bg-muted: #f9fafb;
    --color-text: #1f2937;
    --color-accent: #facc15;
    --color-accent-dark: #eab308;
    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;
    --color-muted: #6b7280;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-fast: 0.18s ease-out;
    --transition-normal: 0.25s ease;
    --reveal-duration: 0.6s;
    --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --reveal-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --reveal-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Кастомний скроллбар */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-bg-muted);
}

*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--color-bg-muted);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
    border-radius: 999px;
}

/* Скидання та типографіка */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
}

body.page {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* захист від горизонтального скролу на мобільних */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea {
    font-family: inherit;
}

/* Контейнер */

.container {
    /* Ширина не фіксується в 100%, щоб падінги не розпирали контейнер за межі екрана */
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================
   АНІМАЦІЯ ПРИ ПРОКРУТЦІ (REVEAL)
   Hero не анімується — лише секції нижче
   ========================= */

/* Заголовки секцій — з'являються знизу з легким «пружинним» рухом, без blur */
.reveal.section-heading,
.reveal.section-heading .section-heading__title,
.reveal.section-heading .section-heading__subtitle {
    opacity: 0;
    transform: translateY(40px);
    filter: none;
    transition:
        opacity 0.65s var(--reveal-smooth),
        transform 0.7s var(--reveal-bounce);
}

.reveal.reveal--visible.section-heading,
.reveal.reveal--visible.section-heading .section-heading__title,
.reveal.reveal--visible.section-heading .section-heading__subtitle {
    opacity: 1;
    transform: translateY(0);
}

.reveal.section-heading .section-heading__subtitle {
    transition-delay: 0.06s;
}

.reveal.reveal--visible.section-heading .section-heading__subtitle {
    transition-delay: 0.08s;
}

/* Блоки без сітки */
.reveal {
    opacity: 0;
    transform: translateY(36px) scale(0.97);
    filter: blur(8px);
    transition:
        opacity var(--reveal-duration) var(--reveal-ease),
        transform var(--reveal-duration) var(--reveal-ease),
        filter var(--reveal-duration) var(--reveal-ease);
}

.reveal.reveal--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Затримка для сіток — елементи з’являються по черзі */
.reveal.reveal--visible .pain-solution__column:nth-child(1) { transition-delay: 0.06s; }
.reveal.reveal--visible .pain-solution__column:nth-child(2) { transition-delay: 0.16s; }

.reveal.reveal--visible .service-card:nth-child(1) { transition-delay: 0.06s; }
.reveal.reveal--visible .service-card:nth-child(2) { transition-delay: 0.14s; }
.reveal.reveal--visible .service-card:nth-child(3) { transition-delay: 0.22s; }
.reveal.reveal--visible .service-card:nth-child(4) { transition-delay: 0.30s; }

.reveal.reveal--visible .benefit:nth-child(1) { transition-delay: 0.05s; }
.reveal.reveal--visible .benefit:nth-child(2) { transition-delay: 0.12s; }
.reveal.reveal--visible .benefit:nth-child(3) { transition-delay: 0.19s; }
.reveal.reveal--visible .benefit:nth-child(4) { transition-delay: 0.26s; }
.reveal.reveal--visible .benefit:nth-child(5) { transition-delay: 0.33s; }
.reveal.reveal--visible .benefit:nth-child(6) { transition-delay: 0.40s; }

.reveal.reveal--visible .step:nth-child(1) { transition-delay: 0.06s; }
.reveal.reveal--visible .step:nth-child(2) { transition-delay: 0.15s; }
.reveal.reveal--visible .step:nth-child(3) { transition-delay: 0.24s; }
.reveal.reveal--visible .step:nth-child(4) { transition-delay: 0.33s; }
.reveal.reveal--visible .step:nth-child(5) { transition-delay: 0.42s; }

.reveal.reveal--visible .gallery__item:nth-child(1) { transition-delay: 0.05s; }
.reveal.reveal--visible .gallery__item:nth-child(2) { transition-delay: 0.11s; }
.reveal.reveal--visible .gallery__item:nth-child(3) { transition-delay: 0.17s; }
.reveal.reveal--visible .gallery__item:nth-child(4) { transition-delay: 0.23s; }
.reveal.reveal--visible .gallery__item:nth-child(5) { transition-delay: 0.29s; }
.reveal.reveal--visible .gallery__item:nth-child(6) { transition-delay: 0.35s; }
.reveal.reveal--visible .gallery__item:nth-child(8) { transition-delay: 0.08s; }
.reveal.reveal--visible .gallery__item:nth-child(9) { transition-delay: 0.14s; }
.reveal.reveal--visible .gallery__item:nth-child(10) { transition-delay: 0.20s; }
.reveal.reveal--visible .gallery__item:nth-child(11) { transition-delay: 0.26s; }

.reveal.reveal--visible .faq-item:nth-child(1) { transition-delay: 0.06s; }
.reveal.reveal--visible .faq-item:nth-child(2) { transition-delay: 0.16s; }
.reveal.reveal--visible .faq-item:nth-child(3) { transition-delay: 0.26s; }

/* Контейнери-сітки самі не анімуються, тільки діти */
.pain-solution__grid.reveal,
.services__grid.reveal,
.benefits__grid.reveal,
.steps__timeline.reveal,
.gallery__grid.reveal,
.faq__list.reveal {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Дочірні елементи сіток анімуються */
.reveal .pain-solution__column,
.reveal .service-card,
.reveal .benefit,
.reveal .step,
.reveal .gallery__item,
.reveal .faq-item {
    opacity: 0;
    transform: translateY(32px) scale(0.92);
    transition:
        opacity 0.55s var(--reveal-smooth),
        transform 0.6s var(--reveal-bounce);
}

.reveal.reveal--visible .pain-solution__column,
.reveal.reveal--visible .service-card,
.reveal.reveal--visible .benefit,
.reveal.reveal--visible .step,
.reveal.reveal--visible .gallery__item,
.reveal.reveal--visible .faq-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Невелике «роз’їжджання» карток з боків для більш живої анімації */

/* Заголовки */

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
    color: var(--color-text);
}

/* Адаптивні заголовки */

.hero__title {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.section-heading__title {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

/* Кнопки */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    gap: 8px;
}

.button--primary {
    background-color: var(--color-accent);
    color: #111827;
    box-shadow: 0 10px 25px rgba(250, 204, 21, 0.35);
}

.button--primary:hover {
    background-color: var(--color-accent-dark);
    box-shadow: 0 12px 30px rgba(234, 179, 8, 0.45);
    transform: translateY(-1px);
}

.button--secondary {
    background-color: #111827;
    color: #f9fafb;
}

.button--secondary:hover {
    background-color: #020617;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.45);
    transform: translateY(-1px);
}

.button--ghost {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.button--ghost:hover {
    border-color: var(--color-text);
    background-color: var(--color-bg-muted);
}

.button--full {
    width: 100%;
}

.button--sm-text {
    font-size: 0.82rem;
    padding-left: 10px;
    padding-right: 10px;
}

/* Секції */

.main {
    padding-bottom: 96px; /* запас під липку кнопку на мобільних */
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading--center {
    text-align: center;
}

.section-heading__subtitle {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* =========================
   HEADER
   ========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Горизонтальні відступи забираємо, їх дає .container */
    padding: 10px 0;
    gap: 16px;
}

.header__logo {
    display: block;
    line-height: 0;
    flex: 0 0 auto;
    min-width: 0;
}

.header__tagline {
    margin: 0;
    padding-left: 20px;
    border-left: 3px solid var(--color-accent);
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
}

.header__tagline-main {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-text);
    line-height: 1.2;
}

.header__tagline-sub {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-dark);
}

.header__logo-img {
    display: block;
    height: 72px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.header__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.header__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1rem;
}

.header__phone-number {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.header__phone:hover .header__phone-number {
    text-decoration: underline;
}

.header__phone-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f9fafb;
    font-size: 0.9rem;
}

.header__schedule {
    font-size: 0.78rem;
    color: var(--color-muted);
}

.header__messengers {
    font-size: 0.78rem;
    color: var(--color-text);
}

/* =========================
   HERO
   ========================= */

.hero {
    padding: 24px 0 40px;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 55%), var(--color-bg);
}

.hero__inner {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.6);
    font-size: 0.78rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 10px;
}

.hero__title-highlight {
    display: block;
}

.hero__subtitle {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 0.98rem;
}

.hero__info {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr);
    gap: 16px;
    align-items: stretch;
}

.hero__price {
    background: #111827;
    color: #f9fafb;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__price-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.9;
}

.hero__price-value {
    font-size: 1.4rem;
    font-weight: 800;
}

.hero__price-note {
    font-size: 0.8rem;
    color: #e5e7eb;
}

.hero__features {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.87rem;
    padding: 8px 10px;
    border-radius: 999px;
    background-color: rgba(249, 250, 251, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.85);
}

.hero__feature-icon {
    color: var(--color-accent-dark);
}

.hero__actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero__trust {
    margin: 10px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero__trust-stars {
    color: var(--color-accent);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.hero__trust-text {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.button__icon {
    margin-left: 6px;
    font-size: 0.85em;
    opacity: 0.9;
}

.hero__hint {
    margin-top: 10px;
    font-size: 0.86rem;
    color: var(--color-muted);
}

.hero__visual {
    display: block;
}

.hero__image-card {
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
    color: #f9fafb;
}

.hero__image-placeholder {
    position: relative;
    border-radius: 24px;
    min-height: 320px;
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, transparent 45%, rgba(15, 23, 42, 0.2) 100%),
        url("images/hero-main.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0f172a;
    padding: 20px;
    overflow: hidden;
}

.hero__image-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(250, 204, 21, 0.15), transparent 50%);
    pointer-events: none;
}

.hero__list--overlay {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
    max-width: 85%;
}

.hero__list-item--glass {
    font-size: 0.72rem;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero__list-icon {
    color: var(--color-accent);
    margin-top: 1px;
    flex-shrink: 0;
    font-size: 0.65rem;
}

/* =========================
   ЛИПКЕ CTA НА МОБІЛЬНИХ
   ========================= */

.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    border: none;
    border-radius: 0;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    background: linear-gradient(90deg, #facc15, #fde047);
    color: #111827;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.98rem;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    min-height: 56px;
}

.sticky-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: #111827;
    color: #facc15;
    font-size: 0.9rem;
}

/* =========================
   БОЛІ ТА РІШЕННЯ
   ========================= */

.pain-solution {
    padding: 32px 0 40px;
    background-color: var(--color-bg-muted);
}

.pain-solution__inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pain-solution__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.pain-solution__column {
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    border: 1px solid var(--color-border);
    background-color: #ffffff;
}

.pain-solution__column--bad {
    border-style: dashed;
}

.pain-solution__column--good {
    border-color: var(--color-success);
    box-shadow: var(--shadow-soft);
}

.pain-solution__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.pain-solution__icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.pain-solution__icon--bad {
    background-color: rgba(248, 113, 113, 0.1);
    color: var(--color-danger);
}

.pain-solution__icon--good {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.pain-solution__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--color-text);
}

.pain-solution__item {
    position: relative;
    padding-left: 14px;
}

.pain-solution__item::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-muted);
}

.pain-solution__button {
    margin-top: 12px;
}

/* =========================
   ПОСЛУГИ
   ========================= */

.services {
    padding: 36px 0 40px;
    background-color: var(--color-bg);
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
}

.service-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background-color var(--transition-fast);
}

.service-card--primary {
    border-color: var(--color-accent);
    box-shadow: 0 14px 30px rgba(250, 204, 21, 0.2);
}

.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.14), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    border-color: rgba(148, 163, 184, 0.9);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: rgba(250, 204, 21, 0.13);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #92400e;
    font-size: 1rem;
}

.service-card__title {
    font-size: 1.02rem;
}

.service-card__text {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.service-card__price {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.98rem;
}

.service-card__note {
    margin-top: auto;
    font-size: 0.82rem;
    color: var(--color-muted);
}

.service-card .button {
    margin-top: auto;
}

.service-card__list {
    list-style: none;
    margin: 4px 0 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.86rem;
}

.service-card__list-item {
    position: relative;
    padding-left: 14px;
}

.service-card__list-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background-color: var(--color-accent);
}

/* =========================
   ПЕРЕВАГи
   ========================= */

.benefits {
    padding: 36px 0 38px;
    background-color: var(--color-bg-muted);
}

.benefits__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
}

.benefit {
    border-radius: var(--radius-md);
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    padding: 14px 14px 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    transform: translateY(0);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast);
}

.benefit:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    border-color: rgba(148, 163, 184, 0.9);
}

.benefit__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background-color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1rem;
}

.benefit__title {
    font-size: 0.98rem;
    margin: 0 0 4px;
}

.benefit__text {
    grid-column: 1 / -1;
    font-size: 0.86rem;
    color: var(--color-muted);
    margin: 0;
}

/* =========================
   ЕТАПИ РОБІТ
   ========================= */

.steps {
    padding: 36px 0 38px;
    background-color: var(--color-bg);
}

.steps__timeline {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    position: relative;
}

.steps__timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), rgba(250, 204, 21, 0.1));
}

.step {
    position: relative;
    padding-left: 56px;
    padding-bottom: 18px;
}

.step:last-child {
    padding-bottom: 0;
}

.step__marker {
    position: absolute;
    left: 6px;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background-color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.2);
}

.step__number {
    font-size: 0.8rem;
    color: #f9fafb;
    font-weight: 600;
}

.step__title {
    font-size: 0.98rem;
    margin-bottom: 4px;
}

.step__text {
    font-size: 0.86rem;
    color: var(--color-muted);
}

/* =========================
   ГАЛЕРЕЯ
   ========================= */

.gallery {
    padding: 36px 0 38px;
    background-color: var(--color-bg-muted);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.gallery__item {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    position: relative;
    cursor: pointer;
}

.gallery__placeholder {
    background-color: #e5e7eb;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px 14px;
    position: relative;
}

.gallery__placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 50%, transparent 75%);
    pointer-events: none;
}

.gallery__label {
    position: relative;
    z-index: 1;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.7);
    line-height: 1.25;
}

.gallery__placeholder--tall {
    /* Відео-слот так само вертикальний */
}

/* Слот для відео: покладіть walkthrough.mp4 у папку images — воно з’явиться тут */
.gallery__video-wrap {
    position: relative;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px 14px;
}

.gallery__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    background: #0f172a;
}

.gallery__placeholder--wide {
    grid-column: auto;
}

/*
   Галерея: зображення повністю в кадрі (contain), підписи — білі з тінню для читабельності.
*/
.gallery__placeholder--1,
.gallery__placeholder--3,
.gallery__placeholder--4,
.gallery__placeholder--5,
.gallery__placeholder--6 {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.gallery__placeholder--1 {
    background-image: url("images/gallery-1.jpg");
}

.gallery__placeholder--3 {
    background-image: url("images/gallery-3.jpg");
}

.gallery__placeholder--4 {
    background-image: url("images/gallery-4.jpg");
}

.gallery__placeholder--5 {
    background-image: url("images/gallery-5.jpg");
}

.gallery__placeholder--6 {
    background-image: url("images/gallery-6.jpg");
}

.gallery__note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.gallery__section-label {
    grid-column: 1 / -1;
    margin-top: 32px;
    margin-bottom: 4px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
}

/* Оглядові ями: 4 зображення завжди квадратиком 2×2, великі */
.gallery__wells-block {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 1100px;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 18px;
    aspect-ratio: 1;
}

.gallery__wells-block .gallery__item {
    min-height: 0;
    aspect-ratio: 1;
}

.gallery__placeholder--wells {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.gallery__placeholder--wells-1 { background-image: url("images/wells-pit-1.jpg"); }
.gallery__placeholder--wells-2 { background-image: url("images/wells-pit-2.jpg"); }
.gallery__placeholder--wells-3 { background-image: url("images/wells-pit-3.jpg"); }
.gallery__placeholder--wells-4 { background-image: url("images/wells-pit-4.jpg"); }

/* Додаткове налаштування саме для невеликих екранів */
@media (max-width: 639px) {
    .hero {
        /* Вписуємо hero в висоту екрану з урахуванням шапки та липкої кнопки */
        min-height: calc(100vh - 120px);
        display: flex;
        align-items: stretch;
    }

    .hero__inner {
        flex: 1;
    }

    .hero__actions {
        /* На вузьких екранах дозволяємо перенос, щоб кнопки не розпирали ширину */
        flex-wrap: wrap;
    }

    .hero__actions .button {
        flex: 1 1 100%;
        justify-content: center;
        white-space: normal; /* текст у кнопках може переноситися */
    }

    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .header__tagline {
        display: none;
    }

    .section-heading {
        margin-bottom: 18px;
    }

    /* Секція переваг на мобільній: горизонтальний скрол з картками + snap */
    .benefits {
        padding: 28px 0 32px;
    }

    .benefits .section-heading {
        margin-bottom: 14px;
    }

    .benefits__grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        margin-top: 12px;
        margin-left: -14px;
        margin-right: -14px;
        padding: 4px 14px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .benefits__grid::-webkit-scrollbar {
        display: none;
    }

    .benefit {
        flex: 0 0 82%;
        min-width: 260px;
        max-width: 320px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        padding: 12px 14px 14px;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 8px;
    }

    .benefit .benefit__icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .benefit__title {
        font-size: 0.92rem;
        margin: 0 0 2px;
    }

    .benefit__text {
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .footer {
        padding-bottom: 72px; /* щоб контент футера не перекривався липкою кнопкою */
    }
}

/* =========================
   FAQ
   ========================= */

.faq {
    padding: 36px 0 42px;
    background-color: var(--color-bg);
}

.faq__list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    overflow: hidden;
}

.faq-item__header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-height: 48px;
}

.faq-item__question {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.faq-item__icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background-color: var(--color-bg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 0.8rem;
    transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.faq-item__body {
    max-height: 0;
    overflow: hidden;
    padding: 0 14px;
    transition: max-height var(--transition-normal), padding-bottom var(--transition-normal);
}

.faq-item__answer {
    margin: 0;
    padding-bottom: 12px;
    font-size: 0.88rem;
    color: var(--color-muted);
}

/* Стан відкритого елемента */
.faq-item--open .faq-item__body {
    max-height: 250px;
    padding-bottom: 12px;
}

.faq-item--open .faq-item__icon {
    transform: rotate(180deg);
    background-color: rgba(250, 204, 21, 0.14);
    color: #92400e;
}

/* =========================
   ФОРМИ
   ========================= */

.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form__label {
    font-size: 0.85rem;
    font-weight: 500;
}

.form__input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.form__input-flag {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.form__input-flag-img {
    display: block;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.form__field--phone .form__input {
    padding-left: 48px;
}

.form__input {
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid var(--color-border-strong);
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    background-color: #ffffff;
}

.form__input--textarea {
    border-radius: 14px;
    resize: vertical;
    min-height: 96px;
}

.form__input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 1px #1118271a;
    background-color: #f9fafb;
}

.form__note {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--color-muted);
}

/* =========================
   МОДАЛЬНЕ ВІКНО
   ========================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.35);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 22px 22px 0 0;
    background-color: #ffffff;
    padding: 18px 18px 16px;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    box-shadow: 0 -18px 38px rgba(15, 23, 42, 0.4);
}

.modal__title {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.modal__subtitle {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin-bottom: 12px;
}

.modal__close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background-color: var(--color-bg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.modal__close:hover {
    background-color: var(--color-border);
    transform: translateY(-1px);
}

/* Активний стан модального вікна */
.modal--visible {
    pointer-events: auto;
    opacity: 1;
}

.modal--visible .modal__backdrop {
    opacity: 1;
}

.modal--visible .modal__dialog {
    transform: translateY(0);
}

/* =========================
   ЛАЙТБОКС ГАЛЕРЕЇ
   ========================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox--open {
    pointer-events: auto;
    opacity: 1;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.lightbox__content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.2s;
}

.lightbox__close:hover {
    background: #fff;
}

.lightbox__media {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.lightbox__img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox__video {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

/* =========================
   FOOTER
   ========================= */

.footer {
    background-color: #020617;
    color: #e5e7eb;
    padding: 30px 0 0;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #ffffff;
    font-weight: 700;
}

.footer__subtitle {
    font-size: 0.88rem;
    color: #9ca3af;
}

.footer__contacts {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer__phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f9fafb;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.footer__phone-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background-color: #facc15;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer__meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

.footer__form-wrap {
    background-color: #020617;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 14px 14px 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

.form--footer .form__input {
    background-color: #020617;
    color: #f9fafb;
    border-color: #374151;
}

.form--footer .form__input::placeholder {
    color: #6b7280;
}

.form--footer .form__input:focus {
    background-color: #020617;
    border-color: #e5e7eb;
    box-shadow: 0 0 0 1px rgba(249, 250, 251, 0.12);
}

.footer__bottom {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    margin-top: 18px;
    padding: 10px 0 16px;
    font-size: 0.78rem;
    color: #6b7280;
}

.footer__bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer__brand {
    font-weight: 500;
}

/* =========================
   АДАПТИВНІСТЬ
   ========================= */

/* Великі мобільні / планшет */
@media (min-width: 640px) {
    .hero__inner {
        gap: 36px;
    }

    .hero__image-placeholder {
        padding: 24px;
        min-height: 280px;
    }

    .pain-solution__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .benefits__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery__placeholder--wide {
        grid-column: span 2;
    }

    .footer__inner {
        flex-direction: row;
        align-items: flex-start;
    }

    .footer__content {
        flex: 1.1;
    }

    .footer__form-wrap {
        flex: 1;
    }

    .footer__bottom-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Десктопи */
@media (min-width: 900px) {
    .header__inner {
        padding: 12px 0;
    }

    .hero {
        padding: 32px 0 56px;
    }

    .hero__inner {
        flex-direction: row;
        align-items: center;
    }

    .hero__content,
    .hero__visual {
        flex: 1;
    }

    .hero__image-placeholder {
        min-height: 380px;
    }

    .hero__info {
        grid-template-columns: 1fr 1.4fr;
    }

    .hero__actions {
        gap: 14px;
    }

    .main {
        padding-bottom: 72px;
    }

    .sticky-cta {
        display: none;
    }

    .modal {
        align-items: center;
    }

    .modal__dialog {
        border-radius: 22px;
        padding: 24px 24px 20px;
    }

    .modal__title {
        font-size: 1.4rem;
    }

    .benefit {
        grid-template-columns: auto minmax(0, 1fr);
    }
}

/* Десктопи: 5 карток послуг в один ряд */
@media (min-width: 1000px) {
    .services__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Великі десктопи */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .benefits__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
