/* === БАЗОВЫЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ ТТК === */
body {
  background-color: #f4f4f4;
  font-family: 'Montserrat', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  color: #111;
}

/* === ПОДЛОЖКА === */
.ttk-box {
  background-color: #fff;
  border-radius: 16px;
  padding: 40px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  margin-top: -24px;
}

/* Обёртки */
.ttk-wrapper,
.ttk-single-wrapper,
.recipe-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  box-sizing: border-box;
}

/* Заголовки */
.ttk-page-title,
.ttk-single-wrapper h1,
.recipe-container h2 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

/* Поисковая форма */
.ttk-search-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.ttk-search-input {
  padding: 12px 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

.ttk-search-button {
  padding: 12px 24px;
  background-color: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  height: 48px;
  transition: background-color 0.2s ease;
}
.ttk-search-button:hover {
  background-color: #333;
}

/* Хлебные крошки */
.breadcrumbs,
.ttk-breadcrumbs {
  font-size: 14px;
  margin-bottom: 24px;
  text-align: left;
}
.breadcrumbs a,
.ttk-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.breadcrumbs a:hover,
.ttk-breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs span,
.ttk-breadcrumbs span {
  color: #888;
  font-weight: 600;
}

/* Сетка карточек */
.ttk-folder-grid,
.ttk-recipe-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Карточки */
.ttk-folder,
.ttk-recipe-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s, box-shadow 0.3s;
  color: #111;
  min-height: 180px;
}
.ttk-folder:hover,
.ttk-recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.ttk-folder-title,
.ttk-recipe-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.ttk-folder-desc {
  font-size: 14px;
  color: #444;
  margin-bottom: 16px;
}
.ttk-folder-link {
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  width: fit-content;
}
.ttk-folder-link:hover {
  background-color: #333;
}

/* Рецепт — тип карточки */
.ttk-folder.ttk-recipe,
.ttk-recipe-card {
  border: 2px dashed #999;
  background-color: #fefefe;
}
.ttk-recipe-card .ttk-folder-link {
  background-color: #555;
}

/* Аккордеон */
.toggle-all {
  display: block;
  background-color: #111;
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-bottom: 24px;
}
.toggle-all:hover {
  background-color: #333;
}
.accordion {
  background-color: #d1d1d1;
  color: #000;
  cursor: pointer;
  padding: 14px 18px;
  width: 100%;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 16px;
  transition: background 0.3s;
}
.accordion:hover {
  background-color: #c1c1c1;
}
.panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #fafafa;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 0 18px;
}
.panel.open {
  padding-top: 16px;
  padding-bottom: 16px;
}
.panel p {
  font-size: 15px;
  line-height: 1.6;
}
.panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.panel td {
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 14px;
}

/* Галерея */
.recipe-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}
.recipe-gallery img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}
.recipe-gallery img:hover {
  transform: scale(1.03);
}

/* Обложка */
.recipe-featured-image {
  max-width: 100%;
  margin-bottom: 24px;
  text-align: center;
}
.recipe-featured-image img {
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  height: auto;
}

/* Анимация появления и исчезновения карточек */
.ttk-folder {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ttk-folder.hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

/* Адаптив */
@media (max-width: 768px) {
  .ttk-wrapper,
  .ttk-single-wrapper,
  .recipe-container {
    padding: 24px 16px;
  }

  .ttk-box {
    padding: 32px 16px;
    border-radius: 0;
    margin-top: 24px;
  }

  .ttk-page-title,
  .ttk-single-wrapper h1,
  .recipe-container h2 {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .ttk-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .ttk-folder-title,
  .ttk-recipe-card h3 {
    font-size: 16px;
  }

  .ttk-folder-link {
    font-size: 13px;
    padding: 8px 14px;
  }

  .toggle-all {
    font-size: 15px;
    padding: 12px;
  }

  .accordion {
    font-size: 15px;
    padding: 12px 14px;
  }

  .panel td {
    font-size: 13px;
  }
}