/* RESET & NORMALIZE (simple version) */
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;
}

html {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  background: #F3F4F6;
  color: #232323;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: #232323;
  background: #F3F4F6;
  position: relative;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: #1B263B;
  text-decoration: none;
  transition: color 0.25s;
}

a:hover, a:focus {
  color: #CDAA63;
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #1B263B;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.15;
}
h1 { font-size: 2.5rem; letter-spacing: 0.01em; }
h2 { font-size: 2rem; letter-spacing: 0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.95rem; }

p, ul, ol, li, blockquote {
  margin-bottom: 16px;
  font-size: 1rem;
  color: #232323;
}

ul, ol {
  padding-left: 1.2em;
}
ul {
  list-style-type: disc;
}
ol {
  list-style-type: decimal;
}
strong {
  font-weight: 700;
}

blockquote {
  font-style: italic;
  color: #333;
  background: #F7F6F3;
  border-left: 3px solid #CDAA63;
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 14px;
}

address {
  font-style: normal;
  color: #232323;
  margin-top: 16px;
  font-size: 0.98rem;
}

/* ---------- BRAND COLOR VARS ---------- */
:root {
  --color-primary: #1B263B;
  --color-secondary: #5D8AA8;
  --color-accent: #F3F4F6;
  --color-gold: #CDAA63;
  --color-white: #fff;
  --color-black: #141618;
  --color-grey: #D4D8DD;
  --color-shadow: rgba(27, 38, 59, 0.07);
}
/* Fallbacks */
body {
  background-color: var(--color-accent, #F3F4F6);
}

/* ---------- LAYOUT CONTAINERS ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-white);
  border-radius: 18px;
  box-shadow: 0 2px 18px var(--color-shadow);
  /* margin-top handled by previous section's margin-bottom */
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.section-hero {
  padding: 0;
  background: linear-gradient(120deg, #F3F4F6 50%, #fff 100%);
}
.section-hero .container {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-hero h1 {
  font-size: 2.6rem;
  color: var(--color-primary);
  margin-bottom: 16px;
  font-family: 'Montserrat', sans-serif;
}
.section-hero p {
  color: #232323;
  font-size: 1.18rem;
  margin-bottom: 28px;
}

.section-cta {
  background: var(--color-primary);
  border-radius: 18px;
  color: var(--color-white);
  margin-bottom: 60px;
  padding: 40px 20px;
}
.section-cta h2, .section-cta p {
  color: var(--color-white);
}

/* ---------- FLEX LAYOUTS ---------- */
.feature-grid,
.card-container, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 16px;
}
.content-grid { gap: 20px; justify-content: space-between; }
.card-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .feature-grid, .card-container, .content-grid, .card-grid, .text-image-section {
    gap: 18px;
  }
}
@media (max-width: 768px) {
  .feature-grid,
  .card-container,
  .content-grid,
  .card-grid,
  .text-image-section {
    flex-direction: column!important;
    gap: 20px;
    align-items: stretch;
  }
}

/* ---------- FEATURE ITEM ---------- */
.feature-item {
  background: var(--color-white);
  border-radius: 14px;
  box-shadow: 0 2px 10px var(--color-shadow);
  padding: 24px 18px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 0;
  min-width: 210px;
  flex: 1 1 225px;
  position: relative;
  border: 1px solid #eee;
  transition: box-shadow 0.23s, border-color 0.20s;
}
.feature-item img {
  width: 34px;
  height: 34px;
  margin-bottom: 7px;
}
.feature-item h3 {
  font-size: 1.16rem;
  color: var(--color-primary);
  margin-bottom: 5px;
}
.feature-item p {
  margin-bottom: 3px;
  color: #333;
}
.feature-item:hover, .feature-item:focus-within {
  border-color: var(--color-gold);
  box-shadow: 0 4px 24px rgba(205,170,99,0.15);
  z-index: 2;
}

/* ---------- TESTIMONIALS ---------- */
.section-testimonials {
  margin-bottom: 60px;
  padding: 40px 20px 20px 20px;
  background: var(--color-accent);
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
  background: var(--color-white);
  border-radius: 14px;
  box-shadow: 0 2px 14px var(--color-shadow);
  border-left: 4px solid var(--color-gold);
  min-width: 0;
}
.testimonial-card img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  background: #fff;
}
.testimonial-card blockquote {
  flex: 1;
  font-size: 1.06rem;
  color: #191919;
  margin-bottom: 0;
  background: none;
  padding: 0 0 0 4px;
  border-left: none;
}
.testimonial-card div {
  font-size: 0.98rem;
  color: var(--color-primary);
  font-weight: 600;
}
@media (max-width: 700px) {
  .testimonial-card {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .testimonial-card img {
    width: 38px;
    height: 38px;
  }
}

/* ---------- BUTTONS ---------- */
.cta-btn {
  background: linear-gradient(90deg, var(--color-gold) 20%, #e1c176 100%);
  color: var(--color-primary);
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.06rem;
  text-align: center;
  padding: 14px 30px;
  border: none;
  border-radius: 28px;
  box-shadow: 0 2px 10px var(--color-shadow);
  cursor: pointer;
  transition: background 0.18s, transform 0.13s, box-shadow 0.23s, color 0.18s;
  letter-spacing: 0.03em;
  outline: none;
  margin-top: 10px;
  margin-bottom: 10px;
  display: inline-block;
}
.cta-btn:hover, .cta-btn:active, .cta-btn:focus {
  background: linear-gradient(90deg, #e1c176 40%, var(--color-gold) 100%);
  color: var(--color-black);
  transform: translateY(-2px) scale(1.035);
  box-shadow: 0 4px 22px 0 rgba(205,170,99,0.18);
}

/* Inline secondary buttons for cookies/modals */
.btn-secondary, .btn-cookie-secondary {
  background: transparent;
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  font-weight: 600;
  border-radius: 22px;
  padding: 11px 22px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.13s;
  margin: 0 6px;
}
.btn-secondary:hover, .btn-cookie-secondary:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

/* ---------- HEADER & NAVIGATION ---------- */
header {
  background: var(--color-white);
  box-shadow: 0 2px 18px var(--color-shadow);
  position: relative;
  z-index: 70;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 80px;
}
nav {
  display: flex;
  gap: 20px;
}
nav a {
  color: var(--color-primary);
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 8px;
  border-radius: 6px;
  position: relative;
  transition: color 0.24s, background 0.14s;
}
nav a:hover, nav a:focus {
  color: var(--color-gold);
  background: #faf6ef;
}
header img[alt*="Ricon Cofin Immobilien"] {
  height: 48px;
  max-width: 182px;
  margin-right: 16px;
}

@media (max-width:860px) {
  header .container {
    flex-direction: row;
    gap: 6px;
  }
  nav { gap: 8px; }
}

/* ---------- MOBILE NAVIGATION ---------- */
.mobile-menu-toggle {
  display: none;
  background: var(--color-gold);
  border: none;
  color: var(--color-primary);
  font-size: 2rem;
  padding: 7px 18px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 12px;
  z-index: 103;
}
@media (max-width:1000px) {
  header nav, header .cta-btn { display: none; }
  .mobile-menu-toggle { display: inline-block; }
}

.mobile-menu {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(36,36,36, 0.95);
  box-shadow: 0 4px 32px rgba(27,38,59,0.25);
  z-index: 1900;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateX(-100%);
  opacity: 0;
  transition: opacity 0.27s, transform 0.32s cubic-bezier(.9,.1,.13,.96);
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--color-gold);
  font-size: 2.2rem;
  margin: 18px 0 0 20px;
  cursor: pointer;
  z-index: 1950;
  align-self: flex-start;
  transition: color 0.12s;
}
.mobile-menu-close:hover { color: #fff; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 45px;
  margin-left: 32px;
}
.mobile-nav a {
  color: var(--color-gold);
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.32rem;
  font-weight: 600;
  padding: 15px 10px;
  border-radius: 9px;
  background: none;
  transition: background 0.18s, color 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: rgba(205,170,99,0.12);
  color: #fff;
}

@media (min-width:1001px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
}

/* ---------- CARDS ---------- */
.card-container,
.card-grid {
  margin-top: 20px;
  margin-bottom: 20px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--color-white);
  border-radius: 14px;
  box-shadow: 0 3px 14px var(--color-shadow);
  padding: 25px 20px 22px 20px;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  transition: box-shadow 0.24s, border-color 0.22s;
  border: 1px solid #eee;
}
.card:hover, .card:focus-within {
  border-color: var(--color-gold);
  box-shadow: 0 6px 28px 0 rgba(205,170,99,0.16);
  z-index: 2;
}

.card-content { display: flex; flex-direction: column; justify-content: center; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--color-primary);
  color: var(--color-white);
  margin-top: 60px;
  padding: 38px 0 25px 0;
  font-size: 1rem;
  border-top: 8px solid var(--color-gold);
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 38px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
footer nav a {
  color: var(--color-gold);
  font-size: 1.01rem;
  font-weight: 600;
  padding: 3px 0;
  border-radius: 0;
  background: none;
}
footer nav a:hover {
  text-decoration: underline;
}
footer address {
  color: var(--color-white);
  font-size: 0.96rem;
  margin-top: 4px;
  font-style: normal;
}
footer address img {
  height: 18px;
  width: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  margin-bottom: 1px;
}
@media (max-width: 700px) {
  footer .container {
    flex-direction: column;
    gap: 20px;
  }
  footer nav { flex-direction: row; gap: 16px; flex-wrap: wrap; }
}

/* ---------- SECTION SPACING ---------- */
section, .section {
  margin-bottom: 60px;
}
.section:last-child, section:last-child {
  margin-bottom: 0;
}

/* ---------- FORMS & MISC ---------- */
input, button, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--color-accent);
  color: #222;
  box-sizing: border-box;
}
input:focus, textarea:focus, select:focus {
  border: 1.5px solid var(--color-gold);
}
label {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- COOKIE BANNER ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3200;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px 28px;
  padding: 25px 20px 22px 20px;
  font-size: 1rem;
  box-shadow: 0 -2px 18px var(--color-shadow);
  transition: transform 0.32s cubic-bezier(.8,.1,.13,.96), opacity 0.22s;
}
.cookie-banner.hide {
  opacity: 0;
  transform: translateY(150%);
  pointer-events: none;
}
.cookie-banner p {
  flex: 1 1 auto;
  color: var(--color-accent);
  margin-bottom: 0;
}
.btn-cookie, .btn-cookie-secondary, .btn-cookie-settings {
  margin-left: 4px;
  margin-right: 4px;
}
.btn-cookie {
  background: var(--color-gold);
  color: var(--color-primary);
  font-weight: 700;
  border-radius: 20px;
  padding: 12px 22px;
  border: none;
  transition: background 0.14s, color 0.125s;
  cursor: pointer;
}
.btn-cookie:hover {
  background: #e1c176;
  color: var(--color-primary);
}

