/*
Theme Name: BG Receptite
Theme URI: https://bgreceptite.eu
Author: Ivo
Author URI: https://bgreceptite.eu
Description: Топла, домашна WordPress тема за български рецепти — боб, леща, суджук, супи, основни ястия, десерти, категории, архиви, джаджи и социални мрежи.
Version: 2.1.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bgreceptite
Tags: food, recipes, blog, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --bg: #fff8ed;
  --paper: #fffdf7;
  --paper-2: #fff2dc;
  --ink: #2b1a10;
  --muted: #6f594a;
  --brand: #a33b16;
  --brand-2: #d86f2a;
  --green: #4f7d3b;
  --gold: #f2b84b;
  --border: rgba(43, 26, 16, 0.14);
  --shadow: 0 18px 45px rgba(91, 47, 18, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(242, 184, 75, 0.22), transparent 34rem),
    linear-gradient(180deg, var(--bg), #fffdf7 42%, #fff7ea);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--brand); text-decoration: none; }
a:hover, a:focus { color: #73220d; text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 50;
  background: rgba(255, 248, 237, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* Слайдерът не е sticky, за да не покрива публикациите при скрол. */

.topbar {
  background: #2b1a10;
  color: #ffe8c0;
  font-size: 14px;
  padding: 7px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.topbar a { color: #ffe8c0; font-weight: 700; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 230px;
}

.custom-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 10px 25px rgba(91, 47, 18, 0.13);
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 30px;
  box-shadow: 0 12px 28px rgba(163, 59, 22, 0.25);
}

.site-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.site-title a { color: var(--ink); text-decoration: none; }
.site-description { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.nav-toggle {
  display: none;
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.primary-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-navigation a {
  display: inline-flex;
  align-items: center;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
  background: var(--paper-2);
  color: var(--brand);
  text-decoration: none;
}

.header-search {
  padding: 0 0 18px;
}

.header-search-inner {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(91, 47, 18, 0.08);
}

.header-search-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.header-search-copy strong {
  font-size: 17px;
}

.header-search-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.recipe-search-form {
  position: relative;
  width: 100%;
  margin: 0;
}

.recipe-search-form .recipe-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
  pointer-events: none;
}

.recipe-search-form .search-field {
  min-height: 48px;
  padding-left: 48px;
  border-width: 2px;
  border-color: rgba(163, 59, 22, 0.22);
  background: #fff;
}

.recipe-search-form .search-field:focus {
  outline: 3px solid rgba(216, 111, 42, 0.18);
  border-color: var(--brand-2);
}

.recipe-search-form .search-submit {
  flex: 0 0 auto;
  min-width: 104px;
  box-shadow: none;
}


.header-slider {
  background:
    radial-gradient(circle at top right, rgba(216, 111, 42, 0.20), transparent 26rem),
    linear-gradient(135deg, #fffaf1, #fff0dc);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.header-slider-inner {
  position: relative;
}

.header-slider-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.slider-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(91, 47, 18, 0.10);
  font-size: 14px;
  font-weight: 900;
}

.slider-toggle:hover,
.slider-toggle:focus {
  background: var(--brand);
  color: #fff;
}

.header-slider.is-collapsed {
  padding: 12px 0;
}

.header-slider.is-collapsed .header-slider-toggle-wrap {
  margin-bottom: 0;
}

.header-slider.is-collapsed .header-slider-inner {
  display: none;
}

.header-slider-track {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.header-slide {
  display: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 26px;
  align-items: center;
  min-height: 330px;
  padding: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,242,220,0.94)),
    radial-gradient(circle at 80% 10%, rgba(242, 184, 75, 0.35), transparent 22rem);
  border: 1px solid var(--border);
}

.header-slide.is-active {
  display: grid;
}

.header-slide-content h2 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.header-slide-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.header-slide-media {
  min-height: 240px;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.35), transparent 34%),
    linear-gradient(135deg, #f6c260, #b84918);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.header-slide-media span {
  font-size: clamp(80px, 12vw, 140px);
  filter: drop-shadow(0 16px 18px rgba(0,0,0,0.18));
}

.header-slide-media img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.header-slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.slider-control,
.slider-dot {
  box-shadow: none;
}

.slider-control {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.slider-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.slider-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(43, 26, 16, 0.22);
}

.slider-dot.is-active {
  width: 28px;
  background: var(--brand);
}

.hero {
  position: relative;
  padding: clamp(42px, 6vw, 82px) 0 40px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--brand);
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(91, 47, 18, 0.08);
}

.hero h1,
.page-title,
.archive-title,
.entry-title {
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
}

