/* ==================================================  
   BücherGeflecht | Elegant Classic UI CSS
   Responsive, Flexbox-Only, High Contrast, Timeless Design
   =================================================== */

/* ========== 1. RESET & NORMALIZATION ========== */
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;
}

html {
  height: 100%;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  background: #F7F9F9;
  color: #2E4053;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
a {
  text-decoration: none;
  color: #2E4053;
  transition: color 0.2s;
}
a:focus {
  outline: 2px solid #D4AC0D;
}
ul,
ol {
  margin-left: 1.6em;
}
li {
  margin-bottom: 0.5em;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* ========== 2. BRAND & TYPOGRAPHY ========== */
:root {
  --color-primary: #2E4053;
  --color-secondary: #F7F9F9;
  --color-accent: #D4AC0D;
  --color-light: #fff;
  --color-muted: #ECECEC;
  --color-border: #D7DBDD;
  --color-shadow: rgba(46,64,83,0.04);
  --color-contrast: #232529;
  --shadow-card: 0 2px 10px rgba(46,64,83,0.07);
  --shadow-elevate: 0 16px 32px rgba(46,64,83,0.09);
  --radius: 12px;
  --transition-fast: 0.15s cubic-bezier(.25,.8,.25,1);
  --transition-main: 0.3s cubic-bezier(.23,1,.32,1);
  --font-display: 'Merriweather', serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
}
h1 { font-size: 2.5rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 20px; }
h3 { font-size: 1.3rem; margin-bottom: 16px; font-weight: 600; }
h4 { font-size: 1.15rem; }
p, li, blockquote {
  font-family: var(--font-body);
  font-size: 1rem;
}
.subtitle {
  font-size: 1.25rem;
  margin-bottom: 18px;
  color: #55595d;
  font-family: var(--font-display);
  font-weight: 400;
}
strong { font-weight: 700; font-family: var(--font-display); }
blockquote {
  quotes: "\201E" "\201C" "\201A" "\2018";
  padding-left: 22px;
  border-left: 3px solid var(--color-accent);
  color: var(--color-primary);
  font-style: italic;
  margin-bottom: 12px;
  font-family: var(--font-display);
  background: transparent;
}

.text-section {
  margin-bottom: 24px;
}

/* ========== 3. LAYOUT CONTAINERS ========== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========== 4. NAVIGATION & HEADER ========== */
header {
  background: var(--color-light);
  box-shadow: 0 4px 16px var(--color-shadow);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 200;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
header a img {
  height: 48px;
  width: auto;
}
nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
nav a {
  font-family: var(--font-body);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}
nav a:hover,
nav a:focus {
  background: var(--color-accent);
  color: var(--color-light);
}

/* ========== 5. MOBILE MENU ========== */
.mobile-menu-toggle {
  display: none;
  background: var(--color-light);
  color: var(--color-primary);
  font-size: 2rem;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  margin-left: 12px;
  transition: background var(--transition-fast);
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--color-accent);
  color: var(--color-light);
}
.mobile-menu {
  position: fixed;
  left: 0; top: 0; bottom: 0; right: 0;
  z-index: 300;
  background: rgba(47,64,83, 0.90);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform: translateX(-100%);
  transition: transform var(--transition-main);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  color: var(--color-light);
  font-size: 2.3rem;
  border: none;
  cursor: pointer;
  margin: 32px 24px 0 0;
  align-self: flex-end;
  transition: color var(--transition-fast);
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  color: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 48px 32px;
  gap: 18px;
}
.mobile-nav a {
  color: var(--color-light);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
  width: 100%;
  transition: color var(--transition-fast);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-accent);
  background: none;
}

@media (max-width: 1024px) {
  header nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* ========== 6. HERO STYLING ========== */
.hero {
  background: var(--color-secondary);
  padding: 60px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  min-height: 30vh;
}
.hero .container {
  align-items: center;
  justify-content: center;
}
.hero .content-wrapper {
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  gap: 14px;
}
.hero h1 {
  margin-bottom: 10px;
  font-size: 2.5rem;
}
.hero .subtitle {
  color: #56606a;
  margin-bottom: 12px;
}

/* ========== 7. BUTTONS ========== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  padding: 12px 32px;
  margin-top: 10px;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(46,64,83,0.08);
  cursor: pointer;
  transition: background var(--transition-main), color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  text-align: center;
  letter-spacing: 0.015em;
}
.button:hover, .button:focus {
  background: #B7950B;
  color: var(--color-light);
  box-shadow: 0 6px 18px rgba(46,64,83,0.14);
}
.button.primary {
  background: var(--color-primary);
  color: var(--color-light);
}
.button.primary:hover, .button.primary:focus {
  background: #223049;
  color: var(--color-accent);
}

.quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.quicklinks a {
  color: var(--color-primary);
  background: var(--color-muted);
  font-family: var(--font-body);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-weight: 600;
  border: 1px solid var(--color-border);
}
.quicklinks a:hover, .quicklinks a:focus {
  background: var(--color-accent);
  color: var(--color-light);
}

/* ========== 8. SERVICE & CARD STYLES ========== */
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.service-card {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-card);
  flex: 1 1 270px;
  min-width: 270px;
  max-width: 320px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  transition: box-shadow var(--transition-main), border-color var(--transition-fast);
  position: relative;
}
.service-card h3 {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.17rem;
  margin-bottom: 4px;
  font-weight: 700;
}
.service-card:hover, .service-card:focus-within {
  box-shadow: 0 6px 24px rgba(46,64,83,0.13);
  border-color: #B7950B;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 370px;
  background: var(--color-light);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 28px 22px;
}

/* ========== 9. GRID & FLEX PATTERNS ========== */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--color-secondary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(46,64,83,0.05);
  margin-bottom: 20px;
  margin-top: 6px;
  flex-wrap: wrap;
  min-width: 250px;
  max-width: 650px;
  color: var(--color-primary);
  font-size: 1.07rem;
}
.testimonial-card strong {
  color: var(--color-accent);
  font-family: var(--font-body);
}

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

