/* =============================================================
   COMPONENTS.CSS — Optimizado sin duplicados
   =============================================================
   Contiene: Modal Compra, Scroll To Top, WhatsApp Float, Footer
   NO incluye propiedades tipográficas (font-size, font-weight, line-height)
   que ya están en tipografia.css
   ============================================================= */

/* ── MODAL FORMULARIO COMPRA ─────────────────────────────────── */
.modal-compra {
  position: fixed;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(30,30,30,.35),
      rgba(0,0,0,.78)
    );

  display: flex;
  align-items: center;
  justify-content: center;

  padding: clamp(12px, 2.5vw, 20px);

  z-index: 9999;

  animation: modalFadeIn 0.3s ease;
}
.modal-compra[hidden] {
  display: none !important;
}

.modal-compra-content {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.97),
      rgba(245,245,245,.90)
    );

  width: 100%;
  max-width: clamp(320px, 90vw, 520px);

  border-radius: clamp(16px, 2.5vw, 24px);

  overflow: hidden;

  display: flex;
  flex-direction: column;

  max-height: 90vh;

  box-shadow:
    0 25px 60px rgba(0,0,0,.25),
    0 5px 20px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.75);

  border: 1px solid rgba(255,255,255,.45);

  animation: modalPop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-compra-header {
  padding: clamp(16px, 2.2vw, 22px);
  background: linear-gradient(135deg, #f99109, #ffb347);
  color: white;
  position: relative;
  text-align: center;
}

.modal-compra-header h2 {
  margin: 0;
  letter-spacing: 0.5px;
  font-size: 2.0rem;
}

.modal-compra-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.close-compra {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.close-compra:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg) scale(1.1);
}

.modal-compra-body {
  padding: clamp(14px, 2vw, 20px);
  overflow-y: auto;
  flex: 1;
}

.terreno-seleccionado {
  background: linear-gradient(135deg, #fff7ed, #fff);
  padding: clamp(12px, 1.6vw, 16px);
  border-radius: clamp(10px, 1.4vw, 14px);
  margin-bottom: clamp(14px, 2vw, 20px);
  border: 1px solid #fde68a;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.terreno-seleccionado h3 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1.2rem;
}
.terreno-seleccionado .terreno-info p {
  margin: 5px 0;
  font-size: 0.95rem;
}
.form-compra {
  margin-top: 10px;
}
.form-compra-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 1.5vw, 15px);
}

.form-compra-group {
  display: flex;
  flex-direction: column;
}

.form-compra-group.full-width {
  grid-column: span 2;
}

.form-compra-group label {
  margin-bottom: 5px;
  font-weight: 600;
  color: #374151;
}

.form-compra-group input,
.form-compra-group textarea {
  padding: clamp(10px, 1.2vw, 12px) clamp(12px, 1.4vw, 14px);
  border-radius: clamp(8px, 1.2vw, 12px);
  border: 2px solid transparent;
  background: #f9fafb;
  transition: all 0.25s ease;
}

.form-compra-group input:focus,
.form-compra-group textarea:focus {
  background: #fff;
  border-color: #f99109;
  box-shadow: 0 0 0 4px rgba(249, 145, 9, 0.15);
}

.form-compra-group input:hover,
.form-compra-group textarea:hover {
  background: #fff;
}

.form-compra-actions {
  margin-top: clamp(14px, 2vw, 20px);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: clamp(12px, 1.6vw, 16px);
  border-top: 1px solid #eee;
}
.form-compra .btn-cancelar,
.form-compra .btn-enviar-compra {
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.form-compra .btn-cancelar {
  background: #e5e7eb;
  color: #4b5563;
}

.form-compra .btn-cancelar:hover {
  background: #d1d5db;
}

.form-compra .btn-enviar-compra {
  background: #f99109;
  color: white;
}

.form-compra .btn-enviar-compra:hover {
  background: #e07b1f;
}
.form-compra-group input:focus,
.form-compra-group textarea:focus {
  outline: none;
  background: #fff;
  border-color: #f99109;
  box-shadow: 0 0 0 4px rgba(249, 145, 9, 0.15);
}
@media (max-width: 480px) {

  .modal-compra {
    padding: 10px;
  }

  .modal-compra-content {
    width: 100%;
    max-height: 95vh;
    border-radius: 14px;
  }

  .form-compra-actions {
    flex-direction: column;
  }

  .form-compra .btn-cancelar,
  .form-compra .btn-enviar-compra {
    width: 100%;
  }

}

/* ── BOTÓN SCROLL TO TOP ─────────────────────────────────────── */
.scrollToHome {
  display: none;
  opacity: 0;
  position: fixed;
  bottom: clamp(15px, 2vw, 20px);
  right: clamp(15px, 2vw, 20px);
  z-index: 99999;
  width: clamp(45px, 5.5vw, 55px);
  height: clamp(45px, 5.5vw, 55px);
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f49d32, #ff6b35);
  color: #fff;
  border: none;
  border-radius: clamp(15px, 2vw, 20px);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(244, 157, 50, 0.4);
  transition: opacity 0.3s ease;
}

.scrollToHome:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(244, 157, 50, 0.6);
  background: linear-gradient(135deg, #ff6b35, #e8890b);
}

.scrollToHome:active {
  transform: translateY(-1px) scale(1.02);
}

/* ── BOTÓN FLOTANTE WHATSAPP ─────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: clamp(12px, 2vw, 20px);
  left: clamp(12px, 2vw, 20px);
  z-index: 100;
  width: clamp(50px, 6vw, 60px);
  height: clamp(50px, 6vw, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--whatsapp);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: #fff;
  margin-top: clamp(50px, 8vw, 80px);
  position: relative;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  padding: clamp(35px, 5.5vw, 55px) clamp(16px, 2vw, 20px) clamp(28px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(25px, 4vw, 40px);
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand h3 {
  margin-bottom: 10px;
}

.footer-brand p {
  color: #cfcfcf;
  line-height: 1.5;
}

.footer-social {
  text-align: center;
}

.footer-social span {
  display: block;
  margin-bottom: 15px;
  color: #ddd;
}

.redes-sociales {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 1.6vw, 16px);
}

.redes-sociales a {
  width: clamp(50px, 5.6vw, 56px);
  height: clamp(50px, 5.6vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.redes-sociales a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(251, 159, 46, 0.35);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 40px;
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

/* LEGAL LINKS */
.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-title {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.3px;
}

.footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  text-decoration: none;

  color: rgba(255,255,255,.85);

  padding: 10px 18px;

  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.08);

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03)
    );

  box-shadow:
    0 4px 12px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.05);

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.footer-privacy i {
  color: var(--color-primary);
}

.footer-privacy:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(249, 145, 9, 0.25);
  background: rgba(249, 145, 9, 0.08);
  box-shadow: 0 8px 20px rgba(249, 145, 9, 0.12);
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-legal span {
  color: rgba(255, 255, 255, 0.75);
}

.footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  transition: all 0.25s ease;
}

.footer-privacy i {
  color: #f99109;
  transition: transform 0.25s ease;
}

.footer-privacy:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-privacy:hover i {
  transform: scale(1.08);
}

/* ── RESPONSIVE ESTRUCTURAL (solo cambios de layout) ────────── */
@media (max-width: 900px) {
  .footer-container {
    justify-content: center;
    text-align: center;
  }
  .footer-brand {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .footer-legal {
    gap: 6px;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-bottom {
    padding: 22px 16px 18px;
    gap: 10px;
  }
  .footer-privacy {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }
}