/* =========================================================
   Viventra – Haupt-Styles (mobil-first, "Airbnb-ish")
   ========================================================= */

/* Tokens */
:root{
  --bg:#fff; --text:#333; --muted:#6b7280; --border:#eee;
  --brand:#ff385c; --brand-hover:#e31c5f; --accent:#111827;
  --radius:16px; --radius-sm:12px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --shadow-sm:0 4px 12px rgba(0,0,0,.06);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --container:1200px;
}

*,
*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:'Segoe UI', system-ui, -apple-system, sans-serif;
  background:var(--bg); color:var(--text); line-height:1.45;
  font-size:16px;
}
@media (min-width:768px){ body{ font-size:17px; } }

a{ color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
a:hover{ opacity:.9; }

/* ===== Header / Nav – mobil pill bar + avatar ===== */
.main-header{
  position:sticky; top:0; z-index:1000;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:10px 16px; background:#fff; border-bottom:1px solid var(--border);
  backdrop-filter:saturate(140%) blur(6px);
}
.main-header .logo img{ height:60px; display:block; }

/* Desktop-Menü aus, Mobile bekommt kompakte Icons/Avatar */
.nav-menu ul{
  list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:10px;
}
.nav-menu a{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; font-weight:600; border-radius:999px; transition:background .2s;
}
.nav-menu a:hover{ background:#f7f7f7; }
.nav-menu .dropdown{ position:relative; }
.nav-menu .dropdown-menu{
  display:none; position:absolute; top:calc(100% + 8px); right:0; min-width:220px;
  background:#fff; border-radius:14px; box-shadow:var(--shadow); padding:6px; z-index:1000;
}
.nav-menu .dropdown:hover .dropdown-menu{ display:block; }
.nav-menu .dropdown-menu li{ padding:8px 10px; border-radius:10px; }
.nav-menu .dropdown-menu li:hover{ background:#f7f7f7; }

.avatar img{
  width:36px; height:36px; border-radius:50%; object-fit:cover; border:1px solid #ddd;
}

/* ===== Buttons ===== */
.btn{
  appearance:none; border:none; cursor:pointer; font-weight:800; font-size:1rem;
  background:var(--brand); color:#fff; padding:12px 20px; border-radius:999px;
  transition:background .2s, transform .06s; box-shadow:none;
  min-height:48px;
}
.btn:hover{ background:var(--brand-hover); }
.btn:active{ transform:translateY(1px) scale(.99); }
.btn-outline{
  background:#fff; color:#333; border:1px solid #ddd; padding:12px 20px; border-radius:999px;
}
.btn-outline:hover{ background:#f7f7f7; }
.btn-cancel{ background:#ff6666; color:#fff; padding:12px 18px; border-radius:999px; }
.btn-cancel:hover{ background:#e05555; }

/* ===== Container / Layout ===== */
.container{ width:min(100%, var(--container)); margin:0 auto; padding:18px; }

/* Cards (Airbnb-ish) */
.card,.room-card,.booking-card{
  background:#fff; border:1px solid var(--border);
  padding:18px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease;
}
.card:hover,.room-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow); }
.booking-card:hover{ transform:none; }

/* ===== Hero ===== */
.hero-header{
  position:relative; height:48vh; min-height:300px;
  background:url('../assets/img/header-bg.jpg') center/cover no-repeat;
  display:flex; align-items:center; justify-content:center; text-align:center; color:#fff;
}
.hero-overlay{
  position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.25));
  backdrop-filter: blur(4px);
}
.hero-content{ position:relative; z-index:1; padding: 0 16px; }
.hero-logo{ max-width:160px; margin:0 auto 12px; }
.hero-header h1{ font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin:0; letter-spacing:.2px; }
.hero-header p{ font-size: clamp(.95rem, 2.6vw, 1.15rem); opacity:.95; }

/* ===== Search bar (pill) ===== */
.search-bar{
  display:flex; justify-content:center; align-items:center; gap:10px; margin-top:16px;
}
.search-bar input{
  width:min(92vw, 520px);
  padding:12px 16px; border-radius:999px; border:1px solid #ddd; font-size:1rem; background:#fff;
}
.search-bar button{ border-radius:999px; padding:12px 18px; }

/* ===== Rooms grid ===== */
.rooms{
  display:grid; grid-template-columns:1fr; gap:14px;
}
@media (min-width:640px){ .rooms{ grid-template-columns: repeat(2,1fr); gap:18px; } }
@media (min-width:1024px){ .rooms{ grid-template-columns: repeat(3,1fr); gap:20px; } }

.room-card{ overflow:hidden; padding:0; border-radius:18px; }
.room-card img{ width:100%; height:220px; object-fit:cover; display:block; }
.room-info{
  padding:16px; display:flex; flex-direction:column; gap:8px; min-height:auto; text-align:left;
}
.room-info h3{ margin:0; font-size:1.1rem; }
.room-info .meta{ color:var(--muted); font-size:.95rem; }

/* ===== 2-Spalten Detail (mit sticky Buchung) ===== */
.room-two-col{
  display:grid; grid-template-columns:1fr; gap:16px; align-items:start;
}
@media (min-width:1024px){
  .room-two-col{ grid-template-columns: 1.2fr .8fr; gap:24px; }
}
.booking-aside{
  position:static;
}
@media (min-width:1200px){
  .booking-aside{
    position:sticky; --header-h:64px; top: calc(var(--header-h) + 16px);
  }
}
.booking-card{
  max-height:none; overflow:visible; padding:18px; border-radius:16px; box-shadow:var(--shadow-sm);
}
@media (min-width:1200px){
  .booking-card{ max-height: calc(100vh - (var(--header-h) + 40px)); overflow:auto; }
}

/* ===== Gallery ===== */
/* Phone: horizontales Scrollen mit Snap (Airbnb-Style) */
.room-gallery{
  display:flex; gap:10px; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px;
  scroll-snap-type:x mandatory;
}
.room-gallery img{
  flex:0 0 auto; width: 80vw; max-width: 480px; height: 220px;
  object-fit:cover; border-radius:14px; box-shadow:var(--shadow-sm);
  scroll-snap-align:center;
}
/* Tablet & Desktop: Grid */
@media (min-width:768px){
  .room-gallery{ display:flex; flex-wrap:wrap; overflow:visible; }
  .room-gallery img{
    width: calc(33.333% - 10px); height: 220px; scroll-snap-align:unset;
  }
}

/* ===== Room description ===== */
.room-description{
  background:#fafafa; padding:18px; border-radius:14px; box-shadow:var(--shadow-sm); margin-bottom:16px;
}

/* ===== Delete image btn ===== */
.btn-delete-image{
  position:absolute; top:8px; right:8px;
  background:rgba(255,102,102,.95); color:#fff; border:none;
  padding:8px; border-radius:50%; font-size:14px; line-height:1; cursor:pointer;
  transition: transform .15s, background .2s; box-shadow:0 2px 6px rgba(0,0,0,.2);
}
.btn-delete-image:hover{ transform:scale(1.05); background:rgba(224,85,85,.98); }

/* ===== Booking form ===== */
.booking-form{
  background:#fff; padding:18px; border-radius:14px; box-shadow:var(--shadow-sm);
}
.booking-form h3{ margin:0 0 12px; color:var(--brand); }
.booking-form label{ display:block; margin:0 0 6px; font-weight:600; }
.booking-form input[type="date"]{
  width:100%; padding:12px; border:1px solid #ddd; border-radius:10px; background:#fafafa;
}
.booking-form input:focus{ border-color:var(--brand); outline:none; }
.booking-form .btn{ width:100%; padding:12px; }

/* ===== Customer dashboard ===== */
.customer-dashboard{
  width:min(100%, var(--container));
  margin: 18px auto; background:#fff; padding:18px;
  border-radius:14px; box-shadow:var(--shadow-sm); text-align:center;
}
.profile-summary img{
  width:90px; height:90px; border-radius:50%; object-fit:cover; border:2px solid #ddd; margin-bottom:10px;
}
.button-group{ display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:12px; }
.new-booking{ text-align:center; margin-top:20px; }
.new-booking .btn{ padding:12px 22px; font-size:1rem; }
.status.confirmed{ color:#28a745; font-weight:700; }
.status.pending{ color:#ffaa00; font-weight:700; }
.status.cancelled{ color:#999; font-weight:700; }

.customer-dashboard .dashboard-top{
  display:flex; flex-direction:column; gap:14px; margin-top:16px;
}
@media (min-width:768px){
  .customer-dashboard .dashboard-top{ flex-direction:row; }
}
.card{ padding:18px; border-radius:14px; box-shadow:var(--shadow-sm); }

/* ===== Hero small (room) ===== */
.small-hero{ height:32vh; margin-bottom:8%; }
.hero-header.small{ height:30vh; min-height:280px; max-height:300px; }
.hero-header h1{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hero-avatar{
  width:96px; height:96px; border-radius:50%; object-fit:cover; margin-bottom:10px;
  border:3px solid #fff; box-shadow:0 4px 10px rgba(0,0,0,.2);
}

/* ===== Forms (general) ===== */
.profile-form textarea{
  width:100%; padding:12px; border-radius:12px; border:1px solid #ddd; background:#fafafa; min-height:100px;
}

/* ===== Alerts ===== */
.success{
  background:#e6ffed; color:#28a745; padding:10px; border-radius:10px; text-align:center; margin-bottom:12px;
}
.error{
  background:#ffe6e6; color:#ff0000; padding:10px; border-radius:10px; text-align:center; margin-bottom:12px;
}

/* ===== Utilities ===== */
.container,.room-detail{ overflow:visible; }
.hide-desktop{ display:inline-flex; }
@media (min-width:1024px){ .hide-desktop{ display:none!important; } }
.only-desktop{ display:none; }
@media (min-width:1024px){ .only-desktop{ display:block; } }

/* =========================================================
   MOBILE POLISH (≤ 430px) – größere Tap-Targest & Typo
   ========================================================= */
@media (max-width:430px){
  html,body{ font-size:18.5px; }                /* +~15% ohne Zoom-Blur */
  .main-header{ padding:10px 14px; }
  .btn,.btn-outline,.btn-cancel{ min-height:52px; padding:14px 18px; }
  .search-bar input{ width:92vw; padding:14px 18px; }
  .card,.booking-form,.room-description,.customer-dashboard{ padding:20px; border-radius:18px; }
  .room-card img{ height:210px; }
}

/* =========================================================
   TABLET UP (≥ 768px) – etwas mehr Luft
   ========================================================= */
@media (min-width:768px){
  .container{ padding:24px; }
  .card,.booking-form,.room-description{ padding:22px; }
}

/* =========================================================
   DESKTOP UP (≥ 1024px)
   ========================================================= */
@media (min-width:1024px){
  .main-header{ padding:12px 24px; }
  .container{ padding:24px; }
  .card,.booking-form,.room-description{ border-radius:18px; }
}

/* =========================================================
   MISC FIXES
   ========================================================= */
.hero-header .btn{ box-shadow:0 6px 18px rgba(0,0,0,.15); }
.hero-header .btn:hover{ transform:translateY(-1px); }

.search-bar input:focus{ outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(255,56,92,.15); }

/* Dezentere link-states konsistent */
a:visited{ text-decoration:none; }

/* Kein overflow Hide-Fehler auf Eltern */
.container, .room-detail{ overflow:visible; }

/* ===== Burger Button ===== */
.burger-btn{
  appearance:none; border:none; background:#fff; cursor:pointer;
  width:44px; height:44px; border-radius:999px; padding:0; display:inline-flex;
  align-items:center; justify-content:center; box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.burger-btn span{
  display:block; width:20px; height:2px; background:#111; border-radius:2px;
  position:relative; transition: transform .2s, opacity .2s, top .2s, bottom .2s;
}
.burger-btn span + span{ margin-top:4px; }
.burger-btn.is-active span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.burger-btn.is-active span:nth-child(2){ opacity:0; }
.burger-btn.is-active span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
/* Grundlayout übernimmt .icon-btn von dir */

/* Beide Icons vorbereiten */
.burger-btn .icon-open,
.burger-btn .icon-close {
  font-size: 20px;
  line-height: 1;
  transition: opacity .2s ease;
  position: absolute;         /* beide an derselben Stelle überlagern */
}

/* Startzustand: nur Bars sichtbar */
.burger-btn .icon-close { opacity: 0; }

/* Wenn aktiv: Close zeigen, Bars verstecken */
.burger-btn.is-active .icon-open { opacity: 0; }
.burger-btn.is-active .icon-close { opacity: 1; position: static; }
/* ===== Off-canvas Drawer ===== */
.nav-drawer{
  position: fixed; top: var(--safe-top); right:0; bottom:0;
  width: min(86vw, 360px);
  background:#fff; border-left:1px solid var(--border);
  transform: translateX(100%); transition: transform .25s ease;
  box-shadow: -12px 0 30px rgba(0,0,0,.08); z-index: 1200;
}
.nav-drawer.is-open{ transform: translateX(0); }
.nav-drawer__header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; font-weight:800; border-bottom:1px solid var(--border);
}
.drawer-close{
  appearance:none; border:none; background:#f5f5f5; border-radius:10px;
  width:36px; height:36px; cursor:pointer;
}
.nav-drawer__list{
  list-style:none; margin:0; padding:10px;
  display:flex; flex-direction:column; gap:6px;
}
.nav-drawer__list a{
  display:block; padding:12px 14px; border-radius:12px; font-weight:700;
}
.nav-drawer__list a:hover{ background:#f7f7f7; }
.nav-drawer__avatar a{
  display:flex; align-items:center; gap:10px;
}
.nav-drawer__avatar img{
  width:28px; height:28px; border-radius:50%; object-fit:cover; border:1px solid #ddd;
}

/* Backdrop */
.nav-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.25);
  backdrop-filter: blur(2px);
  z-index: 1100;
  opacity:0; pointer-events:none; transition: opacity .2s;
}
.nav-backdrop.is-open{ opacity:1; pointer-events:auto; }

/* Scroll-Lock wenn Drawer offen */
body.no-scroll{ overflow:hidden; }

/* Sichtbarkeit:
   - Burger nur mobil, Desktop-Menü nur ≥1024px (du nutzt already hide-desktop/only-desktop) */
.hide-desktop{ display:inline-flex; }
@media (min-width:1024px){
  .hide-desktop{ display:none!important; }
  .nav-drawer, .nav-backdrop{ display:none!important; }
}

/* ===== SEARCH – mobile pill, flexibel ===== */
.search-bar{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 6px;                          /* „Rahmen“-Padding für die Pill */
  width: min(92vw, 720px);               /* niemals über den Bildschirm */
  background: #fff;
  border: 1px solid #eee;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.search-bar input{
  flex: 1 1 auto;                        /* nimmt restliche Breite */
  min-width: 0;                          /* verhindert Overflow */
  border: none;
  outline: none;
  padding: 12px 14px;
  border-radius: 999px;
  font-size: 1rem;
  background: transparent;               /* Input verschmilzt mit Pill */
}
.search-bar input::placeholder{ color:#9aa3af; }

/* optional: kleine „Chips“-Felder (Datum/Guests) nebendran */
.search-chip{
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f7f7f7;
  border: 1px solid #eee;
  font-weight: 600;
  font-size: .95rem;
}

/* Button bleibt innerhalb der Pill */
.search-bar .btn{
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;                       /* kompakter als vorher */
  border-radius: 999px;
}

/* Kreis-Icon-Button Variante (auf ganz klein) */
.search-btn-icon{
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  padding: 0;
}

/* Phones: reduziere Sekundärfelder und halte alles im Frame */
@media (max-width: 430px){
  .search-bar{ width: 92vw; padding: 6px; }
  .search-chip{ display: none; }         /* nur Hauptfeld + Button */
  .search-bar .btn{ padding: 0 14px; min-height: 44px; }
  .search-bar input{ padding: 12px 12px; }
}

@media (max-width: 360px){
  .search-bar .btn{ width: 44px; padding: 0; }
  .search-bar .btn span{ display: none; } /* Text ausblenden, nur Icon */
}