:root {
  --bg: #0c1220;
  --panel: #10182b;
  --muted: #c8d1e0;
  --text: #e9eef7;
  --accent: #0ea5e9;
  --accent-strong: #f97316;
  --border: rgba(255, 255, 255, 0.09);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background: #0a0f1a;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.no-margin { margin: 0; }

.top-bar {
  background: rgba(14,165,233,0.08);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 18px;
  font-size: 0.95rem;
}
.top-bar-inner {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.top-marquee {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: 200%;
  gap: 16px;
  animation: top-scroll 30s linear infinite;
  will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.top-actions { display: none; }

@keyframes top-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14,165,233,0.2);
  border: 1px solid rgba(14,165,233,0.35);
  color: var(--text);
  font-weight: 600;
}
.pill-wa {
  background: rgba(16,185,129,0.22);
  border-color: rgba(16,185,129,0.4);
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.92), rgba(12, 20, 36, 0.9));
  border-bottom: 1px solid var(--border);
}
nav {
  max-width: 1150px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  place-items: center;
  cursor: pointer;
}
.nav-toggle i { font-size: 22px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand-logo {
  height: 46px;
  width: auto;
}
.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.25); box-shadow: 0 12px 36px rgba(14,165,233,0.2); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  border: none;
  color: #02101c;
  box-shadow: 0 14px 40px rgba(56,189,248,0.32);
}
.btn-ghost { border-color: rgba(255,255,255,0.2); }
.btn-outline-accent { border-color: rgba(14,165,233,0.4); }

.hero-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(14,165,233,0.14), rgba(10,16,32,0.8)),
              url('img/reparacion-estufas-gas.png') center/cover no-repeat;
}

.hero-slider { position: relative; }
.hero-slide { display: none; }
.hero-slide.active {
  display: block;
}
.hero-slide.active .hero-text {
  animation: hero-fade-up 0.8s ease forwards;
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-left {
  opacity: 0;
  animation: fade-in-left 0.8s ease forwards;
}
.fade-right {
  opacity: 0;
  animation: fade-in-right 0.8s ease forwards;
}

@keyframes fade-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.hero-banner.alt-one {
  background: linear-gradient(120deg, rgba(14,165,233,0.14), rgba(10,16,32,0.8)),
              url('img/mantenimiento-estufas-gas.png') center/cover no-repeat;
}
.hero-banner.alt-two {
  background: linear-gradient(120deg, rgba(249,115,22,0.12), rgba(10,16,32,0.85)),
              url('img/reparacion-hornos-boilers-gas.png') center/cover no-repeat;
}
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 25%, rgba(14,165,233,0.22), transparent 30%),
              linear-gradient(180deg, rgba(6,10,20,0.75), rgba(10,16,32,0.85));
  z-index: 0;
}
.hero-banner { scroll-margin-top: 100px; }
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1150px;
  margin: 0 auto;
  padding: 42px 20px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: center;
}
.hero-slide { min-height: 600px; }
.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}
.hero-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  transform-origin: left center;
}

.hero-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 10px;
  z-index: 2;
}
.hero-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.hero-control-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 12px 24px rgba(14,165,233,0.2);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 14px 0 12px;
  letter-spacing: -0.5px;
}
.hero-text h1 span { color: var(--accent); }
.hero-text p { margin: 0 0 18px; color: var(--muted); max-width: 680px; }
.big-call {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(14,165,233,0.35);
  background: rgba(14,165,233,0.14);
  color: #04101a;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 14px 40px rgba(14,165,233,0.18);
}
.big-call-phone { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.checks { display: grid; gap: 8px; margin: 16px 0 0; color: var(--muted); }
.checks span { display: inline-flex; align-items: center; gap: 8px; }
.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 12px;
  color: #10b981;
  font-weight: 700;
}
.hero-card {
  background: rgba(16, 24, 39, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}
.hero-card h3 { margin: 0; font-size: 1.1rem; }
.hero-card p { color: var(--muted); margin: 0; }
.metrics { display: grid; gap: 10px; }
.metric {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}

.section {
  width: 100%;
  margin: 0;
  padding: 48px 0;
  background: var(--section-bg, #0b1220);
  scroll-margin-top: 100px;
}
.bg-servicios {
  --section-bg: linear-gradient(180deg, rgba(10,16,32,0.8), rgba(10,16,32,0.9)), url('img/fondo.png') center/cover no-repeat;
}
.section.alt {
  --section-bg: #122036;
}
.section-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
}
.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.2px;
}
.section p { margin: 0 0 22px; color: var(--muted); max-width: 840px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
#servicios .cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1082px) {
  #servicios .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 890px) {
  #servicios .cards {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}
.card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.card strong { font-size: 1.05rem; }
.card span { color: var(--muted); }
.icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(14,165,233,0.15);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 32px;
}
.icon i { font-size: 34px; line-height: 1; }
.icon-left {
  display: grid;
  grid-template-columns: 20% 80%;
  align-items: center;
  gap: 12px;
}
.icon-left .icon {
  justify-self: center;
  align-self: center;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}
