body, * {
    margin: 0;
    padding: 0;
}

body {
    background-color: #F4FBFF;
    font-family: 'montserrat', sans-serif;

}

html {
  scroll-behavior: smooth;
}

/* Header */

.header {
  background-color: #F4FBFF;
  height: 116px;
  display: flex;
  align-items: center;
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo img {
  width: 328px;
  height: 28px;
}

.header__menu {
  width: 385px;
}

.menu__list {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.menu__item a {
  color: #000;
  text-decoration: none;
}

.header__button .btn--primary {
  width: 144px;
  height: 52px;
  background-color: #1F5676;
  border: none;
  border-radius: 12px;
  font-family: 'montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.btn--primary {
  background-color: #b4232e;
  color: #fff;
  width: 144px;
}

.btn--primary:hover {
  background-color: #921e27;
}

.btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  height: 52px;
  cursor: pointer;
  transition: 0.3s ease;
}


.header__button .btn--primary img {
    display: none;
}

.header {
  background-color: white;
  position: relative;
  z-index: 10;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.mobile_menu-cont {
    display: none;
}

.menu-toggle {
  display: none;

  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
}

.mobile-menu.open {          /* КЛЮЧЕВОЕ правило для показа меню */
  display: block;
}

.menu-toggle img {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
}

/* Мобильное меню */


.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  padding: 20px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  font-family: 'montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.mobile-menu ul {
  max-width: 704px;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

.mobile-menu li {
  margin-bottom: 15px;
}

.mobile-menu a {
  text-decoration: none;
  font-size: 18px;
  color: #333;
}


/* Базовая контейнерная сетка */
.container {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}


/* catalog */

.catalog {
  width: 100%;
  padding: 60px 0;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.catalog-title {
  color: #1F5676;
  font-family: 'Montserrat', sans-serif;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 40px;
}

.link__main{
    margin-bottom: 60px;
    color: #9FA2A3;
}

.link__main a{
    margin-bottom: 60px;

    text-decoration: none;
    color: #9FA2A3;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
}


.catalog__layout {
    display: flex;

    border-radius: 24px;
}

.sidebar {
    width: 100%;
    max-width: 360px;

    background-color: #E9EFF2;
    border-radius: 24px 0 0 24px;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    background: #E9EFF2;
    border: none;
    border-radius: 24px 24px 0 0 ;
    cursor: pointer;
}

.sidebar .chevron {
    transition: transform 0.2s ease;
}
.sidebar.open .chevron {
    transform: rotate(180deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    padding: 24px 32px;

    border-bottom: 1px solid #fff;
    text-decoration: none;
    color: #000;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.active {
    background-color: #1F5676;
    color: #fff;

    border-radius: 24px 0 0 0;

}

.sidebar-nav .sidebar-link.active {
  border-radius: 0;
}

/* Скругляем углы ТОЛЬКО если активен самый первый пункт */
.sidebar-nav .sidebar-link:first-child.active {
  border-radius: 24px 0 0 0; /* desktop */
}

.sidebar-link:hover {
    background-color: #1F5676;
    color: #fff;
    transition: .3s ease;
}

.catalog__items {
    width: 100%;
    max-width: 808px;
    background-color: #fff;
    border-radius: 0 24px 24px 0;
    padding: 24px 24px 32px 24px;
}


/* Скрытая подпись для доступности */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  margin:-1px; padding:0; border:0;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%);
}

/* Поисковая строка */
.searchbar{
  position:relative;
  width:100%;
}

.searchbar input{
  width:100%;
  height:56px;                 /* подгон по высоте */
  background:#ECEEEF;          /* светло-серый как на макете */
  border:none;
  border-radius:14px;
  padding:0 52px 0 18px;       /* место под иконку справа */
  font-size:16px;
  color:#222;
  outline:none;
  transition:box-shadow .15s ease;
}

.searchbar input::placeholder{
  color:#9FA2A3;               /* серый плейсхолдер */
}

.searchbar input:focus{
  box-shadow:0 0 0 3px rgba(31,86,118,.12); /* мягкий фокус */
}

/* Кнопка с иконкой */
.searchbar button{
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  width:28px; height:28px;
  display:grid; place-items:center;
  border:none; background:transparent;
  color:#8F969B;                /* цвет иконки */
  cursor:pointer;
}

.searchbar button:hover{ opacity:.9; }


/* card */

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    margin-top: 32px;
}

.keep-ws{
  white-space: pre-wrap;     /* сохраняет \n и пробелы */
  word-break: break-word;    /* не вылезает за границы */
  overflow-wrap: anywhere;   /* подстраховка для длинных слов */
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    width: 248px;
    height: 386px;
    padding: 24px 24px 24px 24px;

    border: solid 1px rgba(31, 86, 118, 0.38);
    border-radius: 16px;

    font-family: 'montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    /* text-align: center; */
}

.card__text {
    height: 50px;
}

.card__desc {
    display: none;
}

.card__img {
    width: 200px;
    height: 200px;
}

.card__btn {
    width: 100%;
    height: 40px;

    background-color: #1F5676;
    color: #fff;

    border: none;
    border-radius: 8px;

    cursor: pointer;

    font-family: 'montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;

}

.card__btn:hover {
    background-color: #16415A;
    transition: 0.3s ease;
}

.card_theme {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Footer */

.footer {
  background-color: #fff;
  padding: 60px 0;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.15);
  font-family: 'montserrat', sans-serif;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer__logo img {
  width: 328px;
  height: 28px;
}

.footer__title {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin-bottom: 20px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  list-style: none;

}

.footer__link {
  text-decoration: none;
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  /* width: calc(50% - 15px); */
}

.footer__links li {
  margin-bottom: 12px;
}

.footer__links a {
  text-decoration: none;
  color: #000;
  font-size: 16px;
  font-weight: 500;
}

.footer__social-icons {
  display: flex;
  gap: 40px;
}

.footer__social-icons img {
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background-color: #000;
  margin: 32px 0;
}

.footer__copy {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  text-align: left;
}

/* Modal */
.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:1000}
.modal.is-open{display:flex}
.modal__overlay{position:absolute; inset:0; background:rgba(0,0,0,.45)}
.modal__content{
  position:relative; background:#fff; border-radius:16px; padding:24px;
  width:min(780px, calc(100% - 32px));
  box-shadow:0 30px 100px rgba(0,0,0,.20); animation:modal-pop .18s ease
}
@keyframes modal-pop{from{opacity:.8; transform:translateY(6px)} to{opacity:1; transform:translateY(0)}}

.modal__grid{display:grid; grid-template-columns:240px 1fr; gap:24px}
.modal__img{
  width:100%; aspect-ratio:1/1; object-fit:contain;
  background:#F6FAFC; border:1px solid rgba(31,86,118,.15); border-radius:12px
}
.modal__title{margin:0 0 8px; font:700 22px/1.2 'Montserrat', sans-serif; color:#1F5676}
.modal__text{margin:0 0 16px; color:#333; font:500 16px/1.5 'Montserrat', sans-serif}
.modal__actions{display:flex; gap:12px}

.modal__close{
  position:absolute; top:10px; right:10px; width:36px; height:36px;
  border:0; border-radius:10px; background:#F0F5F8; color:#1F5676; font-size:22px; cursor:pointer
}
.modal__close:hover{background:#E7EFF4}

body.modal-open{overflow:hidden}


@media (max-width: 1200px) {
    .container {
        max-width: 704px;
    }

    .header {
        height: 100px;
    }

    .header__logo img {
        width: 280px;
        height: 24px;
    }

    .header__menu {
        display: none;
    }
    
    .header__mobile-menu {
        display: none; /* Показывается только на мобилках */
    }

    .catalog {
        width: 100%;
        padding: 32px 0;
    }

    .catalog-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
    }

    .catalog-title {
        font-size: 20px;
    }


    .catalog__items {
        width: 100%;
        max-width: 704px;
        background-color: #fff;
        border-radius: 24px;
        padding: 24px 24px 32px 24px;
    }

    .catalog-item {
        width: 336px;
        height: 132px;
        padding: 24px;
    }

    .item-img img {
        width: 120px;
        max-height: 115px;
    }

    /* Footer */

    .footer {
        padding: 40px 0;
    }

    .footer__content {
        gap: 10px;
    }

    .footer__logo img {
        width: 280px;
        height: 24px;
    }

    .footer__title {
        font-size: 16px;
    }

    .footer__links {
        width: 172px;
    }

    .footer__link {
        font-size: 14px;
    }

    .footer__links li {
        margin-bottom: 12px;
    }

    .footer__links a {
        font-size: 14px;
    }

    .footer__social-icons {
    display: flex;
    gap: 24px;
    }

    .footer__social-icons img {
    width: 24px;
    height: 24px;
    }

    .mobile-menu ul {
        max-width: 704px;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0 auto;
    }

    .mobile_menu-cont {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle img {
        display: block;
    }

    /* catalog */

    .catalog {
        width: 100%;
        padding: 60px 0;
    }

    .catalog-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
    }

    .catalog-title {
        color: #1F5676;
        font-family: 'Montserrat', sans-serif;
        font-size: 30px;
        font-weight: 700;
        margin: 0;
    }

    .link__main{
        margin-bottom: 60px;
        color: #9FA2A3;
    }

    .link__main a{
        margin-bottom: 60px;

        text-decoration: none;
        color: #9FA2A3;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
    }


    .catalog__layout {
        display: block;
        width: 704px;
        border-radius: 24px;
    }

    .sidebar {
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
        width: 100%;
        max-width: 704px;
        border-radius: 16px;

    }

    /* Показываем кнопку */
    .sidebar-toggle {
        display: flex;
        background-color: #1F5676;
        color: #fff;
        padding-top: 26px;
    }

    /* Делаем список выпадающим */
    .sidebar-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        background: #E9EFF2;
        border-radius: 0;
    }

    .sidebar.open .sidebar-nav {
        max-height: 500px; /* достаточно большое значение для всех пунктов */
    }

    /* Стили ссылок */
    .sidebar-link {
        padding: 16px 20px;
        border-bottom: 1px solid #fff;
        color: #000;
        text-decoration: none;
        font-weight: 600;
    }

    .sidebar-link.active {
        background-color: #1F5676;
        color: #fff;
        border-radius: 0;
    }

    .sidebar-link:hover {
        background-color: #1F5676;
        color: #fff;
    }

    .catalog__items {
        width: 704px;
        background-color: #fff;
        border-radius: 0 0 24px 24px;
        padding: 24px;
        box-sizing: border-box;
    }


    /* Скрытая подпись для доступности */
    .sr-only{
    position:absolute;
    width:1px; height:1px;
    margin:-1px; padding:0; border:0;
    overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%);
    }

    /* Поисковая строка */
    .searchbar{
    position:relative;
    width:100%;
    }

    .searchbar input{
    width:100%;
    max-width: 704px;
    height:56px;                 /* подгон по высоте */
    background:#ECEEEF;          /* светло-серый как на макете */
    border:none;
    border-radius:14px;
    padding:0 52px 0 18px;       /* место под иконку справа */
    font-size:16px;
    color:#222;
    outline:none;
    transition:box-shadow .15s ease;
    }

    .searchbar input::placeholder{
    color:#9FA2A3;               /* серый плейсхолдер */
    }

    .searchbar input:focus{
    box-shadow:0 0 0 3px rgba(31,86,118,.12); /* мягкий фокус */
    }

    /* Кнопка с иконкой */
    .searchbar button{
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    width:28px; height:28px;
    display:grid; place-items:center;
    border:none; background:transparent;
    color:#8F969B;                /* цвет иконки */
    cursor:pointer;
    }

    .searchbar button:hover{ opacity:.9; }


    /* card */

    .cards {
        width: 100%;
        max-width: 700px;
        display: flex;
        flex-wrap: wrap;
        gap: 28px;
        justify-content: flex-start;
        margin-top: 32px;
    }

    .card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        width: 200px;
        height: 338px;
        padding: 24px 24px 24px 24px;

        border: solid 1px rgba(31, 86, 118, 0.38);
        border-radius: 16px;

        font-family: 'montserrat', sans-serif;
        font-size: 16px;
        font-weight: 700;
        /* text-align: center; */
    }

    .card__text {
        height: 68px;
    }

    .card__img {
        width: 168px;
        height: 168px;
    }

    .card__btn {
        width: 100%;
        height: 40px;

        background-color: #1F5676;
        color: #fff;

        border: none;
        border-radius: 8px;

        cursor: pointer;

        font-family: 'montserrat', sans-serif;
        font-size: 16px;
        font-weight: 700;

    }

    .card__btn:hover {
        background-color: #16415A;
        transition: 0.3s ease;
    }

    .card_theme {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }


}

