/* ═══════════════════════════════════════════════════════════════
   SR-HOMES.AT — Custom Styles (non-Tailwind)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Base ──────────────────────────────────────────────────── */
* { font-family: 'Outfit', system-ui, sans-serif; box-sizing: border-box; }
html { scroll-behavior: auto; }
body { background: #FAF8F5; margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.font-display { font-family: 'Playfair Display', Georgia, serif; }

/* ─── Animations ────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(40px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideRight { from { transform:translateX(-100%); } to { transform:translateX(0); } }
@keyframes scaleUp { from { transform:scale(0.9); opacity:0; } to { transform:scale(1); opacity:1; } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes marquee { 0% { transform:translateX(0); } 100% { transform:translateX(-50%); } }
@keyframes countUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes videoZoom { 0% { transform:scale(1); } 100% { transform:scale(1.1); } }
@keyframes heroTextReveal { from { clip-path:inset(100% 0 0 0); opacity:0; } to { clip-path:inset(0 0 0 0); opacity:1; } }

.anim-fade-up { animation: fadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity:0; }
.anim-fade-in { animation: fadeIn 0.8s ease forwards; opacity:0; }
.anim-hero-text { animation: heroTextReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.anim-d1 { animation-delay:0.1s; }
.anim-d2 { animation-delay:0.25s; }
.anim-d3 { animation-delay:0.4s; }
.anim-d4 { animation-delay:0.55s; }
.anim-d5 { animation-delay:0.7s; }

.hero-video { animation: none; }
@media (min-width:769px) { .hero-video { animation: videoZoom 30s ease-in-out infinite alternate; } }

/* ─── Hover Effects ─────────────────────────────────────────── */
.hover-lift { transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), box-shadow 0.6s cubic-bezier(0.22,1,0.36,1); }
.hover-lift:hover { transform:translateY(-6px); box-shadow:0 30px 60px -20px rgba(0,0,0,0.12); }
.hover-scale { transition: transform 1.2s cubic-bezier(0.22,1,0.36,1); }
.hover-scale:hover { transform:scale(1.05); }
.hover-glow:hover { box-shadow: 0 0 40px rgba(212,98,43,0.12); }

/* ─── Underline Reveal ──────────────────────────────────────── */
.line-reveal { position:relative; display:inline-block; }
.line-reveal::after {
  content:''; position:absolute; bottom:-2px; left:0; width:0; height:2px;
  background:#D4622B; transition: width 0.4s cubic-bezier(0.22,1,0.36,1);
}
.line-reveal:hover::after { width:100%; }

/* ─── Marquee ───────────────────────────────────────────────── */
.marquee-track { display:flex; animation: marquee 30s linear infinite; }

/* ─── Grain Overlay ─────────────────────────────────────────── */
.grain {
  position:fixed; inset:0; z-index:9998; pointer-events:none; opacity:0.025; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Video Overlay ─────────────────────────────────────────── */
.video-overlay {
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(10,10,8,0.3) 0%, rgba(10,10,8,0.1) 30%, rgba(10,10,8,0.6) 70%, rgba(10,10,8,0.95) 100%);
}

/* ─── Card Image ────────────────────────────────────────────── */
.card-img { aspect-ratio:4/3; overflow:hidden; }
.card-img img { transition: transform 1.4s cubic-bezier(0.22,1,0.36,1); }
.card-img:hover img { transform:scale(1.08); }

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#C5C0B8; border-radius:10px; }

/* ─── Form Elements ─────────────────────────────────────────── */
input, textarea, select { font-family: 'Outfit', system-ui, sans-serif; }
input:focus, textarea:focus, select:focus {
  outline:none; border-color:#D4622B !important;
  box-shadow:0 0 0 3px rgba(212,98,43,0.08);
}

/* ─── Responsive Hero ───────────────────────────────────────── */
@media (max-width:768px) { .hero-h1 { font-size:2.5rem !important; } }
@media (min-width:769px) and (max-width:1440px) {
  .hero-h1 { font-size:clamp(2.8rem, 5.5vw, 5rem) !important; }
  .section-heading { font-size:clamp(1.8rem, 3.2vw, 2.8rem) !important; }
  .stat-number { font-size:3.5rem !important; }
  .laptop-py { padding-top:5rem !important; padding-bottom:5rem !important; }
  .page-hero-h1 { font-size:clamp(2.2rem, 4.5vw, 3.8rem) !important; }
}

