/* ===========================
   Design tokens — wohnung-barcelona.com
=========================== */
:root {
  --bg:       #f8f6f3;
  --bg-soft:  #f0ece6;
  --text:     #2c2520;
  --muted:    #695d56;
  --brand:    #c0392b;      /* Barcelona red */
  --brand-600:#a93226;
  --accent:   #e8aa42;      /* warm gold */
  --surface:  #ffffff;
  --radius:   18px;
  --shadow:   0 8px 28px rgba(0,0,0,.07);
  --max:      1100px;
}

/* ===========================
   Base / reset
=========================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; }
a { color: var(--brand); }

.container { width: min(var(--max), 92%); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===========================
   Header / Navigation
=========================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e4dcd4;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.brand {
  font-weight: 700; letter-spacing: -.2px; font-size: 1.05rem;
  color: var(--text); text-decoration: none;
}
.brand span { color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--brand); }
.nav-links .btn { font-size: .9rem; }

/* Language switcher */
.lang-menu { position: relative; margin-left: 10px; }
.lang-menu > summary {
  list-style: none; display: flex; align-items: center; gap: 6px;
  border: 1px solid #ddd4ca; border-radius: 999px; padding: .38rem .65rem;
  cursor: pointer; background: #fff; font-size: .9rem;
  transition: box-shadow .2s;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::marker { display: none; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 160px; background: #fff; border: 1px solid #e4dcd4;
  border-radius: 12px; padding: 5px; margin: 0; list-style: none;
  box-shadow: 0 12px 28px rgba(0,0,0,.12); z-index: 20;
}
.lang-menu a {
  display: block; text-decoration: none; color: var(--text);
  padding: .5rem .65rem; border-radius: 8px; font-size: .9rem;
  transition: background .15s;
}
.lang-menu a:hover { background: #f5f0ea; }
.lang-menu a[aria-selected="true"] { background: #ede8e1; font-weight: 600; }

/* Hamburger */
.hamburger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ===========================
   Buttons
=========================== */
.btn {
  display: inline-block; border: 1px solid #cfc6bc; padding: .65rem .95rem;
  border-radius: 999px; text-decoration: none; font-size: .9rem;
  cursor: pointer; font-family: inherit; transition: background .2s, color .2s, box-shadow .2s;
}
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 14px rgba(192,57,43,.25);
}
.btn.primary:hover { background: var(--brand-600); box-shadow: 0 6px 18px rgba(192,57,43,.35); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.full { width: 100%; text-align: center; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ===========================
   Hero
=========================== */
.hero {
  position: relative; height: 90svh; min-height: 480px;
  isolation: isolate; overflow: hidden;
}
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(30,15,8,.6) 0%, rgba(0,0,0,.25) 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-box {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius); padding: 2.4rem 3rem;
  max-width: 780px; text-align: center; color: #fff;
}
.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw + 1rem, 3.8rem);
  margin: 0 0 .4rem; color: #fff;
}
.lead { font-size: clamp(1.05rem, 1.3vw + .5rem, 1.45rem); margin: .3rem 0 .5rem; opacity: .95; }
.sublead { opacity: .88; margin: 0 0 1.2rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ===========================
   Sections
=========================== */
.section { padding: 64px 0; }
.section.soft { background: var(--bg-soft); }
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 2vw + .9rem, 2.7rem);
  margin: 0 0 .4rem;
}
.section-kicker { color: var(--muted); margin: 0 0 24px; max-width: 640px; }
.center { text-align: center; }
.center .section-kicker { margin-inline: auto; }

/* ===========================
   Apartment cards (homepage)
=========================== */
.apt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}
.apt-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.apt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.1);
}
.apt-card-img {
  aspect-ratio: 4/3; overflow: hidden;
}
.apt-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.apt-card:hover .apt-card-img img { transform: scale(1.03); }
.apt-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.apt-eyebrow { font-size: .82rem; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.apt-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.55rem; margin: .3rem 0 .6rem;
}
.apt-desc { color: var(--muted); font-size: .95rem; margin: 0 0 16px; flex: 1; }
.apt-price { font-weight: 700; color: var(--brand); margin-bottom: 16px; }

/* Pill list */
.pill-list {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; list-style: none;
}
.pill-list li {
  padding: .32rem .7rem; border: 1px solid #e0d8cf; border-radius: 999px;
  font-size: .86rem; color: var(--muted);
}

/* ===========================
   Features grid
=========================== */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px;
}
.feature {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.feature-icon { font-size: 1.6rem; margin-bottom: .4rem; }
.feature-title { font-weight: 600; margin: .3rem 0 .2rem; }
.feature-desc { color: var(--muted); font-size: .92rem; margin: 0; }

/* ===========================
   Gallery
=========================== */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px;
}
.gallery a { display: block; border-radius: 12px; overflow: hidden; }
.gallery img {
  width: 100%; height: 200px; object-fit: cover;
  transition: transform .35s;
}
.gallery a:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.88);
  display: none; place-items: center; z-index: 200;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: min(94vw, 1200px); max-height: 88vh; border-radius: 10px; }
.lightbox-close {
  position: absolute; top: 14px; right: 18px;
  font-size: 2rem; background: transparent; color: #fff; border: 0; cursor: pointer; line-height: 1;
}

