/* ==========================================================================
   ARQRO Real Estate - Custom CSS & Animations (Tema Negro & Oro)
   ========================================================================== */

:root {
  --primary-black: #000000;
  --secondary-black: #121212;
  --surface-black: #1a1a1a;
  --accent-gold: #c5a880;
  --accent-gold-hover: #b39265;
  --accent-gold-light: #f5f0ea;
  --whatsapp-green: #25d366;
  --chatbot-gold: #c5a880;
  --card-bg: #ffffff;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-dark);
  background-color: #f8fafc;
}

/* ==========================================================================
   Efecto Pulse Infinito para Botones Flotantes
   ========================================================================== */
@keyframes infinite-pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    transform: scale(1);
  }
}

@keyframes infinite-pulse-chatbot {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(197, 168, 128, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0);
    transform: scale(1);
  }
}

.floating-whatsapp-btn {
  position: fixed !important;
  bottom: 30px !important;
  left: 30px !important;
  width: 70px !important;
  height: 70px !important;
  background-color: var(--whatsapp-green);
  color: #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 40px !important;
  z-index: 9999 !important;
  text-decoration: none !important;
  animation: infinite-pulse-whatsapp 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.floating-whatsapp-btn i {
  font-size: 40px;
  line-height: 1;
}

.floating-whatsapp-btn:hover {
  background-color: #20ba59;
  transform: scale(1.1);
  color: #ffffff;
}

.floating-chatbot-btn {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 70px !important;
  height: 70px !important;
  min-width: 70px !important;
  min-height: 70px !important;
  max-width: 70px !important;
  max-height: 70px !important;
  background: transparent;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  cursor: pointer;
  animation: infinite-pulse-chatbot 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(197, 168, 128, 0.9) !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.floating-chatbot-btn img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  display: block !important;
}

.floating-chatbot-btn:hover {
  transform: scale(1.1);
  background: #000000;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(197, 168, 128, 0.5);
}

/* Chatbot Modal Dialog */
.chatbot-container {
  position: fixed;
  bottom: 115px;
  right: 30px;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  border: 1px solid #27272a;
  transition: all 0.3s ease;
}

.chatbot-container.active {
  display: flex;
  animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Estilos de Tarjeta de Propiedad y Carrusel Interno
   ========================================================================== */
.property-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
  border-color: #cbd5e1;
}

.property-card-slider {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #000000;
}

.property-card-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.property-card-slider:hover img {
  transform: scale(1.03);
}

.slider-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 0.85;
}

.slider-arrow-btn:hover {
  background: rgba(197, 168, 128, 0.95);
  color: #000000;
  opacity: 1;
}

.slider-arrow-btn.left {
  left: 10px;
}

.slider-arrow-btn.right {
  right: 10px;
}

.slider-counter-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  z-index: 10;
}

/* Badges de Amenidades */
.amenity-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.amenity-chip:hover {
  background-color: var(--accent-gold-light);
  color: #785a28;
  border-color: var(--accent-gold);
}

/* Iconos de características técnicas */
.spec-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.spec-box i {
  color: var(--accent-gold);
  font-size: 14px;
}

/* ==========================================================================
   Hero Slider de 5 Diapositivas (Overlay Negro Profundo)
   ========================================================================== */
.hero-slider-wrapper {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 600px;
  overflow: hidden;
  background-color: #0c121e;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s ease-out;
  transform: scale(1.05);
  background-size: cover;
  background-position: center;
  background-color: #0c121e;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.65) 50%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

/* ==========================================================================
   Ficha Técnica Imprimible (Print View)
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  #technical-sheet-print, #technical-sheet-print * {
    visibility: visible;
  }
  #technical-sheet-print {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    background: #ffffff;
  }
  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   Footer Logo Alignment (Compensación de márgenes transparentes del PNG)
   ========================================================================== */
.footer-logo-wrap {
  display: inline-block;
  margin-left: -31px;
  margin-top: -38px;
  margin-bottom: -22px;
  transition: transform 0.2s ease;
}

.footer-logo-wrap:hover {
  transform: scale(1.05);
}

.footer-logo-img {
  height: 125px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 640px) {
  .footer-logo-wrap {
    margin-left: -26px;
    margin-top: -32px;
    margin-bottom: -18px;
  }
  .footer-logo-wrap img,
  .footer-logo-img {
    height: 105px;
  }
}

/* ==========================================================================
   Alineación uniforme de los 3 botones de llamado a la acción en Propiedad
   ========================================================================== */
.prop-cta-btn {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.prop-cta-btn .cta-icon-wrapper,
.prop-cta-btn > i {
  position: absolute !important;
  left: 1.25rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 1.5rem !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.125rem !important;
}

/* Burbuja de respuesta del cliente en Chatbot (Naranja de los botones de la web) */
.chatbot-user-msg, .chatbot-user-bubble {
  background-color: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25) !important;
}

/* Ocultar de raíz cualquier botón de respuestas rápidas 1, 2, etc. en la ventana del chat */
.chatbot-container button[onclick*="sendQuickChatMessage"],
.chatbot-container .overflow-x-auto,
.chatbot-container div:has(> button[onclick*="sendQuickChatMessage"]) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}


/* ==========================================================================
   Skill animar-interfaz - Micro-animaciones para ARQRO Real Estate
   ========================================================================== */

:root {
  --color-primario: #000000;
  --color-secundario: #d97706;
  --color-acento: #c5a880;
  --color-fondo: #000000;
  --color-tarjeta: #111111;
}

/* --- 1. Fade-in al hacer scroll (.reveal) --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 2. Hover en tarjetas (elevación sutil y sombra dorada) --- */
.tarjeta, .prop-card, .service-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.28s ease !important;
}
.tarjeta:hover, .prop-card:hover, .service-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 32px -10px rgba(217, 119, 6, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* --- 3. Hover en botones y botón magnético --- */
.btn, .btn-magnetico {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease;
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

/* --- 4. Pulso de radar para WhatsApp flotante --- */
.whatsapp-flotante {
  position: relative;
}
.whatsapp-flotante::before, .floating-whatsapp-btn::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.45);
  animation: pulso-radar 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes pulso-radar {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* --- 5. Subrayado animado en enlaces del menú --- */
header nav a:not(.btn):not(.px-5) {
  position: relative;
}
header nav a:not(.btn):not(.px-5)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: #fbbf24;
  transition: width 0.25s ease-out;
  border-radius: 2px;
}
header nav a:not(.btn):not(.px-5):hover::after {
  width: 100%;
}

/* --- 7. Shimmer de carga de imágenes --- */
.img-wrap.cargando {
  position: relative;
  overflow: hidden;
}
.img-wrap.cargando::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(245,158,11,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer-arqro 1.6s linear infinite;
  z-index: 2;
}
@keyframes shimmer-arqro {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 8. Confirmación animada de formulario --- */
.confirmacion-envio {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.confirmacion-envio.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 9. Accesibilidad: Respeta 'prefers-reduced-motion: reduce' --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .whatsapp-flotante::before, .floating-whatsapp-btn::before {
    animation: none !important;
    display: none !important;
  }
  .tarjeta, .prop-card, .service-card, .btn, .btn-magnetico,
  header nav a::after, .img-wrap.cargando::before, .confirmacion-envio {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
