/* =============================================================
   CSS Reset & Normalize
   ============================================================= */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.55;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* =============================================================
   Custom Fonts (Elegant/Classic with Fallbacks)
   ============================================================= */
@import url('https://fonts.googleapis.com/css?family=Playfair+Display:400,700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,400i,700&display=swap');
:root {
  --primary: #1B263B;
  --secondary: #415A77;
  --accent: #F7B32B;
  --bg: #F7F6F1;
  --white: #fff;
  --gray-50: #f7f7f7;
  --gray-100: #ececec;
  --gray-200: #d4d6d7;
  --text-main: #222220;
  --text-muted: #65696c;
  --shadow: 0 4px 20px 0 rgba(27,38,59,0.07);
  --border-radius: 10px;
  --transition: all 0.3s cubic-bezier(0.45,0.05,0.55,0.95);
  --border-color: #e5e5e5;
}

body {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--text-main);
  background: var(--bg);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--primary);
  letter-spacing: 0.01em;
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 16px;
}
h1 { font-size: 2.6rem; margin-bottom: 20px; }
h2 { font-size: 2rem; margin-bottom: 18px; }
h3 { font-size: 1.4rem; margin-bottom: 16px; }
h4 { font-size: 1.1rem; margin-bottom: 12px; }

p, li, td, dd, dt, input, label, textarea {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 400;
}
p { margin-bottom: 16px; }
strong, b { font-weight: 700; }

em, i { font-style: italic; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover, a:focus {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}

/* Buttons */
.cta-btn, .cookie-banner button, .cookie-modal button, .mobile-menu-toggle, .mobile-menu-close {
  font-family: 'Playfair Display', Georgia, serif;
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  margin: 8px 0 0 0;
  letter-spacing: 0.008em;
}
.cta-btn:hover,.cta-btn:focus,
.cookie-banner button:hover,.cookie-banner button:focus,
.cookie-modal button:hover,.cookie-modal button:focus {
  background: var(--secondary);
  color: var(--accent);
  outline: none;
}

/* =============================================================
   Layout Containers
   ============================================================= */
.container {
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
  padding-right: 20px;
  padding-left: 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover, .card:focus {
  box-shadow: 0 8px 28px 0 rgba(27,38,59,.14);
  transform: translateY(-2px) scale(1.015);
}
.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;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 28px;
  margin-bottom: 24px;
  background: var(--gray-50);
  border-left: 5px solid var(--accent);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px 0 rgba(27,38,59,0.07);
  font-style: italic;
  color: var(--primary);
  max-width: 600px;
}
.testimonial-card blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 1.18rem;
  color: var(--primary);
  margin: 0 0 10px 0;
}
.testimonial-card footer {
  font-family: 'Roboto', Arial, sans-serif;
  font-style: normal;
  font-size: 1rem;
  color: var(--gray-100);
  margin: 0;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Service Cards */
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  padding: 28px 20px 20px 20px;
  min-width: 250px;
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s, transform 0.12s;
}
.service-card h3 {
  color: var(--secondary);
  font-size: 1.15rem;
  font-family: 'Playfair Display', serif;
}
.service-card span {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}
.service-card p {
  font-size: 1rem;
  color: var(--text-muted);
}
.service-card:hover, .service-card:focus {
  box-shadow: 0 8px 28px 0 rgba(27,38,59,.13);
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent);
}

/* Services list on dienstleistungen */
.services-list li {
  margin-bottom: 20px;
  background: var(--gray-100);
  padding: 18px 22px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px 0 rgba(27,38,59,0.03);
  font-size: 1.04rem;
}
.services-list span {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  margin-left: 12px;
}

/* Pricing Table */
.pricing-table {
  width: 100%;
  margin-top: 16px;
  background: var(--gray-50);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
  font-size: 1.01rem;
}
.pricing-table caption {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 8px;
  padding: 8px 0;
}
.pricing-table th, .pricing-table td {
  padding: 12px 16px;
  text-align: left;
}
.pricing-table th {
  background: var(--gray-100);
  color: var(--primary);
  font-weight: 700;
}
.pricing-table tr:nth-child(even) td {
  background: var(--gray-50);
}
.pricing-table tr:nth-child(odd) td {
  background: var(--white);
}

/* FAQ styles */
dt {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 24px;
}
dd {
  margin-left: 0;
  margin-bottom: 12px;
  color: var(--text-main);
}

