/* Nightshade Hill Immobilien - Minimalist Flexbox CSS */

/* ===== CSS RESET & BASE ===== */
html { box-sizing: border-box; font-size: 16px; height: 100%;}
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
body {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  background: #fff;
  color: #223042;
  min-height: 100vh;
  line-height: 1.66;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #223042; text-decoration: none; transition: color 0.2s; }
a:hover, a:focus { color: #C9A96B; }
button, .cta-button { font-family: inherit; }

/* ===== VARIABLES (fallbacks set manually) ===== */
:root {
  --color-primary: #223042;
  --color-secondary: #C9A96B;
  --color-accent: #F6F3EC;
  --color-bg: #fff;
  --color-muted: #E5E6E7;
  --radius: 10px;
  --shadow-sm: 0 2px 12px rgba(34,48,66,.06);
  --shadow-md: 0 8px 32px rgba(34,48,66,.08);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

/* ===== TYPOGRAPHY SCALE ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #223042;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: .01em;
}
h1 { font-size: 2.5rem; margin-bottom: 24px; }
h2 { font-size: 1.75rem; margin-bottom: 18px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }
h4 { font-size: 1rem; margin-bottom: 4px; }
.hero-sub { font-size: 1.25rem; font-family: 'Lato', Arial, Helvetica, sans-serif; color: #223042; margin-bottom: 18px; }
p, ul, ol { font-size: 1rem; margin-bottom: 16px; }
ul, ol { padding-left: 18px; }
strong { font-weight: 600; }

/* ===== LAYOUT CONTAINERS ===== */
.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.content-wrapper {
  width: 100%;
  margin: 0 auto;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-muted);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
}
header a img { height: 38px; margin-right: 18px; }

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav a {
  color: #223042;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 6px 2px;
  transition: color var(--transition);
  position: relative;
}
nav a:after {
  content: '';
  display: block;
  height: 2px;
  width: 0%;
  background: #C9A96B;
  border-radius: 1px;
  transition: width 0.18s;
  margin-top: 2px;
}
nav a:hover:after, nav a:focus:after {
  width: 100%;
}
nav a.active, nav a[aria-current="page"] {
  color: #C9A96B;
  font-weight: 700;
}

.cta-button {
  background: #223042;
  color: #fff;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: 13px 30px;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  margin-left: 16px;
  outline: none;
  letter-spacing: 0.03em;
}
.cta-button:hover, .cta-button:focus {
  background: #C9A96B;
  color: #223042;
  box-shadow: var(--shadow-md);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #223042;
  font-size: 2rem;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  z-index: 1200;
  transition: color var(--transition);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  color: #C9A96B;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 88vw;
  max-width: 360px;
  background: #fff;
  box-shadow: -2px 0 32px rgba(34,48,66,0.08);
  z-index: 2000;
  padding: 28px 24px 24px 24px;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(.42,.15,.41,1.02), opacity 0.22s;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2rem;
  background: none;
  border: none;
  color: #223042;
  cursor: pointer;
  margin-bottom: 18px;
  padding: 6px 12px;
  z-index: 2050;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: #C9A96B;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 15px;
}
.mobile-nav a {
  color: #223042;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
  padding: 8px 0;
  border-radius: var(--radius);
  transition: background var(--transition);
  font-weight: 500;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #F6F3EC;
}

/* Hide desktop nav on mobile, show hamburger */
@media (max-width: 980px) {
  header .container {
    flex-wrap: wrap;
    gap: 0;
  }
  nav {
    display: none;
  }
  .cta-button { margin-left: auto; }
  .mobile-menu-toggle {
    display: block;
  }
}

@media (max-width: 500px) {
  header .container { min-height: 64px; padding: 0 10px; }
  .cta-button { padding: 11px 18px; font-size: 0.98rem; }
}

/* ===== HERO & SECTION SPACING RULES ===== */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 700px) {
  section { padding: 28px 5px; }
}

/* ===== FLEXBOX CONTENT PATTERNS ===== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  min-width: 240px;
  flex: 1 1 calc(33.3% - 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px) scale(1.01);
}
.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) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  background: #F6F3EC;
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  color: #223042;
  max-width: 530px;
  border: 1px solid #E5E6E7;
  position: relative;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #C9A96B;
}
.testimonial-author {
  font-size: 1rem;
  color: #223042;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  opacity: .8;
  font-weight: 500;
}

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

/* Feature grid on Startseite */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 20px;
}
.feature-grid > div {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex: 1 1 230px;
  min-width: 230px;
  max-width: 340px;
  padding: 28px 22px 22px 22px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: box-shadow var(--transition), border-color var(--transition);
  border: 1px solid #E5E6E7;
}
.feature-grid > div:hover {
  box-shadow: var(--shadow-md);
  border-color: #C9A96B;
}
.feature-grid img {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}