/* ─── Lightbox ──────────────────────────────────────────────── */
.lightbox-overlay {
  position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,0.92);
  backdrop-filter:blur(12px); display:flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity 0.3s ease; pointer-events:none;
}
.lightbox-overlay.active { opacity:1; pointer-events:all; }
.lightbox-overlay img { max-width:90vw; max-height:85vh; object-fit:contain; border-radius:8px; transition:opacity 0.3s ease; }
.lightbox-btn {
  position:absolute; top:50%; transform:translateY(-50%); width:48px; height:48px;
  border-radius:50%; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.1); color:#fff; font-size:20px; transition:background 0.3s;
}
.lightbox-btn:hover { background:rgba(255,255,255,0.2); }
.lightbox-prev { left:20px; }
.lightbox-next { right:20px; }
.lightbox-close { position:absolute; top:20px; right:20px; transform:none; }
.lightbox-counter { position:absolute; bottom:24px; left:50%; transform:translateX(-50%); color:rgba(255,255,255,0.5); font-size:14px; font-weight:500; }
/* Mobil: Pfeile als grosse, deutlich sichtbare Buttons UNTEN neben dem
   Zaehler — an den Bildraendern waren sie kaum sichtbar und schwer zu
   treffen. Zusaetzlich laesst sich am Handy per Wischen blaettern. */
@media (max-width: 767px) {
  .lightbox-overlay img { max-height:70vh; }
  .lightbox-btn {
    width:56px; height:56px; font-size:28px;
    background:rgba(255,255,255,0.16);
    border:1.5px solid rgba(255,255,255,0.35);
  }
  .lightbox-prev { top:auto; bottom:24px; left:calc(50% - 100px); right:auto; transform:none; }
  .lightbox-next { top:auto; bottom:24px; left:calc(50% + 44px); right:auto; transform:none; }
  .lightbox-close { top:16px; right:16px; width:48px; height:48px; background:rgba(255,255,255,0.16); border:1.5px solid rgba(255,255,255,0.35); }
  .lightbox-counter { bottom:44px; color:rgba(255,255,255,0.85); font-weight:600; }
}