.quick-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 8px;
}
.quick-links li {
  background: var(--gray-100);
  padding: 10px 18px;
  border-radius: var(--border-radius);
}
.quick-links a {
  color: var(--primary);
  font-weight: 700;
}

/* Process timeline info */
.process-timeline {
  background: var(--gray-50);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent);
  padding: 18px 20px;
  margin: 24px 0 12px 0;
  box-shadow: 0 1px 6px 0 rgba(27,38,59,0.06);
}

/* Text sections on Kontakt/Datenschutz/etc */
.text-section {
  background: var(--gray-50);
  border-radius: var(--border-radius);
  padding: 18px 26px 18px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.text-section h2 {
  margin-top: 24px;
}

/* =============================================================
   Header and Navigation
   ============================================================= */
header {
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding: 18px 0 8px 0;
  justify-content: center;
}
.main-nav a {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.02rem;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 4px;
  transition: color 0.15s;
  font-weight: 500;
}
.main-nav a img {
  height: 38px;
  margin-right: 12px;
  vertical-align: middle;
}
.main-nav a.active, .main-nav a:hover, .main-nav a:focus {
  color: var(--accent);
}
header .cta-btn {
  margin-left: 16px;
  margin-top: 0;
}

/* Mobile Nav - Hamburger & Overlay */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: var(--primary);
  font-size: 2rem;
  border-radius: var(--border-radius);
  border: none;
  padding: 8px 16px;
  margin-left: auto;
  margin-right: 8px;
  margin-top: 8px;
  z-index: 1100;
  transition: var(--transition);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--secondary);
  color: var(--white);
  outline: none;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(27,38,59,0.97);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.68,.1,.19,1.11);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-menu-close {
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-size: 2.2rem;
  padding: 8px 20px 0 0;
  margin: 16px 8px 0 0;
  border-radius: var(--border-radius);
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.15s, color 0.13s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--secondary);
  color: var(--white);
}
.mobile-nav {
  margin: 36px 0 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 0 24px;
}
.mobile-nav a {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--white);
  padding: 16px 0;
  width: 100%;
  border-bottom: 1px solid rgba(247,179,43,0.18);
  transition: color 0.18s, background 0.2s;
  border-radius: 0;
  text-align: left;
}
.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--accent);
  background: rgba(65,90,119,0.18);
  outline: none;
}

/* Hide main nav and CTA on mobile */
@media (max-width: 900px) {
  .main-nav {
    display: none !important;
  }
  header .cta-btn {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: block !important;
  }
}
@media (min-width: 900px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
}

/* =============================================================
   Sections, Spacing & Responsive Flex Layouts
   ============================================================= */
section {
  margin-bottom: 60px;
  padding: 40px 0;
  background: none;
}
section:last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  section {
    padding: 28px 0;
    margin-bottom: 38px;
  }
}

