/* CSS RESET & FONT SETUP */
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  color: #33404F;
  background: linear-gradient(135deg, #F6F4EF 60%, #E2923A 100%);
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul, ol {
  padding-left: 1.3em;
  margin-bottom: 1.2em;
}
a {
  color: #33404F;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #E2923A;
  text-decoration: underline;
}

/* GENERAL TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #33404F;
  margin-bottom: 0.5em;
  line-height: 1.15;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 32px; }
h3 { font-size: 1.5rem; margin-top: 24px; }
h4 { font-size: 1.17rem; margin-top: 16px; }
p { font-size: 1.08rem; margin-bottom: 0.9em; }
strong { font-weight: 700; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.17rem; }
}

/* CONTAINER & LAYOUT */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}
.flex-header {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
  padding: 18px 0 12px 0;
}

@media (max-width: 940px) {
  .container {
    max-width: 96vw;
    padding: 0 8px;
  }
  .flex-header {
    gap: 14px;
    flex-wrap: wrap;
  }
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 32px 0 rgba(51, 64, 79, 0.05);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}

/* HEADER NAVIGATION */
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-size: 1rem;
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  color: #33404F;
  padding: 8px 4px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  background: #E2923A;
  color: #fff;
}

.button-primary {
  display: inline-block;
  background: linear-gradient(90deg, #E2923A 60%, #33404F 100%);
  color: #fff;
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.06rem;
  padding: 12px 28px;
  border: none;
  border-radius: 30px;
  box-shadow: 0 3px 12px 0 rgba(51, 64, 79, 0.12);
  cursor: pointer;
  margin-left: 12px;
  transition: background 0.22s, box-shadow 0.22s, transform 0.12s;
  text-align: center;
  letter-spacing: 0.02em;
}
.button-primary:hover, .button-primary:focus {
  background: linear-gradient(90deg, #33404F 70%, #E2923A 100%);
  color: #fff;
  box-shadow: 0 6px 18px 0 rgba(226, 146, 58, 0.11);
  transform: translateY(-2px) scale(1.03);
}

/* MOBILE NAVIGATION */
.mobile-menu-toggle {
  display: none;
  background: #E2923A;
  color: #fff;
  border: none;
  font-size: 2.1rem;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 600;
  align-items: center;
  justify-content: center;
}
@media (max-width: 1020px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(51,64,79,0.97);
  z-index: 1001;
  transform: translateX(100vw);
  transition: transform 0.33s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 40px 0 0 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: #E2923A;
  color: #fff;
  border: none;
  font-size: 2.6rem;
  border-radius: 12px;
  width: 50px;
  height: 50px;
  margin: 0 36px 26px 0;
  cursor: pointer;
  z-index: 1012;
  transition: background 0.15s, transform 0.16s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #fff;
  color: #33404F;
  transform: scale(1.1);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100vw;
  padding-left: 36px;
  gap: 18px;
}
.mobile-nav a {
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  font-size: 1.3rem;
  color: #fff;
  padding: 8px 8px 8px 0;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #E2923A;
  color: #33404F;
}

@media (min-width: 1021px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
}

/* HERO SECTIONS */
.hero {
  width: 100%;
  min-height: 320px;
  background: linear-gradient(90deg, #F6F4EF 65%, #E2923A 100%);
  border-radius: 0 0 42px 42px;
  padding: 64px 0 56px 0;
  margin-bottom: 44px;
  display: flex;
  align-items: center;
}
.hero .container {
  align-items: flex-start;
}
.hero h1 {
  color: #33404F;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1.17rem;
  color: #33404F;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .hero {
    padding: 36px 0 28px 0;
    border-radius: 0 0 26px 26px;
    min-height: 180px;
  }
}

/* FEATURE GRID (Highlights auf der Startseite) */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  margin: 12px 0 0 0;
}
.feature-grid > div {
  flex: 1 1 min(210px,48%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 16px 0 rgba(51, 64, 79, 0.07);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 220px;
  max-width: 320px;
  transition: box-shadow 0.21s, transform 0.16s;
}
.feature-grid > div:hover {
  box-shadow: 0 8px 24px 0 rgba(226, 146, 58, 0.18);
  transform: translateY(-4px) scale(1.02);
}
.feature-grid img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}
@media (max-width: 940px) {
  .feature-grid {
    gap: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .feature-grid > div {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

/* SERVICE CARDS / BLOG LIST / GENERIC CARDS */
.service-cards, .blog-list, .recipe-categories, .seasonal-recipes, .editors-choice, .featured-posts {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0 18px 0;
}
.service-cards > div, .blog-list article, .recipe-categories ul, .seasonal-recipes ul, .editors-choice ul, .featured-posts ul {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 16px 0 rgba(51, 64, 79, 0.07);
  padding: 22px 18px 20px 18px;
  min-width: 230px;
  flex: 1 1 340px;
  margin-bottom: 20px;
  transition: box-shadow 0.19s;
}
.service-cards > div:hover, .blog-list article:hover {
  box-shadow:0 8px 26px 0 rgba(226, 146, 58, 0.19);
  transform: scale(1.018); 
}

@media (max-width: 900px) {
  .service-cards, .blog-list, .recipe-categories, .seasonal-recipes, .editors-choice, .featured-posts {
    flex-direction: column;
    gap: 18px;
  }
  .service-cards > div, .blog-list article { flex: 1 1 100%; }
}

/* TESTIMONIALS */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 28px 0;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  background: #F6F4EF;
  border-radius: 18px;
  box-shadow: 0 3px 16px 0 rgba(51, 64, 79, 0.08);
  padding: 24px 22px 22px 28px;
  margin-bottom: 20px;
  min-width: 220px;
  max-width: 340px;
  flex: 1 1 310px;
  border-left: 5px solid #E2923A;
  transition: box-shadow 0.16s, border-color 0.25s;
}
.testimonial-card:hover {
  box-shadow: 0 8px 38px 0 rgba(51, 64, 79, 0.13);
  border-left: 5px solid #33404F;
}
.testimonial-rating {
  color: #E2923A;
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.testimonial-author {
  font-style: italic;
  font-weight: 700;
  color: #33404F;
  font-size: 1rem;
}
.testimonial-card p {
  color: #33404F;
  font-size: 1.08rem;
}

/* ENSURE DARK TEXT FOR CONTRAST */
.testimonial-card, .testimonial-card * { color: #33404F !important; }

@media (max-width: 900px) {
  .testimonial-slider {
    flex-direction: column;
    gap: 20px;
  }
  .testimonial-card {
    min-width: 0;
    max-width: 100%;
  }
}

/* Content Section: Lists, Regions, Info */
.text-section, .contact-details, .region-highlights, .timeline, .course-list, .course-themes, .instructor-highlight, .map-embed, .interactive-map, .author-highlights, .next-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 18px;
}
.text-section ul, .region-highlights ul, .timeline ul, .course-list ul, .course-themes ul, .author-highlights ul, .next-steps ul {
  margin-bottom: 0;
  margin-top: 0;
}

/* Search bar (Rezepte page) */
.search-bar {
  display: flex;
  gap: 10px;
  margin: 12px 0 20px 0;
}
.search-bar input {
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  padding: 12px 12px 12px 20px;
  border: 1.5px solid #E2923A;
  border-radius: 25px;
  background: #fff;
  font-size: 1rem;
  color: #33404F;
  outline: none;
  width: 220px;
  min-width: 120px;
  transition: border 0.2s;
}
.search-bar input:focus { border-color: #33404F; }

@media (max-width: 600px) {
  .search-bar { flex-direction: column; gap: 8px; align-items: stretch; }
  .search-bar input {
    width: 100%;
  }
}

/* FOOTER */
footer {
  background: linear-gradient(90deg, #E2923A 0%, #33404F 100%);
  color: #fff;
  padding: 40px 0 12px 0;
  margin-top: 60px;
  font-size: 1rem;
}
footer .container {
  flex-direction: column;
  align-items: center;
}
.footer-logo img {
  width: 54px;
  margin-bottom: 20px;
  border-radius: 16px;
}
.footer-nav {
  display: flex;
  gap: 22px;
  margin-bottom: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #fff;
  text-decoration: underline;
  opacity: 0.91;
  font-weight: 500;
  transition: color 0.16s, opacity 0.16s;
  padding: 4px 8px;
  border-radius: 6px;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: #fff;
  color: #E2923A;
  opacity: 1;
}
.footer-contact {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.97rem;
  color: #fff;
  margin-bottom: 14px;
}
.footer-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-contact img {
  width: 18px;
  height: 18px;
}
.footer-legal {
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  opacity: 0.80;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .footer-contact, .footer-nav {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

/* Responsive Text-Image Sections */
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px 0 rgba(51, 64, 79, 0.11);
  position: relative;
  padding: 28px 16px;
  min-width: 240px;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* Flex structure for testimonial card alignment */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* CRITICAL SPACING FIXES */
section, .section, .content-wrapper, .card, .service-cards > div, .blog-list article,
.testimonial-card, .feature-grid > div, .recipe-categories ul, .seasonal-recipes ul,
.editors-choice ul, .featured-posts ul, .course-list ul, .course-themes ul, .author-highlights ul, .timeline ul {
  margin-bottom: 20px;
}

/* MODALS & ANIMATIONS */
.fade-in {
  animation: fadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* BUTTONS UTILS */
.button-secondary {
  display: inline-block;
  background: #fff;
  color: #E2923A;
  border: 2px solid #E2923A;
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  font-weight: 600;
  border-radius: 28px;
  font-size: 1rem;
  padding: 11px 24px;
  margin-left: 10px;
  transition: background 0.13s, color 0.13s;
}
.button-secondary:hover, .button-secondary:focus {
  background: #E2923A;
  color: #fff;
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  color: #33404F;
  box-shadow: 0 -5px 22px 0 rgba(51,64,79,0.17);
  z-index: 9000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 10px;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s;
}
.cookie-banner.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }

.cookie-banner-content {
  max-width: 820px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.cookie-banner-text {
  font-size: 1rem;
  flex: 1 1 270px;
}
.cookie-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cookie-banner .button-primary, .cookie-banner .button-secondary {
  margin-left: 0;
}

@media (max-width: 700px) {
  .cookie-banner, .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .cookie-banner-text {
    font-size: 0.97rem;
    min-width: 180px;
 }
 .cookie-buttons {
   width: 100%;
 }
}

/* COOKIE PREFERENCES MODAL */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(51,64,79,0.48);
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal {
  background: #fff;
  width: 94vw;
  max-width: 440px;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 8px 36px 0 rgba(51,64,79,0.18);
  padding: 40px 24px 32px 24px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform: translateY(110%);
  transition: transform 0.33s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.cookie-modal-overlay.active .cookie-modal {
  transform: translateY(0);
}
.cookie-modal h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  color: #33404F;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.cookie-category label {
  font-size: 1rem;
  color: #33404F;
  font-weight: 500;
}
.cookie-category input[type='checkbox'] {
  width: 20px; height: 20px;
  accent-color: #E2923A;
}
.cookie-category.essential label:after {
  content: '(erforderlich)';
  font-size: 0.9em;
  color: #888;
  margin-left: 8px;
}
.cookie-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
}
.cookie-modal .button-secondary {
  border-color: #33404F;
  color: #33404F;
}
.cookie-modal .button-secondary:hover {
  background: #33404F;
  color: #fff;
}
.cookie-modal .button-primary { margin-left: 0; }

@media (max-width: 600px) {
  .cookie-modal { padding: 26px 9vw 20px 9vw; }
  .cookie-modal h2 { font-size: 1.07rem; }
}

/* MICRO-INTERACTIONS */
.button-primary:active, .button-secondary:active {
  transform: scale(0.97);
}

/* ACCESSIBILITY FOCUS STATES */
a:focus, button:focus, input:focus {
  outline: 2px solid #E2923A;
  outline-offset: 2px;
}

/* Hide visually but keep accessible */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; border: 0;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* Util Classes */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 18px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 18px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 18px; }

/* Remove unwanted absolute positioning on cards */
.card, .service-cards > div, .blog-list article, .testimonial-card, .recipe-categories ul, .seasonal-recipes ul, .editors-choice ul, .featured-posts ul {
  position: relative;
}

/* Ensure no Flexbox overlaps */
.card, .feature-grid > div, .service-cards > div, .blog-list article, .testimonial-card {
  min-height: 120px;
}

@media (max-width: 480px) {
  .container {
    padding: 0 2vw;
  }
  .hero { padding: 13vw 0 8vw 0; }
  .section { padding: 20px 6px; }
}

/* Hide unwanted grid/columns officially - CRITICAL RULE! */
[class*='grid'], [class*='col'] {
  /* no grid; only flexbox */
  display: flex !important;
  flex-wrap: wrap;
}