@media (max-width: 704px) {
    .container {
        max-width: 328px;
    }


    /* Header */

    .header {
        height: 88px;
    }

    .header__logo img {
        width: 210px;
        height: 18px;
    }

    .header__button .btn--primary{
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }

    .header__button .btn--primary img {
        display: block;
        width: 21px;
        height: 21px;
    }

    .header__button .btn--primary p {
        display: none;
    }
    .header__mobile-menu {
        display: none; 
    }

    /* Form */

    .form {
        border-radius: 16px;
        padding: 24px 0;
    }

    .form__inner {
        gap: 16px;
    }

    .form__title-small {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .form__title-big {
        font-size: 24px;
        margin-bottom: 2px;
    }

    .form__subtitle {
        font-size: 16px;
    }

    .form__content {
        gap: 16px;
    }

    .form__submit {
        width: 158px;
        height: 40px;
        border-radius: 8px;
        font-size: 14px;
    }


    /* contacts */

    .contacts {
        padding: 40px 0;
    }

    .contacts__title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .contacts__content {
        gap: 16px;
    }

    .contacts__info {
        gap: 16px;
    }

    .contacts__city-header {
        gap: 1px;
    }

    .contacts__city-header img {
        width: 32px;
        height: 32px;
    }

    .contacts__city-name {
        font-size: 16px;
    }

    .contacts__text {
        font-size: 14px;
        margin-top: 10px;
    }

    .contacts__map img {
        width: 328px;
        height: 156px;
        object-fit: cover;
        border-radius: 12px;
    }

    /* Footer */

    .footer {
        padding: 40px 0;
    }

    .footer__content {
        gap: 40px;
    }

    .footer__logo img {
        width: 232px;
        height: 20px;
    }

    .footer__title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .footer__link {
        font-size: 16px;
    }

    .footer__links li {
        margin-bottom: 12px;
    }

    .footer__links a {
        font-size: 14px;
    }

    .footer__social-icons {
        gap: 24px;
    }

    .footer__social-icons img {
        width: 24px;
        height: 24px;
    }


    .footer__copy {
        font-size: 14px;
    }

    .mobile-menu ul {
        max-width: 328px;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0 auto;
    }

    .mobile_menu-cont {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle img {
        display: block;
    }

    /* catalog */

    .catalog {
        width: 100%;
        padding: 60px 0;
    }

    .catalog-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
    }

    .catalog-title {
        color: #1F5676;
        font-family: 'Montserrat', sans-serif;
        font-size: 30px;
        font-weight: 700;
        margin: 0;
    }

    .link__main{
        margin-bottom: 60px;
        color: #9FA2A3;
    }

    .link__main a{
        margin-bottom: 60px;

        text-decoration: none;
        color: #9FA2A3;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
    }


    .catalog__layout {
        display: block;
        width: 328px;
        border-radius: 24px;
    }

    .sidebar {
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
        width: 100%;
        max-width: 328px;
        border-radius: 16px;

    }

    /* Показываем кнопку */
    .sidebar-toggle {
        display: flex;
        background-color: #1F5676;
        color: #fff;
        padding-top: 26px;
    }

    /* Делаем список выпадающим */
    .sidebar-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        background: #E9EFF2;
        border-radius: 0;
    }

    .sidebar.open .sidebar-nav {
        max-height: 500px; /* достаточно большое значение для всех пунктов */
    }

    /* Стили ссылок */
    .sidebar-link {
        padding: 16px 20px;
        border-bottom: 1px solid #fff;
        color: #000;
        text-decoration: none;
        font-weight: 600;
    }

    .sidebar-link.active {
        background-color: #1F5676;
        color: #fff;
        border-radius: 0;
    }

    .sidebar-link:hover {
        background-color: #1F5676;
        color: #fff;
    }

    .catalog__items {
        width: 328px;
        background-color: #fff;
        border-radius: 0 0 24px 24px;
        padding: 16px;
        box-sizing: border-box;
    }


    /* Скрытая подпись для доступности */
    .sr-only{
    position:absolute;
    width:1px; height:1px;
    margin:-1px; padding:0; border:0;
    overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%);
    }

    /* Поисковая строка */
    .searchbar{
    position:relative;
    width:100%;
    }

    .searchbar input{
    width:100%;
    max-width: 704px;
    height:56px;                 /* подгон по высоте */
    background:#ECEEEF;          /* светло-серый как на макете */
    border:none;
    border-radius:14px;
    padding:0 52px 0 18px;       /* место под иконку справа */
    font-size:16px;
    color:#222;
    outline:none;
    transition:box-shadow .15s ease;
    }

    .searchbar input::placeholder{
    color:#9FA2A3;               /* серый плейсхолдер */
    }

    .searchbar input:focus{
    box-shadow:0 0 0 3px rgba(31,86,118,.12); /* мягкий фокус */
    }

    /* Кнопка с иконкой */
    .searchbar button{
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    width:28px; height:28px;
    display:grid; place-items:center;
    border:none; background:transparent;
    color:#8F969B;                /* цвет иконки */
    cursor:pointer;
    }

    .searchbar button:hover{ opacity:.9; }


    /* card */

    .cards {
        width: 100%;
        max-width: 328px;
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        justify-content: flex-start;
        margin-top: 32px;
        padding: 0px;
    }

    .card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        width: 248px;
        height: 386px;
        padding: 24px 24px 24px 24px;

        border: solid 1px rgba(31, 86, 118, 0.38);
        border-radius: 16px;
        margin: 0 auto;

    }

    .card__text {
        height: 68px;
    }

    .card__img {
        width: 200px;
        height: 200px;
    }

    .card__btn {
        width: 100%;
        height: 40px;

        background-color: #1F5676;
        color: #fff;

        border: none;
        border-radius: 8px;

        cursor: pointer;

        font-family: 'montserrat', sans-serif;
        font-size: 14px;
        font-weight: 700;

    }

    .card__btn:hover {
        background-color: #16415A;
        transition: 0.3s ease;
    }

    .card_theme {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

}
