/* =================== 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.6;
  background: #fff;
  color: #25426E;
}
ol, ul {
  list-style: none;
}
a {
  background-color: transparent;
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}
button {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  background: none;
}
input, textarea, select {
  font: inherit;
  border-radius: 0;
}

/* =================== FONT IMPORTS =================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Roboto:wght@400;500;700&display=swap');

:root {
  --color-primary: #25426E;
  --color-secondary: #E7E9ED;
  --color-accent: #8BBE43;
  --color-bg: #fff;
  --color-grey: #f5f7fa;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(37, 66, 110, 0.08);
  --transition: all 0.18s cubic-bezier(.33,.12,.56,.89);
}

/* =================== LAYOUT =================== */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-primary);
  font-size: 16px;
  min-height: 100vh;
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  /* For geometric structure alignment */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 768px) {
  .section {
    margin-bottom: 36px;
    padding: 28px 8px;
  }
}

main {
  flex: 1 0 auto;
  background: var(--color-bg);
}

/* =================== TYPOGRAPHY =================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1 {
  font-size: 2.75rem;
  line-height: 1.12;
  margin-bottom: 20px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}
h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: 700;
}
p, ul li, ol li {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #25426E;
  margin-bottom: 4px;
}
strong {
  font-weight: 700;
}

@media (max-width: 768px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.31rem; }
  h3 { font-size: 1.09rem; }
}

/* Visual hierarchy */
.section > .container > h2,
.section > .container > h1 {
  border-left: 6px solid var(--color-accent);
  padding-left: 18px;
  margin-bottom: 16px;
}

/* =================== BUTTONS =================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.01rem;
  border-radius: var(--radius);
  padding: 13px 34px;
  min-width: 170px;
  text-align: center;
  transition: var(--transition);
  border: 2.7px solid var(--color-primary);
  box-shadow: 0 2px 6px rgba(37, 66, 110, 0.10);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 8px;
  margin-bottom: 8px;
}
.btn-primary:hover, 
.btn-primary:focus {
  background: var(--color-accent);
  color: #25426E;
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(139, 190, 67, 0.22);
  outline: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: var(--radius);
  padding: 12px 28px;
  border: 2px solid var(--color-secondary);
  transition: var(--transition);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #dbe2ee;
  border-color: #b9c3d2;
}

.btn-tertiary {
  background: transparent;
  color: var(--color-primary);
  padding: 9px 21px;
  border-radius: 8px;
  border: 2px solid var(--color-primary);
  font-weight: 600;
  transition: var(--transition);
  text-transform: uppercase;
}
.btn-tertiary:hover, .btn-tertiary:focus {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-accent);
}

/* =================== HEADER & NAVIGATION =================== */
header {
  background: var(--color-secondary);
  box-shadow: 0px 2px 12px rgba(37,66,110,0.11);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 21;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 12px;
  padding-bottom: 12px;
}
header nav {
  display: flex;
  flex-direction: row;
  gap: 22px;
  font-family: var(--font-display);
  font-size: 1rem;
}
header nav a {
  position: relative;
  color: var(--color-primary);
  font-weight: 700;
  transition: color .19s cubic-bezier(.33,.12,.56,.89);
  padding: 5px 2px;
}
header nav a:after {
  content: '';
  display: block;
  width: 0%;
  height: 2.5px;
  background: var(--color-accent);
  margin-top: 2.5px;
  border-radius: 1.5px;
  transition: width .27s cubic-bezier(.55,.15,1,.35);
}
header nav a:hover:after, 
header nav a:focus:after {
  width: 65%;
}
header nav a:hover, header nav a:focus {
  color: var(--color-accent);
}

header .btn-primary {
  margin: 0 0 0 18px;
  min-width: 134px;
  font-size: .97rem;
}

/* Logo align left at all times */
header .container > a {
  display: flex;
  align-items: center;
  min-width: 120px;
}
header img[alt="AlentFigge Immobilien"] {
  max-height: 44px;
  width: auto;
}