/* ===== TEXT STYLES & LISTS ===== */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
ul {
  margin-bottom: 16px;
  padding-left: 21px;
  line-height: 1.72;
}
ul li {
  margin-bottom: 9px;
}
li strong { color: #223042; font-weight: 700; }

/* ===== CARDS/REVIEWS ===== */
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

/* ===== BUTTONS ===== */
button {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}
button:focus-visible {
  outline: 2px solid #C9A96B;
  outline-offset: 2px;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid #E5E6E7;
  background: #fff;
  padding: 32px 0 16px 0;
  margin-top: 60px;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
footer nav {
  display: flex;
  gap: 20px;
}
footer nav a {
  color: #9196A6;
  font-size: 0.95rem;
  transition: color var(--transition);
}
footer nav a:hover, footer nav a:focus { color: #C9A96B; }
.footer-contact {
  font-size: 0.98rem;
  color: #223042;
  opacity: 0.86;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 700px) {
  footer .container {
    padding: 8px 2px;
    gap: 13px;
  }
  .footer-contact { flex-direction: column; align-items: center; text-align: center; gap:7px; }
  footer nav { gap: 11px; flex-wrap: wrap; }
}

/* ===== RESPONSIVE: GENERAL ===== */
@media (max-width: 880px) {
  .feature-grid { gap: 20px; }
  .feature-grid > div { min-width: 160px; max-width: 100%; }
  .testimonial-card { max-width: 100%; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.28rem; }
  .feature-grid { flex-direction: column; gap: 16px; }
  .feature-grid > div { min-width: 0; padding: 15px 9px 16px 12px; }
  .section { margin-bottom: 40px; padding: 18px 3px; }
}

/* ===== MICRO-INTERACTIONS ===== */
.card, .testimonial-card, .feature-grid > div {
  transition: box-shadow 0.22s, transform 0.16s, border-color 0.18s;
}
.card:hover, .testimonial-card:hover, .feature-grid > div:hover {
  box-shadow: 0 8px 28px rgba(201,169,107,.11);
  transform: translateY(-2px) scale(1.012);
}
.cta-button:active {
  transform: scale(0.97);
}

/* ===== FORM ELEMENTS (Kontakt) ===== */
input, textarea {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 9px 14px;
  border: 1px solid #C9A96B;
  border-radius: var(--radius);
  background: #fff;
  color: #223042;
  width: 100%;
  margin-bottom: 20px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus {
  border-color: #223042;
  box-shadow: 0 2px 12px rgba(34,48,66,.06);
}
label { display: block; margin-bottom: 6px; font-weight: 500; }

/* ===== COOKIE CONSENT BANNER & MODAL ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: #223042;
  color: #fff;
  box-shadow: 0 -2px 24px rgba(34,48,66,.12);
  z-index: 4000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 22px 12px 19px 12px;
  font-size: 1rem;
}
.cookie-banner .cookie-message {
  flex: 1 1 400px;
  max-width: 600px;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: 9px 24px;
  font-size: 1rem;
  border-radius: var(--radius);
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), color var(--transition);
}
.cookie-accept { background: #C9A96B; color: #223042; }
.cookie-accept:hover, .cookie-accept:focus { background: #fff; color: #223042; }
.cookie-reject { background: #E5E6E7; color: #223042; }
.cookie-reject:hover, .cookie-reject:focus { background: #fff; color: #223042; }
.cookie-settings { background: none; color: #fff; border: 1.5px solid #fff; }
.cookie-settings:hover, .cookie-settings:focus { background: #fff; color: #223042; border-color: #223042; }

@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.98rem;
    top: unset;
  }
  .cookie-banner .cookie-message { max-width: 98vw; }
}

/* Cookie Consent Modal Popup */
.cookie-modal {
  position: fixed;
  z-index: 4050;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(34,48,66, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s;
}
.cookie-modal.active {
  opacity: 1;
  visibility: visible;
}
.cookie-modal-content {
  background: #fff;
  color: #223042;
  border-radius: var(--radius);
  box-shadow: 0 4px 32px rgba(34,48,66,.18);
  max-width: 420px;
  min-width: 310px;
  width: 98vw;
  padding: 32px 24px 24px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: cookiePopIn 0.38s cubic-bezier(.45, .01, .55, 1.15);
}
@keyframes cookiePopIn {
  0% { transform: scale(0.88) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal-content h3 { margin-bottom: 12px; }
.cookie-modal-content .cookie-switch-group {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-bottom: 16px;
}
.cookie-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  justify-content: space-between;
}
.cookie-switch .switch {
  width: 39px;
  height: 22px;
  background: #E5E6E7;
  border-radius: 11px;
  position: relative;
  transition: background var(--transition);
}
.cookie-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  left: 0;
}
.cookie-switch input[type="checkbox"]:checked + .switch {
  background: #C9A96B;
}
.switch::after {
  content: '';
  display: block;
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #fff;
  transition: left var(--transition);
  box-shadow: 0 2px 6px rgba(201,169,107,.08);
}
.cookie-switch input[type="checkbox"]:checked + .switch::after {
  left: 19px;
}
.cookie-modal-actions {
  display: flex;
  gap: 9px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cookie-modal-close {
  position: absolute;
  top: 18px; right: 16px;
  background: none;
  border: none;
  color: #223042;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 10;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: #C9A96B;
}

/* ===== ACCESSIBILITY ===== */
a:focus-visible, button:focus-visible, .cta-button:focus-visible {
  outline: 2px solid #C9A96B;
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  header, .mobile-menu, .cookie-banner { display: none !important; }
  footer { page-break-after: always; }
  section, .container { box-shadow: none !important; padding: 0 !important; }
}

/* ===== VISUAL SEPARATORS ===== */
hr {
  border: none;
  border-bottom: 1px solid #E5E6E7;
  margin: 36px 0;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

/* ===== SPECIAL SECTIONS ===== */
.hero-section {
  background: #F6F3EC;
  padding: 80px 0 64px 0;
  border-radius: var(--radius);
}
.hero-section h1 { color: #223042; }

/* ===== MIN SPACING BETWEEN ALL CARDS/SECTIONS ===== */
section + section, .card + .card, .testimonial-card + .testimonial-card, .feature-grid > div + div {
  margin-top: 20px;
}


/* ===== END OF STYLE ===== */
