/* ============================== 
   FARBEN & VARIABLEN
============================== */
:root {
  --beige: #9D9970;
  --beige-dark: #9D9970;
  --black: #000;
  --dark-gray: #1A1A1A;
  --white: #fff;
}

/* ============================== 
   GLOBALE STYLES
============================== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

.wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}

/* ============================== 
   HEADER & NAVIGATION
============================== */
header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--beige);
}

.brand {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  background: var(--white);
  border-bottom: 1px solid var(--beige-dark);
}

.brand img,
.logo img {
  height: 96px;
  width: auto;
  display: block;
}

.logo {
  color: #000000;
  font-size: 22px;
  font-weight: bold;
}

.tubi-logo {
  height: 96px;
  width: auto;
  display: inline-block;
  margin-right: 12px;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 8px 0 12px 0;
}

nav a {
  color: #000000;
  margin-left: 20px;
  font-weight: bold;
  text-decoration: none;
}

nav a:hover {
  color: #4a4a4a;
}

/* ============================== 
   VIDEO BAR
============================== */
.video-bar {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.video-bar video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

/* ============================== 
   HERO SECTION
============================== */
.hero {
  background: var(--beige);
  text-align: center;
  padding: 40px 20px;
  margin: 0;
}

.hero h1 {
  color: var(--black);
  font-size: 24px;
  margin-bottom: 12px;
  margin-top: 0;
}

.hero p {
  color: var(--black);
  font-size: 14px;
  margin-bottom: 12px;
}

.hero .lead {
  font-size: 18px;
  line-height: 1.7;
}

.hero .btn {
  display: inline-block;
  background: var(--dark-gray);
  color: var(--white);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s;
}

.hero .btn:hover {
  background: var(--black);
}

/* ============================== 
   CONTENT SECTIONS
============================== */
.content {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
}

.page-mietflaechen .content {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 30px;
  padding-right: 30px;
}

.content h2 {
  color: var(--beige);
  font-size: 28px;
  margin-bottom: 20px;
}

/* ============================== 
   BOXES
============================== */
.box {
  background: var(--beige);
  padding: 20px;
  border-radius: 6px;
  border: 1px solid var(--beige-dark);
  margin-bottom: 20px;
}

.box h3 {
  color: var(--black);
  margin-top: 0;
}

/* ============================== 
   CONTENT ROW
============================== */
.content-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.content-row .lead {
  flex: 1;
}

.content-row .logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  margin-right: 20px;
}

/* ==============================
   MIETER KATEGORIEN
============================== */
.mieter-kategorien {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.mieter-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
}

.mieter-quicklinks a {
  display: inline-block;
  text-decoration: none;
  color: #111;
  background: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 0;
}

.mieter-quicklinks a:hover {
  background: #e8dcc3;
  border-color: #d9c9a7;
}

.mieter-kategorie {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fafafa;
}

.mieter-ueberreiter {
  margin: 0 0 10px;
  font-size: 20px;
  color: #111;
  border-bottom: 2px solid #e6e6e6;
  padding-bottom: 6px;
}

.mieter-hinweis {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.mieter-unterpunkt {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.mieter-kategorie .grid {
  margin-top: 8px;
}

.mieter-card-clickable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mieter-card-clickable:hover,
.mieter-card-clickable:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* ============================== 
   OBJEKT-KARTEN
============================== */
.objekt-liste {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.objekt {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.objekt:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transform: translateY(-3px);
  cursor: pointer;
}

.objekt img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.info {
  padding: 12px;
}

.details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 8px;
}

.qm {
  font-size: 0.9rem;
  color: #666;
}

.preis {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0a7cff;
  white-space: nowrap;
}

/* ============================== 
   FOOTER
============================== */
footer {
  background: var(--dark-gray);
  padding: 40px 20px 0;
  color: var(--beige);
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.footer-column {
  text-align: left;
}

.footer-column h3 {
  color: var(--beige);
  border-bottom: 2px solid var(--beige-dark);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.footer-column a {
  color: var(--beige);
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  color: var(--beige);
  margin-top: 0;
  padding: 20px 0 24px;
  border-top: none;
  background: var(--dark-gray);
}

/* ============================== 
   COMPARE SLIDER
============================== */
.compare-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 40px;
}

.compare {
  position: relative;
  width: calc(33% - 10px);
  overflow: hidden;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Vergleiche 4, 5, 6, 7 - 50% Breite (2 pro Reihe) */
.compare:nth-child(n+4) {
  width: calc(50% - 10px);
}


.image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.overlay .image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  cursor: grab;
  z-index: 3;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
}

.slider::before {
  content: "<>";
}

.slider:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

/* ============================== 
   MODAL
============================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

.modal.show {
  display: block;
}

.modal-content {
  padding: 40px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  animation: slideIn 0.3s ease;
}

.modal-content h2 {
  color: var(--black);
  font-size: 32px;
  margin-top: 0;
  margin-bottom: 20px;
}

.modal-content p {
  color: #333;
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 16px;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
}

/* Bildergalerie im Modal */
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.modal-gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
}

.close {
  position: fixed;
  right: 30px;
  top: 30px;
  font-size: 40px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.9);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover,
.close:focus {
  color: #000;
  background: rgba(255, 255, 255, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================== 
   RESPONSIVE DESIGN
============================== */
@media (max-width: 700px) {
  .brand img,
  .logo img {
    height: 64px;
  }

  .tubi-logo {
    height: 64px;
  }

  header {
    padding: 0;
  }

  nav {
    gap: 12px;
    padding: 8px 0;
  }
}

/* ============================== 
   TIMELINE
============================== */
#about {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

#about .card {
  max-width: 1120px;
  margin: 0 auto;
}

#about .lead {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
  text-align: center;
}

#timeline {
  max-width: 1300px;
  margin: auto;
  padding: 40px 20px;
}

#timeline h2,
#about h2 {
  color: var(--beige);
  font-size: 28px;
  margin-bottom: 40px;
  text-align: center;
  white-space: nowrap;
}