/* =================== MOBILE NAVIGATION =================== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  right: 20px; top: 18px;
  width: 46px; height: 46px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 10px;
  align-items: center; justify-content: center;
  z-index: 999;
  font-size: 2.2rem;
  border: none;
  transition: var(--transition);
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: var(--color-accent);
  color: var(--color-primary);
  outline: 0;
}
@media (max-width: 1023px) {
  header nav,
  header .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #fff;
  z-index: 10000;
  transform: translateX(-110vw);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0;
  transition: transform .37s cubic-bezier(.69,.18,.33,.91);
  box-shadow: 0 0 44px rgba(37,66,110,.15);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  display: block;
  margin: 28px 0 16px 26px;
  background: var(--color-accent);
  color: var(--color-primary);
  border-radius: 10px;
  width: 46px; height: 46px;
  font-size: 2.3rem;
  text-align: center;
  transition: var(--transition);
  border: none;
}
.mobile-menu-close:focus {
  outline: 2px solid var(--color-primary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100vw;
  align-items: flex-start;
  padding-left: 36px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  padding: 10px 2px;
  border-radius: 6px;
  background: transparent;
  transition: background .16s;
  width: 80vw;
  max-width: 450px;
  margin-left: 0;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-accent);
  outline: none;
}

/* =================== FLEX CONTAINERS =================== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.card {
  background: var(--color-grey);
  border: 1.3px solid var(--color-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 24px;
  min-width: 256px;
  flex:1 1 320px;
  transition: box-shadow .18s cubic-bezier(.33,.12,.56,.89), transform .13s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card:hover {
  box-shadow: 0 10px 38px rgba(37,66,110,.17);
  transform: translateY(-3px) scale(1.012);
}

.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) {
  .content-grid, .text-image-section, .testimonial-row {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 1.3px solid var(--color-secondary);
  border-radius: var(--radius);
  box-shadow: 0 3px 21px rgba(37, 66, 110, 0.07);
  padding: 20px;
  margin-bottom: 20px;
  min-width: 210px;
  max-width: 505px;
  transition: box-shadow .19s, background .18s;
}
.testimonial-card p {
  font-size: 1.08rem;
  color: #25426E;
  font-family: var(--font-body);
}
.testimonial-card strong {
  color: var(--color-primary);
  font-size: 1.05rem;
  font-family: var(--font-display);
}
.testimonial-card:hover {
  box-shadow: 0 8px 35px rgba(37,66,110,0.13);
  background: var(--color-grey);
}

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

/* =================== LIST, ICONS & GEOMETRY =================== */
ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
ul li {
  display: flex;
  align-items: center;
  font-size: 1rem;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}
ul li img {
  width: 30px;
  height: 30px;
  margin-right: 14px;
  flex-shrink: 0;
  filter: grayscale(0.18) brightness(0.95);
}
ul li strong {
  font-weight: bold;
  font-family: var(--font-display);
  color: var(--color-primary);
  margin-right: 0.4em;
}

/* Geometric visual elements */
.card, .testimonial-card {
  border-radius: 12px 24px 12px 24px;
  /* Angular geometry */
}
.btn-primary, .btn-secondary, .btn-tertiary, .mobile-menu-toggle, .mobile-menu-close {
  border-radius: 10px;
}

/* =================== CONTACT DETAILS =================== */
.contact-details {
  font-size: 0.99rem;
  margin-top: 16px;
  color: #25426E;
  font-family: var(--font-body);
  line-height: 1.8;
}
.contact-details img {
  display: inline-block;
  vertical-align: middle;
  margin-right: 7px;
  width: 20px;
  height: 20px;
}
.contact-details a {
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  transition: color .15s, border .1s;
}
.contact-details a:hover {
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
}

/* =================== FOOTER =================== */
footer {
  background: var(--color-secondary);
  padding-top: 28px;
  padding-bottom: 22px;
  margin-top: 50px;
  border-top: 3px solid var(--color-accent);
}
footer .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 17px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
footer nav a {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  transition: color .15s;
  padding: 2px 0;
}
footer nav a:hover {
  color: var(--color-accent);
}
footer .copyright {
  color: #727A85;
  font-size: .90rem;
}

footer img[alt="AlentFigge Immobilien"] {
  max-height: 36px;
  margin-bottom: 10px;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 991px) {
  .container {
    max-width: 98vw;
    padding: 0 10px;
  }
}
@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    gap: 16px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .content-wrapper, .card-container, .content-grid, .testimonial-card, .feature-item {
    gap: 15px;
  }
}
@media (max-width: 530px) {
  .container {
    padding: 0 2px;
  }
}

