/* переменные - базовый цвет */
:root {
  --primary-color: #f0f0f0;
  --secondary-color: #87ceeb;
  --text-color: #333;
}

/* Контрольный "ноль" для стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: var(--primary-color);
  line-height: 1.6;
}


.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Шапка */
.header {
  background-color: var(--secondary-color);
  padding: 10px 0;
}

.logo {
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

.logo__image {
  max-width: 100%;
  height: auto;
  aspect-ratio: 10 / 3;
}

/* Бургер-меню */
.menu__toggle {
  display: none;
  position: relative;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000; /* Чтобы кнопка была выше других элементов */
}

.menu__toggle::before,
.menu__toggle::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

.menu__toggle::before {
  top: 0;
}

.menu__toggle::after {
  bottom: 0;
}

.menu__toggle span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

/* Анимация при активации */
.menu__toggle.active::before {
  top: 50%;
  transform: rotate(45deg);
}

.menu__toggle.active::after {
  bottom: 50%;
  transform: rotate(-45deg);
}

.menu__toggle.active span {
  opacity: 0; /* Скрываем среднюю полоску */
}

.menu__list {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
}

.menu__link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.menu__link:hover {
  color: #222;
}

/* Основной контент */
.main {
  padding: 20px 0;
}

.content__title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--secondary-color);
}

.content__text {
  margin-bottom: 20px;
  text-align: justify;
}

.content__images {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.content__image {
  max-width: 340px;
  height: auto;
  margin-bottom: 10px;
}

.button {
  display: block;
  margin: 0 auto;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-decoration: none;
  text-align: center;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #6cb9e6;
}

/* Каталог */
.catalog__title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  color: var(--secondary-color);
}

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

.card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.card__content {
  padding: 15px;
}

.card__author {
  font-size: 1rem;
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.card__title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.card__genre {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.card__description {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
}

/* Адаптивность каталога */
@media (max-width: 1199px) {
  .catalog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .catalog__grid {
    grid-template-columns: 1fr;
  }
}

/* Страница "О нас" */
.about__title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  color: var(--secondary-color);
}

.about__text {
  margin-bottom: 20px;
  text-align: justify;
  font-size: 1rem;
  line-height: 1.6;
}

.about__subtitle {
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 1.5rem;
  text-align: center;
  color: var(--secondary-color);
}

/* Форма обратной связи */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-form__group {
  margin-bottom: 15px;
}

.contact-form__label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.button {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-align: center;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #6cb9e6;
}

/* Подвал */
.footer {
  background-color: var(--secondary-color);
  padding: 20px 0;
}

.footer .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* Адаптивность подвала */
@media (max-width: 767px) {
  .footer .container {
    flex-direction: column;
  }
}

.footer__block {
  margin-bottom: 20px;
}

.footer__title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.footer__text {
  font-size: 0.9rem;
  color: #222;
}

.footer__social {
  list-style: none;
  padding: 0;
}

.footer__social-link {
  display: block;
  margin-bottom: 5px;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__social-link:hover {
  color: #222;
}

/* Адаптивность меню */
@media (max-width: 1199px) {
  .menu__list {
    gap: 15px;
  }
}

@media (max-width: 767px) {
  .menu__toggle {
    display: block;
  }

  .menu__list {
    display: none;
    flex-direction: column;
    align-items: center;
  }

  .menu__list.active {
    display: flex;
  }
}