/*
  Общие стили для сайта «ХИМРОС». В этом файле собраны основные правила
  оформления, включая цвета, шрифты, отступы и макеты для отдельных
  блоков. Шаблон оптимизирован для настольного браузера, но имеет
  адаптивные свойства благодаря media‑запросам.
*/

/* Базовые переменные цветов */
:root {
  --primary-color: #0e93d5; /* основной синий оттенок */
  --secondary-color: #f5f9fc; /* светлый фон для блоков */
  --accent-color: #ffffff; /* белый цвет */
  --text-color: #333333; /* основной цвет текста */
  --footer-bg: #003d6a; /* темно-синий для футера */
  --grey-bg: #efefef; /* светло‑серый для форм */
  --page-gutter: clamp(24px, 4vw, 48px); /* единый боковой отступ */
}

/* Общие параметры */
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* Верхняя полоса с контактной информацией */
.top-bar {
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 0.875rem;
}
.top-bar .contact-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  flex-wrap: wrap;
}
.top-bar .separator {
  opacity: 0.6;
}

/* Шапка */
.header {
  background: var(--accent-color);
  border-bottom: 1px solid #ddd;
}
.header .container {
  padding-inline: clamp(36px, 7vw, 120px);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(220px, max-content) auto;
  align-items: center;
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  padding: 1.35rem 0 1rem;
}
.logo {
  display: flex;
  flex-direction: column;
}
.logo-name {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}
.logo-tagline {
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-color);
}
.contact-info {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-self: end;
  width: auto;
}
.contact-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-visual-icon {
  width: 64px;
  height: 64px;
  stroke: #6cc6f0;
  stroke-width: 2.2;
  fill: #3ba8df;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 260px;
}
.contact-link,
.contact-text {
  color: #8a8a8a;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
}
.contact-link:hover {
  color: var(--primary-color);
}

/* Основное меню */
.main-nav {
  grid-column: 1 / -1;
  width: 100%;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.nav-item {
  position: relative;
}
.nav-item > a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.5rem;
  display: block;
  transition: color 0.2s ease;
}
.nav-item > a:hover {
  color: var(--primary-color);
  background: var(--grey-bg);
}

/* Выпадающее меню */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1000;
}
.dropdown ul {
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
}
.dropdown li a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}
.dropdown li a:hover {
  background: var(--secondary-color);
}
.nav-item:hover .dropdown {
  display: block;
}

/* Слайдер */
.slider {
  background: linear-gradient(135deg, #b9dff6, #e8f3fc);
  padding: 3rem 0;
  text-align: center;
  color: var(--primary-color);
}
.slide {
  max-width: 1200px;
  margin: 0 auto;
}
.slider h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: bold;
}
.slider p {
  margin-top: 1rem;
  font-size: 1.25rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* О компании */
.about {
  padding: 3rem 0;
}
.about-inner {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.about-text {
  flex: 1 1 60%;
}
.about-text h2 {
  margin-top: 0;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}
.about-text p {
  margin: 0;
  text-align: justify;
}
.about-stats {
  flex: 1 1 30%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-weight: bold;
  border-radius: 50%;
  position: absolute;
}
.stat-large {
  width: 150px;
  height: 150px;
  background: var(--primary-color);
  font-size: 3rem;
  top: 20px;
  left: 30px;
}
.stat-medium {
  width: 110px;
  height: 110px;
  background: #58b8e5;
  font-size: 2rem;
  top: 100px;
  left: 100px;
}
.stat-small {
  width: 70px;
  height: 70px;
  background: #88cdea;
  font-size: 1rem;
  top: 0;
  right: 0;
}

/* Весь ассортимент */
.assortment {
  background: var(--secondary-color);
  padding: 2rem 0;
  text-align: center;
}
.assortment h2 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 2rem;
}
.btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--accent-color);
  padding: 0.75rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}
.btn:hover {
  background: #0c7cb4;
}

/* Популярные категории */
.popular-categories {
  padding: 3rem 0;
}
.popular-categories h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 2rem;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.category {
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--accent-color);
  transition: background 0.3s, color 0.3s;
  cursor: default;
}
.category:hover {
  background: var(--primary-color);
  color: var(--accent-color);
}

/* Бренды */
.brands {
  background: var(--secondary-color);
  padding: 3rem 0;
}
.brands h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 2rem;
}
.brands-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.brand {
  background: var(--accent-color);
  border: 1px solid #ddd;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
}

/* Новинки */
.new-products {
  padding: 3rem 0;
}
.new-products h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 2rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.product-item {
  height: 200px;
  background: #d9eaf5;
  border-radius: 6px;
}

/* Контрактное производство */
.contract-production {
  background: var(--secondary-color);
  padding: 3rem 0;
  text-align: center;
}
.contract-production h2 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.contract-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.contract-form input {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  min-width: 200px;
}
.contract-form button {
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: var(--accent-color);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.contract-form button:hover {
  background: #0c7cb4;
}

/* Новости */
.news {
  padding: 3rem 0;
}
.news h2 {
  text-align: center;
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 2rem;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.news-item {
  height: 200px;
  background: #d9eaf5;
  border-radius: 6px;
}

/* Форма обратной связи службы заботы */
.care-form {
  background: var(--grey-bg);
  padding: 3rem 0;
}
.care-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.care-text {
  flex: 1 1 50%;
  color: var(--primary-color);
}
.care-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}
.care-subtitle {
  font-style: italic;
  margin-top: 0.5rem;
}
.care-contact-form {
  flex: 1 1 40%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.care-contact-form input {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  flex: 1 1 200px;
}
.care-contact-form button {
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: var(--accent-color);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.care-contact-form button:hover {
  background: #0c7cb4;
}

/* Отзывы */
.reviews {
  padding: 3rem 0;
}
.reviews h2 {
  text-align: center;
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 2rem;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.review-item {
  height: 200px;
  background: #d9eaf5;
  border-radius: 6px;
}

/* Футер */
.footer {
  background: var(--footer-bg);
  color: var(--accent-color);
  padding: 3rem 0;
  margin-top: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-col {
  flex: 1 1 200px;
}
.footer-col h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-color);
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 0.25rem;
}
.footer-col a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-col a:hover {
  text-decoration: underline;
}
.footer-logo {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

/* Адаптивные стили */
@media (max-width: 768px) {
  .header .container {
    padding-inline: var(--page-gutter);
  }
  .header-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .contact-details {
    min-width: 0;
  }
  .contact-info {
    align-items: flex-start;
    justify-self: start;
  }
  .about-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .about-stats {
    margin-top: 2rem;
    height: 200px;
  }
  .main-nav {
    margin-top: 1rem;
  }
  .nav-list {
    justify-content: center;
  }
  .contract-form,
  .care-contact-form {
    justify-content: center;
  }
  .care-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .care-contact-form {
    width: 100%;
  }
  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
}