/* =================== COOKIE BANNER =================== */
.cookie-banner {
  position: fixed;
  width: 100vw;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  color: var(--color-primary);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0px -2px 18px rgba(37,66,110,.11);
  padding: 22px 8px;
  gap: 12px;
  font-family: var(--font-body);
  border-top: 3.2px solid var(--color-accent);
}
.cookie-banner p {
  max-width: 605px;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 5px;
}
.cookie-banner .cookie-banner-buttons {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.cookie-banner .btn-primary, 
.cookie-banner .btn-secondary, 
.cookie-banner .btn-tertiary {
  margin-top: 0;
  margin-bottom: 0;
  min-width: 138px;
  padding: 11px 20px;
  font-size: .99rem;
}
@media (max-width: 540px) {
  .cookie-banner {
    padding: 14px 1vw 12px 1vw;
  }
  .cookie-banner .cookie-banner-buttons {
    flex-direction: column;
    gap: 8px;
  }
}

/* =================== COOKIE PREFERENCES MODAL =================== */
.cookie-modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(37,66,110,0.13);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s cubic-bezier(.33,.12,.56,.89);
}
.cookie-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 48px rgba(37,66,110,0.19);
  max-width: 420px;
  width: 94vw;
  padding: 28px 24px 22px 24px;
  z-index: 10011;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transform: translateY(32px);
  opacity: 0;
  pointer-events: none;
  transition: all .27s cubic-bezier(.33,.12,.56,.89);
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.cookie-modal h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 0.5em;
}
.cookie-modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: var(--color-secondary);
  color: var(--color-primary);
  border-radius: 7px;
  width: 36px; height: 36px;
  font-size: 1.39rem;
  border: none;
}
.cookie-modal-category-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 10px;
}
.cookie-modal-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e3e5f0;
}
.cookie-modal-category:last-child {
  border-bottom: none;
}
.cookie-modal-category label {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #25426E;
}
.cookie-modal-category input[type="checkbox"] {
  accent-color: var(--color-accent);
  width: 17px; height: 17px;
  border-radius: 3px;
  margin-right: 6px;
  border: 1.5px solid #b8bbc6;
}
.cookie-modal-category input[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 13px;
  align-items: center;
  margin-top: 10px;
  justify-content: flex-end;
}
.cookie-modal-actions .btn-secondary,
.cookie-modal-actions .btn-primary {
  min-width: 100px;
}

/* =================== INTERACTIONS =================== */
.btn-primary, .btn-secondary, .btn-tertiary,
.mobile-menu-toggle, .mobile-menu-close, .cookie-banner button, .cookie-modal button {
  transition: var(--transition);
}

/* Focus & accessibility */
a:focus, button:focus, .btn-primary:focus, .btn-secondary:focus, .btn-tertiary:focus {
  outline: 2px solid var(--color-accent) !important;
  outline-offset: 1px;
}

/* =================== GEOMETRIC STRUCTURED DECOR =================== */
/* Decorative accent: Left angular bar for sections (see before on section titles) is handled in .section > .container > h2 above. */

/* Slight accent shadow for geometric style above cards */
.card-container::before, .content-grid::before {
  content: '';
  display: block;
  height: 0;
}

/* =============== UTILITY ================== */
.hide { display: none !important; }

/* =============== PRINT ==================== */
@media print {
  header, footer, .mobile-menu-toggle, .cookie-banner, .cookie-modal-backdrop {
    display: none !important;
  }
  body { background: #fff; }
}

/* =============== MISC. ==================== */
::-webkit-scrollbar { width: 9px; background: #f2f2f2; }
::-webkit-scrollbar-thumb { background: #d3daef; border-radius: 7px; }

/* =============== FORMS (futureproof) =============== */
input, textarea {
  border: 1.3px solid var(--color-secondary);
  border-radius: var(--radius);
  min-height: 42px;
  padding: 10px 13px;
  font-size: 1rem;
  color: #25426E;
  margin-bottom: 12px;
  transition: border .18s;
  background: #fff;
  box-shadow: none;
}
input:focus, textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}

/* ============= Z-INDEX CONTEXTS ============== */
header { z-index: 21; }
.mobile-menu { z-index: 10000; }
.cookie-banner { z-index: 10001; }
.cookie-modal-backdrop, .cookie-modal { z-index: 10010; }

/* ============= Prevent Overlaps ============== */
.section, .card, .testimonial-card, .card-container, .content-grid {
  margin-bottom: 20px;
}

/* Ensure adequate spacing in grid wrappers */
.content-wrapper > * + * {
  margin-top: 16px;
}

/* ========== End of CSS ============= */
