/* === CSS RESET & BASE === */
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, 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;
}
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
body { line-height: 1.4; }
ol, ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
table { border-collapse: collapse; border-spacing: 0; }
img { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; border: 0; }
input, button, textarea, select { font: inherit; }

/* === BRAND VARIABLES: fallback for non custom property support === */
:root {
  --mr-primary: #234B6F;
  --mr-secondary: #F1F3F6;
  --mr-accent: #F9B521;
  --mr-green: #408C50;
  --mr-earth1: #A2856E;
  --mr-earth2: #E8E3DC;
  --mr-sand: #F5EFE7;
  --mr-dark: #1A2F19;
  --mr-error: #BA3E18;
  --radius-xl: 2.5rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.5rem;
  --shadow-card: 0 6px 24px rgba(55,68,38,0.07);
  --shadow-btn: 0 2px 8px rgba(36,58,37,0.09);
  --shadow-hover: 0 8px 28px rgba(55,68,38,0.13);
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  color: #28513A;
  background: var(--mr-sand);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--mr-dark);
  letter-spacing: 0.01em;
  font-weight: 700;
}
h1 { font-size: 2.5rem; line-height: 1.13; margin-bottom: 20px; }
h2 { font-size: 2rem; margin-bottom: 16px; }
h3 { font-size: 1.35rem; margin-bottom: 12px; }
h4, h5, h6 { font-size: 1.1rem; margin-bottom: 6px; }

p, ul, ol, li, span, a, td, th {
  font-size: 1rem;
  color: #28513A;
  line-height: 1.7;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

main {
  min-height: 70vh;
}

/* === SECTION SPACING AND MODULARITY === */
section { 
  margin-bottom: 60px; 
  padding: 40px 20px; 
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;
}
.content-wrapper {
  width: 100%;
  margin: 0 auto;
  max-width: 870px;
}

/* = FLEX LAYOUTS = */
.feature-grid, .service-cards, .case-studies, .testimonials, .contact-details, .team-bios, .faq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.feature-grid, .service-cards, .case-studies, .contact-details, .team-bios {
  justify-content: space-between;
}
.testimonials, .faq-list {
  flex-direction: column;
  align-items: stretch;
}

.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.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; box-shadow: var(--shadow-card); background: var(--mr-secondary); border-radius: var(--radius-md); margin-bottom: 20px; border-left: 6px solid var(--mr-green); min-width: 220px; transition: box-shadow 0.25s; }
.testimonial-card:hover, .testimonial-card:focus-within {
  box-shadow: var(--shadow-hover);
}
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* === BUTTONS === */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 13px 34px;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.20s, transform 0.18s;
  outline: none;
  margin-top: 9px;
  margin-bottom: 8px;
  gap: 8px;
}
.btn-primary {
  background: var(--mr-green);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: #28513A;
  color: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.03);
}
.btn-secondary {
  background: #fff;
  color: var(--mr-green);
  border: 2px solid var(--mr-green);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--mr-earth2);
  color: #1A2F19;
  box-shadow: var(--shadow-hover);
}

/* === NAVBAR & HEADER === */
header {
  width: 100%;
  background: linear-gradient(88deg, #E8E3DC 84%, #C8DBC1 120%);
  border-bottom: 2px solid var(--mr-earth1);
  box-shadow: 0 4px 18px rgba(94, 120, 80, 0.04);
  position: relative;
  z-index: 1002;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  padding-top: 0; padding-bottom: 0;
}
header nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
header nav a {
  font-weight: 500;
  padding: 7px 0;
  color: #28513A;
  border-radius: 2px;
  position: relative;
  transition: color 0.17s, background 0.18s;
}
header nav a:hover, header nav a:focus {
  color: var(--mr-green);
  background: #e3ede3;
}
header img[alt="MeisterReparatur"] {
  height: 48px;
  width: auto;
  margin-right: 22px;
}
.mobile-menu-toggle {
  display: none;
  background: var(--mr-green);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  border: none;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-btn);
  margin-left: 16px;
  cursor: pointer;
  transition: background 0.22s, color 0.18s, transform 0.18s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: #28513A;
  color: #fff;
}