/* ===========================
   Availability calendar
=========================== */
.cal { margin-top: 12px; }
.cal.hidden { display: none; }
.cal .month { display: inline-block; vertical-align: top; width: 296px; margin: 0 14px 14px 0; }
.cal caption { text-align: left; font-weight: 600; padding: 5px 0 8px; }
.cal table { width: 100%; border-collapse: collapse; }
.cal th, .cal td {
  width: 14.285%; text-align: center; padding: 5px 3px;
  border: 1px solid #ede8e2;
  font-size: .88rem; font-family: system-ui, -apple-system, sans-serif;
}
.cal .dow th { background: #f4f0eb; font-weight: 600; font-size: .8rem; }
.cal .muted { color: #bbb; }
.cal .booked { background: #fde8e8; color: #9a0000; }
.cal .today { outline: 2px solid var(--brand); }

.cal-legend { display: flex; gap: 18px; margin-top: 10px; font-size: .88rem; align-items: center; }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-legend .dot {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1px solid #e0d8cf;
}
.dot.free { background: #fff; }
.dot.booked { background: #fde8e8; }
.dot.today { background: #fff; outline: 2px solid var(--brand); }

/* ===========================
   Contact / Form
=========================== */
.contact-grid {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: 32px; margin-top: 16px;
}
.contact-info-box { }
.icon-list { list-style: none; padding: 0; margin: 0; }
.icon-list li { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .95rem; }
.icon-list .icon { flex-shrink: 0; font-size: 1.1rem; margin-top: .1rem; }
.note {
  margin-top: 20px; background: var(--bg-soft); border: 1px solid #ddd4c8;
  padding: 14px 16px; border-radius: 12px; font-size: .92rem; color: var(--muted);
}

.contact-form {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 5px; }
.field input,
.field textarea,
.field select {
  width: 100%; padding: .65rem .85rem;
  border: 1px solid #ddd4ca; border-radius: 10px;
  background: #fff; font-family: inherit; font-size: .95rem;
  appearance: none; -webkit-appearance: none; color: var(--text);
  transition: border-color .2s, outline .2s;
}
.field input:focus,
.field textarea:focus,
.field select:focus { outline: 2px solid rgba(192,57,43,.3); border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 110px; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23695d56' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2rem; }

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-footer { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.privacy-check { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.privacy-check input { width: auto; margin: .15rem 0 0; flex-shrink: 0; }
.privacy-check a { color: var(--brand); }
.form-status { min-height: 1.4em; font-size: .92rem; color: var(--muted); }
.form-status.success { color: #1a6b2a; }
.form-status.error { color: #9a0000; }
.mandatory { font-size: .82rem; color: var(--muted); }

/* ===========================
   Location section
=========================== */
.map-and-text {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start;
}
.map-embed {
  aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #e8e4de;
}
.map-embed iframe { border: 0; width: 100%; height: 100%; }
.dist-list { margin: 10px 0 0 1.1rem; padding: 0; }
.dist-list li { margin: 6px 0; font-size: .95rem; }

/* ===========================
   Footer
=========================== */
.site-footer { background: #26201c; color: #fff; margin-top: 50px; padding: 36px 0 16px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.footer-brand { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.footer-tagline { opacity: .7; font-size: .9rem; }
.footer-links h4 { margin: 0 0 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; opacity: .55; }
.footer-links a { display: block; color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem; margin: 5px 0; transition: opacity .2s; }
.footer-links a:hover { opacity: 1; color: #fff; }
.copyright {
  font-size: .85rem; opacity: .5; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.1); text-align: center;
}

/* ===========================
   Page header (for inner pages)
=========================== */
.page-header {
  background: var(--bg-soft); border-bottom: 1px solid #e4dcd4;
  padding: 48px 0 32px;
}
.page-header h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 3vw + .8rem, 3rem); margin: 0;
}
.page-header p { color: var(--muted); margin: .4rem 0 0; }

/* ===========================
   Apartment detail page
=========================== */
.apt-detail-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px;
  align-items: start; margin-top: 16px;
}
.apt-detail-info { }
.apt-detail-sidebar {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); position: sticky; top: 80px;
}
.apt-detail-sidebar h3 { margin: 0 0 12px; }
.price-display { font-size: 1.4rem; font-weight: 700; color: var(--brand); margin: 8px 0; }
.price-note { font-size: .88rem; color: var(--muted); }

/* Prose text */
.prose p { margin: 0 0 1rem; }
.prose h2 { font-family: "Playfair Display", Georgia, serif; margin: 1.6rem 0 .5rem; }
.prose ul { padding-left: 1.4rem; margin: .5rem 0 1rem; }
.prose li { margin: .3rem 0; }

/* ===========================
   Legal / AGB / Datenschutz pages
=========================== */
.legal-content { max-width: 760px; margin: 48px auto 80px; }
.legal-content h1 { font-family: "Playfair Display", Georgia, serif; margin-bottom: 1.5rem; }
.legal-content h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal-content p, .legal-content li { color: var(--muted); line-height: 1.75; }

/* ===========================
   404 page
=========================== */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-family: "Playfair Display", Georgia, serif; font-size: 4rem; margin: 0; color: var(--brand); }
.error-page p { color: var(--muted); font-size: 1.1rem; margin: 1rem 0 2rem; }

/* ===========================
   Responsive
=========================== */
@media (max-width: 900px) {
  .apt-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .features { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .map-and-text { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .apt-detail-grid { grid-template-columns: 1fr; }
  .apt-detail-sidebar { position: static; }
}
@media (max-width: 680px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-box { padding: 1.6rem 1.2rem; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .site-header.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; right: 4%; top: 58px;
    background: #fff; padding: 14px 16px; border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,.12); gap: 14px;
    border: 1px solid #e4dcd4;
  }
}

/* ===========================
   Reduced motion
=========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