/* Cookie settings modal */
.cookie-modal-overlay {
  position: fixed;
  z-index: 3500;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(27,38,59,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.18s;
}
.cookie-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: var(--color-white);
  border-radius: 18px;
  min-width: 320px;
  max-width: 96vw;
  padding: 32px 30px 28px 30px;
  box-shadow: 0 4px 36px var(--color-shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--color-primary);
}
.cookie-modal h2 {
  color: var(--color-primary);
  font-size: 1.28rem;
}
.cookie-modal label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}
.cookie-modal .modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 15px;
  justify-content: flex-end;
}
.cookie-modal-close {
  position: absolute;
  top: 14px; right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-gold);
  cursor: pointer;
  transition: color 0.13s;
}
.cookie-modal-close:hover { color: var(--color-primary); }

/* Cookie switches */
.cookie-switch {
  position: relative;
  width: 43px;
  height: 24px;
  display: inline-block;
}
.cookie-switch input {
  opacity: 0;
  width: 0; height: 0;
}
.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background: #D4D8DD;
  border-radius: 24px;
  transition: background 0.24s;
}
.cookie-switch input:checked + .cookie-slider {
  background: var(--color-gold);
}
.cookie-slider:before {
  position: absolute;
  content: '';
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.23s;
}
.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(19px);
}