/* === MOBILE MENU === */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  background: rgba(34,75,111,0.84);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4,0.16,0.3,1), opacity 0.19s;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}
.mobile-menu.open {
  transform: translateX(0);
  transition: transform 0.33s cubic-bezier(0.44,0.2,0.25,1);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: #fff;
  color: var(--mr-primary);
  border: none;
  font-size: 2rem;
  border-radius: 100px;
  width: 42px; height: 42px;
  margin: 23px 20px 12px 15px;
  align-self: flex-end;
  cursor: pointer;
  transition: background 0.19s, color 0.15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--mr-accent);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 25px 32px 0 34px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.2rem;
  font-family: 'Montserrat', Arial, sans-serif;
  padding: 14px 4px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.16s, color 0.14s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--mr-accent);
  color: #fff;
}

/* === HERO / CTA SECTION === */
section:first-of-type {
  background: linear-gradient(100deg, #F1F3F6 78%, #E8E3DC 100%);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: 0 4px 18px rgba(42, 82, 42, 0.05);
}
section .btn-primary {
  margin-top: 24px;
}

/* === FEATURE CARDS === */
.feature-grid {
  margin-top: 24px;
  gap: 24px;
}
.feature {
  background: var(--mr-earth2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 20px 26px 20px;
  flex: 1 1 200px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.22s, transform 0.17s;
}
.feature img { margin-bottom: 12px; height: 40px; }
.feature h3 { color: var(--mr-green); font-size: 1.22rem; }
.feature:hover, .feature:focus-within {
  box-shadow: 0 10px 32px rgba(62, 117, 68, 0.13);
  transform: translateY(-4px) scale(1.035);
}

/* === SERVICE CARDS === */
.service-cards {
  gap: 24px;
  margin-bottom: 22px;
}
.service-card {
  background: var(--mr-sand);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px 22px 24px 22px;
  flex: 1 1 210px;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.15s;
  margin-bottom: 20px;
}
.service-card img {
  margin-bottom: 11px; height: 36px;
}
.service-card h3 {
  color: var(--mr-primary);
  font-size: 1.13rem;
}
.service-card:hover, .service-card:focus-within {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px) scale(1.029);
}

/* === TESTIMONIALS === */
.testimonials {
  gap: 24px;
}
.testimonial-card p {
  font-size: 1.15rem;
  color: #1A2F19;
  margin-bottom: 8px;
  font-style: italic;
}
.testimonial-card span {
  font-size: 1rem;
  color: var(--mr-green);
  font-weight: 500;
}
.stars {
  color: var(--mr-accent);
  font-size: 1.3rem;
  margin-top: 3px;
  letter-spacing: 2px;
  font-family: 'Montserrat', Arial, sans-serif;
}

/* === FAQ === */
.faq-list {
  flex-direction: column;
  gap: 22px;
  margin-bottom: 30px;
}
.faq-question h3 {
  font-size: 1.04rem;
  color: var(--mr-green);
  margin-bottom: 6px;
}
.faq-question p {
  color: #2A4826;
}
.faq-contact-prompt {
  background: var(--mr-earth2);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  margin-top: 16px;
  font-size: 1.02rem;
}

/* === PRICING TABLE === */
.pricing-table {
  width: 100%;
  margin: 18px 0 24px 0;
  background: var(--mr-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-size: 1rem;
}
.pricing-table thead th {
  background: var(--mr-green);
  color: #fff;
  font-weight: 700;
  padding: 14px 8px;
  text-align: left;
}
.pricing-table tbody td {
  padding: 13px 8px;
  border-bottom: 1px solid #e3e2d8;
  color: #2A4826;
}
.pricing-table tbody tr:last-child td {
  border: none;
}
.price-disclaimer {
  color: #A2856E;
  font-size: 0.98rem;
  font-style: italic;
  margin-top: 10px;
}

/* === CASE STUDIES === */
.case-studies {
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.case-studies > div {
  background: var(--mr-earth2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px 18px 16px 18px;
  flex: 1 1 280px;
  min-width: 190px;
  margin-bottom: 12px;
}
.case-studies h3 {
  color: var(--mr-primary);
  margin-bottom: 7px;
}

/* === TEAM BIOS === */
.team-bios {
  gap: 24px;
  margin-bottom: 18px;
}
.team-bios > div {
  background: var(--mr-sand);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 18px 16px 16px 18px;
  flex: 1 1 220px;
  min-width: 170px;
}
.team-bios h3 {
  color: var(--mr-green);
  margin-bottom: 7px;
}
.team-bios p {
  font-size: 1.01rem;
}

/* === CONTACT DETAILS === */
.contact-details {
  gap: 24px;
  margin-bottom: 18px;
}
.contact-details > div {
  background: var(--mr-sand);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 15px 15px 8px 16px;
  flex: 1 1 150px;
}
.contact-details h3 {
  color: var(--mr-primary);
  margin-bottom: 7px;
  font-size: 1.02rem;
}
.contact-details span, .contact-details a {
  font-size: 0.99rem;
  color: #28513A;
}
.contact-details img { height: 19px; margin-right: 7px; vertical-align: middle; }

/* === FOOTER === */
footer {
  width: 100%;
  background: linear-gradient(90deg, #E8E3DC 89%, #C8DBC1 115%);
  border-top: 2px solid var(--mr-earth1);
  padding: 42px 0 32px 0;
  margin-top: 40px;
  position: relative;
  font-size: 1rem;
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: center;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--mr-green);
  margin-bottom: 13px;
}
.footer-nav a {
  color: var(--mr-green);
  font-weight: 700;
  font-size: 1rem;
  transition: color 0.14s;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--mr-primary);
}
.contact-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.contact-summary span {
  display: flex; align-items: center;
  min-width: 190px;
  color: var(--mr-dark);
  background: rgba(250,253,248,0.65);
  border-radius: var(--radius-sm);
  padding: 5px 11px 4px 9px;
  margin-bottom: 2px;
  font-size: 1rem;
}
.contact-summary img {
  height: 19px;
  margin-right: 6px;
}

/* === COOKIE CONSENT BANNER === */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2100;
  background: var(--mr-secondary);
  box-shadow: 0 -2px 12px rgba(55,68,38,0.11);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 18px 20px 24px;
  font-size: 1rem;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  transition: transform 0.27s, opacity 0.19s;
}
.cookie-consent-banner.hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
.cookie-consent-text { max-width: 600px; color: #2A4826; font-size: 1rem; }
.cookie-btns {
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: center;
}
.cookie-consent-banner button {
  min-width: 118px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  margin: 0 5px 2px 0;
  transition: background 0.16s, color 0.14s;
}
.cookie-accept {
  background: var(--mr-green);
  color: #fff;
}
.cookie-accept:hover, .cookie-accept:focus {
  background: #1A2F19;
}
.cookie-reject {
  background: #fff;
  color: var(--mr-green);
  border: 2px solid var(--mr-green);
}
.cookie-reject:hover, .cookie-reject:focus {
  background: var(--mr-earth2);
  color: #1A2F19;
}
.cookie-settings {
  background: var(--mr-accent);
  color: #fff;
}
.cookie-settings:hover, .cookie-settings:focus {
  background: #e2a303;
  color: #fff;
}

/* === COOKIE PREFERENCES MODAL === */
.cookie-modal {
  position: fixed;
  left: 50%; top: 50%;
  z-index: 3000;
  background: var(--mr-secondary);
  box-shadow: 0 6px 32px rgba(42,81,44,0.18);
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 410px;
  padding: 34px 27px 25px 27px;
  transform: translate(-50%,-55%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.21s, transform 0.24s;
  display: flex; flex-direction: column;
  gap: 17px;
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-50%) scale(1);
}
.cookie-modal h3 {
  color: var(--mr-primary);
  font-weight: 700;
  font-size: 1.18rem;
}
.cookie-cats {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 14px 0 6px 0;
}
.cookie-cat {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cookie-cat label {
  font-size: 1rem;
  color: #28513A;
}
.cookie-cat input[type='checkbox'], .cookie-cat input[type='radio'] {
  width: 18px; height: 18px;
  accent-color: var(--mr-green);
}
.cookie-cat.essential label { font-weight: 700; color: var(--mr-green); }
.cookie-modal-actions {
  display: flex; gap: 16px; margin-top: 20px;
  justify-content: flex-end;
}
.cookie-modal-actions button {
  min-width: 108px;
}

/* === TABLES (PRICES) === */
table {
  width: 100%;
  margin-bottom: 12px;
  font-size: 1rem;
}
th, td { padding: 14px 8px; }

/* === ORGANIC/NATURE INSPIRED SHAPES === */
section,
.feature,
.service-card,
.testimonial-card,
.case-studies > div,
.team-bios > div,
.contact-details > div,
.content-wrapper,
.footer-nav,
.cookie-modal,
.cookie-consent-banner {
  border-radius: var(--radius-xl) 46px var(--radius-lg) 62px / 36px 64px var(--radius-md) 52px;
}

hr {
  border: none; height: 2px; background: var(--mr-secondary); margin: 24px 0;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1020px) {
  .container { max-width: 98vw; }
}
@media (max-width: 900px) {
  section { padding: 32px 5vw; }
  .content-wrapper { max-width: 98vw; }
  .feature-grid, .service-cards, .case-studies, .testimonials, .team-bios, .contact-details { gap: 15px; }
}
@media (max-width: 768px) {
  header .container {
    height: 70px;
    flex-direction: row;
    gap: 12px;
  }
  header nav {
    display: none !important;
  }
  .mobile-menu-toggle{
    display: flex;
  }
  section { padding: 28px 6vw; margin-bottom: 36px; } 
  h1 { font-size: 2rem; }
  h2 { font-size: 1.47rem; }
  h3 { font-size: 1.1rem; }
  .feature-grid, .service-cards, .case-studies, .team-bios, .contact-details { flex-direction: column; gap: 16px; }
  .text-image-section, .content-grid { flex-direction: column; gap: 16px; }
  .testimonials, .faq-list { gap: 14px; }
  .footer-nav, .contact-summary { flex-direction: column; gap: 12px; align-items: stretch; }
  .footer-nav { font-size: 0.95rem; }
}
@media (max-width: 480px) {
  html { font-size: 15px; }
  .cookie-consent-banner { flex-direction: column; gap: 14px; padding: 18px 7px 14px 9px; font-size: 0.97rem; }
  .cookie-btns { flex-direction: column; gap: 7px; }
  .cookie-modal { padding: 17px 6px 10px 8px; }
  .content-wrapper, section { padding: 19px 3vw; }
}

/* ========== UTILITIES & MICROINTERACTIONS ========== */
.btn-primary:active, .btn-secondary:active {
  filter: brightness(0.97) saturate(0.92);
}
header nav a.active, .mobile-nav a.active {
  color: var(--mr-green);
  text-decoration: underline solid var(--mr-green) 2px;
  text-underline-offset: 3px;
}

input:focus, button:focus, a:focus {
  outline: 2px dotted var(--mr-green);
  outline-offset: 1px;
}

::-webkit-scrollbar { width: 10px; background: var(--mr-secondary); }
::-webkit-scrollbar-thumb { background: var(--mr-green); border-radius: 33px; }

/* === ACCENT ANIMATIONS === */
@keyframes organic-pop {
  0%   {transform: scale(0.98); }
  50%  {transform: scale(1.04); }
  100% {transform: scale(1); }
}
.testimonial-card:hover, .service-card:hover, .feature:hover, .card:hover {
  animation: organic-pop 0.40s;
}

/* === Z-INDEX and OVERLAPS === */
header, .mobile-menu, .cookie-consent-banner, .cookie-modal {
  z-index: 1000;
}

/* === MINIMUM CARD GAP ENFORCEMENT === */
.service-cards > *, .feature-grid > *, .case-studies > *, .team-bios > *, .contact-details > * {
  margin-bottom: 20px;
}

/* === SPECIAL: FAQ & TEXT === */
.faq-list > .faq-question {
  background: var(--mr-earth2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 14px 11px 15px;
  margin-bottom: 10px;
}

/* === SPECIAL: ACTIVE STATES & LINKED BUTTONS === */
a.btn-primary, a.btn-secondary {
  text-align: center;
  border: none;
}
a.btn-primary:visited, a.btn-secondary:visited {
  color: inherit;
}

/* =========== PRINT STYLES (MINIMAL) =========== */
@media print {
  header, .mobile-menu, .cookie-consent-banner, .cookie-modal, footer { display: none !important; }
  section, body, .container, .content-wrapper { background: #fff !important; box-shadow: none !important; }
}
