/* GAVENZ - Utilidades y Layouts Específicos
   Grillas genéricas, tarjetas de información, fondos y botón flotante.
*/

/* --- Grillas Genéricas --- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem; 
  }
}

@media (min-width: 980px) {
  .grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 2rem; 
  }
}

/* Grilla específica para el catálogo de propiedades */
.property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .property-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* --- Tarjetas Genéricas (Cards de Información) --- */
.card {
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  min-height: 140px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.15);
}

.card__title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--secondary);
}

.card__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Fondos Específicos --- */
.section--bg-lines,
.section--bg-why {
  position: relative;
  /* Nota: Ajusta la ruta de la imagen si mueves el CSS a una subcarpeta */
  background: 
    linear-gradient(rgba(246, 248, 252, 0.85), rgba(255, 255, 255, 0.95)),
    url("../images/bg-city.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* --- WhatsApp Flotante Modernizado --- */
.wa-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 9999;
  
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: var(--text-white);
  font-weight: 800;
  text-decoration: none;
  
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(18, 140, 126, 0.3);
  
  transition: var(--transition);
  /* Animación de entrada al cargar la página */
  animation: waBounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wa-float:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(18, 140, 126, 0.4);
  filter: brightness(1.1);
}

/* Punto de notificación (pulso) para atraer atención */
.wa-float::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #ff3b30; /* Rojo vibrante */
  border: 2px solid white;
  border-radius: 50%;
  animation: waPulse 2s infinite;
}

/* Animaciones */
@keyframes waBounceIn {
  0% { transform: scale(0) translateY(100px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes waPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

@media (max-width: 560px) {
  .wa-float {
    right: 1rem;
    bottom: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* --- Dark Mode --- */
body.dark-mode .section--bg-lines,
body.dark-mode .section--bg-why {
  background: 
    linear-gradient(rgba(15, 23, 42, 0.85), rgba(7, 13, 24, 0.95)),
    url("../images/bg-city.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Asegurar que section--alt con background no se sobrescriba en dark mode */
body.dark-mode .section--alt.section--bg-why {
  background: 
    linear-gradient(rgba(15, 23, 42, 0.85), rgba(7, 13, 24, 0.95)),
    url("../images/bg-city.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.dark-mode .card__title {
  color: var(--text-main);
}

body.dark-mode .card__text {
  color: var(--text-muted);
}