/* ===================================================
   CSS RESET & BASELINE NORMALIZATION
   =================================================== */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; border: 0; background: none; font: inherit; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd { margin: 0; padding: 0; font-weight: normal; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; background: none; border: none; outline: none; }
img { max-width: 100%; display: block; border: none; height: auto; }
section, header, footer, nav, main, aside, article { display: block; }
html { scroll-behavior: smooth; }

/* ===================================================
   ROOT COLORS & FONTS (with fallback)
   =================================================== */
:root {
  --color-primary: #22643A;
  --color-secondary: #2A506A;
  --color-accent: #F0EDEE;
  --color-gold: #CBA135;
  --color-white: #fff;
  --color-dark: #181C1B;
  --color-grey: #EAE7E1;
  --color-grey-light: #F9F8F5;
  --color-text: #23241F;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
  --shadow-card: 0px 4px 32px rgba(34,100,58,0.08);
  --shadow-inset: 0px 1px 4px 0px rgba(203,161,53,0.05);
  --radius: 16px;
  --radius-small: 8px;
  --transition: all 0.2s cubic-bezier(.33,1,.68,1);
}

body {
  background: var(--color-accent);
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.72;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-dark);
}
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 24px; }
h2 { font-size: 2rem; line-height: 1.22; margin-bottom: 20px; }
h3 { font-size: 1.25rem; line-height: 1.28; margin-bottom: 12px; }
h4 { font-size: 1.125rem; }
p, li, blockquote { font-size: 1rem; margin-bottom: 12px; }
strong { font-weight: bold; }

@media (max-width: 600px) {
  h1 { font-size: 2rem; margin-bottom: 20px; }
  h2 { font-size: 1.4rem; margin-bottom: 16px; }
  h3 { font-size: 1.13rem; margin-bottom: 8px; }
}

/* ===================================================
   LUXURY PREMIUM ACCENTS & GOLD DETAILS
   =================================================== */
.golden-border {
  border-bottom: 3px solid var(--color-gold);
  display: inline-block;
  border-radius: 2px;
  padding-bottom: 2px;
}
.golden-text { color: var(--color-gold); }

/* ===================================================
   CONTAINER & SECTIONS
   =================================================== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0; /* container manages children spacing */
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-grey-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

@media (max-width: 800px) {
  .section { padding: 28px 8px; margin-bottom: 38px; }
  .container { padding: 0 6vw; }
}

main {
  padding-bottom: 40px;
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.text-section { max-width: 800px; margin: 0 auto; }

/* Flexbox utilities for prescribed patterns */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px; /* vertical spacing between cards */
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 28px 22px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: 0px 8px 32px rgba(203,161,53,0.12);
  transform: translateY(-4px) scale(1.012);
  z-index: 10;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; gap: 18px; }
}

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.feature-grid > div {
  flex: 1 1 250px;
  min-width: 210px;
  background: var(--color-white);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-inset);
  padding: 32px 22px 22px;
  border: 1.5px solid #e1d3b1;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow var(--transition), border var(--transition);
  position: relative;
}
.feature-grid > div:before {
  content: '';
  display: block;
  width: 36px; height: 3px;
  background: var(--color-gold);
  border-radius: 2px;
  margin-bottom: 12px;
}
.feature-grid > div img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 2px #cba13588);
  flex: 0 0 44px;
}
@media (max-width: 800px) {
  .feature-grid { flex-direction: column; gap: 18px; }
  .feature-grid > div { width: 100%; min-width: 0; padding: 22px 10px 16px; }
}

.highlight-article {
  background: var(--color-secondary);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  margin-top: 16px;
  position: relative;
  box-shadow: 0 2px 32px #2A506A22;
  border-left: 6px solid var(--color-gold);
}
.highlight-article h3 { color: var(--color-gold); font-size: 1.15rem; margin-bottom: 8px; }
.highlight-article a { color: var(--color-gold); font-weight: bold; text-decoration: underline; }

.fact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.fact-grid > div {
  flex: 1 1 210px;
  background: var(--color-white);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-inset);
  padding: 24px 18px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1.5px solid #eee7d0;
  position: relative;
}
.fact-grid > div img {
  height: 34px;
  width: 34px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 2px #CBA13577);
}
.fact-grid > div strong {
  font-size: 2.1rem;
  color: var(--color-primary);
  margin-bottom: 6px;
}
@media (max-width: 800px) {
  .fact-grid { flex-direction: column; gap: 16px; }
  .fact-grid > div { padding: 18px 8px 16px; }
}

