/* ================================================
   City Scape View — Custom CSS
   ================================================ */

/* Base */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --navy:   var(--primary, #0D1B2A);
  --gold:   var(--secondary, #b89a5e);
  --gold-light: color-mix(in srgb, var(--secondary, #b89a5e) 70%, white);
  --gold-dark:  color-mix(in srgb, var(--secondary, #b89a5e) 70%, black);
  --cream:  var(--accent, #f7f4ef);
  --charcoal: #2c2c2c;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--charcoal);
}

/* ── DRAWER OVERLAY ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── SIDE DRAWER ── */
.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 50vw;
  max-width: 780px;
  height: 100vh;
  background: #c8614a;
  z-index: 200;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.77,0,0.175,1), visibility 0.45s;
  display: flex;
  flex-direction: column;
  padding: 36px 40px 48px 60px;
}
.side-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

/* ── DRAWER CLOSE BUTTON ── */
.drawer-close {
  align-self: flex-start;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 56px;
  opacity: 0.9;
  line-height: 1;
  transition: opacity 0.2s;
}
.drawer-close:hover { opacity: 0.5; }

/* ── DRAWER NAV LINKS ── */
.drawer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.drawer-nav li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.side-drawer.open .drawer-nav li { opacity: 1; transform: translateX(0); }
.side-drawer.open .drawer-nav li:nth-child(1) { transition-delay: 0.15s; }
.side-drawer.open .drawer-nav li:nth-child(2) { transition-delay: 0.22s; }
.side-drawer.open .drawer-nav li:nth-child(3) { transition-delay: 0.29s; }
.side-drawer.open .drawer-nav li:nth-child(4) { transition-delay: 0.36s; }
.side-drawer.open .drawer-nav li:nth-child(5) { transition-delay: 0.43s; }
.nav-num {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  font-family: 'Montserrat', sans-serif;
  min-width: 22px;
  flex-shrink: 0;
}
.drawer-nav a {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 400;
  color: white;
  text-decoration: none;
  line-height: 1.1;
  letter-spacing: 0.01em;
  display: block;
  transition: opacity 0.2s ease;
}
.drawer-nav a:hover { opacity: 0.65; }

/* ── DRAWER BOTTOM CONTACT ── */
.drawer-contact {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease 0.4s, transform 0.35s ease 0.4s;
}
.side-drawer.open .drawer-contact {
  opacity: 1;
  transform: translateY(0);
}
.drawer-contact p {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
}

/* ── MAIN NAVBAR BAR ── */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 300px;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.main-nav.at-top {
  background: transparent;
  box-shadow: none;
}
.main-nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 16px rgba(0,0,0,0.09);
}

/* ── HAMBURGER BUTTON ── */
.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  z-index: 300;
  flex-shrink: 0;
  position: relative;
}
.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: background 0.3s ease, transform 0.4s cubic-bezier(0.77,0,0.175,1), opacity 0.3s ease;
  transform-origin: center;
}
.main-nav.scrolled .hamburger-btn span { background: #1a1a1a; }

/* Hamburger → X animation when drawer is open */
.hamburger-btn.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: white !important;
}
.hamburger-btn.open span:nth-child(2) {
  transform: scaleX(0);
  opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: white !important;
}

/* ── NAV LEFT GROUP (hamburger + logo) ── */
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 1;
}

/* ── LOGO ── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 52px;
  width: auto;
  display: block;
}

/* ── NAV RIGHT GROUP ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 1;
  flex-shrink: 0;
}
.nav-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.nav-phone-icon { width: 14px; height: 14px; flex-shrink: 0; }
.main-nav.scrolled .nav-phone { color: #1a1a1a; }
.nav-phone:hover { opacity: 0.75; }

/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
  display: flex;
  align-items: center;
}
.lang-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.09em;
  padding: 5px 10px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}
.lang-btn:first-child { border-right: none; }
.lang-btn.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: white;
}
.main-nav.scrolled .lang-btn {
  color: #333;
  border-color: rgba(0,0,0,0.22);
}
.main-nav.scrolled .lang-btn.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: white;
}

/* ── CURRENCY SWITCHER ── */
.currency-switcher {
  display: flex;
  align-items: center;
}
.currency-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 5px 9px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}
.currency-btn:not(:last-child) { border-right: none; }
.currency-btn.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: white;
}
.main-nav.scrolled .currency-btn {
  color: #333;
  border-color: rgba(0,0,0,0.22);
}
.main-nav.scrolled .currency-btn.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: white;
}
@media (max-width: 640px) {
  .currency-switcher { display: none; }
}

/* ── BOOK NOW BUTTON ── */
.book-now-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #c0392b;
  color: white;
  border: none;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.book-now-btn:hover { background: #a93226; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .nav-phone { display: none; }
}
@media (max-width: 768px) {
  .side-drawer { width: 100vw; max-width: none; padding: 30px 24px 40px 36px; }
  .main-nav { height: 62px; padding: 0 20px !important; }
  .drawer-nav a { font-size: 34px; }
  .drawer-nav li { margin-bottom: 14px; }
}
@media (max-width: 420px) {
  .lang-switcher { display: none; }
}

/* ── Experience section: Airbnb Superhost badge ── */
.superhost-badge {
  position: absolute;
  right: -52px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

/* ── Gold colour helpers ── */
.text-gold        { color: var(--gold); }
.bg-gold          { background-color: var(--gold); }
.border-gold      { border-color: var(--gold); }
.hover\:bg-gold-dark:hover { background-color: var(--gold-dark); }

/* ── Flatpickr custom theme ── */
.flatpickr-calendar {
  font-family: 'Montserrat', sans-serif;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  border-radius: 0;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
}
.flatpickr-day.inRange {
  background: rgba(184,154,94,0.15) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.flatpickr-day:hover {
  background: rgba(184,154,94,0.2);
}
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays {
  background: var(--navy);
  color: #fff;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #fff;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
  color: var(--navy);
  background: #fff;
}
.flatpickr-weekday { color: var(--gold) !important; }
.flatpickr-input { background: #fff; }

/* ── Hero scroll line animation ── */
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.animate-scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

/* ── Fade-in ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.8s ease forwards; }

/* ── Booking canvas transition ── */
#booking-canvas {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#booking-canvas.open {
  transform: translateX(0) !important;
}

/* ── Canvas overlay ── */
#booking-overlay.open {
  opacity: 1 !important;
  display: block !important;
}

/* ── Line-clamp ── */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Focus ring for inputs ── */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(184,154,94,0.15);
}

/* ── Mobile menu transition (legacy — unused) ── */

/* ── Aspect ratio helper ── */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

/* ── Counter buttons ── */
.counter-btn {
  user-select: none;
  cursor: pointer;
  line-height: 1;
}

/* ── Language toggle active ── */
.lang-btn.active {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ── Responsive images ── */
img { display: block; max-width: 100%; }

/* ── Sticky filter bar offset ── */
@media (min-width: 768px) {
  .apartments-sticky-bar { top: 105px; }
}
