/* ============================================================
   CleanLabel.Life — 01-base.css
   Переменные, база, шрифты, container, header, search-area
   ============================================================ */

   :root {
    --green: #174c3b;
    --green-dark: #10382c;
    --green-soft: #e9f4ee;
    --green-light: #e8f3ed;

    --lime: #c9e86b;
    --mint: #f3f8f5;

    --yellow: #e2b83f;
    --yellow-soft: #fff7df;

    --red: #c96d6d;
    --red-soft: #fff0f0;

    --blue: #5d89a4;
    --blue-soft: #edf5fa;

    --text: #18221e;
    --muted: #718079;

    --border: #e1e9e4;
    --background: #f7faf8;
    --white: #ffffff;

    --shadow: 0 15px 45px rgba(23, 76, 59, .08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.65;
    /* Защита от горизонтального выезда контента на мобильных */
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

/* ---------- HEADER ---------- */
header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -.5px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.logo-icon,
.logo-mark {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    border-radius: 11px;
    font-weight: 900;
}

.nav,
.nav-links {
    display: flex;
    align-items: center;
    gap: 27px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.nav a:hover,
.nav-links a:hover {
    color: var(--green);
}

.nav-button,
.nav-search {
    padding: 10px 15px;
    background: var(--green);
    color: #fff;
    border-radius: 11px;
}

.nav-button:hover,
.nav-search:hover {
    background: var(--green-dark);
    color: #fff;
}

/* ---------- SEARCH AREA ---------- */
.search-area {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 17px 0;
}

.search {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    padding: 5px;
    background: #f6f9f7;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.search-icon {
    width: 45px;
    display: grid;
    place-items: center;
    color: #87938e;
    font-size: 20px;
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.search button {
    border: 0;
    padding: 0 20px;
    background: var(--green);
    color: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.search button:hover {
    background: var(--green-dark);
}

/* ---------- MAIN ---------- */
main {
    padding: 40px 0 90px;
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumbs span {
    margin: 0 8px;
    color: #aeb8b3;
}

/* ============================================================
   ГАМБУРГЕР-МЕНЮ
   ============================================================ */

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 10px;
    transition: background .15s;
    flex: 0 0 auto;
}

.nav-toggle:hover {
    background: var(--green-soft);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

/* Анимация бургер → крестик, когда меню открыто */
.navbar.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.navbar.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}
.navbar.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   АДАПТИВ ШАПКИ
   ============================================================ */

@media (max-width: 900px) {
    .container {
        width: min(1120px, calc(100% - 28px));
    }

    .navbar {
        min-height: 60px;
        padding: 10px 0;
        flex-wrap: nowrap;
        gap: 8px;
        position: relative;
    }

    /* Логотип слева */
    .navbar .logo {
        flex: 1 1 auto;
        font-size: 16px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Бургер справа */
    .nav-toggle {
        display: flex;
    }

    /* Меню выпадает вниз под шапку */
    .navbar .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(23, 76, 59, .08);
        z-index: 90;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar.nav-open .nav {
        display: flex;
    }

    .navbar .nav a {
        padding: 11px 14px;
        font-size: 14px;
        white-space: normal;
        border-radius: 10px;
        background: transparent;
        color: var(--text);
    }
    .navbar .nav a:hover {
        background: var(--green-light);
    }

    .navbar .nav .nav-button {
        padding: 11px 14px;
        text-align: center;
        background: var(--green);
        color: #fff;
        font-size: 14px;
    }
    .navbar .nav .nav-button:hover {
        background: var(--green-dark);
        color: #fff;
    }

    /* Search area компактнее */
    .search-area { padding: 12px 0; }
    .search { padding: 4px; }
    .search-icon { width: 38px; font-size: 17px; }
    .search input { font-size: 13px; padding: 8px 0; }
    .search button { padding: 0 14px; font-size: 11px; }

    main { padding: 24px 0 60px; }
}

@media (max-width: 600px) {
    .container {
        width: min(1120px, calc(100% - 20px));
    }

    .navbar .logo { font-size: 15px; }
    .navbar .logo-icon,
    .navbar .logo-mark {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: 13px;
    }

    main { padding: 18px 0 48px; }
    .breadcrumbs { margin-bottom: 16px; font-size: 11px; }
}