:root {
  --color-primary: #0c4d9a;
  --color-primary-dark: #082d5a;
  --color-accent: #d81f2a;
  --color-whatsapp: #1fbf63;
  --color-bg: #f5f7fa;
  --color-text: #0c4d9a;
  --color-muted: #5a6472;
  --font-heading: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Poppins', 'Segoe UI', sans-serif;
  --max-width: 1180px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(7, 29, 54, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 .5em;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 3px solid var(--color-accent);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  padding: 4px 0;
}
.logo img {
  display: block;
  width: clamp(220px, 28vw, 420px);
  height: auto;
  max-height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(13, 54, 97, 0.06));
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .92rem;
  transition: color .2s;
}
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--color-accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--color-primary-dark);
  border-radius: 2px;
}

/* HERO */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.02);
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-bg.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,20,45,.35) 0%, rgba(0,20,45,.55) 55%, rgba(0,20,45,.9) 100%);
}
.hero-content {
  position: relative;
  padding-bottom: 64px;
  max-width: 760px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.hero p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 400;
  color: #e7edf5;
  margin-bottom: 1.6em;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #a1121d 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(216, 31, 42, 0.35);
}
.btn-whatsapp {
  background: linear-gradient(135deg, var(--color-whatsapp) 0%, #169f53 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 191, 99, 0.35);
}
.btn-whatsapp svg { width: 22px; height: 22px; fill: #fff; }

/* SECTIONS GENERIC */
section {
  padding: 72px 0;
  scroll-margin-top: 72px;
}
html.js main > section:not(.hero),
html.js .site-footer {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-enabled main > section:not(.hero).is-visible,
.reveal-enabled .site-footer.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-enabled main > section:not(.hero),
  .reveal-enabled .site-footer {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
section h2 {
  position: relative;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  color: var(--color-primary);
  text-align: center;
  margin: 0 auto 2rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
section h2::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  margin: 14px auto 0 0;
  background: var(--color-accent);
}

main {
  display: flex;
  flex-direction: column;
}
main > #inicio { order: 1; }
main > #servicios { order: 2; }
main > #productos { order: 3; }
main > #trayectoria { order: 4; }
main > #galeria { order: 5; }
main > #ubicacion { order: 6; }
.trayectoria-texto h2::after {
  margin-left: 0;
}

/* trayectoria */
.trayectoria {
  background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
  padding-bottom: 0;
}
.trayectoria-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.trayectoria-texto h2 {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}
.trayectoria-texto p {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-weight: 300;
  margin: 0 0 1.1em;
}
.section-intro {
  max-width: 620px;
  margin: -0.75rem auto 2rem;
  color: var(--color-muted);
  text-align: center;
}
.trayectoria-badge {
  background: linear-gradient(145deg, var(--color-primary), var(--color-primary));
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}
.badge-year {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
}
.badge-text { font-size: .95rem; color: #d7e6f9; }

/* GALERIA / CARRUSEL */
.galeria {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
  padding-top: 32px;
}
.galeria .container {
  padding-top: 0;
}
.carousel { position: relative; max-width: 900px; margin: 0 auto; }
.carousel-track-wrapper {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #10151f;
}
.carousel-track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform .5s ease;
}
.carousel-slide {
  min-width: 100%;
  height: 60vh;
  max-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: contain; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .2s;
}
.carousel-btn:hover { background: rgba(0,0,0,.7); }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
.carousel-pause {
  top: auto;
  right: 50%;
  bottom: 18px;
  transform: translateX(50%);
  width: 34px;
  height: 34px;
  font-size: .8rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.carousel-dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: #c6d2e0;
  cursor: pointer;
  padding: 0;
}
.carousel-dots button[aria-selected="true"] { background: var(--color-primary); }

/* SERVICIOS */
.servicios {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
}
.productos {
  background: linear-gradient(180deg, #eef5ff 0%, #f9fbff 100%);
}
.servicios-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.section-cta {
  display: block;
  width: fit-content;
  margin: -0.75rem auto 2rem;
  color: var(--color-accent);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.section-cta:hover,
.section-cta:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.servicio-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 59, 115, 0.08);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow: 0 10px 24px rgba(15, 38, 62, 0.05);
}
.servicio-reparacion {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/reparacion.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-venta {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/venta.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-cambio {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/cambio.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-calefaccion {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/calefaccion.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-calefaccion-nuevo {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/calefaccion_2.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-pesada {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/pesada.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-enjuague {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/lavado.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-cambio-calefaccion {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/calefaccion-cambio.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-nuevo {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/radiador.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-depositos {
  background:
    linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.82)),
    url('pictures/deposito.webp') center/cover no-repeat;
  border-color: rgba(12, 77, 154, 0.12);
}
.servicio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(7, 29, 54, 0.12);
  border-color: rgba(12, 77, 154, 0.18);
}
.servicio-icon {
  display: block;
  margin: 0 auto 0.75rem;
  font-size: 2.5rem;
  line-height: 1;
}
.servicio-card h3 {
  font-size: clamp(1.2rem, 1.5vw, 1.5rem);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: .7rem;
}
.servicio-card p {
  color: #111111b0;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.productos {
  padding-top: 72px;
}
.productos .servicios-grid {
  margin-top: 0;
}

/* MEDIOS DE PAGO EN EL PIE */
.footer-payments {
  padding: 0;
  margin-bottom: 20px;
}
.pagos-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 920px;
  margin-inline: auto;
}
.pago-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  text-align: left;
  font-weight: 600;
  font-size: .82rem;
  color: #e3edf9;
}
.pago-icon { font-size: 1.5rem; display: block; }
.pago-logo {
  width: 58px;
  height: 30px;
  object-fit: contain;
  margin: 0;
}
.banco-logo {
  filter: brightness(0) invert(1);
}

/* UBICACION */
.ubicacion {
  background: linear-gradient(180deg, #edf5ff 0%, #ffffff 100%);
  text-align: center;
}
.direccion {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.15rem;
  margin-bottom: 1.5em;
}
.location-phone {
  display: inline-block;
  margin: 0;
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}
.location-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: -0.5rem 0 1.5rem;
}
.location-whatsapp {
  color: var(--color-whatsapp);
  font-weight: 700;
  text-decoration: none;
}
.location-phone:hover,
.location-phone:focus-visible,
.location-whatsapp:hover,
.location-whatsapp:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mapa-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}
.mapa-wrapper iframe { width: 100%; display: block; }

/* FOOTER */
.site-footer {
  background: linear-gradient(180deg, #0a2d52 0%, #061e39 100%);
  color: #e3edf9;
  text-align: center;
  padding: 28px 0 96px;
  font-size: .9rem;
}
.footer-prompt {
  max-width: 520px;
  margin: 0 auto 20px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.2;
}
.footer-contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 0 0 24px;
  padding: 20px 0 0;
  border-top: 2px solid var(--color-accent);
}
.footer-contact li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.footer-contact-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: #d7e6f9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.footer-contact a {
  color: #e3edf9;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* WHATSAPP FLOAT */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.5);
  z-index: 200;
  transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; }

/* RESPONSIVE */
@media (max-width: 860px) {
  .trayectoria-grid { grid-template-columns: 1fr; }
  .trayectoria-badge { position: static; }
}

@media (max-width: 1024px) {
  .hero { min-height: 62vh; }
}

@media (max-width: 768px) {
  .hero {
    min-height: 68vh;
  }
  .hero-media img {
    object-position: center center;
    transform: scale(1.08);
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 64vh;
  }
  .hero-media img {
    object-position: center center;
    transform: scale(1.12);
  }
  .hero h1 {
    letter-spacing: 0.04em;
  }
  .hero p {
    font-size: 0.98rem;
  }
  .trayectoria-texto p {
    font-size: .95rem;
  }
}

@media (max-width: 900px) {
  .main-nav ul {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,.08);
    transition: max-height .3s ease;
  }
  .main-nav ul.open { max-height: 400px; }
  .main-nav li { border-bottom: 1px solid #eee; }
  .main-nav a { display: block; padding: 16px 24px; }
  .nav-toggle { display: flex; }

  .hero { min-height: 92vh; }
  section { padding: 56px 0; }
  .carousel-slide { height: 42vh; }
  .carousel-btn.prev { left: 6px; }
  .carousel-btn.next { right: 6px; }
}
