/* === ГЛОБАЛЬНЫЕ НАСТРОЙКИ === */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #f8f1e8;
  color: #333;
}

h1, h2 {
  color: #333;
}

a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #d7000f;
}

/* === ХЕДЕР === */
.main-header {
  background-color: #689F38;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  gap: 20px;
}


.header-left, .header-center, .header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-right img[src*="foodmix-logo.png"] {
  background-color: #fffaf6;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }

.main-logo {
  max-height: 200px;
}

.main-logo-receptures {
  max-height: 50px;
  height: 50px;
  transform: scale(2.1);
  object-fit: contain;
}

.foodmix-logo {
  max-height: 40px;
}

/* === ГЛАВНАЯ === */
.main-home {
  margin: 0;
  background: linear-gradient(to bottom, #689F38 0%, #fae584 30%);
  min-height: calc(100vh - 220px);
  padding: 40px 20px;
  text-align: center;
}

.welcome-section h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.welcome-section p {
  font-size: 1rem;
  color: #555;
}

/* === СЕКЦИИ === */
.section {
  margin: 60px auto;
  padding: 0 20px;
  max-width: 1000px;
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-left: 15px;
}

/* === СЛАЙДЕР === */
.news-slider {
  padding: 40px 0;
  text-align: center;
}

.news-slider .section-title {
  font-size: 32px;
  margin-bottom: 30px;
  color: #222;
  font-weight: bold;
  border: none;
}

.slider {
  position: relative;
  width: 960px;
  height: 300px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slider input[type="radio"] {
  display: none;
}

.slider-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.slider-controls label {
  width: 12px;
  height: 12px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

#btn-1:checked ~ .slider-controls label[for="btn-1"],
#btn-2:checked ~ .slider-controls label[for="btn-2"],
#btn-3:checked ~ .slider-controls label[for="btn-3"] {
  background-color: #333;
}

.slides {
  list-style: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px 30px 20px;
  width: 100%;
  height: 100%;
  background-color: #fdf8f3;
  opacity: 0;
  transform: translateX(-100%);
  transition: all 0.4s ease-in-out;
}

#btn-1:checked ~ .slides .slide:nth-child(1),
#btn-2:checked ~ .slides .slide:nth-child(2),
#btn-3:checked ~ .slides .slide:nth-child(3) {
  transform: translateX(0);
  opacity: 1;
  z-index: 1;
}

.slide-content {
  width: 50%;
  text-align: left;
}

.slide-title {
  font-size: 24px;
  margin-bottom: 10px;
  color: #111;
}

.slide-text {
  font-size: 16px;
  margin-bottom: 15px;
  color: #444;
}

.slide-image {
  width: 48%;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.slide-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* === КАТАЛОГ / ССЫЛКИ === */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.catalog-item {
  background-color: #f9edb6;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recipe-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 0;
  margin: 0 auto;
  max-width: 900px;
  list-style: none;
}

.recipe-links li {
  flex: 0 1 calc(33.333% - 10px);
  background-color: #f9edb6;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

.recipe-links li a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.recipe-links li:hover {
  background-color: #f0de9d;
}

.link-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.link-content img {
  width: 24px;
  height: 24px;
}

.link-content .icon-left {
  order: -1;
}

.link-content .icon-right {
  order: 1;
}


.video-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.video-grid video {
  max-width: 100%;
  width: 400px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* === ФУТЕР === */
.main-footer {
  background-color: #333;
  color: #fff;
  padding: 30px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}
/* === iOS: исправление цвета номеров телефонов в футере === */
.main-footer a[href^="tel"] {
  color: #fff !important;
  text-decoration: none;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-logos {
  display: flex;
  flex-wrap: nowrap;
  gap: 25px;
  align-items: center;
  margin-bottom: 10px;
}

.footer-logos img {
  max-height: 45px;
}

.footer-logos img:first-child {
  max-height: 65px;
}

.footer-logos img[src*="foodmix-logo.png"] {
  background-color: #fffaf6;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.footer-info p {
  margin: 3px 0;
  font-size: 0.9rem;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
}

.footer-right a {
  color: #fff;
  font-size: 0.95rem;
  margin-top: 10px;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 600px) {
  .main-logo {
    max-height: 90px; /* вместо 60px поставь 90 или больше */
    height: auto;
    width: auto;
    margin-top: 10px; /* если хочешь опустить логотип */
  }

  .footer-logos {
    flex-direction: column;
    gap: 15px;
  }
}
@media (max-width: 768px) {
  /* Убираем горизонтальный скролл */
  body {
    overflow-x: hidden;
  }

  .main-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    width: 100%;
    max-width: 100vw;
    background-color: #689F38;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: 30px; /* если хочешь немного опустить логотип */
  }

  /* Скрываем все, кроме центрального логотипа */
  .header-left,
  .header-right {
    display: none !important;
  }

  .header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .main-logo {
    max-height: 90px;
    height: auto;
    width: auto;
    margin-top: 10px; /* дополнительно опускаем, если нужно */
  }
}

@media (max-width: 768px) {
  .recipe-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  .recipe-links li {
    list-style: none;
  }

  .link-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
  }

  .link-content img {
    max-width: 40px;
    height: auto;
    margin-bottom: 5px;
  }

  .link-content span {
    font-size: 14px;
    text-align: center;
  }

  /* Центрируем последнюю плитку, если она одиночная */
  .recipe-links li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 60%; /* можно настроить по вкусу */
  }
}



@media (max-width: 600px) {
  /* Хедер */
  .main-header {
    flex-direction: column;
    padding: 10px 0;
  }

  .header-left,
  .header-center,
  .header-right {
    justify-content: center;
    margin: 5px 0;
  }

  .main-logo {
    max-height: 150px; /* увеличено с 60px */
    height: auto;
    width: auto;
    margin-top: 10px; /* при необходимости можно увеличить */
  }

  .main-logo-receptures {
    transform: scale(1.2);
    height: auto;
  }

  /* Слайдер */
  .slider {
    width: 100%;
    height: 400px; /* добавили минимальную высоту */
    border-radius: 10px;
    position: relative;
  }

  .slides {
    position: relative;
    height: 100%;
  }

  .slide {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
  }

  .slide-content, .slide-image {
    width: 100%;
    text-align: center;
  }

  .slide-image {
    height: auto;
    margin-top: 15px;
  }

  .slide-image img {
    display: none
     /* max-width: 100%;
    height: auto;*/
  }

  .slider-controls {
    bottom: 10px;
  }

  .video-grid video {
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  .news-slider {
    margin-top: 10px; /* или меньше, чтобы сократить расстояние */
  }


  .news-slider .section-title {
    margin-top: 5px;
    margin-bottom: 15px;
  }
}
