:root {
    --brand-blue: #b7d9ed; /* світло-блакитний */
    --cta-call: #FA701A; /* зателефонувати */
    --cta-call-hover: #f8915d;
    --cta-chat: #7360F2;
    --cta-chat-hover: #927ffd;/* написати */
    --text: #0f172a;
    --muted: #4b5563;
    --card: #ffffff;
    --radius: 16px;
    --container-px: 24px;
    --maxw: 1400px; /* контентна ширина окремих секцій (не хедер) */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: #f7fafc;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ======= Navbar ======= */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    padding: 10px var(--container-px);
    position: sticky;
    top: 0;
    z-index: 100;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar__brand {
    font-weight: 700;
    font-size: 20px;
}

.navbar__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.navbar__links a {
    font-weight: 600;
    font-size: 16px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.navbar__links a:hover {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

/* ======= Header / Hero ======= */
.hero {
    position: relative;
    width: 100%;
    min-height: 120px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url("../img/header-bg.jpg") no-repeat center;
    background-size: cover;
    color: #fff;
}

.hero__content {
    position: relative;
    display: flex;
    align-content: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px var(--container-px);
}
.hero__left {
    font-weight: 600;
}
.hero__right {
    font-weight: 570;
    margin: auto 0;
}
.hero__title {
    font-size: 20px;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
}
.hero__right a {
    font-weight: 700;
    white-space: nowrap;
    font-size: 30px;
    text-decoration: underline;
}

.hero__right a:hover {
    color: #E0F7FA;
}

/* ======= Section base ======= */
.section {
    padding: 28px var(--container-px);
    background: #fff;
}
.section + .section { border-top: 1px solid #e5e7eb; }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 4px 0 20px;
    text-align: center;
}

/* ======= Область роботи ======= */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 20px;
    padding: 0;
}
.work-card {
    background: #E0F7FA;
    border-radius: var(--radius);
    padding: 18px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #0b1e2b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.work-card__media {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}
.work-card__title { font-weight: 700; }
.work-card__desc { font-size: 14px; }

/* ======= Мої переваги (3x2) ======= */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-left: 0;
}

.benefit {
    background: var(--brand-blue);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 84px;
    display: flex; align-items: center; justify-content: space-around;
    text-align: center;
    font-weight: 600;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.benefit img {
    height: 100%;
}

/* ======= Розцінки ======= */
.prices-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0 16px;
    font-size: 16px;
}

.prices-table th,
.prices-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.prices-table thead {
    background-color: #f3f4f6;
    color: var(--muted);
}

.prices-table th {
    font-weight: 600;
}

.prices-table td:last-child {
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    color: var(--cta-call);
}

.prices-disclaimer {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin: 0 auto;
    max-width: 700px;
}

/* ======= Бренди (300x300 картки) ======= */
.brands {
    background: #fff;
}
.brands__title { margin-bottom: 16px; }
.brands-grid-wrapper {
    position: relative;
    overflow: hidden; /* для каруселі */
}
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.brand-card {
    width: 300px; height: 300px;
    background: #f1f5f9;
    border-radius: 15px;
    flex: 0 0 300px; /* для режиму каруселі */
    padding: 15px; /* зовнішній відступ усередині картки */
    display: flex; flex-direction: column; gap: 20px; /* відступ між двома контейнерами */
    margin: 0 auto; /* центрування, коли grid має ширшу колонку */
}
.brand-slot {
    flex: 1;
    border-radius: 12px;
    background: #ffffff;
    height: 125px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.brand-slot img {
    pointer-events: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.is-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-behavior: auto;
    scrollbar-width: none;
}

.is-carousel {
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.is-carousel.active {
    cursor: grabbing;
}

.brands-grid-wrapper::before,
.brands-grid-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px; /* Ширина градієнта */
    z-index: 2; /* Перекриває контент, але не елементи управління */
    pointer-events: none; /* Дозволяє клікати крізь градієнт */
}

.brands-grid-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.brands-grid-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}

/* ======= Швидкий зв'язок / CTA ======= */
.cta-bar {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
}
.btn {
    border: none;
    cursor: pointer;
    border-radius: 18px;
    font-weight: 700;
    color: #fff;
    padding: 14px 22px;
    min-width: 220px;
    font-size: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.btn img {
    max-height: 40px;
}
.cta-name { font-size: 20px; }

.btn span {
    line-height: 1.4;
}

.btn--call { background: var(--cta-call); }
.btn--call:hover { background: var(--cta-call-hover); }
.btn--chat { background: var(--cta-chat); }
.btn--chat:hover { background: var(--cta-chat-hover); }

/* ======= Footer ======= */
.footer {
    background: linear-gradient(135deg, #23374a, #577b9e);
    color: #fff;
    padding: 28px var(--container-px);
}
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;}
.footer .brand { font-weight: 700; }
.footer .list { margin: 0; padding: 0; }
.footer .list dt,dd { margin: 6px 0; font-style: normal; }
.footer .list div { display: flex; flex-direction: row; gap: 12px; }
.footer a { text-decoration: underline; }
.footer a:hover { color: #E0F7FA; }

/* ======= Адаптивність під великі монітори і зменшення ======= */
@media (max-width: 992px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero__right a {
        font-size: 26px; /* Зменшуємо шрифт номера телефону, щоб уникнути переносу */
    }
    .navbar__links {
        gap: 16px; /* зменшуємо проміжки в навігації */
    }
    .navbar__links a {
        font-size: 15px;
    }
}

/* Мобільні пристрої */
@media (max-width: 768px) {
    .hero__content {
        flex-direction: column;
        text-align: center;
    }
    .work-grid {
        grid-template-columns: 1fr;
    }
    .cta-bar {
        flex-direction: column; /* Ставимо кнопки вертикально */
        align-items: stretch; /* Розтягуємо кнопки на однакову ширину */
    }
    .btn {
        min-width: 0;
        width: 100%;
    }
    .footer__inner {
        grid-template-columns: 1fr; /* Ставимо колонки футера вертикально */
        gap: 24px;
        text-align: center;
    }
    html {
        scroll-padding-top: 60px; /* Відступ для якірних посилань, щоб контент не ховався під навігацією */
    }
    .navbar__links {
        display: none; /* Ховаємо посилання на мобільних пристроях, залишаючи бренд */
    }
    .prices-table thead {
        display: none; /* Ховаємо заголовки таблиці */
    }
    .prices-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }
    .prices-table td {
        display: block;
        text-align: right;
        border-bottom: none;
        position: relative;
        padding-left: 50%;
    }
    .prices-table td:last-child {
        text-align: right;
        border-top: 1px dashed #e5e7eb;
        padding-top: 10px;
        margin-top: 6px;
    }
    .prices-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        font-weight: 600;
        color: var(--muted);
        text-align: left;
    }
    .prices-table td:nth-of-type(1)::before {
        content: "Послуга:";
    }
    .prices-table td:nth-of-type(2)::before {
        content: "Ціна:";
    }
}

/* Маленькі мобільні пристрої */
@media (max-width: 480px) {
    .benefits-grid {
        grid-template-columns: 1fr; /* Переваги в одну колонку */
    }
    .btn img {
        max-height: 30px;
    }
    .btn {
        font-size: 10px;
    }
    .cta-name {
        font-size: 18px;
    }
    .hero__right a {
        font-size: 22px;
    }
}