.brand-track {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  animation: brand-scroll 28s linear infinite;
}
.brand-track:hover { animation-play-state: paused; }
.brand-marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.brand-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 100px;
  display: grid;
  place-items: center;
  padding: 14px;
  flex: 0 0 140px;
}
.brand-card img {
  max-width: 120px;
  max-height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  opacity: 0.9;
}

@keyframes brand-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Testimonios */
.testi-slider { position: relative; }
.testi-slide { display: none; }
.testi-slide.active { display: block; }
.testi-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 10px;
  min-height: 250px;
}
.testi-quote { font-size: 1.05rem; color: var(--muted); }
.testi-author { font-weight: 700; }
.testi-meta { color: var(--muted); font-size: 0.95rem; }
.testi-dots {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.testi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  padding: 0;
}
.testi-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Modal servicios */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 50;
  padding: 12px;
}
.modal.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: rgba(16, 24, 39, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.service-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 6px;
}
.service-card strong { font-size: 1.05rem; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}


.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.step-num { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(249,115,22,0.18); color: var(--accent-strong); font-weight: 800; }

.section-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
  min-height: 260px;
}
.section-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,0.02); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq-answer { color: var(--muted); margin-top: 6px; }

.cta-band {
  margin: 28px auto 0;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(14,165,233,0.16), rgba(249,115,22,0.12));
  border: 1px solid rgba(14,165,233,0.3);
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow);
}
.cta-band-title { font-size: 1.1rem; }
.cta-band-title-lg { font-size: 1.15rem; }

.footer {
  padding: 32px 12px 56px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(8,12,22,0.9);
}
.footer-grid {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.footer-line { margin-top: 6px; display: block; }
.footer-logo {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 6px;
}

.card-accent { background: rgba(14,165,233,0.08); border-color: rgba(14,165,233,0.35); }
.card-flat { box-shadow: none; }
.card-grid-compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.card-title-lg { font-size: 1.2rem; }
.input-field {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.textarea-field { resize: vertical; }
.contact-form { display: grid; gap: 10px; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: rgba(17,24,39,0.9);
  min-height: 320px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  border: none;
  z-index: 20;
}
.floating-whatsapp i {
  font-family: "tabler-icons";
  font-size: 30px;
  line-height: 1;
  color: #ffffff;
  font-style: normal;
}
.floating-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,0,0,0.4); }

/* Combina la entrada de Animate.css con el rebote suave */
.floating-whatsapp.animate__animated.animate__bounceIn {
  animation:
    bounceIn 0.9s ease both,
    float-bounce 1.8s ease-in-out infinite 0.9s;
}

@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 890px) {
  nav { grid-template-columns: 1fr; }
  .nav-links {
    justify-content: flex-start;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    animation: menu-fade 300ms ease;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; }
  .hero-inner { padding: 34px 16px 46px; }
  .section { padding: 34px 16px; }
  .big-call { font-size: 1.05rem; }
  .icon-left { grid-template-columns: 80px 1fr; }
}

@keyframes menu-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1082px) {
  #por-que .grid-2 {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  #por-que .section-image {
    max-width: 100%;
    height: 320px;
  }
}
