/* --------------------------------------------------
   Heimwärts Beratung – Vintage Retro CSS Theme
   Brand: Modern, warm, trustworthy, vintage-retro twist
   -------------------------------------------------- */

/* --------------------
   FONT IMPORTS
-------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Roboto:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap'); /* For retro accent headings */

:root {
  --color-primary: #233D4D;
  --color-secondary: #F6F5F3;
  --color-accent: #D9B382;
  --color-retro-red: #B94E48;
  --color-retro-green: #6C8E6B;
  --color-retro-blue: #4F6D7A;
  --color-retro-yellow: #F7C873;
  --color-retro-bg: #F6F5F3;
  --color-retro-card: #FFF8E1;
  --color-retro-border: #E2C799;
  --color-retro-shadow: rgba(35, 61, 77, 0.08);
  --font-display: 'Montserrat', 'Arial Black', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
  --font-retro: 'Pacifico', cursive;
  --radius-card: 18px;
  --radius-btn: 28px;
  --shadow-card: 0 4px 24px var(--color-retro-shadow);
  --transition: all 0.25s cubic-bezier(.4,0,.2,1);
  --section-spacing: 60px;
  --container-width: 1200px;
}

html {
  box-sizing: border-box;
  font-size: 18px;
  background: var(--color-retro-bg);
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-primary);
  background: var(--color-retro-bg);
  min-height: 100vh;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* --------------------
   CONTAINER & LAYOUT
-------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: var(--section-spacing);
  padding: 40px 20px;
  background: repeating-linear-gradient(135deg, #FFF8E1 0 20px, #F6F5F3 20px 40px);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* --------------------
   TYPOGRAPHY
-------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  margin: 0 0 12px 0;
  letter-spacing: 0.02em;
}
h1 {
  font-size: 2.3rem;
  font-family: var(--font-retro), var(--font-display);
  color: var(--color-retro-red);
  text-shadow: 2px 2px 0 #F7C873, 0 2px 8px #E2C79944;
  margin-bottom: 10px;
}
h2 {
  font-size: 1.7rem;
  color: var(--color-retro-blue);
  font-family: var(--font-display);
  margin-bottom: 8px;
}
h3 {
  font-size: 1.2rem;
  color: var(--color-retro-green);
  font-family: var(--font-display);
}
p, ul, ol {
  font-family: var(--font-body);
  color: var(--color-primary);
  margin: 0 0 12px 0;
}
strong {
  font-weight: 700;
  color: var(--color-retro-red);
}

/* Retro underline for headings */
h2, h3 {
  position: relative;
}
h2:after, h3:after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-retro-yellow), var(--color-accent));
  border-radius: 2px;
  margin-top: 6px;
}

/* --------------------
   HEADER & NAVIGATION
-------------------- */
header {
  background: var(--color-retro-yellow);
  border-bottom: 4px solid var(--color-retro-border);
  box-shadow: 0 2px 12px #E2C79933;
  position: relative;
  z-index: 100;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}
header img {
  height: 48px;
  width: auto;
  margin-right: 24px;
}
.main-nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px #D9B38255;
}

.cta-btn {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  background: linear-gradient(90deg, var(--color-retro-red), var(--color-retro-yellow));
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 32px;
  margin-left: 16px;
  cursor: pointer;
  box-shadow: 0 4px 16px #B94E4833;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.cta-btn:hover, .cta-btn:focus {
  background: linear-gradient(90deg, var(--color-retro-yellow), var(--color-retro-red));
  color: var(--color-primary);
  box-shadow: 0 6px 24px #B94E4888;
  transform: translateY(-2px) scale(1.03);
}

/* --------------------
   MOBILE NAVIGATION
-------------------- */
.mobile-menu-toggle {
  display: none;
  background: var(--color-retro-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 12px;
  transition: background 0.2s;
  z-index: 120;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-retro-yellow);
  color: var(--color-retro-red);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(120deg, var(--color-retro-yellow) 70%, var(--color-retro-red) 100%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 32px 24px 24px 24px;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(.77,0,.18,1), opacity 0.3s;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--color-retro-red);
  font-size: 2.2rem;
  align-self: flex-end;
  margin-bottom: 24px;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-retro-blue);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-primary);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-retro-border);
  transition: color 0.2s, background 0.2s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-retro-red);
  background: var(--color-retro-card);
}