.timeline {
  position: relative;
  padding: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  top: 20px;
  bottom: 20px;
  background: #000;
}

.timeline-item {
  display: flex;
  /* keep the wrapper and dot starting from the top edge so
     all dates sit auf der gleichen Höhe */
  align-items: flex-start;
  /* etwas mehr Platz für die noch größeren Bilder */
  margin-bottom: 220px;
  position: relative;
  overflow: visible; /* allow enlarged images to extend if needed */
}

/* Eintrag 1946–2013 hat langen Text → kleinerer Abstand zum nächsten */
.timeline-item:nth-child(2) {
  margin-bottom: 100px;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
  justify-content: flex-start;
}

.timeline-item:nth-child(even) {
  flex-direction: row;
  justify-content: flex-end;
}

.timeline-wrapper {
  display: flex;
  flex-direction: column;
  width: 47%;
}

.timeline-item:nth-child(odd) .timeline-wrapper {
  align-items: flex-end;
  padding-right: 68px;
}

.timeline-item:nth-child(even) .timeline-wrapper {
  align-items: flex-start;
  padding-left: 68px;
}

.timeline-date {
  font-size: 27px;
  font-weight: bold;
  color: #000;
  margin-bottom: 5px;
  cursor: default;
}

.timeline-instruction {
  text-align: center;
  font-size: 14px;
  color: #333;
  margin-bottom: 20px;
}

.timeline-dot {
  width: 24px;
  height: 24px;
  background: #000;
  border: 4px solid #000;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  /* pin to the top of the item so it follows the date text */
  top: 0;
  transform: translate(-50%, 0);
  flex-shrink: 0;
  z-index: 1;
}

/* placeholder for year-specific image; authors can replace with <img> later */
.timeline-image {
  position: absolute;
  top: 0;
  /* Fotos vergrößert, ohne Position/Abstände zu ändern */
  width: 560px;
  height: 370px;
  background: #eee;
  /* entferne den gestrichelten rand, damit nur das foto sichtbar bleibt */
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  z-index: 0;
  overflow: hidden;
}

/* make any <img> inside the placeholder cover the box */
.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-item:nth-child(odd) .timeline-image {
  /* von der Mittellinie aus positionieren, damit Bilder nicht am Seitenrand kleben */
  left: calc(50% + 58px);
}

.timeline-item:nth-child(even) .timeline-image {
  /* von der Mittellinie aus positionieren, damit Bilder nicht am Seitenrand kleben */
  right: calc(50% + 58px);
}

.timeline-content {
  color: #000;
  line-height: 1.6;
  font-size: 20px;
  position: relative;
  z-index: 2; /* über Bildern stehen, wenn Inhalt öffnet */
}

