/* =========================================================
   VOLARIA – Booking Platform UI
   Built on Bootstrap 5.3
   ========================================================= */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --primary:      #0D6E6E;
  --primary-light:#14B8A6;
  --primary-dark: #0A5252;
  --accent:       #F59E0B;
  --accent-dark:  #D97706;
  --body-bg:      #F8FAFC;
  --card-bg:      #FFFFFF;
  --text:         #1E293B;
  --text-muted:   #64748B;
  --border:       #E2E8F0;
  --nav-height:   64px;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.14);
}

/* ── Base ─────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--body-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  padding-top: var(--nav-height);
  transition: background .3s, color .3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  background: var(--primary-dark) !important;
  min-height: var(--nav-height);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.5px;
  color: #fff !important;
}

.navbar-brand span { color: var(--accent); }

.navbar-nav .nav-link {
  color: rgba(255,255,255,.82) !important;
  font-weight: 500;
  padding: .45rem .9rem !important;
  border-radius: 7px;
  transition: all .18s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.12);
}

.navbar-toggler { border-color: rgba(255,255,255,.3); }
.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(255,255,255,0.8)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* dark-mode toggle button */
#dark-mode-toggle {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  border-radius: 20px;
  padding: .3rem .85rem;
  font-size: .82rem;
  cursor: pointer;
  transition: background .18s;
  display: flex;
  align-items: center;
  gap: .35rem;
}
#dark-mode-toggle:hover { background: rgba(255,255,255,.22); }

/* ── Hero / Banner ────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1a4a4a 55%, #0f3d5c 100%);
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 3rem 1rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 30%, rgba(20,184,166,.18) 0%, transparent 65%);
}

.hero-badge {
  display: inline-block;
  background: rgba(245,158,11,.2);
  color: var(--accent);
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 20px;
  padding: .3rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  position: relative;
}

.hero-title .highlight { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,.78);
  max-width: 560px;
  margin: .8rem auto 2rem;
  position: relative;
}

/* ── Hero Search Widget ───────────────────────────────────── */
.hero-search {
  background: #fff;
  border-radius: 100px;
  box-shadow: var(--shadow-lg);
  padding: .4rem .4rem .4rem 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 780px;
  position: relative;
}

.hero-search .hs-field {
  flex: 1;
  padding: .6rem 1.1rem;
  border-left: 1px solid var(--border);
  min-width: 0;
}

.hero-search .hs-field:first-child { border-left: none; padding-left: 1.4rem; }

.hero-search .hs-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
  margin-bottom: .15rem;
}

.hero-search .hs-field input,
.hero-search .hs-field select {
  border: none;
  outline: none;
  width: 100%;
  font-size: .92rem;
  color: var(--text);
  background: transparent;
  padding: 0;
}

.hero-search .hs-field input::placeholder { color: var(--text-muted); }

.hero-search .btn-search {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: .7rem 1.6rem;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
  transition: background .18s;
  flex-shrink: 0;
}
.hero-search .btn-search:hover { background: var(--primary-dark); }

/* Mobile hero search */
@media (max-width: 700px) {
  .hero-search {
    flex-direction: column;
    border-radius: var(--radius);
    padding: 1rem;
    gap: .8rem;
  }
  .hero-search .hs-field {
    border-left: none;
    border-bottom: 1px solid var(--border);
    padding: .5rem 0;
  }
  .hero-search .hs-field:last-of-type { border-bottom: none; }
  .hero-search .btn-search {
    border-radius: var(--radius-sm);
    justify-content: center;
  }
}

/* ── Section headings ─────────────────────────────────────── */
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary-brand {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .6rem 1.4rem;
  font-weight: 600;
  transition: background .18s, transform .15s;
}
.btn-primary-brand:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .6rem 1.4rem;
  font-weight: 600;
  transition: background .18s;
}
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

/* ── Property Card ────────────────────────────────────────── */
.property-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.property-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #e2e8f0;
}

.property-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.property-card:hover .card-img-wrap img { transform: scale(1.05); }

