/* ========================================
   Antigravity — Professional Real Estate Styles
   Light/elegant theme with navy & warm gold accents
   ======================================== */

/* --- Custom Properties --- */
:root {
  --clr-navy: #1b2a4a;
  --clr-navy-light: #2d4066;
  --clr-navy-dark: #0f1a2e;
  --clr-gold: #c9a96e;
  --clr-gold-light: #dfc291;
  --clr-gold-dark: #a88c55;
  --clr-cream: #faf8f5;
  --clr-warm-white: #f5f2ed;
  --clr-warm-gray: #e8e4de;
  --clr-text: #2c2c2c;
  --clr-text-light: #6b6b6b;
  --clr-text-muted: #999;
  --clr-white: #ffffff;
  --clr-whatsapp: #25d366;
  --clr-accent: #c9a96e;
  --clr-glass: rgba(27, 42, 74, 0.85);
  --clr-glass-border: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.1);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* --- Base Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-cream);
  color: var(--clr-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--clr-navy);
}

/* --- Scrollbar Hide --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Glassmorphism (for bottom nav) --- */
.glass {
  background: var(--clr-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--clr-glass-border);
}

/* --- Scroll Snap --- */
.snap-x {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.snap-item {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* =================================================
   HERO SECTION
   ================================================= */
.hero-section {
  height: 65dvh;
  min-height: 500px;
  max-height: 900px;
  position: relative;
  overflow: hidden;
}

/* On desktop: cap the hero height so it doesn't dominate */
@media (min-width: 768px) {
  .hero-section {
    height: 75vh;
    max-height: 750px;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    height: 70vh;
    max-height: 700px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27, 42, 74, 0.95) 0%,
    rgba(27, 42, 74, 0.6) 35%,
    rgba(27, 42, 74, 0.15) 65%,
    transparent 100%
  );
  z-index: 1;
}

/* --- Swipe Up Bounce --- */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.bounce-anim {
  animation: bounce 2.5s ease-in-out infinite;
}

/* =================================================
   REVEAL ANIMATIONS (IntersectionObserver)
   ================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* =================================================
   STORY CARDS (About Section)
   ================================================= */
.story-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.story-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.story-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27, 42, 74, 0.92) 0%,
    rgba(27, 42, 74, 0.5) 50%,
    rgba(27, 42, 74, 0.15) 100%
  );
}

/* =================================================
   GALLERY DOTS
   ================================================= */
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: all var(--transition);
  cursor: pointer;
}
.gallery-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--clr-gold);
}

/* Light dots (for light backgrounds) */
.gallery-dot-dark {
  background: rgba(27, 42, 74, 0.2);
}
.gallery-dot-dark.active {
  background: var(--clr-gold);
}

/* =================================================
   PROPERTY CARDS
   ================================================= */
.property-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--clr-white);
}
.property-card:active {
  transform: scale(0.98);
}
@media (hover: hover) {
  .property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(27, 42, 74, 0.15);
  }
}

/* =================================================
   CAROUSEL NAVIGATION ARROWS
   ================================================= */
