/* Основные стили по БЭМ методологии для главной страницы */

/* ===== VARIABLES ===== */
:root {
  --color-primary: #000;
  --color-secondary: #fff;
  --color-accent: red;
  --color-gray: #e6e6e6;
  --color-dark-gray: #7b899a;
  --font-main: "Roboto", sans-serif;
  --font-condensed: "Roboto Condensed", sans-serif;
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: var(--color-secondary);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
}

.page__wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

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

/* ===== HEADER ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  background: var(--color-primary);
  width: 100%;
  top: 0;
  left: 0;
  font-family: var(--font-condensed);
  text-transform: uppercase;
  border-bottom: 3px solid var(--color-secondary);
  z-index: 100;
  padding: 10px 0;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
}

.header__menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-secondary);
  cursor: pointer;
  font-family: inherit;
}

.header__nav {
  display: flex;
  align-items: center;
  align-self: stretch;
}

.header__nav--left > *,
.header__nav--right > * {
  display: flex;
  align-items: center;
  align-self: stretch;
  border-right: 1px solid var(--color-gray);
  padding: 0 20px;
}

.header__nav--left > *:last-child,
.header__nav--right > *:last-child {
  border-right: none;
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__logo-img {
  width: 300px;
}

.header__contacts {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header__contact {
  color: var(--color-secondary) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.header__contact:hover {
  color: var(--color-accent) !important;
}

.header__links {
  display: flex;
  align-items: center;
}

.header__link {
  color: var(--color-secondary) !important;
  text-decoration: none;
  margin-left: 25px;
  transition: color 0.3s ease;
}

.header__link:hover {
  color: var(--color-accent) !important;
}

/* ===== CATALOG MENU ===== */
.catalog {
  position: relative;
}

.catalog__button {
  display: block;
  padding: 29px 20px 29px 65px;
  position: relative;
  user-select: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-secondary);
  font-family: inherit;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.catalog__button:hover {
  background: var(--color-secondary);
  color: var(--color-primary) !important;
}

.catalog__icon {
  position: absolute;
  left: 23px;
  top: 51%;
  transform: translateY(-50%);
  display: block;
  width: 28px;
  height: 2px;
  margin-top: -1px;
  background-color: var(--color-accent);
  transition: all 0.3s ease;
}

.catalog__icon::before,
.catalog__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: inherit;
  transition: all 0.3s ease;
}

.catalog__icon::before {
  transform: translateY(-400%);
}

.catalog__icon::after {
  transform: translateY(400%);
}

.catalog__menu {
  position: fixed;
  width: 100%;
  background: #f7f6f7;
  left: -101%;
  top: 80px;
  box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.33);
  z-index: 30;
  min-height: 400px;
  transition: all 0.2s ease-out;
}

.catalog__menu--open {
  left: 0;
}

.catalog__list {
  list-style: none;
  padding: 22px 5px 20px 70px;
  margin: 0;
}

.catalog__item {
  margin-bottom: 0;
}