/* Card hierarchy for everything not .testimonial-card */
ul, ol {
  margin-bottom: 14px;
  padding-left: 1.2em;
}
ul li, ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.text-section ul, .text-section ol {
  margin-bottom: 12px;
  padding-left: 1.2em;
}
.text-section li::marker { color: var(--color-gold); font-weight: bold; }

/* Testimonials */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 2px 24px #22643A0A;
  border-left: 5px solid var(--color-gold);
  margin-bottom: 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
  position: relative;
}
.testimonial-card blockquote {
  color: var(--color-primary);
  font-size: 1.08rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 6px;
  line-height: 1.6;
}
.testimonial-card footer {
  color: #222;
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 0;
  display: block;
}
@media (max-width: 600px) {
  .testimonial-card { flex-direction: column; padding: 14px 12px; gap: 10px; }
  .testimonial-card blockquote { font-size: 1rem; }
}

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

/* ===================================================
   BUTTONS & CTA
   =================================================== */
.cta-btn, button.cta-btn {
  display: inline-block;
  border-radius: var(--radius-small);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  padding: 12px 32px;
  background: linear-gradient(90deg, var(--color-gold), #F8E7A6);
  color: var(--color-primary);
  border: none;
  box-shadow: 0 3px 12px #CBA13514;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-align: center;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  margin: 10px 0 0 0;
}
.cta-btn.primary, .cta-btn:active {
  background: var(--color-primary);
  color: var(--color-gold);
}
.cta-btn.primary:hover, .cta-btn:focus, .cta-btn:hover {
  background: var(--color-gold);
  color: var(--color-primary);
  box-shadow: 0 6px 22px #CBA13539;
  transform: scale(1.04);
}

/* Link styles */
a { color: var(--color-primary); transition: color 0.15s; }
a:hover, a:focus { color: var(--color-gold); text-decoration: underline; }

/* ===================================================
   HEADER & NAVIGATION
   =================================================== */
header {
  background: var(--color-white);
  box-shadow: 0 2px 12px #22643A0D;
  border-bottom: 2.5px solid #f3e3bb;
}
header .container {
  min-height: 72px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
header img[alt="Perlen der Natur Bonn"] {
  height: 46px;
  width: auto;
  margin-right: 32px;
}
nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
}
nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-dark);
  padding: 3.5px 8px;
  border-radius: 3px;
  opacity: 0.94;
  position: relative;
  transition: color 0.15s, opacity 0.18s, background 0.16s;
}
nav a:hover, nav a:focus {
  color: var(--color-gold);
  background: #FAF6ED;
  opacity: 1;
}

header .cta-btn.primary {
  margin-left: 32px;
  margin-right: 0;
  font-size: 1rem;
  min-width: 135px;
}

@media (max-width: 900px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: unset;
  }
  nav { gap: 12px; }
  header img[alt="Perlen der Natur Bonn"] { margin-bottom: 4px; }
}
@media (max-width: 768px) {
  header .container { flex-direction: row; gap: 8px; justify-content: space-between; }
  nav { display: none; opacity: 0; visibility: hidden; pointer-events: none; }
  header .cta-btn.primary { margin-left: 0; }
}

/* ===================================================
   MOBILE MENU & BURGER
   =================================================== */
.mobile-menu-toggle {
  position: fixed;
  right: 28px; top: 24px;
  z-index: 102;
  width: 46px;
  height: 46px;
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px #22643a1b;
  border: 1.5px solid #f0e2b1;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  color: var(--color-gold);
  background: #FFF9EC;
}
@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
}

.mobile-menu {
  position: fixed;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(34,100,58,0.96);
  z-index: 1990;
  transform: translateX(-100vw);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(.44,.84,.56,1.08), opacity 0.18s;
}
.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  right: 22px; top: 18px;
  font-size: 2rem;
  color: var(--color-gold);
  background: none;
  border: none;
  width: 46px; height: 46px;
  display: flex;
  align-items: center; justify-content: center;
  z-index: 30;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #CBA13533;
  color: var(--color-white);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 64px;
  align-items: flex-start;
  padding: 38px 32px 30px;
}
.mobile-nav a {
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 1.35rem;
  border-radius: 6px;
  padding: 8px 12px;
  transition: color 0.14s, background 0.18s;
  opacity: 0.98;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-gold);
  background: #F5D35A1B;
  opacity: 1;
}
@media (min-width: 769px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
}

