/* ============================================
   Estilos Generales - Estilo Hotel
   ============================================ */

body {
  font-family: 'Poppins', sans-serif;
  color: #2c2c2c;
  background-color: #fafaf8;
  font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: #1a1a2e;
}

/* ============================================
   Navbar - Hotel Elegante
   ============================================ */

.navbar-hotel {
  background: #1a1a2e;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar-hotel .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

.navbar-hotel .navbar-brand:hover {
  color: #c9a96e;
}

.navbar-hotel .nav-link {
  color: rgba(255,255,255,0.8);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 20px;
  transition: color 0.3s ease;
}

.navbar-hotel .nav-link:hover,
.navbar-hotel .nav-link:focus {
  color: #c9a96e;
}

.navbar-hotel .navbar-toggler {
  border-color: rgba(255,255,255,0.2);
}

.navbar-hotel .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%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Header / Hero Principal
   ============================================ */

header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  text-align: center;
  padding: 80px 20px;
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #c9a96e;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

header p,
header p.text-muted {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7) !important;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* Hero en páginas interiores (intro.php) */
.container > header {
  border-radius: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 60px 30px;
  border: none;
}

.container > header h1 {
  font-size: 2.4rem;
}

/* ============================================
   Tarjetas de Propiedad (Homepage)
   ============================================ */

.propiedad {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(0,0,0,0.06);
}

.propiedad:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.propiedad img {
  border-radius: 0;
  transition: transform 0.6s ease;
}

.propiedad:hover img {
  transform: scale(1.03);
}

.propiedad .card-body {
  padding: 28px;
}

.propiedad .card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a2e;
}

.propiedad .card-body p {
  color: #666;
  line-height: 1.7;
}

.propiedad .btn-success {
  background: #1a1a2e;
  border-color: #1a1a2e;
  border-radius: 30px;
  padding: 10px 28px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.3s ease;
}

.propiedad .btn-success:hover {
  background: #c9a96e;
  border-color: #c9a96e;
  color: #fff;
}

/* Precio overlay en tarjetas */
.propiedad .position-absolute {
  background: rgba(26, 26, 46, 0.85) !important;
  backdrop-filter: blur(4px);
  border-radius: 0 12px 0 0 !important;
}

/* ============================================
   Botones Generales
   ============================================ */

.btn {
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.btn-dark {
  background: #1a1a2e;
  border-color: #1a1a2e;
}

.btn-dark:hover {
  background: #c9a96e;
  border-color: #c9a96e;
}

.btn-light {
  border-color: #ddd;
}

.btn-light:hover {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
}

.rounded-pill {
  letter-spacing: 0.5px;
}

/* ============================================
   Sección de Apartamento
   ============================================ */

.apartment-section {
  font-family: 'Poppins', sans-serif;
  color: #2c2c2c;
}

.apartment-section h1,
.apartment-section h2,
.apartment-section h3 {
  font-family: 'Playfair Display', serif;
  color: #1a1a2e;
}

.apartment-section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 12px;
}

.apartment-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: #c9a96e;
}

/* Detalles del apartamento card */
.apartment-section > .card {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.apartment-section > .card h2 {
  font-family: 'Playfair Display', serif;
  border-bottom-color: #c9a96e !important;
}

/* ============================================
   Galería tipo Airbnb
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #f0ede8;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.04);
  filter: brightness(1.05);
}

.modal-content img {
  width: 100%;
  border-radius: 12px;
}

/* ============================================
   Tarjetas de precios
   ============================================ */

.price-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.06);
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* ============================================
   Botón principal de reserva
   ============================================ */