.timeline-item:nth-child(odd) .timeline-content {
  width: fit-content;
  max-width: 100%;
  text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content p,
.timeline-item:nth-child(odd) .timeline-more {
  text-align: right;
}

/* keep the subtitle on one line; overflow will be truncated with ellipsis */
.timeline-content p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-more {
  max-height: none;
  opacity: 1;
  overflow: visible;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.7;
  color: #444;
}

@media (max-width: 760px) {
  .timeline {
    padding: 20px 0;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    flex-direction: column !important;
    justify-content: flex-start !important;
    margin-left: 60px;
    margin-bottom: 40px;
    align-items: flex-start;
  }

  .timeline-wrapper {
    width: 100%;
    padding: 0 !important;
    align-items: flex-start !important;
  }

  .timeline-date {
    width: 100%;
    justify-content: flex-start !important;
    margin-bottom: 10px;
  }

  .timeline-content {
    width: 100%;
  }

  .timeline-dot {
    position: absolute;
    left: 20px;
    top: 0;
  }
}

@media (max-width: 760px) {
  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-column {
    grid-column: auto;
    width: 100%;
    margin-bottom: 25px;
    text-align: center;
  }
}

/* ==============================
   NEWHOME-STYLE PROPERTY MODAL
============================== */

.nh-gallery {
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: #111;
  flex-shrink: 0;
  position: relative;
}

.nh-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Galerie-Pfeilbuttons */
.nh-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nh-gallery-btn:hover { background: rgba(0,0,0,0.72); }
.nh-gallery-btn:disabled { opacity: 0.25; cursor: default; }
.nh-gallery-prev { left: 16px; }
.nh-gallery-next { right: 16px; }

/* Galerie-Zähler */
.nh-gallery-counter {
  position: absolute;
  bottom: 14px;
  right: 16px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 13px;
  padding: 3px 11px;
  border-radius: 20px;
  pointer-events: none;
}

/* Thumbnail-Leiste */
.nh-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  background: #111;
  overflow-x: auto;
}

.nh-thumb {
  width: 80px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  border: 2px solid transparent;
  opacity: 0.55;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s, border-color 0.2s;
}
.nh-thumb:hover,
.nh-thumb.active {
  opacity: 1;
  border-color: #fff;
}

/* Lightbox */
.nh-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.nh-lightbox.show { display: flex; }

.nh-lb-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 3px;
  display: block;
}

.nh-lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nh-lb-btn:hover { background: rgba(255,255,255,0.26); }
.nh-lb-btn:disabled { opacity: 0.2; cursor: default; }
.nh-lb-prev { left: 20px; }
.nh-lb-next { right: 20px; }

.nh-lb-close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nh-lb-close:hover { background: rgba(255,255,255,0.26); }

.nh-lb-counter {
  position: fixed;
  bottom: 22px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  letter-spacing: 0.4px;
}

.nh-body {
  display: flex;
  gap: 32px;
  max-width: 100%;
  margin: 0;
  padding: 40px 48px;
  align-items: flex-start;
}

.nh-main {
  flex: 1;
  min-width: 0;
}

/* Titel-Bereich */
.nh-badge {
  display: inline-block;
  background: var(--dark-gray);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.nh-header-section h1 {
  font-size: 26px;
  margin: 6px 0 4px;
  color: var(--black);
  line-height: 1.3;
}

.nh-address {
  font-size: 14px;
  color: #666;
  margin: 0 0 0;
}

/* Abschnitts-Trennlinie */
.nh-section {
  border-top: 1px solid #e8e8e8;
  padding-top: 24px;
  margin-top: 24px;
}

.nh-section-title {
  font-size: 17px;
  color: var(--black);
  margin: 0 0 14px;
  font-weight: bold;
}

/* Kosten-Tabelle */
.nh-kosten {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.nh-kosten td {
  padding: 9px 0;
  border-bottom: 1px solid #f2f2f2;
  color: #333;
}

.nh-kosten td:last-child {
  text-align: right;
  font-weight: 600;
}

.nh-total-row td {
  padding-top: 14px;
  border-bottom: none;
}

.nh-total-row td:last-child {
  color: var(--black);
}

/* Facts-Grid */
.nh-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}

.nh-fact {
  display: flex;
  flex-direction: column;
}

.nh-fact-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}

.nh-fact-value {
  font-size: 15px;
  color: var(--black);
  font-weight: 500;
  white-space: nowrap;
}

/* Sidebar */
.nh-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nh-contact-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  background: #fafafa;
}

.nh-contact-card h3 {
  font-size: 16px;
  color: var(--black);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.nh-provider-info {
  margin-bottom: 18px;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

.nh-provider-info strong {
  display: block;
  font-size: 15px;
  color: var(--black);
  margin-bottom: 2px;
}

.nh-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nh-contact-btn {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: background 0.2s, border-color 0.2s;
}

.nh-contact-btn:hover {
  background: var(--beige);
  border-color: var(--beige-dark);
}

.nh-contact-email {
  background: var(--dark-gray);
  color: var(--white);
  border-color: var(--dark-gray);
  text-align: center;
  margin-top: 4px;
}

.nh-contact-email:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

@media (max-width: 760px) {
  .nh-body {
    flex-direction: column;
    padding: 24px 16px;
  }

  .nh-sidebar {
    width: 100%;
    position: static;
  }

  .nh-gallery img {
    height: 220px;
  }

  .nh-facts {
    grid-template-columns: 1fr;
  }
}
