/* ==========================================================================
   CSS Variables & Themes
   ========================================================================== */
:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --bg-body: #f8f6f2;
  --bg-card: #ffffff;
  --bg-card-alt: #f3eee6;
  --border-color: #e5ddd0;
  
  --text-main: #2b2520;
  --text-muted: #6b635b;
  --text-light: #9c9287;
  
  --accent-burgundy: #80182a;
  --accent-burgundy-hover: #671120;
  --accent-gold: #c28833;
  --accent-gold-light: #fef8ee;
  
  --success: #2d8a4e;
  --shadow-sm: 0 2px 8px rgba(43, 37, 32, 0.05);
  --shadow-md: 0 8px 24px rgba(43, 37, 32, 0.08);
  --shadow-lg: 0 16px 40px rgba(43, 37, 32, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-body: #161311;
  --bg-card: #211c19;
  --bg-card-alt: #2a2420;
  --border-color: #38302b;
  
  --text-main: #f4ede6;
  --text-muted: #b8ad9e;
  --text-light: #83786d;
  
  --accent-burgundy: #a82e42;
  --accent-burgundy-hover: #c43c53;
  --accent-gold: #e2a549;
  --accent-gold-light: #2c2214;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  color: var(--text-main);
  line-height: 1.25;
}

h1, h2 {
  font-family: var(--font-serif);
}

/* Saubere, ungeschnittene Bilddarstellung (Keine Verzerrung!) */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.responsive-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme="dark"] .site-header {
  background-color: rgba(33, 28, 25, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.25rem;
  color: var(--text-main);
}

.brand-logo strong {
  color: var(--accent-burgundy);
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--accent-burgundy);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--border-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.badge-pill {
  display: inline-block;
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid rgba(194, 136, 51, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-text h1 {
  font-size: 2.75rem;
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.key-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  font-size: 1.75rem;
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-burgundy);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-burgundy-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-outline {
  background: transparent;
  color: var(--accent-burgundy);
  border: 2px solid var(--accent-burgundy);
}

.btn-outline:hover {
  background: var(--accent-burgundy);
  color: #fff;
}

/* Hero Image */
.hero-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  aspect-ratio: 4 / 3;
}

.hero-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #ffffff;
  padding: 24px 18px 14px;
  font-size: 0.85rem;
}

/* ==========================================================================
   Section Components
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-bottom: 80px;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  margin-bottom: 32px;
}

.section-header.center {
  text-align: center;
}

.section-badge {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 6px;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ==========================================================================
   Portionsrechner & Zutaten
   ========================================================================== */
.portion-calculator-bar {
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
}

.calc-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}

.current-portion {
  color: var(--accent-burgundy);
  font-weight: 700;
}

.calc-stepper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-step {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-step:hover {
  background: var(--accent-burgundy);
  color: #fff;
  border-color: var(--accent-burgundy);
}

input[type="range"] {
  accent-color: var(--accent-burgundy);
  width: 140px;
  cursor: pointer;
}

.ingredients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.column-title {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.column-title h3 {
  font-size: 1.25rem;
}

.column-title span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.checklist li:hover {
  border-color: var(--accent-gold);
}

.checklist li.checked {
  opacity: 0.55;
  text-decoration: line-through;
  background: var(--bg-card-alt);
}

.checklist input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--success);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checklist .ing-text {
  flex: 1;
}

.checklist .ing-amount {
  font-weight: 700;
  color: var(--accent-burgundy);
}

.equipment-box {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.equipment-box h4 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.equipment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.equipment-tags span {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Schritt-für-Schritt Zubereitung (Timeline)
   ========================================================================== */
.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding: 24px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--accent-burgundy);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(128, 24, 42, 0.3);
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.step-header h3 {
  font-size: 1.25rem;
}

.step-time {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 700;
}

.step-desc {
  color: var(--text-main);
  line-height: 1.6;
}

.step-hint {
  background: var(--accent-gold-light);
  border-left: 4px solid var(--accent-gold);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-main);
}

.step-images-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.step-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.step-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.step-img-wrap:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   Timer Section
   ========================================================================== */
.timer-section {
  text-align: center;
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-alt));
}

.timer-display-wrapper {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.timer-circle {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-full);
  border: 6px solid var(--accent-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.timer-time {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.timer-status {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 4px;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

.timer-presets {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-chip:hover {
  background: var(--accent-burgundy);
  color: #fff;
  border-color: var(--accent-burgundy);
}

/* ==========================================================================
   Fotogalerie & Lightbox
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
  transition: var(--transition);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  text-align: center;
}

.lightbox-figure img {
  max-width: 85vw;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #ffffff;
  margin-top: 14px;
  font-size: 1.05rem;
}

.lightbox-btn-close,
.lightbox-nav-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-btn-close {
  top: -45px;
  right: 0;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}

.lightbox-nav-btn {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
}

.lightbox-nav-btn.prev {
  left: -70px;
}

.lightbox-nav-btn.next {
  right: -70px;
}

.lightbox-nav-btn:hover,
.lightbox-btn-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Tipps & Beilagen
   ========================================================================== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.tip-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-md);
}

.tip-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.tip-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.tip-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sides-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: var(--radius-md);
}

.sides-heading {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.sides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.side-item {
  display: flex;
  gap: 14px;
}

.side-item span {
  font-size: 1.75rem;
}

.side-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.side-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer & Print Style
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: var(--bg-card);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.back-top {
  text-decoration: none;
  color: var(--accent-burgundy);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .hero-grid,
  .ingredients-grid,
  .tips-grid,
  .sides-grid {
    grid-template-columns: 1fr;
  }
  
  .main-nav {
    display: none;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
  }
  
  .lightbox-nav-btn.prev {
    left: 10px;
  }
  .lightbox-nav-btn.next {
    right: 10px;
  }
}

@media print {
  .site-header,
  .timer-section,
  .hero-actions,
  .header-controls,
  .lightbox-modal,
  .site-footer,
  .portion-calculator-bar input[type="range"] {
    display: none !important;
  }
  
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  .section-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
  }
}