.reservar-btn {
  background: linear-gradient(90deg, #1a1a2e, #0f3460);
  border: none;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.reservar-btn:hover {
  background: linear-gradient(90deg, #c9a96e, #b8944e);
}

/* ============================================
   Tipografía de títulos en cards
   ============================================ */

.card-body h2,
.card-body h3 {
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.3px;
}

/* ============================================
   Footer - Hotel Elegante
   ============================================ */

footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 40px 20px 30px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-top: 3px solid #c9a96e;
}

footer p {
  margin-bottom: 8px;
}

footer a {
  color: #c9a96e !important;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #e0c080 !important;
}

/* ============================================
   Sección "Sobre Tucacas" (bg-light)
   ============================================ */

.bg-light {
  background-color: #f5f3ef !important;
}

section.bg-light {
  position: relative;
}

section.bg-light h2 {
  font-family: 'Playfair Display', serif;
  color: #1a1a2e;
}

section.bg-light p {
  color: #666;
  line-height: 1.8;
}

/* ============================================
   Botón WhatsApp fijo
   ============================================ */

.whatsapp-fixed {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-fixed:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

.whatsapp-fixed svg {
  width: 58%;
  height: 58%;
  display: block;
}

@media (max-width: 480px) {
  .whatsapp-fixed {
    width: 54px;
    height: 54px;
    right: 15px;
    bottom: 15px;
  }
}

/* Botón WhatsApp inline */
.btn-whatsapp {
  background-color: #25d366;
  color: white;
  font-weight: 500;
  border-radius: 30px;
}

.btn-whatsapp:hover {
  background-color: #1ebe57;
  color: white;
}

/* ============================================
   Calendario - evitar selección de texto
   ============================================ */

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* ============================================
   Galerías de imágenes para el editor HTML
   ============================================ */

/* Galería Mosaico - estilo Pinterest/Airbnb */
.galeria-mosaico {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 10px;
  margin: 20px 0;
}

.galeria-mosaico .foto-item {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}

.galeria-mosaico .foto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
  cursor: pointer;
  display: block;
}

.galeria-mosaico .foto-item img:hover {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* Imagen destacada: ocupa 2 columnas y 2 filas */
.galeria-mosaico .foto-item.destacada {
  grid-column: span 2;
  grid-row: span 2;
}

/* Imagen ancha: ocupa 2 columnas */
.galeria-mosaico .foto-item.ancha {
  grid-column: span 2;
}

/* Imagen alta: ocupa 2 filas */
.galeria-mosaico .foto-item.alta {
  grid-row: span 2;
}

@media (max-width: 768px) {
  .galeria-mosaico {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .galeria-mosaico {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
    gap: 6px;
  }
  .galeria-mosaico .foto-item.destacada,
  .galeria-mosaico .foto-item.ancha {
    grid-column: span 1;
  }
}

/* Galería Carrusel con Bootstrap */
.galeria-carrusel {
  margin: 20px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.galeria-carrusel .carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.galeria-carrusel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .galeria-carrusel .carousel-item img {
    height: 300px;
  }
}

/* Galería Hero: 1 grande + 4 pequeñas (estilo Airbnb) */
.galeria-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 250px 250px;
  gap: 8px;
  margin: 20px 0;
  border-radius: 16px;
  overflow: hidden;
}

.galeria-hero .foto-item {
  overflow: hidden;
  position: relative;
}

.galeria-hero .foto-item:first-child {
  grid-row: span 2;
}

.galeria-hero .foto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: pointer;
  display: block;
}

.galeria-hero .foto-item img:hover {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .galeria-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .galeria-hero .foto-item:first-child {
    grid-row: span 1;
  }
  .galeria-hero .foto-item img {
    height: 250px;
  }
}

/* Galería simple en filas */
.galeria-filas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.galeria-filas .foto-item {
  overflow: hidden;
  border-radius: 12px;
}

.galeria-filas .foto-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.35s ease;
  cursor: pointer;
  display: block;
}

.galeria-filas .foto-item img:hover {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .galeria-filas {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .galeria-filas {
    grid-template-columns: 1fr;
  }
}

/* Lightbox overlay para click en fotos */
.foto-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.25s ease;
}

.foto-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   Widget de Reserva - Estilo Hotel Profesional
   ============================================ */

/* Header del widget */
.booking-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
}

.booking-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: #c9a96e;
}

.booking-header h2 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  letter-spacing: 0.5px;
}

/* Widget card */
.booking-widget .card {
  border: 1px solid rgba(0,0,0,0.06);
}

/* Barra de fechas check-in / check-out */
.booking-dates-bar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.date-selector {
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.date-selector:hover {
  border-color: #c9a96e;
  box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.15);
}

.date-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #999;
  margin-top: 2px;
}

.date-value.date-filled {
  color: #1a1a2e;
}

/* Resumen de reserva */
.booking-widget .bg-light {
  background-color: #f9f7f4 !important;
}

