/* =========================
   Base
========================= */

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

html {
    font-size: 16px;
}

body {
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 340px),
        #f4f6fb;
    color: #172033;
    line-height: 1.5;
}

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

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

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

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================
   Header
========================= */

.header {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(220, 225, 235, 0.9);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

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

.logo {
    display: flex;
    align-items: center;
    color: #111827;
}

.logo__image {
    height: 42px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__link {
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 15px;
    color: #5b6475;
    transition: 0.2s ease;
}

.nav__link:hover,
.nav__link_active {
    background: #eef2ff;
    color: #1d4ed8;
}

/* =========================
   Main
========================= */

.main {
    flex: 1;
}

/* =========================
   Home hero
========================= */

.hero {
    padding: 58px 0 46px;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 36px;
    align-items: center;
}

.hero__label,
.section-label {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #eaf0ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
}

.hero__title {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: 48px;
    line-height: 1.08;
    color: #111827;
    letter-spacing: -0.04em;
}

.hero__description {
    max-width: 720px;
    margin-bottom: 26px;
    font-size: 18px;
    color: #687386;
}

.hero-search {
    max-width: 700px;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.hero-search__input {
    flex: 1;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid #d7deea;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    outline: none;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.hero-search__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hero-search__button {
    min-height: 54px;
    padding: 0 26px;
    border: none;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-search__button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
    color: #4b5563;
    font-size: 14px;
    transition: 0.2s ease;
}

.tag:hover {
    color: #1d4ed8;
    border-color: #bfccff;
    background: #f8faff;
}

.hero__panel {
    display: grid;
    gap: 14px;
}

.mini-tool {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e3e8f2;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 38px rgba(16, 24, 40, 0.06);
}

.mini-tool__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #eaf0ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.mini-tool h3 {
    margin-bottom: 4px;
    font-size: 16px;
    color: #111827;
}

.mini-tool p {
    font-size: 14px;
    color: #687386;
}

/* =========================
   Sections
========================= */

.section {
    padding: 44px 0;
}

.section_light {
    background: rgba(255, 255, 255, 0.58);
    border-top: 1px solid #e8edf7;
    border-bottom: 1px solid #e8edf7;
}

.section-head {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-title {
    font-size: 34px;
    line-height: 1.15;
    color: #111827;
    letter-spacing: -0.03em;
}

.section-link {
    color: #2563eb;
    font-weight: 700;
    white-space: nowrap;
}

.section-link:hover {
    text-decoration: underline;
}

/* =========================
   Tools cards
========================= */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.tool-card {
    display: block;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.045);
    transition: 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: #bfccff;
    box-shadow: 0 18px 38px rgba(16, 24, 40, 0.08);
}

.tool-card__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #eaf0ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.tool-card__title {
    margin-bottom: 9px;
    font-size: 20px;
    color: #111827;
}

.tool-card__text {
    font-size: 15px;
    color: #687386;
}

/* =========================
   Categories
========================= */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.category-card {
    display: block;
    padding: 24px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
    transition: 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: #bfccff;
}

.category-card h3 {
    margin-bottom: 9px;
    font-size: 19px;
    color: #111827;
}

.category-card p {
    font-size: 15px;
    color: #687386;
}

/* =========================
   Benefits
========================= */

.benefits {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: start;
}

.benefits__text {
    font-size: 16px;
    color: #687386;
}

.benefits__list {
    display: grid;
    gap: 16px;
}

.benefit-item {
    padding: 22px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
}

.benefit-item h3 {
    margin-bottom: 7px;
    font-size: 18px;
    color: #111827;
}

.benefit-item p {
    font-size: 15px;
    color: #687386;
}

/* =========================
   SEO text
========================= */

.section_seo {
    padding-top: 22px;
}

.seo-text {
    max-width: 920px;
    padding: 30px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
}

.seo-text h2 {
    margin-bottom: 16px;
    font-size: 28px;
    color: #111827;
}

.seo-text p {
    margin-bottom: 14px;
    color: #687386;
}

.seo-text p:last-child {
    margin-bottom: 0;
}

/* =========================
   Footer
========================= */

.footer {
    background: #111827;
    color: #cbd5e1;
    padding: 46px 0 22px;
}

.footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__logo {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.footer__text {
    max-width: 360px;
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
}

.footer__title {
    margin-bottom: 14px;
    font-size: 15px;
    color: #ffffff;
}

.footer__column {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer__link {
    font-size: 14px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.footer__link:hover {
    color: #ffffff;
}

.footer__bottom {
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
    color: #94a3b8;
}

/* =========================
   Tool page common styles
   пригодится для страниц калькуляторов
========================= */

.page-head {
    margin-bottom: 28px;
}

.page-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf0ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
}

.page-title {
    margin-bottom: 10px;
    font-size: 36px;
    line-height: 1.15;
    color: #111827;
}

.page-description {
    max-width: 680px;
    color: #687386;
    font-size: 16px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.tool-box,
.side-box {
    background: #ffffff;
    border: 1px solid #e3e8f2;
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.06);
}

.tool-box {
    padding: 30px;
}

.side-box {
    padding: 26px;
    position: sticky;
    top: 96px;
}

.card-title {
    margin-bottom: 20px;
    font-size: 21px;
    color: #111827;
}

.form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #d7deea;
    border-radius: 12px;
    background: #fbfcff;
    color: #111827;
    outline: none;
    transition: 0.2s ease;
}

.form-textarea {
    min-height: 140px;
    padding: 14px;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.button {
    width: fit-content;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.result-box {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff, #eef4ff);
    border: 1px solid #dbe6ff;
    margin-bottom: 16px;
}

.result-label {
    margin-bottom: 6px;
    font-size: 14px;
    color: #687386;
}

.result-value {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}

.hint {
    font-size: 14px;
    color: #687386;
}

/* =========================
   Calculator page
========================= */

.tool-page {
    padding: 42px 0 70px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #687386;
}

.breadcrumbs a {
    color: #2563eb;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.result-category {
    margin-top: 6px;
    font-size: 16px;
    color: #2563eb;
    font-weight: 700;
}

.result_error {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.bmi-scale {
    display: grid;
    gap: 10px;
}

.bmi-scale__item {
    padding: 13px 14px;
    border-radius: 13px;
    background: #f8fbff;
    border: 1px solid #e3e8f2;
}

.bmi-scale__item span {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
    color: #687386;
}

.bmi-scale__item strong {
    font-size: 14px;
    color: #111827;
}

.info-section {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
}

.info-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
    color: #111827;
}

.info-card p {
    margin-bottom: 12px;
    color: #687386;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* =========================
   Adaptive
========================= */

@media (max-width: 980px) {
    .hero__inner,
    .benefits {
        grid-template-columns: 1fr;
    }

    .hero__panel {
        grid-template-columns: repeat(3, 1fr);
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__top {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-layout {
        grid-template-columns: 1fr;
    }

    .side-box {
        position: static;
    }
}

@media (max-width: 720px) {
    .header__inner {
        min-height: auto;
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .logo__image {
        height: 38px;
    }

    .nav {
        flex-wrap: wrap;
    }

    .hero {
        padding: 38px 0 30px;
    }

    .hero__title {
        font-size: 34px;
    }

    .hero__description {
        font-size: 16px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search__button {
        width: 100%;
    }

    .hero__panel {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 34px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-title {
        font-size: 28px;
    }

    .tools-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .seo-text {
        padding: 24px;
    }

    .footer {
        padding-top: 36px;
    }

    .footer__top {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer__bottom {
        flex-direction: column;
    }

    .page-title {
        font-size: 29px;
    }

    .tool-box,
    .side-box {
        padding: 22px;
        border-radius: 18px;
    }

    .button {
        width: 100%;
    }
}

/* =========================
   Cookie banner
========================= */

.cookie-banner {
    display: none;
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

.cookie-banner_visible {
    display: block;
}

.cookie-banner__content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e3e8f2;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner__text {
    max-width: 780px;
}

.cookie-banner__text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: #111827;
}

.cookie-banner__text p {
    font-size: 14px;
    line-height: 1.5;
    color: #687386;
}

.cookie-banner__text a {
    color: #2563eb;
    font-weight: 600;
}

.cookie-banner__text a:hover {
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.cookie-btn_accept {
    background: #111827;
    color: #ffffff;
}

.cookie-btn_accept:hover {
    background: #020617;
}

.cookie-btn_reject {
    background: #f1f5f9;
    color: #334155;
}

.cookie-btn_reject:hover {
    background: #e2e8f0;
}

@media (max-width: 720px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .cookie-banner__content {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .cookie-banner__actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}