/*
Theme Name: Nudelsalat Kitchen
Theme URI: https://nudel.blog
Author: Abdelhamid Fachtab
Description: Eigenes Theme fuer Nudelsalat Kitchen - Nudelsalat-Rezepte aus Deutschland, Italien und dem Mittelmeerraum.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: nudelsalat-kitchen
*/

/* ============================================================
   NUDELSALAT KITCHEN — Shared Stylesheet
   Design tokens, layout system, components. Mobile-first.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
input, textarea { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Design tokens ---------- */
:root {
  /* colors — drawn from the dish: mayo cream, olive oil, tomato, mustard/egg */
  --cream: #FBF6EC;
  --cream-2: #F4EDDC;
  --card: #FFFDF8;
  --ink: #332D22;
  --ink-soft: #5B5544;
  --olive: #6E7A3D;
  --olive-dark: #545E2E;
  --tomato: #D85C34;
  --tomato-dark: #B94B27;
  --mustard: #E8AF3C;
  --line: #E3DCC8;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "DM Mono", "Consolas", monospace;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-s: 0 2px 10px rgba(51, 45, 34, 0.06);
  --shadow-m: 0 10px 30px rgba(51, 45, 34, 0.10);
  --shadow-l: 0 20px 45px rgba(51, 45, 34, 0.14);

  --container: 1180px;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.3rem, 5vw + 1rem, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 2.6vw + 1rem, 2.5rem); letter-spacing: -0.005em; }
h3 { font-size: clamp(1.2rem, 1vw + 1rem, 1.45rem); }

p { color: var(--ink-soft); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 700px) {
  .container { padding-inline: 32px; }
}

section { padding: 64px 0; }
@media (min-width: 1000px) { section { padding: 96px 0; } }

.section-alt { background: var(--cream-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin-bottom: 14px;
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; font-size: 1.05rem; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.btn-primary {
  background: var(--tomato);
  color: #FFF9F1;
  box-shadow: var(--shadow-s);
}
.btn-primary:hover { background: var(--tomato-dark); transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-m); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px) scale(1.02); }
.btn-ghost {
  color: var(--olive-dark);
  font-weight: 700;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.btn-ghost:hover { border-color: var(--olive); }

/* ---------- Pasta signature: spiral mark + wave divider ---------- */
.pasta-mark {
  width: 26px; height: 26px;
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(.34,1.56,.64,1);
}
.logo:hover .pasta-mark { transform: rotate(50deg); }

.pasta-divider {
  width: 100%;
  height: 22px;
  display: block;
  color: var(--line);
  margin: 0 auto;
}
.pasta-divider path { stroke: currentColor; }
.pasta-divider.accent { color: var(--olive); opacity: 0.55; }

.pasta-bullet {
  width: 16px; height: 16px;
  margin-right: 10px;
  flex-shrink: 0;
  color: var(--tomato);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}
.logo-text-accent { color: var(--tomato); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav > ul > li > a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.main-nav > ul > li > a:hover,
.dropdown-toggle:hover,
.main-nav > ul > li > a.active,
.main-nav > ul > li.current-menu-item > a {
  background: var(--cream-2);
  color: var(--olive-dark);
}
.chevron { width: 11px; height: 11px; transition: transform 0.25s ease; }
.has-dropdown:hover .chevron,
.has-dropdown.open .chevron { transform: rotate(180deg); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-m);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  font-size: 0.94rem;
  font-weight: 500;
}
.dropdown li a:hover { background: var(--cream-2); color: var(--olive-dark); }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center;
}
.burger span {
  width: 24px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
.burger span:nth-child(2) { width: 18px; align-self: flex-end; }
.burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); width: 24px; }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); width: 24px; }