/* ─── Units Table ───────────────────────────────────────────── */
.units-row:hover { background:rgba(212,116,59,0.03); }
.units-row:hover .row-arrow { opacity:1; }
.row-arrow { opacity:0; transition:opacity 0.3s; }
.unit-badge { padding:4px 12px; border-radius:9999px; font-size:11px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; }
.unit-badge.available { background:rgba(212,116,59,0.08); color:#D4743B; }
.unit-badge.reserved { background:rgba(212,160,59,0.1); color:#D4A03B; }
.unit-badge.sold { background:rgba(155,149,144,0.1); color:#9B9590; }

/* ─── Select Styling ────────────────────────────────────────── */
select { -webkit-appearance:none; -moz-appearance:none; appearance:none; }

/* ─── Hero-Suche: gebrandetes Glas-Dropdown ─────────────────────
   Fix: die Hero-Selects hatten weisse Schrift, dadurch war die
   aufgeklappte Optionsliste weiss-auf-weiss (unlesbar) und es gab
   keinen Pfeil. Jetzt: heller Chevron, dunkle Optionsliste in
   Markenfarbe, klarer Fokus-Ring. */
.hero-select {
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  background-color:rgba(255,255,255,0.08);
  color:#fff;
  /* Heller Chevron als SVG-Data-URI, rechtsbündig */
  background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 0.95rem center;
  background-size:0.9rem;
  padding-right:2.6rem;
  cursor:pointer;
  transition:background-color 0.2s ease, box-shadow 0.2s ease;
}
.hero-select:hover { background-color:rgba(255,255,255,0.14); }
.hero-select:focus {
  outline:none;
  background-color:rgba(255,255,255,0.16);
  box-shadow:0 0 0 2px rgba(232,116,58,0.7);
}
/* Aufgeklappte Optionsliste: dunkles Warm-Grau, helle Schrift —
   lesbar und passend zum Glas-Look (moderne Browser stylen options). */
.hero-select option {
  background:#241F1C;
  color:#fff;
  padding:10px;
}
.hero-select option:checked,
.hero-select option:hover {
  background:#E8743A;
  color:#fff;
}

/* ─── Freitext-Suche (Immobilien-Seite) ─────────────────────── */
.site-search {
  background:#fff;
  border:1.5px solid #E5E0D8;
  color:#0A0A08;
  outline:none;
  transition:border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance:none; appearance:none;
}
.site-search::placeholder { color:#9A958C; }
.site-search:focus {
  border-color:#D4743B;
  box-shadow:0 0 0 3px rgba(212,116,59,0.14);
}
/* natives Clear-Kreuz von type=search ausblenden (wir haben ein eigenes) */
.site-search::-webkit-search-cancel-button { -webkit-appearance:none; appearance:none; }

/* ─── Pill-Navbar ───────────────────────────────────────────── */
#nav-pill .nav-link:hover { color: #0A0A08 !important; background: rgba(10, 10, 8, 0.05); }
#nav-pill .nav-link:focus-visible { outline: 2px solid rgba(212, 116, 59, 0.65); outline-offset: 2px; }

/* ─── Top-Immobilien: Interactive Image Accordion ───────────── */
/* Kern-Layout bewusst hier (nicht nur Tailwind-Klassen): die Sektion
   soll auch bei blockiertem Tailwind-CDN korrekt stehen. */
#prop-accordion, #sold-accordion {
  display: flex; align-items: stretch; gap: 14px;
  height: min(560px, 62vh);
}
/* svh = stabile Viewport-Hoehe: vh pumpt am Handy, wenn die
   Adressleiste beim Scrollen ein-/ausfaehrt — die Sektion aenderte
   dann ihre Hoehe und alles darunter sprang mit. */
@supports (height: 1svh) {
  #prop-accordion, #sold-accordion { height: min(560px, 62svh); }
}
.acc-item {
  position: relative; display: block; overflow: hidden; border-radius: 16px;
  flex: 3 1 0%;
  min-width: 0;
  transition: flex 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
  color: #fff; text-decoration: none;
}
.acc-item:hover { color: #fff; text-decoration: none; }
.acc-item > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.acc-item.acc-active { flex: 24 1 0%; }
.acc-item:focus-visible { box-shadow: 0 0 0 3px rgba(212, 116, 59, 0.65); }
/* Zugeklappt: gedrehter Titel; aufgeklappt: volle Caption */
.acc-label {
  position: absolute; left: 50%; bottom: 110px;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  white-space: nowrap;
  opacity: 1; transition: opacity 0.25s ease;
  pointer-events: none;
}
.acc-item.acc-active .acc-label { opacity: 0; }
.acc-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s ease 0.18s, transform 0.45s ease 0.18s;
  pointer-events: none;
}
.acc-item.acc-active .acc-caption { opacity: 1; transform: translateY(0); }
/* Mobil: vertikal gestapelt — schmale Spalten waeren unbedienbar */
@media (max-width: 767px) {
  #prop-accordion, #sold-accordion { flex-direction: column; height: min(660px, 80vh); }
  @supports (height: 1svh) {
    #prop-accordion, #sold-accordion { height: min(660px, 80svh); }
  }
  .acc-item { min-height: 54px; }
  .acc-label {
    left: 18px; right: auto; bottom: auto; top: 50%;
    transform: translateY(-50%) rotate(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .acc-item, .acc-label, .acc-caption { transition: none; }
}


/* ─── „Kürzlich verkauft": gespiegeltes Akkordeon ───────────── */
/* Wie die Top-Immobilien, nur seitenverkehrt: der aufgeklappte
   Streifen startet rechts, die Labels kippen in die Gegenrichtung.
   Streifen sind keine Links -> Zeiger-Cursor explizit. */
#sold-accordion .acc-item { cursor: pointer; }
@media (min-width: 768px) {
  #sold-accordion { flex-direction: row-reverse; }
  #sold-accordion .acc-label { transform: translateX(-50%) rotate(-90deg); }
}

/* ─── Hero Scroll-Cue ───────────────────────────────────────── */
@keyframes cueDrop { 0% { transform:translateY(0); opacity:1; } 70% { transform:translateY(12px); opacity:0; } 100% { transform:translateY(0); opacity:0; } }
.hero-cue-dot { animation: cueDrop 1.6s ease-in-out infinite; }

/* ─── Immobilien-Filterzeile: Dropdowns mit Label ───────────── */
.filter-field { display: flex; flex-direction: column; gap: 6px; }
.filter-label {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.18em; color: #9A958C; padding-left: 14px;
}
.filter-select {
  appearance: none; -webkit-appearance: none;
  min-width: 150px; min-height: 44px; padding: 10px 40px 10px 16px;
  border-radius: 9999px; border: 1.5px solid #E5E0D8;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239A958C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 16px center;
  font-size: 0.875rem; font-weight: 500; color: #0A0A08;
  cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.filter-select:hover { border-color: #D4743B; }
.filter-select:focus { outline: none; border-color: #D4743B; box-shadow: 0 0 0 3px rgba(212, 116, 59, 0.15); }
/* Aktiver Filter (nicht "alle"): oranger Akzent, damit man sieht, was greift */
.filter-select.is-active { border-color: #D4743B; background-color: #FDF3EC; color: #B4531F; font-weight: 600; }
.filter-reset {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 10px 18px; border-radius: 9999px;
  border: 1.5px solid #E5E0D8; background: transparent;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: #9A958C; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.filter-reset:hover { color: #D4743B; border-color: #D4743B; }
.filter-reset:focus-visible { outline: 3px solid #D4743B; outline-offset: 2px; }
@media (max-width: 640px) {
  .filter-field { flex: 1 1 calc(50% - 6px); }
  .filter-select { min-width: 0; width: 100%; }
}
/* Filterzeile selbst Tailwind-unabhaengig (Layout darf nie vom CDN abhaengen) */
.filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filter-row .flex-1 { flex: 1 1 auto; }
@media (min-width: 768px) { .filter-row { gap: 16px; } }
