/* ============================
   TIPOGRAFÍA & RESET
============================ */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Fondo principal claro con matiz azul */
  --bg: #f3f4f8;
  --bg-alt: #ffffff;

  /* Texto */
  --text: #0f172a;
  --muted: #6b7280;

  /* Azul elegante */
  --primary: #0f4c75;
  --primary-dark: #0b3a59;

  /* Azul acento */
  --accent: #38bdf8;

  /* Dorado suave */
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.12);

  /* Sombras */
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);

  /* Bordes */
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
}

body.dark-theme {
  --bg: #020617;
  --bg-alt: #020617;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --accent: #22d3ee;
  --gold: #facc15;
  --gold-soft: rgba(250, 204, 21, 0.12);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.6);
  --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.4);
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #e5f0ff 0, #f3f4f8 38%, #e5e7eb 100%);
  color: var(--text);
  line-height: 1.6;
}

/* ============================
   ELEMENTOS GENERALES
============================ */
img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: 0.01em;
}

p {
  font-size: 0.95rem;
}

/* ============================
   NAVBAR
============================ */
.navbar {
  background: linear-gradient(to right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  padding: 12px 0;
  position: fixed;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-svg {
  width: 180px;
  height: auto;
  color: #e5e7eb;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: #e5e7eb;
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: 0.3s ease;
  opacity: 0.9;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold), var(--accent));
  transition: 0.3s ease;
  border-radius: 999px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 1;
}

/* Botón nav */
.btn-nav {
  padding: 7px 16px;
  background: var(--gold-soft);
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  color: #fefce8;
  font-size: 0.85rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.4);
}

.btn-nav:hover {
  background: var(--gold);
  color: #111827;
}

/* Toggle tema */
.theme-toggle {
  margin-left: 10px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.8);
  border-radius: 999px;
  padding: 4px 10px;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Hamburguesa */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ============================
   HERO SLIDER
============================ */
.hero-slider {
    position: relative;
    height: calc(100vh - 64px);
    overflow: hidden;
    border-radius: 0 0 32px 32px;
    margin-top: 0 !important;
    padding-top: 64px; /* evita que el navbar cubra el slider */
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.9s ease, transform 1.4s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(15, 23, 42, 0.45), transparent 50%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.98));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #f9fafb;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 16px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  margin-bottom: 10px;
  color: rgba(248, 250, 252, 0.8);
}

.hero-content h1 {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.hero-content p {
  font-size: 0.98rem;
  margin-bottom: 22px;
  color: rgba(226, 232, 240, 0.9);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-arrow-left {
  left: 22px;
}

.hero-arrow-right {
  right: 22px;
}

/* Hero dots */
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: 0.3s ease;
}

.hero-dots button.active {
  width: 22px;
  background: linear-gradient(to right, var(--gold), var(--accent));
}

/* ============================
   BOTONES
============================ */
.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: #f9fafb;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 0.3s ease;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong);
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: #e5e7eb;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  padding: 11px 24px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost-light {
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.6);
  padding: 10px 22px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #fefce8;
  background: transparent;
  transition: 0.3s ease;
}

.btn-ghost-light:hover {
  background: rgba(15, 23, 42, 0.6);
}

.btn-full {
  width: 100%;
}

/* ============================
   SECCIONES GENERALES
============================ */
.section {
  padding: 80px 0;
}

.section-tight {
  padding-top: 36px;
  padding-bottom: 80px;
}

.section-title {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 480px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 32px;
}