.catalog__link {
  text-transform: none;
  font: 500 18px var(--font-main);
  display: inline-block;
  padding-left: 24px;
  margin: 11px 0;
  color: var(--color-primary) !important;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.catalog__link:hover {
  color: var(--color-accent) !important;
}

.catalog__link::after {
  content: "";
  position: absolute;
  height: 22px;
  width: 3px;
  background: var(--color-accent);
  margin-top: -22px;
  margin-left: -10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.catalog__link:hover::after {
  opacity: 1;
}

/* ===== SEARCH ===== */
.search {
  position: relative;
}

.search__toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search__icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 10;
}

.search:hover {
  background: var(--color-secondary) !important;
}

.search:hover .search__icon {
  stroke: var(--color-primary) !important;
}

.search__form {
  position: absolute;
  background: #f7f8fa;
  height: 100%;
  width: 0;
  overflow: hidden;
  top: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.1s ease-out;
}

.search__form--open {
  width: 300px;
  opacity: 1;
  visibility: visible;
}

.search__input {
  border: none;
  width: 210px;
  height: 30px;
  left: 50px;
  display: block;
  position: absolute;
  background-color: transparent;
  top: 50%;
  margin-top: -15px;
  padding: 0 5px;
  font: 500 16px var(--font-main);
}

.search__input:focus {
  outline: none;
}

.search__submit {
  width: 30px;
  height: 30px;
  position: absolute;
  left: 10px;
  top: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin-top: -15px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.search__close {
  width: 15px;
  height: 15px;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"><line x1="1" y1="1" x2="14" y2="14" stroke="%23000" stroke-width="2"/><line x1="1" y1="14" x2="14" y2="1" stroke="%23000" stroke-width="2"/></svg>')
    no-repeat center;
  cursor: pointer;
}

/* ===== MOBILE MENU STYLES ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  z-index: 1000;
  overflow-y: auto;
  transition: left 0.3s ease;
  padding: 20px;
  color: var(--color-secondary);
}

.mobile-menu--open {
  left: 0;
}

.mobile-menu__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-secondary);
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu__catalog {
  margin-top: 50px;
}

.mobile-menu__catalog .catalog__list {
  padding-left: 0;
}

.mobile-menu__catalog .catalog__link {
  color: var(--color-secondary) !important;
  padding-left: 0;
  margin: 15px 0;
  font-size: 18px;
}

.mobile-menu__contacts {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-menu__contacts .header__contact {
  color: var(--color-secondary) !important;
  font-size: 16px;
}

.mobile-menu__links {
  margin-top: 30px;
}

.mobile-menu__links .header__link {
  display: block;
  margin: 15px 0;
  color: var(--color-secondary) !important;
  font-size: 18px;
}

/* Адаптивные стили для мобильного меню */
@media (max-width: 991px) {
  .header__menu-toggle {
    display: block;
  }
  
  .header__nav--left,
  .header__nav--right {
    display: none;
  }
  
  .header__logo {
    margin: 0 auto;
  }
}

/* ===== MAIN CONTENT ===== */
.main {
  flex: 1;
  padding-top: 81px;
}

/* ===== BANNERS ===== */
.banners {
  padding: 30px 0;
}

.banners__container {
  width: 100%;
  max-width: 1950px;
  padding: 0 30px;
  margin: 0 auto;
}

.banners__grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.banners__item {
  padding: 0 15px;
  margin-bottom: 30px;
}

.banners__item--small {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

.banners__item--large {
  flex: 0 0 66.667%;
  max-width: 66.667%;
}

.banners__grid--three .banners__item {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

.banner {
  background: var(--color-primary);
  display: block;
  color: var(--color-secondary);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner:hover {
  text-decoration: none;
  color: var(--color-secondary);
}

.banner__image {
  opacity: 0.66;
  display: block;
  height: 400px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: all 0.3s ease;
}

.banner:hover .banner__image {
  opacity: 0.5;
  transform: scale(1.1);
}

.banner__content {
  position: absolute;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 0 60px 37px;
}

.banner__title {
  font-weight: 300;
  font-size: 30px;
  margin-bottom: 17px;
  transition: all 0.3s ease;
}

.banner:hover .banner__title {
  bottom: 120px;
}

.banner__link {
  opacity: 0;
  display: block;
  font: 500 18px var(--font-condensed);
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.banner__link span {
  display: inline-block;
  border-bottom: 1px solid var(--color-secondary);
}

.banner:hover .banner__link {
  opacity: 1;
  bottom: 77px;
}

.banner::after {
  content: "";
  position: absolute;
  width: 101%;
  height: 101%;
  border: 3px solid var(--color-secondary);
  top: 0;
  left: 0;
  transition: all 0.3s ease;
}

.banner:hover::after {
  width: calc(100% - 80px);
  height: calc(100% - 80px);
}

.banners__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  border-top: 1px solid var(--color-gray);
  border-bottom: 1px solid var(--color-gray);
  margin: 15px;
  font-weight: 700;
  font-size: 30px;
  padding: 0;
  position: relative;
}

.banners__info--center {
  text-align: center;
}

.banners__info-text {
  padding: 0 50px 0;
}

.banners__info--center .banners__info-text {
  width: 100%;
  padding: 0 15px;
}

/* ===== SEO BLOCK ===== */
.seo-block {
  background: #f7f6f7;
  padding: 75px 0 90px;
}

.seo-block__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.seo-block__title {
  font-weight: 500;
  margin-bottom: 20px;
  font-size: 40px;
  text-align: left;
}

.seo-block__content {
  font: 500 18px/1.45em var(--font-main);
}

.seo-block__content p {
  margin-bottom: 20px;
}

/* ===== PAGE CONTACTS ===== */
.page-contacts {
  padding: 15px 10% 15px 10%;
  text-align: center;
  color: var(--color-primary);
  font-size: 22px;
  font-style: italic;
  border-top: solid 2px var(--color-primary);
  border-bottom: solid 2px var(--color-primary);
  margin-bottom: 25px;
  background-color: #e0e6ec;
}

.page-contacts__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-contacts__content p {
  margin-bottom: 10px;
}

.page-contacts__phone {
  color: var(--color-primary);
  text-decoration: none;
}

.page-contacts__phone:hover {
  color: var(--color-accent);
}

/* ===== BUTTON COMPONENT ===== */
.button {
  border: none;
  background: var(--color-primary);
  color: var(--color-secondary);
  text-decoration: none;
  text-transform: uppercase;
  font: 500 18px var(--font-condensed);
  display: inline-block;
  padding: 18px 30px;
  min-width: 235px;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.3s ease;
  text-align: center;
}

.button:focus {
  color: var(--color-accent);
  text-decoration: none;
  outline: none;
}

.button:hover {
  text-decoration: none;
  color: var(--color-primary);
  background: var(--color-secondary);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-primary);
  color: var(--color-secondary);
  padding: 50px 20px 20px;
  font-weight: 100;
}

.footer__container {
  display: flex;
  justify-content: space-between;
}

.footer__grid {
  display: flex;
  justify-content: space-between;
}

.footer__col {
  padding: 0 15px;
  margin-bottom: 20px;
}

.footer__col--center {
  text-align: center;
  max-width: 100%;
}

.footer__section {
  display: inline-block;
  border-left: 1px solid var(--color-secondary);
  padding-left: 39px;
  min-height: 230px;
}

.footer__col--center .footer__section {
  border-left: none;
  padding-left: 0;
  min-height: auto;
}

.footer__title {
  text-transform: uppercase;
  font-size: 18px;
  position: relative;
  margin-top: -4px;
  margin-bottom: 28px;
  font-weight: 400;
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__item {
  margin-bottom: 30px;
}

.footer__link {
  color: var(--color-secondary);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__center {
  text-align: center;
}

.footer__logo {
  display: inline-block;
}

.footer__logo-img {
  width: 300px;
  height: auto;
}

.footer__callback {
  width: 254px;
  position: relative;
  display: block;
  padding: 18px 10px;
  margin: 30px auto 20px;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  background: transparent;
  transition: all 0.3s ease;
}

.footer__callback:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.footer__contacts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__contact-item {
  position: relative;
  margin-bottom: 10px;
}

.footer__contact-text,
.footer__contact-link {
  color: var(--color-secondary);
  text-decoration: none;
  display: block;
}

.footer__contact-link:hover {
  color: var(--color-accent);
}

.footer__bottom {
  display: block;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 310px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__social {
  flex: 1;
}

.social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

.social__item {
  display: inline-block;
}

.social__link {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.social__link:hover {
  color: var(--color-accent);
}

.social__icon {
  margin-left: 5px;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal--open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal__container {
  background: var(--color-secondary);
  position: relative;
  max-width: 630px;
  width: 90%;
  margin: 30px auto;
  padding: 0 15px;
}

.modal__content {
  position: relative;
}

.modal__close {
  width: 14px;
  height: 14px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><line x1="1" y1="1" x2="13" y2="13" stroke="%23000" stroke-width="2"/><line x1="1" y1="13" x2="13" y2="1" stroke="%23000" stroke-width="2"/></svg>')
    no-repeat center;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  z-index: 20000;
  border: none;
  background-color: transparent;
}

.callback-form {
  padding: 20px 30px 30px;
  font: 500 16px var(--font-main);
}

.callback-form__title {
  font: 500 18px var(--font-main);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.callback-form__description {
  margin-bottom: 28px;
}

.callback-form__field {
  margin-bottom: 20px;
}

.callback-form__label {
  margin-bottom: 5px;
  display: block;
}

.callback-form__label span {
  color: var(--color-primary);
}

.callback-form__input {
  width: 100%;
  border: 1px solid #f7f6f7;
  background: #f7f6f7;
  font: 500 18px var(--font-main);
  height: 47px;
  padding: 0 20px;
  transition: all 0.3s ease;
}

.callback-form__input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1);
}

.callback-form__button {
  margin-top: 10px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1199px) {
  .header__logo-img {
    width: 120px;
  }

  .banners__item--small,
  .banners__item--large {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .banners__grid--three .banners__item {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .banner__title {
    font-size: 24px;
  }

  .banners__info-text {
    padding: 0 15px;
  }
}

@media (max-width: 991px) {
  .header__menu-toggle {
    display: block;
  }

  .header__nav--right .header__contact--email {
    display: none;
  }

  .catalog__menu {
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    background: var(--color-secondary);
  }

  .catalog__list {
    padding: 13px 0;
    border: 1px solid var(--color-gray);
  }

  .catalog__link {
    padding-left: 47px;
    font-weight: 400;
    margin: 10px 0;
  }

  .banners__item--small,
  .banners__item--large,
  .banners__grid--three .banners__item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .banner__content {
    padding: 0 30px 25px;
  }

  .banner__image {
    height: 310px;
  }

  .footer__grid {
    flex-direction: column;
  }

  .footer__col {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
  }

  .footer__section {
    border-left: none;
    padding-left: 0;
    min-height: auto;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer__copyright {
    text-align: center;
  }
}

@media (max-width: 767px) {
  .main {
    padding-top: 60px;
  }

  .header {
    height: 60px;
    padding: 5px 0;
  }

  .banners__info {
    font-size: 20px;
    padding: 25px 0;
    margin: 0 0 30px;
  }

  .banners__info span {
    font-size: 24px;
  }

  .seo-block__title {
    font-size: 28px;
  }

  .seo-block__content {
    font-size: 16px;
  }

  .page-contacts {
    font-size: 16px;
    padding: 15px;
  }

  .button {
    padding: 12px 20px;
    min-width: 180px;
    font-size: 16px;
  }
}

@media (max-width: 575px) {
  .header__nav--right .header__contact--phone {
    margin-right: 10px;
    margin-top: 5px;
    font-size: 14px;
  }

  .header__link {
    margin-left: 15px;
    font-size: 14px;
  }

  .search__form--open {
    width: 100%;
    position: fixed;
    height: 60px;
    top: 60px;
    z-index: 100;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
  }

  .banner__content {
    padding: 0 15px 15px;
  }

  .banner__title {
    font-size: 20px;
  }

  .modal__container {
    width: 95%;
    margin: 15px auto;
    padding: 0 10px;
  }

  .callback-form {
    padding: 20px 20px 30px;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.transition {
  transition: all 0.3s ease-out;
}

.reset-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}