/* ============================================================
   TGC Apartments — Custom Styles
   Variables de marca centralizadas: editá solo esta sección
   para cambiar la identidad visual completa del sitio.
   ============================================================ */

/* ---------- CSS Custom Properties (Variables de Marca) ---------- */
:root {
  /* Paleta principal */
  --color-brand-50:  #faf8f5;
  --color-brand-100: #f2ede4;
  --color-brand-200: #e4d9c8;
  --color-brand-300: #d0bc9d;
  --color-brand-400: #b89b72;
  --color-brand-500: #a68555;   /* dorado principal — modificá este para cambiar el acento */
  --color-brand-600: #8f6e42;
  --color-brand-700: #735736;
  --color-brand-800: #5e4730;
  --color-brand-900: #4e3b2a;

  /* Neutros */
  --color-neutral-50:  #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #e5e5e5;
  --color-neutral-300: #d4d4d4;
  --color-neutral-400: #a3a3a3;
  --color-neutral-500: #737373;
  --color-neutral-600: #525252;
  --color-neutral-700: #404040;
  --color-neutral-800: #262626;
  --color-neutral-900: #171717;
  --color-neutral-950: #0f0f0e;

  /* Tipografía */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  /* Transiciones globales */
  --transition-base: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;

  /* Sombras */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 12px 48px rgba(0,0,0,0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-neutral-800);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Header States ---------- */
#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(15, 15, 14, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* When scrolled, nav links stay white (dark bg) */
#site-header.scrolled .nav-link {
  color: rgba(255,255,255,0.75);
}
#site-header.scrolled .nav-link:hover {
  color: #fff;
}

/* If page not at top and bg is white section, darken text */
#site-header.scrolled .header-logo-text {
  color: #fff;
}

/* ---------- Hamburger Animation ---------- */
#hamburger.open .ham-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger.open .ham-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#hamburger.open .ham-line:nth-child(3) {
  width: 24px;
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Booking Form Inputs ---------- */
.booking-input {
  color-scheme: dark;
}

.booking-input option {
  background: #1a1a1a;
  color: #fff;
}

/* ---------- Hero Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ---------- Amenity Card ---------- */
.amenity-card {
  transition: transform var(--transition-base), box-shadow var(--transition-medium);
}

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

/* ---------- Apartment Cards ---------- */
.apt-card {
  transition: transform var(--transition-base), box-shadow var(--transition-medium);
}

.apt-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

/* ---------- Sliders ---------- */
.amenity-slider-viewport {
  overflow: hidden;
}

.amenity-slider-track {
  will-change: transform;
}

.testimonial-viewport {
  overflow: hidden;
}

#testimonial-track {
  will-change: transform;
}

/* Slider Dot Styles */
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-neutral-300);
  border: none;
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-base);
  padding: 0;
}

.slider-dot.active {
  background: var(--color-brand-500);
  transform: scale(1.25);
}

