/* ============================================================
   main.css – Reihenhaus Nürnberg
   Dr. Singer Projektbau GmbH
   ============================================================ */

:root {
  --primary: #0F2044;
  --primary-light: #1a3561;
  --accent: #C5A028;
  --accent-hover: #a8871e;
  --sold-red: #B91C1C;
  --text-dark: #1a1a1a;
  --text-muted: #6b7280;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border: #e5e7eb;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}

.text-accent { color: var(--accent) !important; }
.bg-primary-dark { background: var(--primary) !important; }

/* ---- Topbar ---- */
.topbar {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  font-size: 0.82rem;
  padding: 6px 0;
}
.topbar-tagline { font-weight: 500; }
.topbar-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: color .2s;
}
.topbar-link:hover { color: var(--accent); }

/* ---- Navbar ---- */
.navbar-main {
  background: var(--primary);
  border-bottom: 2px solid rgba(197,160,40,.25);
  padding: 8px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  z-index: 1020;
}
.navbar-main.scrolled {
  background: var(--primary);
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}
.navbar-brand { display: flex; align-items: center; text-decoration: none; }
.navbar-logo {
  height: 56px;
  width: auto;
  max-width: 240px;
  display: block;
  transition: opacity .2s;
}
.navbar-brand:hover .navbar-logo { opacity: .88; }
@media (max-width: 576px) {
  .navbar-logo { height: 44px; max-width: 180px; }
}

.navbar-toggler-dark {
  border-color: rgba(197,160,40,.4);
  padding: 6px 10px;
}
.navbar-toggler-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(197,160,40,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler-dark:focus { box-shadow: 0 0 0 3px rgba(197,160,40,.2); }

.navbar-main .nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  color: rgba(255,255,255,.82);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  background: rgba(197,160,40,.12);
  color: var(--accent);
}
.navbar-main .nav-link.active { font-weight: 600; color: var(--accent); }

/* ---- Buttons ---- */
.btn-accent {
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background .2s, transform .1s;
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--primary);
  transform: translateY(-1px);
}
.btn-primary-dark {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  transition: background .2s, transform .1s;
}
.btn-primary-dark:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: var(--primary);
}

/* ---- Hero ---- */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #1e4080 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.2rem;
  line-height: 1.15;
}
.hero-title span { color: var(--accent); }
.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 600px;
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  margin-bottom: 16px;
}

/* ---- Stats bar ---- */
.stats-bar {
  background: var(--primary);
  padding: 28px 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 4px;
  display: block;
}

/* ---- Section headings ---- */
.section-label {
  display: inline-block;
  background: rgba(197,160,40,.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-divider {
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 12px 0 20px;
}
.section-divider-center { margin: 12px auto 20px; }

/* ---- Property Cards ---- */
.property-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-white);
  transition: transform .25s, box-shadow .25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15,32,68,.12);
}
.card-image-wrap {
  position: relative;
  overflow: hidden;
  background: #e9ecef;
  aspect-ratio: 4/3;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.property-card:hover .card-image-wrap img { transform: scale(1.04); }

/* Status badges on card */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-available { background: #dcfce7; color: #166534; }
.badge-reserved  { background: #fef9c3; color: #854d0e; }
.badge-sold      { background: #fee2e2; color: #991b1b; }
.badge-draft     { background: #f3f4f6; color: #6b7280; }

.card-badge-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}

/* SOLD overlay */
.sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 1;
}
.sold-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: rgba(185, 28, 28, 0.92);
  color: white;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 0.5rem 2rem;
  border: 3px solid white;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(185,28,28,0.5);
  pointer-events: none;
  backdrop-filter: blur(2px);
  z-index: 2;
  white-space: nowrap;
}

.card-body-inner {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-district {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.card-district i { color: var(--accent); }
.card-title-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
  line-height: 1.3;
}
.card-title-link:hover { color: var(--accent); }
.card-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}
.card-price.price-hidden {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-light);
  padding: 4px 10px;
  border-radius: 100px;
}
.spec-item i { color: var(--accent); font-size: 0.75rem; }
.card-cta { margin-top: auto; padding-top: 8px; }

/* ---- Feature icon boxes ---- */
.feature-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  height: 100%;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,32,68,.08);
  border-color: var(--accent);
}
.feature-icon {
  width: 56px; height: 56px;
  background: rgba(197,160,40,.12);
  color: var(--accent);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.feature-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ---- Process steps ---- */
.step-card {
  background: var(--bg-white);
  border-radius: 14px;
  padding: 32px 24px;
  position: relative;
  border: 1px solid var(--border);
  height: 100%;
  text-align: center;
}
.step-number {
  width: 52px; height: 52px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.3rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* ---- Page hero ---- */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 64px 0 48px;
}
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.page-hero p { color: rgba(255,255,255,.8); font-size: 1.05rem; }
.breadcrumb-hero .breadcrumb-item { font-size: 0.82rem; }
.breadcrumb-hero .breadcrumb-item a { color: rgba(255,255,255,.7); }
.breadcrumb-hero .breadcrumb-item.active { color: rgba(255,255,255,.5); }
.breadcrumb-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a70 100%);
  color: #fff;
  padding: 60px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.8); }