.property-card .card-category {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: rgba(255,255,255,.92);
  color: var(--primary-dark);
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.property-card .card-rating {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .22rem .6rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.property-card .card-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card .card-location {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-bottom: .35rem;
}

.property-card .card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card .card-meta {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.property-card .card-price {
  margin-top: auto;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.property-card .card-price span {
  font-weight: 400;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── Card Image Carousel ─────────────────────────────────────────────────── */
.card-carousel-track {
  display: flex;
  height: 100%;
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.card-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.card-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}

/* Suppress the generic hover zoom when carousel is active */
.property-card:hover .card-img-wrap.card-carousel img { transform: none; }

.card-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: #1a1a1a;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
  z-index: 3;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  padding: 0;
  line-height: 1;
}

.card-img-wrap:hover .card-carousel-btn { opacity: 1; }
.card-carousel-btn:hover { background: #fff; }

.card-carousel-prev { left: .5rem; }
.card-carousel-next { right: .5rem; }

.card-carousel-dots {
  position: absolute;
  bottom: .55rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}

.cc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  transition: background .2s, transform .2s;
  cursor: pointer;
}

.cc-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ── Category Cards ───────────────────────────────────────── */
.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.8rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: block;
}

.category-card:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-card .cat-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: .75rem;
  display: block;
  transition: color .2s;
}

.category-card:hover .cat-icon { color: #fff; }

.category-card .cat-name {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  transition: color .2s;
}

.category-card:hover .cat-name { color: #fff; }

.category-card .cat-count {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .2rem;
  transition: color .2s;
}

.category-card:hover .cat-count { color: rgba(255,255,255,.75); }

/* ── Search Filters ───────────────────────────────────────── */
.filter-sidebar {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.filter-section-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Property Detail ──────────────────────────────────────── */
.photo-gallery {
  display: grid;
  gap: .5rem;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 500px;
}

.photo-gallery.has-multiple {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.photo-gallery .main-photo {
  grid-row: 1 / 3;
}

.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: opacity .2s;
}

.photo-gallery img:hover { opacity: .88; }

.photo-gallery .more-overlay {
  position: relative;
  cursor: pointer;
}

.photo-gallery .more-overlay::after {
  content: attr(data-count);
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Booking widget */
.booking-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.booking-widget .bw-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.booking-widget .bw-price span {
  font-size: .9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.booking-widget .bw-rating {
  font-size: .85rem;
  color: var(--text-muted);
}

.bw-dates {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 1rem 0;
}

.bw-dates .bw-date-row {
  display: flex;
}

.bw-dates .bw-date-field {
  flex: 1;
  padding: .75rem 1rem;
}

.bw-dates .bw-date-field:first-child {
  border-right: 1px solid var(--border);
}

.bw-dates label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text);
  display: block;
  margin-bottom: .2rem;
}

.bw-dates input {
  border: none;
  outline: none;
  width: 100%;
  font-size: .9rem;
  color: var(--text);
  background: transparent;
}

.bw-guests {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}

.price-breakdown {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
  font-size: .9rem;
}

.price-breakdown .pb-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
  color: var(--text);
}

.price-breakdown .pb-total {
  font-weight: 800;
  font-size: 1rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-top: .5rem;
}

/* ── Stars ────────────────────────────────────────────────── */
.stars { color: #F59E0B; font-size: .9rem; letter-spacing: -.05em; }
.stars.sm { font-size: .75rem; }

/* ── Amenity Grid ─────────────────────────────────────────── */
.amenity-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  padding: .35rem 0;
  color: var(--text);
}

.amenity-item i {
  color: var(--primary);
  font-size: 1.1rem;
  width: 1.4rem;
  flex-shrink: 0;
}

/* ── Reviews ──────────────────────────────────────────────── */
.review-card {
  background: var(--body-bg);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  border: 1px solid var(--border);
}

.review-card .reviewer-name { font-weight: 700; font-size: .95rem; }
.review-card .review-date { font-size: .78rem; color: var(--text-muted); }

/* ── My Bookings ──────────────────────────────────────────── */
.booking-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  gap: 0;
  transition: box-shadow .2s;
}

.booking-card:hover { box-shadow: var(--shadow); }

.booking-card .bc-img {
  width: 140px;
  flex-shrink: 0;
  object-fit: cover;
}

.booking-card .bc-body {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 576px) {
  .booking-card { flex-direction: column; }
  .booking-card .bc-img { width: 100%; height: 160px; }
}

/* Status badges */
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #e0e7ff; color: #3730a3; }

/* ── Host Dashboard ───────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* ── How it Works ─────────────────────────────────────────── */
.how-step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.how-step .step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 1rem;
}

.how-step h5 { font-weight: 700; font-size: 1rem; }

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: var(--radius);
  padding: 3rem 2rem;
  color: #fff;
  text-align: center;
}

/* ── Auth pages ───────────────────────────────────────────── */
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-card .auth-logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card .auth-logo span { color: var(--accent); }

/* ── Utility ──────────────────────────────────────────────── */
.text-primary-brand { color: var(--primary); }
.bg-primary-brand   { background: var(--primary); }
.border-primary     { border-color: var(--primary) !important; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.65);
  padding: 2.5rem 1rem;
  margin-top: 4rem;
  font-size: .88rem;
}