@media (max-width: 1024px) {
  header .container {
    flex-direction: row;
    gap: 10px;
  }
  .main-nav {
    gap: 14px;
  }
  .cta-btn {
    padding: 10px 20px;
    font-size: 1rem;
  }
}
@media (max-width: 900px) {
  .main-nav {
    gap: 8px;
  }
  .cta-btn {
    margin-left: 0;
  }
}
@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 12px 10px;
  }
  .main-nav {
    display: none;
  }
  .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

/* --------------------
   FLEXBOX LAYOUTS
-------------------- */
.feature-grid, .card-container, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.feature-grid > div, .card {
  background: var(--color-retro-card);
  border: 2px solid var(--color-retro-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
  margin-bottom: 20px;
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.feature-grid > div:hover, .card:hover {
  box-shadow: 0 8px 32px #B94E4844;
  transform: translateY(-4px) scale(1.03);
  border-color: var(--color-retro-yellow);
}

.card-container {
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.content-grid {
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.text-image-section > div {
  flex: 1 1 320px;
  min-width: 240px;
}
.text-image-section img {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-card);
  border: 2px solid var(--color-retro-border);
  box-shadow: 0 2px 16px #B94E4822;
  background: #fff;
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border: 2px solid var(--color-retro-border);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 12px #233D4D11;
  margin-bottom: 20px;
  color: var(--color-primary);
  font-style: italic;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.testimonial-card:hover {
  border-color: var(--color-retro-red);
  box-shadow: 0 6px 24px #B94E4844;
}
.testimonial-card strong {
  font-style: normal;
  font-family: var(--font-display);
  color: var(--color-retro-blue);
  margin-left: 16px;
}

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

/* Gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}
.gallery img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--color-retro-border);
  box-shadow: 0 2px 8px #B94E4822;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery img:hover {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 6px 24px #B94E4844;
  border-color: var(--color-retro-yellow);
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.faq-accordion > div {
  background: var(--color-retro-card);
  border: 2px solid var(--color-retro-border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: 0 2px 8px #B94E4822;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.faq-accordion > div:hover {
  border-color: var(--color-retro-blue);
  box-shadow: 0 6px 24px #4F6D7A33;
}

/* Timeline (About) */
.history-timeline {
  background: var(--color-retro-card);
  border: 2px dashed var(--color-retro-border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-top: 18px;
  box-shadow: 0 2px 8px #B94E4822;
}
.history-timeline ul {
  margin: 0;
  padding-left: 18px;
}
.history-timeline li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 18px;
}
.history-timeline li:before {
  content: '\25CF';
  color: var(--color-retro-yellow);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 1.1em;
}

/* --------------------
   BUTTONS
-------------------- */
button, .cta-btn, .cookie-btn {
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.cookie-btn {
  padding: 10px 24px;
  margin: 0 8px;
  font-size: 1rem;
  background: var(--color-retro-blue);
  color: #fff;
  box-shadow: 0 2px 8px #4F6D7A33;
}
.cookie-btn.accept {
  background: var(--color-retro-green);
}
.cookie-btn.reject {
  background: var(--color-retro-red);
}
.cookie-btn.settings {
  background: var(--color-retro-yellow);
  color: var(--color-primary);
}
.cookie-btn:hover, .cookie-btn:focus {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px #B94E4844;
}

/* --------------------
   FOOTER
-------------------- */
footer {
  background: var(--color-primary);
  color: #fff;
  padding: 36px 0 24px 0;
  border-top: 4px solid var(--color-retro-border);
  font-size: 1rem;
}
footer .container {
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.footer-menu {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}
.footer-menu a {
  color: var(--color-retro-yellow);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1rem;
  transition: color 0.2s;
}
.footer-menu a:hover, .footer-menu a:focus {
  color: var(--color-retro-red);
}
.footer-contact {
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 8px;
}
.social-links {
  display: flex;
  flex-direction: row;
  gap: 18px;
  justify-content: center;
}
.social-links a {
  color: var(--color-retro-yellow);
  font-size: 1.2rem;
  text-decoration: none;
  transition: color 0.2s;
}
.social-links a:hover, .social-links a:focus {
  color: var(--color-retro-red);
}

/* --------------------
   COOKIE CONSENT BANNER
-------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-retro-card);
  border-top: 3px solid var(--color-retro-yellow);
  box-shadow: 0 -2px 16px #B94E4822;
  padding: 24px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 9999;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.4s;
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}
.cookie-banner .cookie-text {
  color: var(--color-primary);
  font-size: 1rem;
  max-width: 420px;
}

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(35,61,77,0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: var(--color-retro-card);
  border: 3px solid var(--color-retro-yellow);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px #B94E4844;
  padding: 36px 28px 28px 28px;
  min-width: 320px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  animation: cookieModalIn 0.4s cubic-bezier(.77,0,.18,1);
}
@keyframes cookieModalIn {
  from { transform: translateY(60px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal h2 {
  font-size: 1.3rem;
  color: var(--color-retro-blue);
  margin-bottom: 10px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.cookie-modal .cookie-category label {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-primary);
}
.cookie-modal .cookie-category input[type="checkbox"] {
  accent-color: var(--color-retro-blue);
  width: 20px;
  height: 20px;
}
.cookie-modal .cookie-category.essential label {
  color: var(--color-retro-green);
  font-weight: bold;
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--color-retro-red);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.cookie-modal .cookie-modal-close:hover, .cookie-modal .cookie-modal-close:focus {
  color: var(--color-retro-blue);
}

/* --------------------
   RESPONSIVE DESIGN
-------------------- */
@media (max-width: 1024px) {
  .feature-grid > div, .card {
    min-width: 180px;
    max-width: 100%;
    padding: 20px 12px;
  }
  .gallery img {
    width: 120px;
    height: 80px;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 98vw;
    padding: 0 8px;
  }
  .section {
    padding: 28px 8px;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 0 4px;
  }
  .section {
    padding: 18px 2px;
    margin-bottom: 36px;
  }
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .feature-grid > div, .card {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .text-image-section img {
    max-width: 100%;
    min-width: 0;
  }
  .gallery {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
  }
  .gallery img {
    width: 90px;
    height: 60px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 10px;
  }
  .footer-menu, .footer-contact, .social-links {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
  }
  .cookie-banner {
    flex-direction: column;
    gap: 16px;
    padding: 18px 6px;
    font-size: 0.95rem;
  }
  .cookie-modal {
    padding: 18px 8px 14px 8px;
    min-width: 0;
    width: 98vw;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
  }
  h2 {
    font-size: 1.1rem;
  }
  .cta-btn, .cookie-btn {
    font-size: 0.95rem;
    padding: 8px 14px;
  }
}

/* --------------------
   MISCELLANEOUS
-------------------- */
ul, ol {
  padding-left: 22px;
}
li {
  margin-bottom: 8px;
}
a {
  color: var(--color-retro-blue);
  text-decoration: underline dotted;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--color-retro-red);
  text-decoration: underline wavy;
}
img {
  max-width: 100%;
  display: block;
}

/* Decorative retro corner pattern for cards */
.card:before, .feature-grid > div:before {
  content: '';
  position: absolute;
  top: -8px; left: -8px;
  width: 32px; height: 32px;
  background: url('data:image/svg+xml;utf8,<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="32" height="32" rx="8" fill="%23F7C873"/><circle cx="8" cy="8" r="4" fill="%23B94E48"/></svg>') no-repeat;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}
.card:after, .feature-grid > div:after {
  content: '';
  position: absolute;
  bottom: -8px; right: -8px;
  width: 32px; height: 32px;
  background: url('data:image/svg+xml;utf8,<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="32" height="32" rx="8" fill="%23B94E48"/><circle cx="24" cy="24" r="4" fill="%23F7C873"/></svg>') no-repeat;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}

/* Hide decorative corners on mobile for space */
@media (max-width: 600px) {
  .card:before, .card:after, .feature-grid > div:before, .feature-grid > div:after {
    display: none;
  }
}

/* --------------------
   ACCESSIBILITY
-------------------- */
:focus {
  outline: 2px dashed var(--color-retro-blue);
  outline-offset: 2px;
}

/* --------------------
   PRINT STYLES
-------------------- */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  .section, .card, .feature-grid > div { box-shadow: none !important; background: #fff !important; }
}