/* Accessibility: Hide only visually, not for screenreaders */
.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px; margin: -1px;
  overflow: hidden;
  padding: 0; position: absolute;
  width: 1px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .container { max-width: 98vw; }
}
@media (max-width: 850px) {
  .section, section {
    padding: 32px 8px;
  }
  .section-cta { padding: 32px 8px; }
}
@media (max-width:670px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.4rem; }
}
@media (max-width:600px) {
  .container { padding-left: 9px; padding-right: 9px; }
  .section, section, .section-cta { padding: 22px 4px; }
  .feature-item, .card { min-width: 0; }
}

/* ---------- MICRO-INTERACTIONS ---------- */
.feature-item, .card, .testimonial-card, .cta-btn {
  transition: box-shadow 0.18s, transform 0.13s, border-color 0.13s, background 0.16s, color 0.13s;
}
.feature-item:active, .card:active, .testimonial-card:active {
  transform: scale(0.99);
}

/* Subtle animation for section reveal (optional JS needed to toggle) */
.section-animate { opacity: 0; transform: translateY(45px); transition: opacity .75s, transform .7s; }
.section-animate.visible { opacity: 1; transform: none; }

/* ---------- UTILITIES ---------- */
.gap-8 { gap: 8px!important; }
.gap-16 { gap: 16px!important; }
.gap-24 { gap: 24px!important; }

/* Hide visually */
.hide { display: none !important; visibility: hidden !important; }

/* Ensures min 20px between cards/sections */
section + section, .section + .section {
  margin-top: 20px;
}

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