.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}
.site-footer .footer-brand span { color: var(--accent); }

/* ── Dark Mode ────────────────────────────────────────────── */
.dark-preload body, .dark-preload { background: #0f172a !important; color: #e2e8f0 !important; }

body.dark {
  --body-bg:   #0f172a;
  --card-bg:   #1e293b;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --border:    #334155;
  background: var(--body-bg);
  color: var(--text);
}

body.dark .property-card,
body.dark .booking-card,
body.dark .filter-sidebar,
body.dark .booking-widget,
body.dark .auth-card,
body.dark .stat-card {
  background: var(--card-bg);
  border-color: var(--border);
}

body.dark .hero-search {
  background: var(--card-bg);
}

body.dark .hero-search .hs-field input,
body.dark .hero-search .hs-field select { color: var(--text); }

body.dark .category-card {
  background: var(--card-bg);
  border-color: var(--border);
}

body.dark .category-card .cat-name { color: var(--text); }

body.dark .bw-dates,
body.dark .bw-guests { border-color: var(--border); }

body.dark .bw-dates input { color: var(--text); }

body.dark .review-card { background: #0f172a; border-color: var(--border); }

body.dark .hero-search .hs-field {
  border-left-color: var(--border);
}

/* ── Autocomplete dropdown ────────────────────────────────── */
.ac-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  z-index: 99999;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}
.ac-item {
  padding: 9px 14px;
  cursor: pointer;
  font-size: .875rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  transition: background .1s;
}
.ac-item:first-child { border-radius: 10px 10px 0 0; }
.ac-item:last-child  { border-radius: 0 0 10px 10px; }
.ac-item:only-child  { border-radius: 10px; }
.ac-item:hover,
.ac-item.active      { background: var(--primary-pale,#e8f5f5); color: var(--primary); }
.ac-item strong      { color: var(--primary); font-weight: 700; }

body.dark .ac-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
body.dark .ac-item            { color: #e2e8f0; }
body.dark .ac-item:hover,
body.dark .ac-item.active     { background: rgba(10,82,82,.35); }
body.dark .ac-item strong     { color: #5eead4; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 991px) {
  .booking-widget { position: static; margin-top: 2rem; }
  .filter-sidebar { position: static; }
  .hero-section { min-height: 70vh; }
}

@media (max-width: 576px) {
  .photo-gallery.has-multiple {
    grid-template-columns: 1fr;
    grid-template-rows: 260px 120px 120px;
    max-height: 520px;
  }
  .photo-gallery.has-multiple .main-photo { grid-row: 1; }

  .booking-widget { padding: 1.1rem; }
  .auth-card { padding: 1.5rem 1rem; }
}