.bg-soft {
  background: radial-gradient(circle at top left, #e0f2fe 0, #f9fafb 40%, #e5e7eb 100%);
}

/* ============================
   TRUST BAR
============================ */
.trust-bar {
  padding: 16px 0 10px;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.trust-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.8rem;
}

.trust-title {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
  opacity: 0.85;
}

.trust-logos span {
  opacity: 0.85;
}

/* ============================
   PAGE HERO (subpáginas)
============================ */
.page-hero {
  padding-top: 120px;
  padding-bottom: 32px;
  background: radial-gradient(circle at top, #dbeafe 0, #eff6ff 40%, #f3f4f6 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.page-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  margin-bottom: 8px;
  color: #6b7280;
}

.page-hero h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.9rem;
  max-width: 520px;
  color: var(--muted);
}

/* ============================
   CARDS
============================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}

.card {
  background: var(--bg-alt);
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(37, 99, 235, 0.35);
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 14px;
}

.card-image-wrap img {
  border-radius: 16px;
  transform: scale(1.02);
  transition: transform 0.6s ease;
}

.card:hover .card-image-wrap img {
  transform: scale(1.06);
}

.card-body h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.card-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.card-price {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--muted);
}

.card-price span {
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

/* ============================
   BADGES & PILLS
============================ */
.badge {
  position: absolute;
  left: 16px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.badge-gold {
  background: radial-gradient(circle at top, rgba(248, 250, 252, 0.3), rgba(15, 23, 42, 0.85));
  border-color: rgba(250, 204, 21, 0.8);
  color: #fef9c3;
}

.badge-urgent {
  background: rgba(220, 38, 38, 0.89);
  border-color: rgba(248, 250, 252, 0.7);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ============================
   TESTIMONIOS
============================ */
.testimonios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.testimonio {
  background: var(--bg-alt);
  padding: 24px;
  border-radius: var(--radius-lg);
  font-style: italic;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.testimonio span {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--primary);
}

/* ============================
   CTA
============================ */
.cta {
  background: radial-gradient(circle at top left, #0f172a, #020617 50%, #020617 100%);
  color: #f9fafb;
  padding: 60px 0;
}

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.cta h2 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.cta p {
  font-size: 0.96rem;
  margin-bottom: 0;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================
   FOOTER
============================ */
footer {
  background: #020617;
  color: #9ca3af;
  padding: 28px 0 22px;
  margin-top: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.8rem;
}

.footer-brand span {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.footer-brand p {
  color: #9ca3af;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.footer-copy {
  margin-top: 4px;
  color: #6b7280;
}

/* ============================
   WHATSAPP FLOTANTE
============================ */
.whatsapp-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #22c55e;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-strong);
  z-index: 999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.whatsapp-btn img {
  width: 32px;
  height: 32px;
  filter: invert(1);
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
}

/* ============================
   MODAL COTIZACIÓN
============================ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.modal.show {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  max-width: 480px;
  width: 90%;
  margin: 92px auto;
  background: var(--bg-alt);
  padding: 24px 22px 26px;
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
  animation: modalIn 0.25s ease-out;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.modal-content h2 {
  margin-bottom: 8px;
}

.modal-content p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
}

.modal-close:hover {
  color: var(--primary);
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-content label {
  font-size: 0.8rem;
  font-weight: 500;
}

.modal-content input,
.modal-content textarea {
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  padding: 9px 12px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}

.modal-content textarea {
  border-radius: 16px;
  resize: vertical;
}

/* ============================
   FILTROS & BUSCADOR
============================ */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
  background: var(--bg-alt);
  padding: 16px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.filters-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.filters-group {
  flex: 1;
  min-width: 180px;
}

.filters-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  color: var(--muted);
}

.input-with-icon {
  display: flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 4px 10px 4px 12px;
  background: var(--bg);
}

.input-with-icon span {
  font-size: 0.9rem;
  margin-right: 4px;
  opacity: 0.6;
}

.input-with-icon input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.88rem;
  padding: 6px 2px 6px 4px;
  color: var(--text);
}

.filters-group select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 7px 12px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}

/* ============================
   LINKS INLINE
============================ */
.link-inline {
  font-size: 0.86rem;
  color: var(--primary);
  text-decoration: none;
}

.link-inline:hover {
  text-decoration: underline;
}

.link-inline-sm {
  font-size: 0.8rem;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ============================
   TEXTOS UTILIDAD
============================ */
.loading-text {
  font-size: 0.86rem;
  color: var(--muted);
}

.muted-text {
  font-size: 0.86rem;
  color: var(--muted);
}

.error-text {
  font-size: 0.86rem;
  color: #b91c1c;
}

/* ============================
   ANIMACIONES
============================ */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 1.9rem;
  }

  .hero-slider {
    height: 75vh;
  }

  .page-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 16px;
    background: rgba(15, 23, 42, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px 16px;
    width: 230px;
    transform: translateX(150%);
    transition: transform 0.25s ease;
    gap: 10px;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a,
  .nav-links .btn-nav {
    width: 100%;
  }

  .hero-arrow {
    display: none;
  }

  .hero-slider {
    height: 78vh;
    border-radius: 0 0 22px 22px;
  }

  .section {
    padding: 60px 0;
  }

  .filters-bar {
    padding: 14px;
  }

  .whatsapp-btn {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
  }

  .whatsapp-btn img {
    width: 28px;
    height: 28px;
  }
}