body { 
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #F0EADB;
}


/* --- HEADER --- */
header {
  background-color: #F0EADB;
  text-align: center;
  padding: 10px 0;
}

header h1 {
  font-family: 'Shrikhand', cursive;
  color: #8a9a76;
  font-size: 45px;
  margin: 0;
}

header p {
  font-size: 14px;
  color: #8f8b80;
  margin-top: 1px;
  letter-spacing: 5px;
}

/* --- NAV --- */
nav {
  background-color: #d9d4c2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px 60px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* --- MENU --- */
.menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  white-space: nowrap;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
  flex-wrap: nowrap;
  justify-content: center;
}

.menu ul li {
  position: relative;
  display: inline-block;
}

.menu ul li a {
  text-decoration: none;
  color: #3b2f22;
  font-weight: 500;
  font-size: 22px;
  transition: color 0.3s;
  cursor: pointer;
}

.menu ul li a:hover {
  color: #8a9a76;
}

/* --- Випадаючі меню --- */
.menu ul li ul {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f5f1e9;
  padding: 10px 0;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  transition-delay: 0.2s;
  white-space: nowrap;
  z-index: 10;
  display: block;
}

.menu ul li ul li {
  display: block;
  text-align: left;
  padding: 4px 20px;
}

.menu ul li:hover ul {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.1s;
}

.menu ul li ul:hover {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.4s;
}

.menu ul li ul li a {
  color: #3b2f22;
  display: block;
  padding: 4px 8px;
  font-size: 16px;
}

.menu ul li ul li a:hover {
  color: #8a9a76;
}

/* --- Пошук --- */
.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  position: relative;
}

.search input[type="text"] {
  padding: 6px 10px;
  border: 2px solid #5c4b36;
  border-radius: 20px;
  outline: none;
  width: 20vw;
  min-width: 140px;
  max-width: 280px;
  transition: width 0.3s ease;
}

.search-icon {
  display: none;
  font-size: 20px;
  color: #3b2f22;
  cursor: pointer;
  margin-left: auto;
}

#toggle-search {
  display: none;
}

/* --- Адаптив під 950px --- */
@media (max-width: 950px) {
  .search input[type="text"] {
    display: none;
  }

  .search-icon {
    display: block;
  }

  #toggle-search:checked + .search-icon + input[type="text"] {
    display: block;
    position: absolute;
    right: 0;
    top: 35px;
    background: #f5f1e9;
    border: 2px solid #5c4b36;
    border-radius: 20px;
    padding: 6px 10px;
    width: 60vw;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease;
  }

  .menu ul {
    flex-wrap: nowrap;
    gap: 30px;
  }
}

/* --- Анімація --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Контент секції --- */
main {
  padding: 40px;
  text-align: center;
}

.content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.content.active {
  display: block;
}

.content h2 {
  color: #5c4b36;
  font-size: 32px;
  margin-bottom: 10px;
}

.content p {
  color: #3b2f22;
  font-size: 10px;
  letter-spacing: 10px;
}

/* --- Мобільна версія --- */
@media (max-width: 950px) {
  nav {
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
  }

  .menu {
    position: static;
    transform: none;
    width: 100%;
  }

  .menu ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .menu ul li {
    display: block;
    text-align: center;
  }

  .menu ul li ul {
    position: static;
    background: #f5f1e9;
    box-shadow: none;
    padding: 5px 0;
    border-radius: 6px;
    display: none;
  }

  .menu ul li.show > ul {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  /* Вимикаємо hover на мобільних */
  .menu ul li:hover ul {
    opacity: 0;
    visibility: hidden;
  }
}

/* --- Мобільне підменю (овальні кнопки) --- */
.mobile-submenu {
  display: none;
  text-align: center;
  padding: 10px 15px;
  background-color: #f0eadb;
  animation: fadeIn 0.3s ease;
}

@media (max-width: 950px) {
  .mobile-submenu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .submenu-btn {
    background-color: #8a9a76;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .submenu-btn:hover {
    background-color: #728462;
  }
}

/* --- Бургер меню --- */
.burger {
  display: none;
  font-size: 30px;
  cursor: pointer;
  color: #3b2f22;
  margin-left: auto;
  user-select: none;
}

@media (max-width: 950px) {
  nav {
    justify-content: space-between;
    padding: 10px 20px;
  }

  .burger {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: #d9d4c2;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #8a9a76;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
  }

  .menu.show {
    display: flex;
  }

  .menu ul {
    flex-direction: column;
    gap: 15px;
  }

  .menu ul li ul {
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
  }

  .menu ul li:hover ul {
    opacity: 1;
    visibility: visible;
    position: static;
  }

  .menu ul li a {
    font-size: 20px;
  }

  .search {
    display: none;
  }

  /* Кнопки підменю */
  .mobile-submenu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
    gap: 30px;
    background-color: #f0eadb;
  }

  .submenu-btn {
    background-color: #8a9a76;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .submenu-btn:hover {
    background-color: #728462;
  }
}
/* --- мобільне підменю за замовчуванням --- */
.mobile-submenu {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background-color: #f3f0e6;
}

/* --- показуємо тільки на мобільних --- */
@media (max-width: 768px) {
  .mobile-submenu {
    display: flex;
  }
}
/* Ефект згортання підменю при кліку */
.menu ul li ul.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

/* Ефект згортання підменю при кліку */
.menu ul li ul.fade-out {
  animation: fadeOut 0.3s ease forwards;
  transform-origin: top center;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    pointer-events: none;
  }
  to {
    opacity: 0;
    pointer-events: none;
  }
}

.menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background-color: #dcd6c9;
  padding: 10px 0;
  margin: 0;
}

.menu ul li {
  position: relative;
}

.menu ul li a {
  text-decoration: none;
  color: #3c3c3b;
  font-weight: 500;
  font-size: 18px;
  transition: color 0.3s ease;
}

.menu ul li a:hover {
  color: #7c8c67;
}

/* Підменю */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #f6f1e9;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-width: 160px;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 10px 0;
  z-index: 100;
}

/* Показ при наведенні */
.has-submenu:hover .submenu {
  display: block;
  opacity: 1;
}

/* Стиль елементів підменю */
.submenu li {
  padding: 8px 16px;
}

.submenu li a {
  color: #3c3c3b;
  font-size: 16px;
  text-decoration: none;
  display: block;
}

.submenu li a:hover {
  color: #7c8c67;
}

/* Ефект згортання */
.submenu.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    pointer-events: none;
  }
  to {
    opacity: 0;
    pointer-events: none;
  }
}
/* --- СТИЛЬ ДЛЯ ЗАГОЛОВКІВ У КОНТЕНТІ --- */
main h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 450;
  font-size: 50px;
  color: #3b2f22;
  margin-top: 1px;
  margin-bottom: 15px;
  text-transform: capitalize;
}

main p {
  font-family: 'Poppins', sans-serif;
  color: #3b2f22;
  font-size: 14px;
  line-height: 1;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 картки в ряд */
  gap: 25px;
  margin-top: 30px;
}

.recipe-card {
  background-color: #d9d4c2;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  width: 100%;
}

.recipe-card:hover {
  transform: translateY(-5px);
}

.recipe-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-bottom: 3px solid #8a9a76;
}

.recipe-card p {
  font-family: 'Poppins', sans-serif;
  color: #3b2f22;
  font-weight: 500;
  padding: 12px;
  font-size: 16px;
}