@media (max-width: 899px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    z-index: 150;
    background: var(--cream);
    padding: 24px 20px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav > ul > li > a, .dropdown-toggle { width: 100%; justify-content: space-between; padding: 16px; font-size: 1.05rem; }
  .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    display: none !important;
    flex-direction: column;
    gap: 2px;
    box-shadow: none;
    border: none;
    background: var(--cream-2);
    margin-top: 4px;
  }
  .dropdown li { width: 100%; }
  .has-dropdown.open .dropdown { display: flex !important; }
}
@media (min-width: 900px) {
  .burger { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 60px; }
}
.hero h1 { margin-bottom: 20px; }
.hero .lede { font-size: 1.15rem; max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-card {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-l);
  transform: rotate(-2deg);
}
.hero-card:hover { transform: rotate(0deg); transition: transform 0.5s ease; }

/* ---------- Photo placeholders (no real photography yet) ---------- */
.photo-placeholder {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 25% 20%, rgba(232,175,60,0.55), transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(216,92,52,0.45), transparent 50%),
    linear-gradient(135deg, #EFE6D2, #E4D8BC);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  overflow: hidden;
}
.photo-placeholder .ph-icon { width: 30%; max-width: 84px; opacity: 0.65; }
.photo-placeholder .ph-label {
  position: absolute;
  bottom: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(51,45,34,0.72);
  color: #FBF6EC;
  padding: 4px 10px;
  border-radius: 999px;
}
.photo-placeholder.square { aspect-ratio: 1 / 1; }
.photo-placeholder.tall { aspect-ratio: 3 / 4; }
.photo-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Category cards ---------- */
.grid { display: grid; gap: 24px; }
.grid.cols-3 { grid-template-columns: repeat(1, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 720px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.category-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  padding: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.category-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-m); border-color: transparent; }
.category-card .cat-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.category-card .cat-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.category-card:hover .cat-photo img { transform: scale(1.05); }
.category-card .cat-body { padding: 0 28px 32px; }
.category-card .cat-icon {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 999px;
  background: var(--cream-2);
  display: flex; align-items: center; justify-content: center;
  margin: -23px 0 18px;
  color: var(--olive-dark);
  border: 3px solid var(--card);
  box-shadow: var(--shadow-m);
}
.category-card h3 { margin-bottom: 10px; }
.category-card p { margin-bottom: 18px; font-size: 0.98rem; }