/* Prevent scroll behind menu */
body.mobile-menu-open { overflow: hidden; }

/* ===================================================
   FOOTER
   =================================================== */
footer {
  background: var(--color-white);
  border-top: 3px solid #e8d6b4;
  box-shadow: 0 -1px 22px #22643A13;
  margin-top: 26px;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 20px 12px;
}
footer nav {
  gap: 18px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
footer nav a {
  color: var(--color-secondary);
  font-size: 1rem;
  padding: 3px 10px;
  border-radius: 4px;
  transition: color 0.12s, background 0.15s;
  opacity: 0.92;
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-gold);
  background: #fdeab2;
  opacity: 1;
}
.footer-contact {
  color: var(--color-dark);
  font-size: 1rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.footer-contact img {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  margin: 0 3.5px 0 6px;
}
footer p {
  margin-top: 11px;
  color: #b09853;
  font-size: 1rem;
}
@media (max-width: 650px) {
  footer .container { padding: 20px 3vw 9px; gap: 10px; }
  .footer-contact { font-size: 0.96rem; }
}

/* ===================================================
   CONTACT-INFO
   =================================================== */
.contact-info {
  margin: 18px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-info p {
  font-size: 1rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-info img {
  width: 21px;
  height: 21px;
  margin-right: 8px;
  filter: drop-shadow(0 1px 2px #CBA13599);
}

/* ===================================================
   ANIMATIONS & HOVER EFFECTS
   =================================================== */
.card, .feature-grid > div, .highlight-article, .testimonial-card {
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.card:hover, .feature-grid > div:hover, .highlight-article:hover {
  box-shadow: 0 8px 42px #CBA1351B;
  border-color: var(--color-gold);
  transform: translateY(-3px) scale(1.01);
  z-index: 2;
}

.testimonial-card:hover {
  border-left: 5px solid var(--color-primary);
  box-shadow: 0 8px 36px #26864D23;
}

.content-wrapper {
  animation: fade-in-down 0.65s cubic-bezier(.23,1.04,.7,.92);
}
@keyframes fade-in-down {
  0% { opacity: 0; transform: translateY(-32px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   RESPONSIVE TWEAKS
   =================================================== */
@media (max-width: 1100px) {
  .container { max-width: 92vw; }
}
@media (max-width: 980px) {
  header .container { padding: 0 8px; }
}
@media (max-width: 768px) {
  .container { padding: 0 4vw; }
}
@media (max-width: 500px) {
  .section { padding: 18px 4px; }
  .card, .feature-grid > div, .highlight-article { padding: 12px 4px 10px; }
}

/* ===================================================
   COOKIE CONSENT BANNER
   =================================================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2000;
  width: 100vw;
  background: var(--color-dark);
  color: var(--color-white);
  box-shadow: 0 -2px 20px #0002;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 20px 20px;
  gap: 24px;
  opacity: 1;
  transition: transform 0.35s cubic-bezier(.48,1.5,.65,1), opacity 0.18s;
  font-size: 1rem;
}
.cookie-banner.hide {
  opacity: 0;
  transform: translateY(150%);
  pointer-events: none;
}
.cookie-banner .cookie-banner-text {
  max-width: 940px;
  color: var(--color-white);
}
.cookie-banner .cookie-banner-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.cookie-banner button {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: bold;
  padding: 11px 28px;
  border-radius: var(--radius-small);
  border: none;
  background: var(--color-primary);
  color: var(--color-gold);
  cursor: pointer;
  box-shadow: 0 1px 12px #FFF2;
  margin-left: 0;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.cookie-banner button.cookie-settings {
  background: var(--color-gold);
  color: var(--color-primary);
}
.cookie-banner button:hover {
  background: var(--color-gold);
  color: var(--color-primary);
  box-shadow: 0 3px 14px #CBA13542;
  transform: scale(1.035);
}
.cookie-banner button.cookie-settings:hover {
  background: var(--color-primary);
  color: var(--color-gold);
}
@media (max-width: 700px) {
  .cookie-banner { flex-direction: column; padding: 18px 10px 14px; gap: 14px; font-size: 0.98rem; }
  .cookie-banner .cookie-banner-actions { margin-left: 0; gap: 7px; }
}

/* COOKIE SETTINGS MODAL */
.cookie-modal {
  position: fixed;
  left: 0; top: 0; z-index: 2040;
  width: 100vw;
  height: 100vh;
  background: rgba(34,100,58,0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(.23,1.04,.7,.92);
}
.cookie-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal-content {
  background: var(--color-grey-light);
  box-shadow: 0 5px 36px #2A506A33;
  border-radius: var(--radius);
  max-width: 390px;
  width: 90vw;
  padding: 38px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  animation: fade-in-down 0.42s;
}
.cookie-modal-close {
  position: absolute;
  top: 14px; right: 15px;
  background: none;
  border: none;
  border-radius: 3px;
  font-size: 1.64rem;
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.18s, color 0.17s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: #F0EDEE;
  color: var(--color-gold);
}
.cookie-modal h2 {
  color: var(--color-primary);
  margin-bottom: 3px;
  font-size: 1.25rem;
}
.cookie-modal .cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-small);
  background: var(--color-white);
  padding: 9px 13px;
  margin-bottom: 8px;
  box-shadow: 0 0 4px #CBA13520;
}
.cookie-modal .cookie-category .toggle {
  width: 38px;
  height: 20px;
  border-radius: 10px;
  background: var(--color-grey);
  position: relative;
  transition: background 0.18s;
}
.cookie-modal .cookie-category .toggle.active { background: var(--color-primary); }
.cookie-modal .cookie-category .toggle:after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background: var(--color-gold);
  border-radius: 50%;
  position: absolute;
  left: 1.5px; top: 1px;
  transition: left 0.22s;
}
.cookie-modal .cookie-category .toggle.active:after { left: 18px; }
.cookie-modal .cookie-category label {
  font-family: var(--font-display);
  color: var(--color-secondary);
  font-size: 1rem;
  font-weight: bold;
}

/* Modal Buttons */
.cookie-modal .actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 12px;
  justify-content: flex-end;
}
.cookie-modal .actions button {
  background: var(--color-primary);
  color: var(--color-gold);
  font-size: 1rem;
  font-family: var(--font-display);
  border-radius: var(--radius-small);
  padding: 9px 22px;
  font-weight: bold;
  transition: background 0.16s, color 0.16s;
}
.cookie-modal .actions button:hover {
  background: var(--color-gold);
  color: var(--color-primary);
}

/* Lock scroll behind modal */
body.cookie-modal-open { overflow: hidden!important; }

/* ===================================================
   MISC & REFINEMENT
   =================================================== */
::-webkit-scrollbar { width: 10px; background: var(--color-grey); }
::-webkit-scrollbar-thumb { background: var(--color-gold); border-radius: 7px; }
::-webkit-scrollbar-thumb:hover { background: #e1b14c; }

hr { border: none; border-bottom: 1.5px solid #ebcca1; margin: 36px 0; }

/* Code and selection */
::selection { background: #fff2cd; color: var(--color-primary); }

/* Accessibility: Focus State */
a:focus, button:focus, .cta-btn:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  z-index: 40;
}

/* Table styles (if used) */
table { width: 100%; border-collapse: collapse; margin: 18px 0; background: var(--color-white); border-radius: var(--radius-small); overflow: hidden; box-shadow: var(--shadow-inset); }
td, th { padding: 9px 12px; border-bottom: 1px solid #f3e3bb; }
th { background: #F8E7A6; color: var(--color-primary); font-family: var(--font-display); font-weight: bold; }

/* Remove absolute positioning for all cards but allow for decorative afters */
.card, .feature-grid > div, .testimonial-card {
  position: relative;
}

/* Spacing and visual separation between cards and sections */
.card + .card, .feature-grid > div + .feature-grid > div, .testimonial-card + .testimonial-card, .section + .section {
  margin-top: 20px!important;
}

/* Ensure no overlapping and adequate gaps everywhere */
.section, .card, .feature-grid > div, .content-grid > *, .fact-grid > div, .testimonial-card, .card-container > *, .text-image-section > *, .content-wrapper > * {
  margin-bottom: 20px; /* override if more margin needed */
}

/* Remove last margin-bottom for last child */
.card-container > *:last-child, .feature-grid > div:last-child, .fact-grid > div:last-child, .testimonial-card:last-child, .section:last-child, .content-wrapper > *:last-child, .content-grid > *:last-child, .text-image-section > *:last-child {
  margin-bottom: 0!important;
}

/* Ensure image alt tag logo in header scales nicely */
@media (max-width: 410px) {
  header img[alt="Perlen der Natur Bonn"] { height: 34px; }
}