.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-white);
  border: 1px solid var(--clr-warm-gray);
  color: var(--clr-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.carousel-btn:hover {
  background: var(--clr-navy);
  color: var(--clr-white);
  border-color: var(--clr-navy);
  box-shadow: var(--shadow-md);
}
.carousel-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* =================================================
   DETAIL PAGE: GALLERY
   ================================================= */
.detail-gallery {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.detail-gallery-item {
  scroll-snap-align: center;
  flex-shrink: 0;
}

/* =================================================
   BOTTOM NAV
   ================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0 0.75rem 0.75rem;
  border-radius: var(--radius-xl);
}
@media (min-width: 768px) {
  .bottom-nav-inner {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* =================================================
   FORM INPUTS
   ================================================= */
.form-input {
  min-height: 52px;
  background: var(--clr-white);
  border: 1px solid var(--clr-warm-gray);
  border-radius: var(--radius);
  color: var(--clr-text);
  font-size: 1rem;
  font-family: var(--font-sans);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--clr-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}
.form-input::placeholder {
  color: var(--clr-text-muted);
}

/* =================================================
   BUTTONS
   ================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--clr-navy);
  color: var(--clr-white);
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  background: var(--clr-navy-light);
  box-shadow: 0 6px 20px rgba(27, 42, 74, 0.25);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-gold {
  background: var(--clr-gold);
  color: var(--clr-navy-dark);
}
.btn-gold:hover {
  background: var(--clr-gold-light);
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.3);
}

.btn-whatsapp {
  background: #25d366;
  color: white;
}
.btn-whatsapp:hover {
  background: #22c35e;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--clr-navy);
  border: 1.5px solid var(--clr-navy);
}
.btn-outline:hover {
  background: var(--clr-navy);
  color: var(--clr-white);
}

/* =================================================
   SPEC ITEMS (Listing Detail)
   ================================================= */
.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--clr-warm-white);
  border: 1px solid var(--clr-warm-gray);
  min-width: 72px;
}

/* Dark-bg spec items (for detail pages with dark headers) */
.spec-item-dark {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
}

/* =================================================
   DESCRIPTION: Read More Toggle
   ================================================= */
.description-text {
  max-height: 4.8em;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
.description-text.expanded {
  max-height: 1000px;
}

/* =================================================
   MOBILE MENU DRAWER
   ================================================= */
.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.menu-drawer.open {
  pointer-events: all;
  opacity: 1;
}
.menu-drawer-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.menu-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--clr-white);
  transform: translateX(100%);
  transition: transform var(--transition);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}
.menu-drawer.open .menu-drawer-panel {
  transform: translateX(0);
}

/* =================================================
   SECTION DIVIDER
   ================================================= */
.section-divider {
  width: 48px;
  height: 3px;
  background: var(--clr-gold);
  border-radius: 2px;
}

/* =================================================
   LABEL TAG
   ================================================= */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}
.tag-gold {
  background: var(--clr-gold);
  color: var(--clr-navy-dark);
}
.tag-navy {
  background: var(--clr-navy);
  color: var(--clr-white);
}

/* =================================================
   VIDEO SHOWCASE SECTION
   ================================================= */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.video-card {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--clr-white);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.video-card lite-youtube {
  max-width: 100%;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.video-desc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-top: 1px solid var(--clr-warm-gray);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-navy);
  transition: background var(--transition), color var(--transition);
}

.video-desc-toggle:hover {
  background: var(--clr-warm-white);
  color: var(--clr-gold-dark);
}

.video-desc-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.video-desc-toggle.open svg {
  transform: rotate(180deg);
}

.video-desc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--clr-text-light);
}

.video-desc-body.open {
  max-height: 600px;
  padding: 0.75rem 1rem 1rem;
}

.video-desc-body strong {
  color: var(--clr-navy);
}

/* Hidden videos area */
.videos-hidden {
  display: none;
}

.videos-hidden.show {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .videos-hidden.show {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .videos-hidden.show {
    grid-template-columns: repeat(4, 1fr);
  }
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.875rem 2rem;
  background: var(--clr-navy);
  color: var(--clr-white);
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-show-more:hover {
  background: var(--clr-navy-light);
  box-shadow: 0 6px 20px rgba(27, 42, 74, 0.25);
  transform: translateY(-1px);
}

/* =================================================
   PHOTO GALLERY SECTION
   ================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 42, 74, 0.3) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Disclaimer banner */
.gallery-disclaimer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: var(--radius);
  color: var(--clr-navy);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.gallery-disclaimer svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--clr-gold-dark);
}

/* =================================================
   LIGHTBOX
   ================================================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 2;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 1.25rem;
}

.lightbox-next {
  right: 1.25rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
}

/* =================================================
   RESPONSIVE: Desktop layout improvements
   ================================================= */
@media (min-width: 1024px) {
  .desktop-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}
