@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
    margin: 0;
}
body {
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
}




/* Общие стили шапки */
header {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
  width: 100%;
    z-index: 1000;
}

.wrp_block {
  max-width: 1000px;
  margin: 0 auto;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  position: relative; /* важно для позиционирования меню */
}


.logo {
    width: 180px;
}

/* Десктопное меню */
nav {
  display: flex;
  gap: 20px;
}

nav a {
    text-decoration: none;
    color: #0010ffb2;
    font-size: 0.9em;
}

/* Бургер по умолчанию скрыт */
.burger {
  display: none;
  width: 24px;
  height: 24px;
  font-size: 24px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0; /* не сжимается в flex-контейнере */
}

/* Мобильная версия: < 1000px */
@media (max-width: 999px) {
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.1s ease;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    nav.active {
        max-height: 350px; /* достаточно для 6 пунктов */
        padding: 15px 0;
    }
    .burger {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* Скрыть оригинальное меню в десктопном виде */
/*
    .wrp_block {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
*/
}

/* Мобильная версия: < 1040px */
@media (max-width: 1039px) {
    .wrp_block {
        padding: 15px 20px;
  }
}




















main {
    flex: 1; /* Это заставляет main занимать всё доступное пространство */
/*    padding: 20px 0;*/
    margin-top: 100px;
}
.main_block_content {
    width: 100%;
    text-align: center;
}
.main_block_content section {
    width: 100%;
}
.main_block_content section:nth-child(2n) {
    background-color: #0004ff0f;
}
.main_block_content section .wrp_block {
    padding: 100px 0;
}

h1, h2 {
    font-size: 2.6em;
    font-weight: 500;
    color: #000000a1;
    margin-bottom: 50px;
}










#block_catalog {
    margin-bottom: 50px;
}
#block_catalog div {
  width: 235px;
  vertical-align: middle;
  border-radius: 10px;
  display: inline-block;
  margin: 2px;
  text-align: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
#block_catalog div img {
  width: 100%;
  border-radius: inherit;
  height: auto;
  transition: transform 0.3s ease;
}
#block_catalog div h3 {
  position: absolute;
  bottom: 0;
  margin: 0 auto;
  text-align: center;
  width: 100%;
  background-color: #14009da6;
  padding: 10px 0;
  border-radius: 0 0 10px 10px;
  color: #fff;
  font-weight: 400;
  font-size: 1.1em;
}
#block_catalog div:hover img {
    transform: scale(1.1);
}

















.list_articles {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.list_articles figure {
  height: 100%;
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50%;
  margin-bottom: 20px;
  border-radius: 10px;
}
.preview_news figure, .blocks_articles figure {
    width: 33%;
    height: 200px;
}
.preview_test_drive figure {
    width: 49%;
    height: 300px;
}
.preview_reviews figure {
    width: 24%;
    height: 300px;
}
.list_articles div {
  height: 100%;
  background: #0000005c;
  border-radius: 10px;
}
.list_articles div section {
  position: absolute;
  bottom: 10px;
  left: 13px;
  text-align: left;
    width: 90%;
}
.list_articles div section span {
  color: #fff;
  font-size: 14px;
}
.list_articles figure div h3 {
  font: inherit;
    font-weight: inherit;
    font-size: inherit;
  color: #fff;
}






















footer {
    background-color: #002334;
    padding: 20px 0;
}

footer .wrp_block div {
  display: inline-block;
  margin: 0 80px 30px 0;
}
footer .wrp_block div {
    vertical-align: top;
}
footer .wrp_block div p {
    color: #828282;
}
footer .wrp_block p {
    color: #fff;
    font-size: 0.8em;
}

footer ul {
    list-style: none;
    color: #ccc;
}

footer ul li {
    margin-top: 8px;
    font-size: 0.9em;
}

footer a {
    color: #ddd;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}





#scrollToTopBtn {
    position: fixed;
    bottom: 40px;
    left: 20px;
    z-index: 999;
    font-size: 24px;
    width: 50px;
    height: 50px;
    background-color: #007cba8c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none; /* Скрыта по умолчанию */
    transition: all 0.3s ease;
}

#scrollToTopBtn:hover {
    background-color: #005a87;
    transform: scale(1.1);
}





.form_auth {
    max-width: 350px;
    width: 100%;
}
.form_auth input, .form_auth button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;   
}
.form_auth button {
    background-color: #007BFF;
    color: white;
    cursor: pointer;
}