/* ---------- Recipe cards ---------- */
.recipe-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.recipe-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: var(--shadow-m); }
.recipe-card .recipe-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.recipe-card h3 { font-size: 1.15rem; }
.recipe-card h3 a { color: inherit; }
.recipe-card p { font-size: 0.94rem; }
.recipe-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.recipe-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
}
.badge-klassisch { background: #EFE9D6; color: var(--olive-dark); }
.badge-italienisch { background: #F6DCCB; color: var(--tomato-dark); }
.badge-mediterran { background: #E4EAD2; color: var(--olive-dark); }

.recipe-card .photo-placeholder { position: relative; }

/* ---------- Pagination ---------- */
.pagination { margin: 56px 0 0; }
.pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--card);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
a.page-numbers:hover { border-color: var(--olive); color: var(--olive-dark); }
.pagination .page-numbers.current {
  background: var(--tomato);
  border-color: var(--tomato);
  color: #FBF6EC;
}
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ---------- Single recipe ---------- */
.recipe-single-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 18px 0 8px;
}
.recipe-single-meta span {
  background: var(--cream-2);
  padding: 6px 14px;
  border-radius: 999px;
}
.recipe-single-photo { border-radius: var(--radius-l); overflow: hidden; margin: 28px 0 36px; box-shadow: var(--shadow-m); }
.recipe-single-photo img { width: 100%; height: auto; display: block; }
.photo-credit {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  opacity: 0.8;
  margin: -8px 0 28px;
}
.recipe-single-content { max-width: 760px; }
.recipe-single-content p { margin-bottom: 14px; }
.recipe-single-content ul, .recipe-single-content ol { margin: 0 0 20px; padding-left: 22px; }
.recipe-single-content li { margin-bottom: 8px; color: var(--ink-soft); }
.recipe-single-content h2 { margin: 36px 0 14px; }
.recipe-single-content h2:first-child { margin-top: 0; }
.recipe-single-content h3 { margin: 22px 0 8px; }
.recipe-single-content a {
  color: var(--tomato);
  text-decoration: underline;
  text-decoration-color: rgba(216, 92, 52, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.recipe-single-content a:hover {
  text-decoration-color: var(--tomato);
}

/* ---------- Intro / text sections ---------- */
.intro-block { max-width: 760px; }
.intro-block p + p { margin-top: 16px; }
.intro-block a, .legal-content a {
  color: var(--tomato);
  text-decoration: underline;
  text-decoration-color: rgba(216, 92, 52, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.intro-block a:hover, .legal-content a:hover {
  text-decoration-color: var(--tomato);
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  gap: 48px;
  align-items: start;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 0.85fr 1.15fr; }
}
.philosophy-list { display: grid; gap: 20px; margin-top: 8px; }
.philosophy-item { display: flex; gap: 14px; align-items: flex-start; }
.philosophy-item h4 { margin-bottom: 4px; }
.philosophy-item p { font-size: 0.95rem; }

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  gap: 44px;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}
.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 32px;
  box-shadow: var(--shadow-s);
}
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input:focus, .form-row textarea:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(110,122,61,0.14);
  outline: none;
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-error {
  color: var(--tomato-dark);
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}
.form-row.invalid input, .form-row.invalid textarea { border-color: var(--tomato); }
.form-row.invalid .form-error { display: block; }
.form-success {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-s);
  background: #E4EAD2;
  color: var(--olive-dark);
  font-weight: 600;
  display: none;
}
.form-success.show { display: block; }
.form-success.is-error { background: #F6DCCB; color: var(--tomato-dark); }

.contact-info { display: grid; gap: 24px; align-content: start; }
.contact-info-item { display: flex; gap: 14px; }
.contact-info-item .ci-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 999px;
  background: var(--cream-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--olive-dark);
}

/* ---------- Legal pages ---------- */
.legal-page main { padding-bottom: 40px; }
.legal-content { max-width: 760px; }
.legal-content h2 { margin-top: 40px; margin-bottom: 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; }
.legal-note {
  margin-top: 32px;
  padding: 16px 20px;
  border-left: 3px solid var(--mustard);
  background: var(--cream-2);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #E9E4D6;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  gap: 40px;
  padding: 64px 0 40px;
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-brand .logo-text { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: #FBF6EC; }
.footer-brand p { color: #C9C2AC; margin-top: 14px; max-width: 32ch; font-size: 0.94rem; }
.footer-legal h3, .footer-nav h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9C2AC;
  margin-bottom: 16px;
}
.footer-legal ul, .footer-nav ul { display: grid; gap: 10px; }
.footer-legal a, .footer-nav a { color: #E9E4D6; font-size: 0.95rem; transition: color 0.2s ease; }
.footer-legal a:hover, .footer-nav a:hover { color: var(--mustard); }
.footer-bottom {
  border-top: 1px solid rgba(233,228,214,0.15);
  padding: 22px 0;
  font-size: 0.85rem;
  color: #A9A28D;
}

/* ---------- Social links ---------- */
.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(233,228,214,0.25);
  color: #E9E4D6;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-links a:hover { background: var(--mustard); border-color: var(--mustard); color: var(--ink); transform: translateY(-2px); }
.social-links.light a { background: var(--cream-2); border-color: transparent; color: var(--olive-dark); }
.social-links.light a:hover { background: var(--olive); color: #FBF6EC; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Page hero (secondary pages) ---------- */
.page-hero { padding: 48px 0 40px; }
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero p { max-width: 60ch; margin-top: 14px; font-size: 1.05rem; }