/* Responsive content wrappers */
@media (max-width: 900px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .service-cards {
    flex-direction: column;
    gap: 18px;
  }
  .card-container, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .testimonial-card {
    max-width: 100%;
    padding: 16px 10px;
  }
}
@media (max-width: 768px) {
  .text-image-section, .content-grid {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .service-card, .card {
    min-width: 0;
    width: 100%;
  }
}

/* Ensure no overlap of elements by sufficient margin/padding */
section:not(:last-child), .card:not(:last-child), .testimonial-card:not(:last-child) {
  margin-bottom: 24px;
}

/* =============================================================
   Footer Styling
   ============================================================= */
footer {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 38px 0 15px 0;
  font-size: 0.99rem;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.footer-nav {
  flex: 1 1 190px;
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.footer-nav a {
  color: var(--white);
  font-weight: 400;
  opacity: 0.83;
  font-size: 0.98rem;
  margin-right: 6px;
  display: inline-block;
  transition: color 0.18s, opacity 0.14s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--accent);
  opacity: 1;
}
.footer-brand img {
  height: 36px;
  margin: 0px 12px 0 12px;
}
.impressum-link {
  flex: 0 0 auto;
}
.impressum-link a {
  color: var(--accent);
  font-size: 0.98rem;
  text-decoration: underline;
  font-weight: 700;
}
@media (max-width: 700px) {
  footer .container {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .footer-nav { flex-direction: column; gap: 4px; }
}

/* =============================================================
   Cookie Consent Banner & Modal
   ============================================================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 -1px 10px 0 rgba(27,38,59,0.09);
  padding: 18px 24px 22px 24px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  font-size: 1rem;
  border-radius: 10px 10px 0 0;
  opacity: 1;
  transition: transform 0.45s cubic-bezier(.67,.1,.19,1.11), opacity 0.25s ease;
}
.cookie-banner--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(130%);
}
.cookie-banner p {
  color: var(--primary);
}
.cookie-banner .banner-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
}
.cookie-banner button {
  background: var(--primary);
  color: var(--white);
  padding: 8px 19px;
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: none;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-top: 0;
}
.cookie-banner button.cookie-settings {
  background: var(--gray-100);
  color: var(--primary);
  border: 1px solid var(--border-color);
}
.cookie-banner button.cookie-settings:hover,
.cookie-banner button.cookie-settings:focus {
  background: var(--accent);
  color: var(--white);
}
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 8px 16px 8px;
    font-size: 0.97rem;
  }
  .cookie-banner .banner-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Cookie Modal Overlay */
.cookie-modal-backdrop {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(25,35,60,0.53);
  z-index: 1350;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.cookie-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: var(--white);
  min-width: 320px;
  max-width: 95vw;
  width: 400px;
  border-radius: 12px;
  box-shadow: 0 12px 40px 0 rgba(27,38,59,0.18);
  z-index: 1400;
  padding: 32px 24px 28px 24px;
  animation: fadeInScale 0.4s cubic-bezier(.68,.1,.19,1.11);
  font-size: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@keyframes fadeInScale {
  from { opacity: 0; transform: translate(-50%, -45%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.cookie-modal h2 {
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 1.09rem;
}
.cookie-modal-close {
  position: absolute;
  right: 18px; top: 12px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 2rem;
  cursor: pointer;
  transition: color .2s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--accent);
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 1rem;
}
.cookie-modal .cookie-category:last-child {
  border-bottom: none;
}
.cookie-modal .cookie-toggle {
  font-size: 1.21rem;
}
.cookie-modal .category-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-left: 6px;
}

/* Custom toggle switches */
.cookie-switch {
  position: relative; display: inline-block; width: 48px; height: 24px;
}
.cookie-switch input { opacity:0; width:0; height:0; }
.cookie-slider {
  position: absolute; cursor:pointer; top:0; left:0;
  right:0; bottom:0; background:var(--gray-100); border-radius:12px; transition:.3s;
  border: 1px solid var(--border-color);
}
.cookie-switch input:checked + .cookie-slider {
  background: var(--accent);
}
.cookie-slider:before {
  position: absolute; content:"";
  height: 20px; width: 20px; left:2px; bottom:2px;
  background: var(--white);
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 4px 0 rgba(27,38,59,0.11);
  border: 1px solid var(--border-color);
}
.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(24px);
}
.cookie-modal .btn-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
}
.cookie-modal button {
  padding: 9px 22px;
  border-radius: var(--border-radius);
  border: none;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  background: var(--primary);
  color: var(--white);
  margin: 0 0 0 0;
  font-size: 1rem;
}
.cookie-modal button.secondary {
  background: var(--gray-100);
  color: var(--secondary);
  border: 1px solid var(--border-color);
}
.cookie-modal button.secondary:hover {
  background: var(--secondary);
  color: var(--white);
}
@media (max-width: 420px) {
  .cookie-modal { min-width: 90vw; width:95vw; padding: 20px 8px; }
}

/* =============================================================
   Micro-interactions, Animations, Misc
   ============================================================= */
.card, .service-card, .testimonial-card, .cookie-banner, .cookie-modal {
  will-change: transform, box-shadow;
}
a, .cta-btn, button, .mobile-menu-toggle, .mobile-menu-close {
  transition: var(--transition);
}
/* Focus state for all interactive elements */
a:focus, button:focus, .cta-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Subtle shadows */
.card, .testimonial-card, .service-card {
  box-shadow: var(--shadow);
}

/* Selection highlight */
::selection { background: var(--accent); color: var(--primary); }

/* =============================================================
   Utilities & Helper Classes
   ============================================================= */
.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 16px !important; }

/* =============================================================
   Print / A11y (minimal for classic aesthetics)
   ============================================================= */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cta-btn, .cookie-banner, .cookie-modal, .cookie-modal-backdrop { display: none !important; }
  header, footer { box-shadow: none !important; }
}