.hero p {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  margin: 0 0 24px;
  max-width: 650px;
}

.hero-actions,
.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(163, 59, 22, 0.2);
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
  color: #fff;
  background: #7f2d10;
  text-decoration: none;
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}
.button.secondary:hover { color: var(--brand); background: var(--paper-2); }

.hero-card {
  background: linear-gradient(160deg, #fff, #fff2dc);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.hero-dish {
  min-height: 360px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, #ffe8b4 0 20%, transparent 21%),
    radial-gradient(circle at 50% 50%, #93441a 0 34%, transparent 35%),
    radial-gradient(circle at 50% 50%, #f5d18b 0 49%, transparent 50%),
    linear-gradient(135deg, #df8f3a, #80330f);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-dish span {
  font-size: clamp(90px, 14vw, 160px);
  filter: drop-shadow(0 16px 18px rgba(0,0,0,0.18));
}

.recipe-meta-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.badge {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.section {
  padding: 44px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p { margin: 6px 0 0; color: var(--muted); }

.recipe-grid,
.category-grid,
.post-grid {
  display: grid;
  gap: 22px;
}

.recipe-grid,
.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recipe-card,
.category-card,
.post-card,
.widget,
.content-box {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(91, 47, 18, 0.08);
}

.recipe-card,
.post-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f6c260, #b84918);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 56px;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3, .post-card h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.card-body p { margin: 0; color: var(--muted); }

.entry-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.category-grid {
  gap: 14px;
}

.category-card {
  padding: 15px 18px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  background: linear-gradient(160deg, #fff, #fff4e2);
}

.category-card strong {
  font-size: 19px;
  line-height: 1.2;
  color: var(--ink);
}

.category-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.category-card span:last-child {
  margin-top: auto;
}

.category-card:hover { transform: translateY(-2px); transition: 0.2s ease; }

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 42px 0;
}


.entry-thumbnail {
  margin-bottom: 24px;
  border-radius: 24px;
  overflow: hidden;
}

.single-recipe-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.single-recipe-main { min-width: 0; }

.single-recipe-side {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recipe-side-card {
  background: linear-gradient(160deg, #fff7eb, #ffffff);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(60, 36, 16, 0.08);
}

.recipe-side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.recipe-info-list {
  display: grid;
  gap: 12px;
}

.recipe-info-list div {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px;
}

.recipe-info-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.recipe-info-list strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.recipe-info-list a { color: var(--brand); }

.recipe-side-note p { margin: 0; color: var(--muted); font-weight: 700; }

.entry-footer { margin-top: 24px; }

.entry,
.page-content,
.archive-header {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow);
}

.entry-title,
.page-title,
.archive-title { margin: 0 0 14px; font-size: clamp(32px, 5vw, 54px); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3 { line-height: 1.15; letter-spacing: -0.02em; }

.entry-content ul,
.entry-content ol { padding-left: 1.3em; }

.entry-content blockquote {
  border-left: 5px solid var(--brand-2);
  background: var(--paper-2);
  margin: 24px 0;
  padding: 18px 22px;
  border-radius: 16px;
}

.recipe-info-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.recipe-info-box div {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  font-weight: 900;
}
.recipe-info-box span { display: block; font-size: 13px; color: var(--muted); font-weight: 800; }

.widget-area { display: flex; flex-direction: column; gap: 18px; }
.widget { padding: 20px; }
.widget-title,
.widget h2,
.widget h3 { margin: 0 0 14px; font-size: 21px; }
.widget ul { margin: 0; padding-left: 18px; }
.widget li + li { margin-top: 8px; }
.widget select,
.widget input[type="search"],
.search-field,
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
}
.search-form { display: flex; gap: 8px; }
.search-form .search-field { min-width: 0; }

.pagination,
.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  align-items: center;
}
.page-numbers,
.nav-links a,
.nav-links span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
}
.page-numbers.current { background: var(--brand); color: #fff; }

.site-footer {
  margin-top: 42px;
  background: #2b1a10;
  color: #ffe8c0;
  padding: 44px 0 0;
}
.site-footer a { color: #fff0d2; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.footer-brand h2 { margin: 0 0 8px; font-size: 28px; }
.footer-brand p { margin: 0; color: #dfc7a2; }
.footer-widget { color: #f6d9ae; }
.footer-widget .widget {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.footer-social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
}
.footer-social a:hover { background: var(--brand-2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 32px;
  padding: 18px 0;
  color: #dfc7a2;
  font-size: 14px;
}
.footer-menu ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }

.comments-area {
  margin-top: 28px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 32px);
}

.wp-caption,
.gallery-caption,
.bypostauthor { max-width: 100%; }
.alignleft { float: left; margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }

@media (max-width: 940px) {
  .hero-grid,
  .header-slide,
  .main-layout,
  .single-recipe-columns,
  .footer-grid { grid-template-columns: 1fr; }
  .single-recipe-side { position: static; }
  .recipe-grid,
  .category-grid,
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle { display: inline-flex; }
  .primary-navigation { display: none; width: 100%; }
  .primary-navigation.is-open { display: block; }
  .header-main { align-items: flex-start; flex-wrap: wrap; }
  .primary-navigation ul { justify-content: flex-start; align-items: stretch; flex-direction: column; width: 100%; }
  .primary-navigation a { width: 100%; border-radius: 14px; background: #fff; }
  .header-search-inner { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .recipe-grid,
  .category-grid,
  .post-grid,
  .recipe-info-box,
  .single-recipe-columns { grid-template-columns: 1fr; }
  .hero-dish { min-height: 260px; }
  .search-form { flex-direction: column; }
  .header-search { padding-bottom: 14px; }
  .header-search-inner { padding: 14px; }
  .recipe-search-form .recipe-search-icon { top: 24px; }
  .recipe-search-form .search-submit { width: 100%; }
}

/* Compact recipe/post grid - poster style like a movie listing */
.post-grid {
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 24px 18px;
  align-items: start;
}

.post-card.recipe-poster-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: block;
}

.recipe-poster-card .poster-thumb {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6c260, #b84918);
  box-shadow: 0 12px 24px rgba(43, 26, 16, 0.18);
  border: 1px solid rgba(43, 26, 16, 0.12);
  font-size: 42px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.recipe-poster-card .poster-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(43, 26, 16, 0.24);
}

.recipe-poster-card .poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  max-width: calc(100% - 14px);
  padding: 6px 10px;
  border-radius: 7px 0 8px 0;
  background: var(--brand-2);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 16px rgba(43, 26, 16, 0.18);
}

.poster-star {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(20, 14, 10, 0.82);
  color: #f6c260;
  font-size: 18px;
  line-height: 1;
}

.poster-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.recipe-poster-card .poster-body {
  padding: 8px 0 0;
  gap: 3px;
}

.recipe-poster-card .poster-body h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.22;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-poster-card .poster-body h2 a {
  color: var(--ink);
}

.recipe-poster-card .poster-body h2 a:hover {
  color: var(--brand);
}

.recipe-poster-card .poster-meta {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (min-width: 1180px) {
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
}

@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }

  .recipe-poster-card .poster-body h2 {
    font-size: 15px;
  }
}

/* Horizontal category carousel */
.category-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
}

.category-carousel-viewport {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  border-radius: var(--radius);
}

.category-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.category-carousel-track {
  display: flex;
  gap: 14px;
  width: max-content;
  min-width: 100%;
}

.category-carousel .category-card {
  flex: 0 0 calc((100vw - 32px - 96px - 56px) / 3);
  width: min(360px, calc((100vw - 32px - 96px - 56px) / 3));
  max-width: 360px;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (min-width: 1212px) {
  .category-carousel .category-card {
    flex-basis: calc((1180px - 96px - 56px) / 3);
    width: calc((1180px - 96px - 56px) / 3);
  }
}

.category-carousel-control {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(91, 47, 18, 0.16);
  font: inherit;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.category-carousel-control:hover,
.category-carousel-control:focus-visible {
  background: var(--brand-2);
  transform: translateY(-2px);
}

.category-carousel-control:disabled {
  opacity: 0.28;
  cursor: default;
  transform: none;
}

.category-carousel-hint {
  margin: 12px 62px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 940px) {
  .category-carousel .category-card {
    flex-basis: calc((100vw - 32px - 96px - 42px) / 2);
    width: calc((100vw - 32px - 96px - 42px) / 2);
    max-width: none;
  }
}

@media (max-width: 640px) {
  .category-carousel {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .category-carousel-control {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .category-carousel .category-card {
    flex-basis: calc(100vw - 32px - 96px);
    width: calc(100vw - 32px - 96px);
  }

  .category-carousel-hint {
    margin-inline: 48px;
  }
}


/* Recipe preparation field output */
.recipe-preparation {
  margin-top: 28px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--brand-2);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--paper), var(--paper-2));
  box-shadow: 0 14px 30px rgba(91, 47, 18, 0.08);
}

.recipe-preparation h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.recipe-preparation-text {
  color: var(--ink);
  line-height: 1.75;
}

.recipe-preparation-text > :first-child {
  margin-top: 0;
}

.recipe-preparation-text > :last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .recipe-preparation {
    padding: 20px;
  }
}
