/* ==========================================================
   Receptár rodiny Lachkovičovcov — Apple-style
   Biela/sivá, systémové písmo (SF Pro na Apple zariadeniach),
   jeden akcent (oranžovo-hnedá) len tam, kde má význam.
   ========================================================== */

:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --accent: #b5651d;
  --accent-soft: #f7ead9;
  --line: #d2d2d7;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--accent);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hlavička ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 36px;
}

.site-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.05;
}

.site-title a {
  display: block;
}

.site-tagline {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 1.15rem;
  margin: 10px 0 0;
  max-width: 46ch;
}

.admin-link {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  margin-top: 6px;
}

.admin-link:hover {
  background: var(--line);
}

/* ---------- Vyhľadávanie a kategórie ---------- */

.filters {
  margin-top: 32px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  max-width: 480px;
}

.search-form svg {
  flex: none;
  color: var(--ink-soft);
}

.search-form input[type="search"] {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 1rem;
  flex: 1;
  padding: 2px 0;
  color: var(--ink);
}

.search-form input[type="search"]::placeholder {
  color: var(--ink-soft);
}

.search-form input[type="search"]:focus {
  outline: none;
}

.search-form button {
  display: none;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.category-tabs a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: transparent;
}

.category-tabs a:hover {
  background: var(--bg);
  color: var(--ink);
}

.category-tabs a.active {
  background: var(--ink);
  color: white;
  font-weight: 600;
}

/* ---------- Mriežka receptov ---------- */

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 44px 0 84px;
}

.recipe-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.recipe-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
}

.recipe-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-card__category {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.recipe-card__title {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin: 6px 0 0;
  letter-spacing: -0.01em;
}

.recipe-card__note {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

.recipe-card__category,
.recipe-card__title,
.recipe-card__note {
  padding: 0 22px;
}

.recipe-card__category {
  margin-top: 22px;
}

.recipe-card {
  padding-bottom: 22px;
}

.empty-state {
  padding: 70px 0;
  text-align: center;
  color: var(--ink-soft);
}

.empty-state strong {
  display: block;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

/* ---------- Detail receptu ---------- */

.recipe-detail {
  padding: 48px 0 96px;
}

.back-link {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 26px;
}

.back-link:hover {
  opacity: 0.7;
}

.recipe-detail__category {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.recipe-detail__title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  line-height: 1.08;
}

.recipe-detail__note {
  font-family: var(--font);
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0 0 28px;
  max-width: 60ch;
}

.recipe-detail__image {
  margin: 24px 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 440px;
}

.recipe-detail__image img {
  width: 100%;
  object-fit: cover;
  max-height: 440px;
}

.recipe-body {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 720px) {
  .recipe-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.ingredient-group {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ingredient-group + .ingredient-group {
  margin-top: 16px;
}

.ingredient-group__name {
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  margin: 0 0 12px;
}

.ingredient-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ingredient-list li {
  padding: 6px 0;
  font-size: 0.96rem;
  color: var(--ink);
  border-bottom: 1px solid var(--bg);
}

.ingredient-list li:last-child {
  border-bottom: none;
}

.steps-heading {
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.15rem;
  margin: 0 0 20px;
}

.steps-list {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.steps-list li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  font-size: 1rem;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2em;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  background: var(--accent);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-tip {
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
}

.no-steps-note {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 50px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ---------- 404 ---------- */

.notfound {
  padding: 110px 0;
  text-align: center;
}

.notfound h1 {
  font-family: var(--font);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--ink);
}