.booking-widget .bg-light h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}

/* Calendario interactivo - Días */
.cal-day {
  font-size: 0.8rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 32px;
  margin: 1px auto;
  cursor: default;
  transition: all 0.15s ease;
  position: relative;
}

.cal-available {
  cursor: pointer;
  color: #333;
  font-weight: 500;
}

.cal-available:hover {
  background-color: rgba(201, 169, 110, 0.15);
  color: #c9a96e;
  transform: scale(1.1);
}

.cal-booked {
  background-color: #FFE0EB;
  color: #c9184a;
  text-decoration: line-through;
  font-size: 0.7rem;
  opacity: 0.8;
}

.cal-past {
  color: #ccc;
  opacity: 0.5;
}

.cal-today {
  border: 2px solid #c9a96e;
  font-weight: 700;
}

/* Selección de fechas */
.cal-selected {
  background-color: #1a1a2e !important;
  color: #fff !important;
  font-weight: 700;
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.4);
  text-decoration: none !important;
  opacity: 1 !important;
}

.cal-checkin {
  border-radius: 50% 8px 8px 50%;
}

.cal-checkout {
  border-radius: 8px 50% 50% 8px;
}

.cal-range {
  background-color: rgba(26, 26, 46, 0.1) !important;
  color: #1a1a2e !important;
  border-radius: 4px;
  opacity: 1 !important;
  text-decoration: none !important;
}

/* Botón de reserva - estados */
.booking-btn-disabled {
  background: #ccc !important;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: auto;
}

.booking-btn-disabled:hover {
  background: #bbb !important;
  transform: none;
}

.booking-btn-active {
  background: linear-gradient(90deg, #1a1a2e, #0f3460) !important;
  opacity: 1;
  cursor: pointer;
  animation: btnAppear 0.3s ease;
}

.booking-btn-active:hover {
  background: linear-gradient(90deg, #c9a96e, #b8944e) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.4);
}

@keyframes btnAppear {
  from { transform: scale(0.95); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}

/* Efecto pulse para instrucciones */
.booking-pulse {
  animation: pulseHighlight 1.5s ease;
}

@keyframes pulseHighlight {
  0% { background-color: transparent; }
  25% { background-color: rgba(201, 169, 110, 0.15); border-radius: 8px; }
  75% { background-color: rgba(201, 169, 110, 0.15); border-radius: 8px; }
  100% { background-color: transparent; }
}

/* Desglose de precio */
.booking-price-breakdown {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Widget responsive */
@media (max-width: 991px) {
  .booking-widget .col-lg-8 {
    border-end: none !important;
    border-bottom: 1px solid #dee2e6;
  }
}

@media (max-width: 576px) {
  .cal-day {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 0.7rem;
  }

  .date-selector {
    padding: 6px 8px;
  }

  .date-value {
    font-size: 0.85rem;
  }

  .booking-header h2 {
    font-size: 1.1rem;
  }
}

/* Navegación de meses */
.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: #dee2e6;
  color: #333;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover:not(:disabled) {
  background-color: rgba(201, 169, 110, 0.1);
  border-color: #c9a96e;
  color: #c9a96e;
}

.cal-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-month-panel {
  animation: calFadeIn 0.2s ease;
}

@keyframes calFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   Pestañas de reserva (intro page)
   ============================================ */

.booking-tabs {
  gap: 4px;
}

.booking-tabs .nav-link {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 10px 28px;
  border-radius: 30px 30px 0 0;
  color: #666;
  background: #e8e6e1;
  border: 1px solid #ddd;
  border-bottom: none;
  transition: all 0.3s ease;
}

.booking-tabs .nav-link:hover {
  color: #1a1a2e;
  background: #f0ede8;
}

.booking-tabs .nav-link.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

.booking-tabs + .tab-content .booking-widget {
  margin-top: 0;
}

/* ============================================
   Responsive general
   ============================================ */

@media (max-width: 768px) {
  header {
    padding: 50px 20px;
  }

  header h1 {
    font-size: 2rem;
  }

  .container > header h1 {
    font-size: 1.8rem;
  }

  .navbar-hotel .navbar-brand {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.6rem;
  }

  .container > header h1 {
    font-size: 1.5rem;
  }

  footer {
    padding: 30px 15px 20px;
  }
}