/* List adjustments */
ul, ol {
  padding-left: 22px;
  margin-bottom: 12px;
}
ul ul, ol ol {
  margin-bottom: 0;
}

/* ========== 10. FOOTER ========== */
footer {
  background: var(--color-primary);
  color: var(--color-light);
  font-size: 1rem;
  margin-top: 44px;
  padding: 36px 0 18px 0;
}
footer .container {
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
footer nav {
  display: flex;
  gap: 22px;
  margin-bottom: 10px;
}
footer nav a {
  color: var(--color-light);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: background var(--transition-main), color var(--transition-fast);
}
footer nav a:hover, footer nav a:focus {
  background: var(--color-accent);
  color: var(--color-primary);
}
footer p {
  font-size: 0.94rem;
}

/* ========== 11. COOKIE CONSENT BANNER ========== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-light);
  color: var(--color-primary);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 18px rgba(46,64,83,0.12);
  z-index: 9999;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5vw 22px 5vw;
  gap: 34px;
  font-size: 1rem;
  transition: transform .34s cubic-bezier(0.42,0,0.58,1), opacity .2s;
}
.cookie-banner.hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .cookie-banner-content {
  max-width: 580px;
  flex: 1 1 auto;
}
.cookie-banner .cookie-banner-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  flex: 0 0 auto;
}
.cookie-banner button {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  padding: 11px 25px;
  margin: 0;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  box-shadow: none;
}
.cookie-banner button.accept {
  background: var(--color-primary);
  color: var(--color-light);
}
.cookie-banner button.accept:hover, .cookie-banner button.accept:focus {
  background: #223049;
  color: var(--color-accent);
}
.cookie-banner button.reject {
  background: var(--color-accent);
  color: var(--color-primary);
}
.cookie-banner button.reject:hover, .cookie-banner button.reject:focus {
  background: #B7950B;
  color: var(--color-light);
}
.cookie-banner button.settings {
  background: var(--color-muted);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.cookie-banner button.settings:hover, .cookie-banner button.settings:focus {
  background: var(--color-accent);
  color: var(--color-light);
}

/* Cookie Settings Modal */
.cookie-modal-overlay {
  position: fixed;
  z-index: 10000;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(46,64,83, 0.62);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: var(--color-light);
  color: var(--color-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevate);
  padding: 36px 30px 28px 30px;
  width: 95%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  animation: fadeInModal .3s cubic-bezier(.23,1,.32,1);
}
@keyframes fadeInModal {
  from { transform: scale(0.935); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cookie-modal h2 {
  font-size: 1.27rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: var(--color-muted);
  border-radius: 8px;
  padding: 15px 14px;
  margin-bottom: 14px;
  font-size: 1rem;
}
.cookie-category label {
  font-weight: 600;
  font-family: var(--font-display);
}
.cookie-modal .cookie-category input[type=checkbox] {
  transform: scale(1.24);
  accent-color: var(--color-accent);
}
.cookie-modal .cookie-category input[disabled] {
  opacity: 0.42;
  pointer-events: none;
}
.cookie-modal .cookies-save {
  margin-top: 20px;
  background: var(--color-primary);
  color: var(--color-light);
  padding: 11px 22px;
  border: none;
  border-radius: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.cookie-modal .cookies-save:hover, .cookie-modal .cookies-save:focus {
  background: #223049;
  color: var(--color-accent);
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  cursor: pointer;
  opacity: 0.85;
  padding: 4px 7px;
  border-radius: 6px;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.cookie-modal .cookie-modal-close:hover, .cookie-modal .cookie-modal-close:focus {
  background: var(--color-accent);
  color: var(--color-light);
}

/* ========== 12. MISCELLANEOUS & UTILITY ========== */
::-webkit-scrollbar {
  width: 8px;
  background: rgba(223,223,223, 0.1);
}
::-webkit-scrollbar-thumb {
  background: #D7DBDD;
  border-radius: 4px;
}
::selection {
  background: var(--color-accent);
  color: var(--color-light);
}

/* Info boxes */
.info, .notice, .alert {
  border-left: 4px solid var(--color-accent);
  background: var(--color-muted);
  color: var(--color-primary);
  padding: 18px 22px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  font-size: 1rem;
}

/* ========== 13. RESPONSIVE DESIGN (MOBILE-FIRST) ========== */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.09rem; }
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .section, .hero {
    padding: 28px 8px;
  }
  .content-wrapper {
    gap: 18px;
  }
  .service-cards, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    min-width: unset;
    max-width: unset;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .hero .content-wrapper {
    align-items: flex-start;
    padding: 0 0;
    text-align: left;
  }
  .quicklinks {
    flex-direction: column;
    gap: 14px;
  }
  .cookie-banner {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding: 14px 5vw 14px 5vw;
  }
  .cookie-banner .cookie-banner-actions {
    flex-direction: column;
    gap: 10px;
    align-self: stretch;
    width: 100%;
  }
}

/* XS screens */
@media (max-width: 400px) {
  .service-card, .card {
    padding: 18px 7px;
    min-width: 150px;
    max-width: unset;
  }
  .cookie-modal {
    padding: 17px 6px 14px 6px;
    max-width: 98vw;
  }
}

/* ========== 14. ACCESSIBILITY ========== */
:focus {
  outline: 2px solid var(--color-accent) !important;
  outline-offset: 1px;
}

/* ========== 15. PRINT STYLES ========== */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  body {
    color: #222;
    background: #fff;
  }
  .section, .hero {
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: #fff;
  }
}
