/*
 * Cookyt WorkDo-inspired theme layer (SITE_THEME=workdo).
 * Только стили tailwind-совместимые поверх site.css. Без копирования ассетов макета.
 * Rollback: SITE_THEME=classic + перезапуск (home_workdo.html не используется).
 */
:root {
  --wd-orange: #fb923c;
  --wd-orange-deep: #f97316;
  --wd-orange-dark: #ea7a23;
  --wd-soft: #fff4e6;
  --wd-ink: #1f2937;
  --wd-muted: #64748b;
  --wd-line: rgba(15, 23, 42, .08);
}

/* Хедер: белый, аккуратно вмещаем элементы */
.site-header-inner { padding-top: 5px; padding-bottom: 5px; gap: 26px; }
.site-header-search { background: var(--wd-soft); }
.site-header-channel { background: var(--wd-soft); color: var(--wd-ink); }
.site-header-actions { display: flex; align-items: center; gap: 10px; }

/* Иконки Flaticon: выравнивание по центру текста */
.fi.fi-rr { position: relative; top: 2px; }
.site-header-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: var(--wd-soft); color: var(--wd-ink); font-size: 18px; text-decoration: none; transition: background .15s; }
.site-header-icon:hover { background: #ffecd6; }
.site-header-search-mob { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: var(--wd-soft); color: var(--wd-ink); font-size: 18px; text-decoration: none; }
.site-header-search-mob:hover { background: #ffecd6; }
.site-header-auth { display: inline-flex !important; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 14px; background: var(--wd-orange-deep); color: #fff !important; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.site-header-auth:hover { background: var(--wd-orange-dark); color: #fff !important; }
.site-header-search:hover, .site-header-channel:hover { background: #ffecd6; }
.site-header-nav > a:not(.site-header-search):hover,
.site-header-logo { color: #1f2937; }

/* Глобальный line-height и футер к контенту */
body { line-height: 1.5; }
main > section:last-of-type { padding-bottom: 2rem; }

/* Акценты: светлый оранжевый вместо зелёного/жёлтого */
.text-brand { color: var(--wd-orange-deep) !important; }
a { color: #334155; }
a:hover { color: var(--wd-orange-deep); }
.wd-eyebrow { color: var(--wd-orange-deep); font-weight: 600; letter-spacing: .02em; }
b, strong { color: var(--wd-ink); }
.text-wdmuted { color: var(--wd-muted); }

/* ===== Главная (home_workdo.html) ===== */
.wd-page { color: var(--wd-ink); }
.wd-page h1, .wd-page h2, .wd-page h3 { color: var(--wd-ink); }

.wd-hero { background: #fff; }
.wd-hero-left { min-width: 0; }
.wd-hero h1 { max-width: 16ch; }
.wd-search { width: 100%; border: 2px solid var(--wd-orange); background: #fff; box-shadow: 0 12px 34px rgba(23,37,29,.06); }
.wd-search input { border: 0; background: transparent; }
.wd-topics { width: 100%; margin-top: .75rem; }
.wd-hero-pic { border-radius: 18px 18px 80px 18px; overflow: hidden; }
@media (min-width: 1024px) {
  /* Поиск выходит до середины правой фото-колонки, теги впритык к нему */
  .wd-hero .wd-search { width: calc(100% + 42%); max-width: none; }
  .wd-hero .wd-topics { width: calc(100% + 42%); max-width: none; }
}
@media (max-width: 1023px) { .wd-hero-pic { display: none; } }
.wd-btn-cta { color: #fff; background: var(--wd-orange-deep); border: 0; cursor: pointer; transition: background .18s ease; }
.wd-btn-cta:hover { color: #fff; background: var(--wd-orange-dark); }

/* Теги под поиском: плотно, разные неяркие фоны */
.wd-topics { gap: .5rem; margin-top: .75rem; }
.wd-topics > span { white-space: nowrap; color: var(--wd-muted); font-size: .9rem; }
.wd-tag { border-radius: 999px; color: #334155; padding: .45rem .85rem; font-size: .9rem; }
.wd-tag[data-tag="0"] { background: #fff1e0; }
.wd-tag[data-tag="1"] { background: #fdeee2; }
.wd-tag[data-tag="2"] { background: #f7eee8; }
.wd-tag[data-tag="3"] { background: #fbe8e0; }
.wd-tag[data-tag="4"] { background: #f5ede2; }
.wd-tag[data-tag="5"] { background: #fdeedd; }
.wd-tag[data-tag="6"] { background: #f6eae0; }
.wd-tag[data-tag="7"] { background: #fdeee6; }
.wd-tag[data-tag="8"] { background: #f8ece2; }
.wd-tag:hover { background: #ffdcc0; }
.wd-tag-lg { font-weight: 500; }

/* Полоса каналов */
.wd-strip { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #fcd9b8 transparent; }
.wd-strip::-webkit-scrollbar { height: 8px; }
.wd-strip::-webkit-scrollbar-thumb { background: #fcd9b8; border-radius: 999px; }
.wd-scroll-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #e2e8f0; border-radius: 12px; color: #334155; background: #fff; cursor: pointer; }
.wd-scroll-btn:hover { background: var(--wd-soft); color: var(--wd-orange-deep); }
.wd-channel-row { flex-shrink: 0; width: 250px; }
.wd-channel-item { border: 1px solid #e5e7eb; background: #fff; transition: background .18s ease; }
.wd-channel-item:hover { background: var(--wd-soft); }
.wd-channel-logo { border: 1px solid #e2e8f0; }
.wd-channel-name { color: var(--wd-ink); font-size: 14px; font-weight: 600; }
.wd-channel-strip small { color: var(--wd-muted); }
.wd-seo-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }

/* Карточка рецепта: тень, скругления, категория на фото слева сверху.
   Стили заданы и через .recipe-card, чтобы распространялись на все страницы темы. */
.recipe-card { border: 1px solid #eef0f2; }
.recipe-card .wd-thumb-wrap,
.recipe-card > a > div:first-child,
.recipe-card .aspect-video { border-radius: 16px; background: #f7f3ec; }
.wd-card, .recipe-card { background: #fff; box-shadow: 0 6px 24px rgba(23,37,29,.06); transition: box-shadow .18s ease, transform .18s ease; }
.wd-card:hover, .recipe-card:hover { box-shadow: 0 16px 40px rgba(23,37,29,.13); }
.wd-card { height: 100%; }
.wd-thumb-wrap { position: relative; background: #f7f3ec; }
.wd-card-title, .recipe-card h2 { color: var(--wd-ink); font-size: 16px !important; font-weight: 600 !important; line-height: 1.3 !important; transition: color .18s ease; }
.wd-card:hover .wd-card-title, .recipe-card:hover h2 { color: var(--wd-orange-deep); }
.wd-card-channel { display: inline-flex; align-items: center; gap: 6px; color: #6b7280; font-size: 13px !important; font-weight: 400 !important; background: #f1f2f4; padding: 2px 8px; border-radius: 999px; }
.wd-card p[class*="text-wdmuted"],
.recipe-card p { color: var(--wd-muted); font-size: 13px !important; font-weight: 400 !important; line-height: 1.45 !important; }
.wd-badge-on-photo { position: absolute; top: 10px; left: 10px; z-index: 2; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 400; line-height: 1.4; padding: 4px 9px; border-radius: 6px; }

/* Новые рецепты: сетка 4 колонки; на моб все как мини-карточки */
@media (max-width: 639px) {
  .wd-grid { grid-template-columns: 1fr; }
  .wd-grid > div .wd-card > a { display: flex; align-items: center; gap: 12px; }
  .wd-grid > div .wd-thumb-wrap { width: 96px; height: 96px; flex-shrink: 0; border-radius: 12px; min-height: auto; }
  .wd-grid > div .wd-thumb-wrap img { border-radius: 12px; }
  .wd-grid > div .wd-badge-on-photo { display: none; }
  .wd-grid > div .wd-card > a > .p-4 { flex: 1; padding: 0; }
  .wd-grid > div .wd-card-channel { display: none; }
  .wd-grid > div .wd-card-title { margin-top: 0; font-size: 14px; font-weight: 600; }
  .wd-grid > div .wd-card p.text-wdmuted { display: none; }
  .wd-grid > div .wd-card { box-shadow: none; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
}

/* Рецепт дня */
.wd-day-of-week { background: linear-gradient(140deg, var(--wd-soft) 0%, #fff 100%); }
.wd-day-of-week .wd-card { background: #fff; }
.wd-day-channel { border: 1px solid #e5e7eb; background: #fff; transition: background .18s ease, transform .18s ease; color: var(--wd-ink); }
.wd-day-channel:hover { background: var(--wd-soft); transform: translateY(-2px); }
.wd-day-channel small { color: var(--wd-muted); }

/* Категории: цвет + иконка */
.wd-category { border: 1px solid #e5e7eb; background: #fff; color: var(--wd-ink); transition: box-shadow .18s ease, background .18s ease; }
.wd-category:hover { background: var(--wd-soft); box-shadow: 0 10px 26px rgba(23,37,29,.08); }
.wd-cat-ico { display: grid; width: 42px; height: 42px; flex-shrink: 0; place-items: center; border-radius: .5rem; font-size: 20px; border: 1px solid rgba(15,23,42,.06); color: var(--wd-ink); }
.wd-cat-ico i { font-style: normal; color: var(--wd-ink); }
.wd-cat-hero { width: 100%; max-width: 160px; }
.wd-cat-hero i { font-style: normal; }

/* Карточка канала на странице /channels */
.wd-channel-card:hover b { color: var(--wd-orange-deep); }

@media (max-width: 640px) {
  .wd-search { border-width: 1px; border-radius: 12px; }
  .wd-hero-pic { border-radius: 12px 12px 36px 12px; }
  .wd-card, .wd-card > a > div:first-child { border-radius: 12px; }
}

/* Хедер: плавающий (sticky), без зелёной полосы, отступы 5px */
.site-main-header { border-top: none !important; position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.88) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header-inner { min-height: 0; padding-top: 5px; padding-bottom: 5px; }
.wd-mob-burger { display: none; }

/* Мобильное меню — вынесено из шапки в body, z-index максимальный,
   чтобы быть поверх ВСЕХ слоёв и sticky/фиксированных элементов страниц */
.wd-mob-overlay { position: fixed !important; inset: 0; z-index: 100002 !important; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.wd-mob-overlay.open { opacity: 1; pointer-events: auto; }
.wd-mob-menu { position: fixed !important; inset: 0 33% 0 0; z-index: 100003 !important; background: #fff; transform: translateX(-100%); transition: transform .28s ease; overflow-y: auto; display: flex; flex-direction: column; padding: 20px; box-shadow: 8px 0 32px rgba(15,23,42,.15); }
.wd-mob-menu.open { transform: translateX(0); }
.wd-mob-close { align-self: flex-end; display: grid; width: 40px; height: 40px; place-items: center; border: 0; background: none; cursor: pointer; font-size: 22px; color: #64748b; }
.wd-mob-links { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.wd-mob-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; color: #334155; text-decoration: none; transition: background .15s ease; }
.wd-mob-link:hover, .wd-mob-link.active { background: #fff4e6; color: var(--wd-orange-deep); }
.wd-mob-link i { width: 24px; text-align: center; font-size: 18px; }

@media (max-width: 980px) {
  .site-main-header .site-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 8px; padding: 5px 16px; }
  .site-main-header .site-header-logo { flex-shrink: 0; }
  .site-main-header .site-header-logo b { font-size: 18px; }
  .site-main-header .site-header-logo img { width: 36px; height: 36px; }
  .site-main-header .site-header-nav { display: none; }
  .site-main-header .site-header-actions { display: flex; align-items: center; gap: 6px; }
  .site-main-header .site-header-search-mob { display: inline-flex; }
  .site-main-header .site-header-auth { display: none !important; }
  .site-main-header .site-header-icon { width: 40px; height: 40px; border-radius: 12px; }
  .site-main-header .site-header-search-mob { width: 40px; height: 40px; border-radius: 12px; }
  .wd-mob-burger { display: grid !important; width: 40px; height: 40px; place-items: center; border: 0; background: none; cursor: pointer; }
  .wd-mob-burger i { font-size: 22px; color: var(--wd-ink); }
}

/* Футер: весь шрифт 13px */
body > footer,
body > footer * { font-size: 13px !important; }
body > footer h2,
body > footer b,
body > footer .text-ink,
body > footer .text-lg { font-size: 14px !important; }

/* Поиск */
.wd-search { position: relative; }
#home-search { scroll-margin-top: 110px; }

/* Страница рецепта */
.wd-recipe-hero { border-radius: 20px; }
.wd-recipe-hero img,
.wd-recipe-hero iframe { border-radius: 20px; }
.wd-slide { scroll-snap-align: start; }
.wd-mini { border: 1px solid #eef0f2; }
.wd-mini:hover { border-color: #e5e7eb; box-shadow: 0 10px 30px rgba(23,37,29,.08); }
.wd-mini .wd-thumb-wrap { border-radius: 10px; }
.wd-mini .wd-card-channel { background: #f5f6f8; }
/* Карточки рецептов: на мобильных горизонтально — фото 1/3, контент 2/3 */
@media (max-width: 640px) {
  .recipe-card.wd-card { display: flex; flex-direction: row; align-items: stretch; border-radius: 14px; border: 1px solid var(--wd-line); gap: 0; }
  .recipe-card.wd-card > a.block { flex-shrink: 0; width: 33.33%; }
  .recipe-card.wd-card .wd-thumb-wrap { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 14px 0 0 14px; }
  .recipe-card.wd-card .wd-thumb-wrap img { border-radius: 14px 0 0 14px; height: 100%; }
  .recipe-card.wd-card .p-4 { flex: 1; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .recipe-card.wd-card .wd-card-channel { font-size: 11px; margin-bottom: 2px; }
  .recipe-card.wd-card .wd-card-title { font-size: 14px !important; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .recipe-card.wd-card .text-sm.text-wdmuted { font-size: 11px !important; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}


/* Шаги рецепта: чекбокс с галочкой */
.wd-step-check span { transition: all .18s ease; }
.wd-step-check input:checked + span { background: var(--wd-orange-deep); border-color: var(--wd-orange-deep); color: #fff; }
.wd-step-check input:checked + span i { display: block; }

/* Блог и статьи */
.wd-post-card { border: 1px solid var(--wd-line); border-radius: 18px; padding: 16px; background: #fff; transition: box-shadow .18s ease, border-color .18s ease; }
.wd-post-card:hover { border-color: #e5e7eb; box-shadow: 0 12px 32px rgba(23,37,29,.07); }
.wd-post-thumb { max-width: 100%; }
.wd-article .wd-eyebrow { margin-bottom: .75rem; }

/* Читаемые тексты (страницы, статьи) */
.wd-prose { color: #374151; }
.wd-prose h2 { font-size: 1.6rem; font-weight: 600; color: var(--wd-ink); margin: 1.6rem 0 .6rem; }
.wd-prose h3 { font-size: 1.25rem; font-weight: 600; color: var(--wd-ink); margin: 1.4rem 0 .5rem; }
.wd-prose p { margin: 0 0 1rem; line-height: 1.7; }
.wd-prose ul, .wd-prose ol { margin: 0 0 1rem 1.2rem; line-height: 1.7; }
.wd-prose li { margin-bottom: .35rem; }
.wd-prose a { color: var(--wd-orange-deep); text-decoration: underline; }
.wd-prose img { border-radius: 14px; }
