/* APARTMENT GAIA - SALENTO | MOBILE-FIRST RESPONSIVE DESIGN */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Italiana&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-sand-50: #FAF8F5;
  --color-sand-100: #F4EFE6;
  --color-sand-200: #EAE0D0;
  --color-sand-300: #D8C7B0;
  --color-gold-400: #C5A880;
  --color-gold-500: #B39265;
  --color-gold-600: #9B784C;
  --color-med-navy: #0F1E28;
  --color-med-blue: #182C3D;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #128C7E;
  --color-text-main: #2C353D;
  --color-text-muted: #64748B;
  --font-display: 'Italiana', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-soft: 0 10px 30px -5px rgba(15, 30, 40, 0.07);
  --shadow-hover: 0 20px 40px -10px rgba(15, 30, 40, 0.14);
  --shadow-gold: 0 10px 25px -5px rgba(197, 168, 128, 0.35);
  --shadow-whatsapp: 0 10px 25px -5px rgba(37, 211, 102, 0.45);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-sand-50);
  color: var(--color-text-main);
  line-height: 1.65;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
}

.font-display {
  font-family: var(--font-display);
}

.font-sans {
  font-family: var(--font-sans);
}

.nav-glass {
  background: rgba(15, 30, 40, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.nav-glass.scrolled {
  background: rgba(15, 30, 40, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}

.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 30, 40, 0.5) 0%,
    rgba(15, 30, 40, 0.7) 60%,
    rgba(15, 30, 40, 0.92) 100%
  );
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #B39265 100%);
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-gold);
  transition: var(--transition-smooth);
  touch-action: manipulation;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(179, 146, 101, 0.5);
  background: linear-gradient(135deg, #E2C04D 0%, #C5A880 100%);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: var(--shadow-whatsapp);
  transition: var(--transition-smooth);
  touch-action: manipulation;
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(37, 211, 102, 0.55);
}

.luxury-card {
  background: #FFFFFF;
  border-radius: 1.25rem;
  border: 1px solid rgba(216, 199, 176, 0.5);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  overflow: hidden;
}
.luxury-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-gold-400);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  touch-action: manipulation;
}
.gallery-item img {
  transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 30, 40, 0.88) 0%, rgba(15, 30, 40, 0.2) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-overlay,
.gallery-item:active .gallery-overlay {
  opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 20, 28, 0.96);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-modal.active {
  display: flex;
  opacity: 1;
}
.lightbox-img-container {
  max-width: 94vw;
  max-height: 85vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

/* Floating WhatsApp Button */
.floating-wa-container {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.wa-bubble-popup {
  background: #FFFFFF;
  color: var(--color-med-navy);
  padding: 10px 16px;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  margin-bottom: 10px;
  max-width: 250px;
  font-size: 0.825rem;
  border-left: 4px solid var(--color-whatsapp);
  animation: floatBounce 4s infinite ease-in-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  transition: var(--transition-smooth);
  position: relative;
  text-decoration: none;
  touch-action: manipulation;
}
.wa-floating-btn:hover {
  transform: scale(1.08) rotate(4deg);
  background: #20BA5A;
}

.wa-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.6;
  animation: waPulse 2s infinite;
  z-index: -1;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Mobile Inputs (16px base font to prevent auto-zoom in iOS Safari) */
.form-input {
  width: 100%;
  background-color: #FAF8F5;
  border: 1.5px solid #E2D7C7;
  border-radius: 0.75rem;
  padding: 0.85rem 1.15rem;
  font-size: 1rem; /* 16px is required by iOS Safari to prevent auto-zoom */
  color: var(--color-med-navy);
  transition: var(--transition-smooth);
  outline: none;
}
.form-input:focus {
  background-color: #FFFFFF;
  border-color: var(--color-gold-400);
  box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.2);
}

.badge-salento {
  background-color: rgba(197, 168, 128, 0.15);
  color: #8C6A3C;
  border: 1px solid rgba(197, 168, 128, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Specific Mobile Responsive Refinements */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem !important;
    line-height: 1.18 !important;
  }
  .floating-wa-container {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }
  .wa-floating-btn {
    width: 54px;
    height: 54px;
  }
  .wa-bubble-popup {
    display: none;
  }
  .gallery-item {
    height: 160px !important;
  }
}


/* Refined Mobile Spacing & Clean Typography */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
  }
  .hero-container {
    padding-top: 2rem !important;
    padding-bottom: 2.5rem !important;
  }
  .section-padding {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  .floating-wa-container {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 14px;
  }
  .wa-floating-btn {
    width: 52px;
    height: 52px;
  }
}