/* ---------- Modal ---------- */
.modal-overlay {
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-box {
  transition: transform 0.3s ease;
}

/* Detail row inside booking modal */
.modal-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.modal-detail-label {
  color: var(--color-neutral-500);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-detail-value {
  font-weight: 600;
  color: var(--color-neutral-900);
}

/* ---------- Form Error State ---------- */
.booking-input.error {
  border-color: #f87171 !important;
}

.form-error {
  font-size: 0.7rem;
  color: #f87171;
}

.form-error.visible {
  display: block !important;
}

/* ---------- Scroll-reveal (JS adds .revealed) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---------- Social Icon hover ---------- */
.social-icon {
  transition: border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

/* ---------- Slider navigation buttons ---------- */
.slider-btn {
  cursor: pointer;
}

/* ---------- Parallax Hero BG (CSS subtle effect) ---------- */
.hero-bg {
  transform: scale(1.05);
  transition: transform 20s ease;
}

/* ---------- Custom scrollbar (webkit) ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-brand-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-500);
}

/* ---------- Selection color ---------- */
::selection {
  background: var(--color-brand-300);
  color: #fff;
}

/* ---------- Mobile Menu Open Body Lock ---------- */
body.menu-open {
  overflow: hidden;
}

/* ---------- Focus styles (accesibilidad) ---------- */
:focus-visible {
  outline: 2px solid var(--color-brand-500);
  outline-offset: 3px;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  /* Hero stats smaller on very small screens */
  .hero-stats span:first-child {
    font-size: 1.5rem;
  }

  /* Modal full-screen feel on mobile */
  .modal-box {
    margin: 0;
    border-radius: 0;
    max-height: 100dvh;
    overflow-y: auto;
  }
}

/* ---------- Card Carousel ---------- */
.card-carousel .cc-slide {
  pointer-events: none;
}

.card-carousel .cc-slide.opacity-100 {
  pointer-events: auto;
}

.card-carousel .cc-prev,
.card-carousel .cc-next {
  /* Siempre visibles en touch, hover en desktop */
}

@media (hover: none) {
  /* Dispositivos táctiles: mostrar flechas siempre */
  .card-carousel .cc-prev,
  .card-carousel .cc-next {
    opacity: 1 !important;
    background: rgba(0,0,0,0.25);
  }
}

/* ---------- Calendario de disponibilidad ---------- */
.apt-calendar {
  font-size: 0.78rem;
  user-select: none;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-nav-title {
  font-weight: 600;
  color: var(--color-neutral-800);
  text-transform: capitalize;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.cal-nav-btn {
  background: none;
  border: 1px solid var(--color-neutral-200);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-neutral-500);
  transition: background var(--transition-base), color var(--transition-base);
  padding: 0;
}

.cal-nav-btn:hover {
  background: var(--color-neutral-100);
  color: var(--color-neutral-900);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-dow {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-neutral-400);
  padding: 3px 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-day {
  text-align: center;
  padding: 5px 2px;
  border-radius: 4px;
  color: var(--color-neutral-700);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  cursor: default;
  transition: background var(--transition-base);
}

.cal-day.empty {
  background: transparent;
  border-color: transparent;
}

.cal-day.blocked {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
  text-decoration: line-through;
  opacity: 0.75;
}

.cal-day.past {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-200);
  color: var(--color-neutral-300);
}

.cal-day.today {
  font-weight: 700;
  outline: 2px solid var(--color-brand-500);
  outline-offset: -2px;
}

/* ---------- Lightbox ---------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}

#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transition: transform 0.3s ease;
  transform: scale(0.96);
  cursor: zoom-out;
}

#lightbox.open #lightbox-img {
  transform: scale(1);
}

#lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 6px;
  line-height: 0;
  transition: color var(--transition-base), transform var(--transition-base);
}

#lightbox-close:hover {
  color: #fff;
  transform: scale(1.1);
}

/* Cursor zoom-in sobre las cards con carrusel */
.card-carousel {
  cursor: zoom-in;
}

/* ---------- Selección de fechas en calendario ---------- */
.cal-day.available {
  cursor: pointer;
}

.cal-day.available:hover {
  background: #a7f3d0;
  border-color: #34d399;
}

.cal-day.sel-start,
.cal-day.sel-end {
  background: var(--color-brand-500) !important;
  border-color: var(--color-brand-600) !important;
  color: #fff !important;
  font-weight: 700;
}

.cal-day.sel-range {
  background: #fde68a !important;
  border-color: #f59e0b !important;
  color: var(--color-neutral-800) !important;
}

/* Display de selección debajo del calendario */
.cal-selection-display {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
  transition: background var(--transition-base);
}

.cal-selection-display.empty {
  color: var(--color-neutral-400);
  background: var(--color-neutral-50);
  border: 1px dashed var(--color-neutral-200);
}

.cal-selection-display.partial {
  color: var(--color-brand-600);
  background: #fef9ee;
  border: 1px solid #f5d97e;
}

.cal-selection-display.selected {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  font-weight: 600;
}

/* ---------- Language Switcher ---------- */
.lang-btn {
  font-size: 1.35rem;
  background: none;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.45;
  padding: 2px 4px;
  line-height: 1;
  transition: opacity var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  user-select: none;
}

.lang-btn:hover {
  opacity: 0.85;
  transform: scale(1.1);
}

.lang-btn.lang-active {
  opacity: 1;
  transform: scale(1.15);
  border-color: var(--color-brand-500);
}

/* ---------- Print ---------- */
@media print {
  #site-header,
  #hamburger,
  #mobile-menu,
  #booking-modal,
  #detail-modal {
    display: none !important;
  }
}