/* ---- Filter bar ---- */
.filter-bar {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.filter-bar .form-select,
.filter-bar .form-control {
  font-size: 0.88rem;
  border-color: var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197,160,40,.15);
}

/* ---- Property detail ---- */
.property-gallery-main {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #e9ecef;
}
.property-gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
}
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 80px; height: 60px;
  border-radius: 8px; overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s;
  flex-shrink: 0;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-price-box {
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.detail-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.detail-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.detail-spec {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.detail-spec-value { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.detail-spec-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.features-list { list-style: none; padding: 0; margin: 0; }
.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.features-list li:last-child { border-bottom: none; }
.features-list li i { color: var(--accent); font-size: 0.75rem; }

/* ---- Contact form ---- */
.contact-form-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.form-control, .form-select {
  border-color: var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197,160,40,.15);
}
.form-label { font-weight: 600; font-size: 0.85rem; color: var(--primary); }

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--accent); }
.faq-question {
  background: var(--bg-white);
  border: none;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question:hover { background: var(--bg-light); }
.faq-question .faq-icon { color: var(--accent); font-size: 0.85rem; transition: transform .25s; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 20px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* ---- Team card ---- */
.team-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  height: 100%;
}
.team-avatar {
  width: 80px; height: 80px;
  background: var(--primary);
  color: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}
.team-name { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.team-title { font-size: 0.82rem; color: var(--text-muted); }

/* ---- Reference cards ---- */
.reference-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.reference-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e9ecef;
}
.reference-image img { width: 100%; height: 100%; object-fit: cover; }
.reference-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

/* ---- Pagination ---- */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  border-radius: 8px !important;
  margin: 0 2px;
  font-weight: 500;
}
.pagination .page-link:hover { background: var(--bg-light); color: var(--accent); }
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ---- Alert ---- */
.alert-success-custom {
  background: #dcfce7; color: #166534; border: 1px solid #86efac;
  border-radius: 10px; padding: 14px 18px; font-weight: 500;
}
.alert-error-custom {
  background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5;
  border-radius: 10px; padding: 14px 18px; font-weight: 500;
}

/* ---- Footer ---- */
.site-footer { background: #0a1628; color: rgba(255,255,255,.8); margin-top: 0; }
.footer-top { padding: 56px 0 40px; }
.footer-brand { font-size: 1.05rem; font-weight: 700; color: #fff; }
.footer-tagline { font-size: 0.88rem; color: rgba(255,255,255,.6); max-width: 280px; line-height: 1.6; }
.footer-address { font-size: 0.85rem; color: rgba(255,255,255,.7); margin-bottom: 6px; }
.footer-address a { color: rgba(255,255,255,.7); }
.footer-address a:hover { color: var(--accent); }
.footer-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.87rem; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  background: rgba(0,0,0,.2);
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.text-footer-muted { color: rgba(255,255,255,.5) !important; }
.footer-legal-links a { font-size: 0.82rem; color: rgba(255,255,255,.5); }
.footer-legal-links a:hover { color: var(--accent); }
.footer-districts { font-size: 0.78rem; color: rgba(255,255,255,.5); }

/* ---- Utility ---- */
.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 48px 0; }
.bg-light-custom { background: var(--bg-light); }
.rounded-xl { border-radius: 14px !important; }
.shadow-soft { box-shadow: 0 4px 24px rgba(0,0,0,.07) !important; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section { padding: 60px 0 48px; }
  .stats-bar .col-6 { border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 16px; margin-bottom: 16px; }
  .detail-specs-grid { grid-template-columns: 1fr 1fr; }
  .contact-form-card { padding: 20px; }
}

@media (max-width: 576px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
  .detail-specs-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Loading spinner ---- */
.spinner-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 0;
}
.spinner-border-accent { color: var(--accent); }

/* ---- No results ---- */
.no-results {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}
.no-results i { font-size: 3rem; color: var(--border); margin-bottom: 16px; }
