/* BR Mantenimiento General — estilos
   Marca: rojo + azul marino (logo). Tipografía: Poppins / Open Sans. */

:root {
  --red: #c8141b;
  --red-dark: #9f0f15;
  --navy: #0b2a6f;
  --navy-dark: #071b4a;
  --ink: #14213d;
  --muted: #4a5568;
  --bg: #ffffff;
  --soft: #eef3fb;
  --border: #d5deee;
  --wa: #128c4a;
  --wa-dark: #0d6e3a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 42, 111, .12);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--navy-dark); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid #f5a623; outline-offset: 3px; border-radius: 4px; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: 600 1rem var(--font-head);
  border: 2px solid transparent; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-dark); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-ghost-dark { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost-dark:hover { background: var(--navy); color: #fff; }
.ico { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(7,27,74,.12); border-color: var(--border); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 56px; width: auto; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav ul { display: flex; gap: 22px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 0;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:not(.btn):hover, .nav a.is-current { color: var(--red); border-color: var(--red); }
.nav-cta { min-height: 44px; padding: 8px 20px; }
.nav-toggle {
  display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-dark); transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + 56px) 0 72px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(200,20,27,.45), transparent 45%),
    linear-gradient(135deg, var(--navy-dark), var(--navy));
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 span { color: #ff8a8f; }
.lead { font-size: 1.15rem; max-width: 52ch; color: #e6ecfa; }
.eyebrow {
  font: 600 .8rem var(--font-head); letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 12px;
}
.hero .eyebrow, .eyebrow-light { color: #ffb3b6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #dbe5fb; font-size: .95rem; }
.hero-points li::before { content: "✓"; color: #7ee0a3; font-weight: 700; margin-right: 8px; }
.hero-media { margin: 0; }
.hero-media img {
  border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  border: 4px solid rgba(255,255,255,.9);
  max-width: 460px; margin-inline: auto;
}

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-soft { background: var(--soft); }
.section-dark { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #e6ecfa; }
.section-dark h2 { color: #fff; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head p:last-child { color: var(--muted); }

.cards { display: grid; gap: 24px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--navy); }
.card p { color: var(--muted); }
.card-ico {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  background: var(--navy); border-radius: 12px;
}
.card-ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.why { border-top: 4px solid var(--red); }

.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 9px;
  border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg) scale(.9);
}
.ticks-light li::before { border-color: #7ee0a3; }

/* ---------- Espacios (split) ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.split-media { margin: 0; }
.split-media img { border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.35); max-height: 560px; width: auto; margin-inline: auto; }
.tabs { display: flex; gap: 8px; margin: 24px 0 16px; }
.tab {
  min-height: 44px; padding: 8px 22px; border-radius: 999px; cursor: pointer;
  font: 600 .95rem var(--font-head); color: #fff; background: transparent; border: 2px solid rgba(255,255,255,.4);
  transition: background-color .2s, color .2s;
}
.tab[aria-selected="true"] { background: #fff; color: var(--navy-dark); border-color: #fff; }
.tab-panel { min-height: 170px; margin-bottom: 20px; }
.tab-panel[hidden] { display: none; }

/* ---------- Preventivo / correctivo ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }
.compare-col { border-radius: var(--radius); padding: 32px; border: 1px solid var(--border); }
.compare-prev { background: #f3f7ff; border-top: 5px solid var(--navy); }
.compare-corr { background: #fff5f5; border-top: 5px solid var(--red); }
.compare-tag { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
.wide-figure { margin: 0 auto; max-width: 560px; text-align: center; }
.wide-figure img { border-radius: 16px; box-shadow: var(--shadow); }
.wide-figure figcaption { margin-top: 12px; color: var(--muted); font-size: .95rem; }

/* ---------- Galería ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 32px; }
.chip {
  min-height: 44px; padding: 8px 22px; border-radius: 999px; cursor: pointer;
  font: 600 .95rem var(--font-head); background: #fff; color: var(--navy); border: 2px solid var(--navy);
  transition: background-color .2s, color .2s;
}
.chip:hover { background: #dfe8fb; }
.chip.is-active { background: var(--navy); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gal-item { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: opacity .3s, transform .3s; }
.gal-item.is-hidden { display: none; }
.gal-item figcaption { padding: 14px 16px; font-weight: 600; color: var(--navy-dark); }
.zoomable { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoomable img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; transition: transform .4s ease; }
.gal-item:hover .zoomable img, .zoomable:hover img { transform: scale(1.03); }
.zoom-hint {
  position: absolute; right: 12px; bottom: 12px; background: rgba(7,27,74,.88); color: #fff;
  font: 600 .8rem var(--font-head); padding: 6px 12px; border-radius: 999px;
}
.split-media .zoomable img { aspect-ratio: auto; object-fit: contain; }
.wide-figure .zoomable img { aspect-ratio: auto; object-fit: contain; }
.zoomable { overflow: hidden; border-radius: inherit; }

.brands { margin-top: 56px; text-align: center; }
.brands h3 { color: var(--muted); font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.brands ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.brands li { background: #fff; border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; font-weight: 600; color: var(--navy); }

/* ---------- Contacto ---------- */
.section-contact { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #e6ecfa; }
.section-contact h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { margin-top: 28px; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ico { width: 28px; height: 28px; fill: none; stroke: #ffb3b6; stroke-width: 1.8; margin-top: 4px; }
.contact-list li:first-child .ico { fill: #7ee0a3; stroke: none; }
.contact-list strong { display: block; color: #fff; }
.contact-list a { color: #fff; text-underline-offset: 3px; overflow-wrap: anywhere; }
.contact-list a:hover { color: #ffb3b6; }

.contact-form { background: #fff; color: var(--ink); border-radius: 18px; padding: 32px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.contact-form h3 { margin-bottom: 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #b7c3dc; border-radius: 10px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,42,111,.2); }
.field.has-error input, .field.has-error select { border-color: var(--red); }
.error { color: #b00d13; font-size: .88rem; font-weight: 600; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-actions .btn { flex: 1 1 200px; }
.form-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-dark); color: #cbd6f0; padding-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding-bottom: 28px; }
.footer-inner p { margin: 0; }
.footer-inner img { background: #fff; border-radius: 10px; padding: 4px; }
.site-footer a { color: #fff; }
.copy { text-align: center; border-top: 1px solid rgba(255,255,255,.12); padding: 16px; margin: 0; font-size: .85rem; }

/* ---------- WhatsApp flotante ---------- */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); box-shadow: 0 8px 22px rgba(0,0,0,.3);
  transition: transform .2s, background-color .2s;
}
.fab:hover { background: var(--wa-dark); transform: scale(1.06); }
.fab svg { width: 32px; height: 32px; fill: #fff; }

/* ---------- Visor ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgba(4,12,35,.88); }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; border-radius: 12px; }
.lb-close {
  position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #fff; color: var(--navy-dark); font-size: 1.8rem; line-height: 1; cursor: pointer;
}

/* ---------- Animaciones de aparición ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 24px rgba(7,27,74,.15);
    transform: translateY(-120%); visibility: hidden; transition: transform .3s ease, visibility .3s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a:not(.btn) { display: block; padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 14px; }
  .hero-grid, .split, .contact-grid, .compare { grid-template-columns: minmax(0, 1fr); }
  .hero-grid > *, .split > *, .contact-grid > * { min-width: 0; }
  .hero-media img { width: 100%; }
  .hero-grid { gap: 36px; }
  .split-media { order: -1; }
  .cards.three { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .gallery, .cards.four { grid-template-columns: minmax(0, 1fr); }
  .brand img { height: 48px; }
  .contact-form { padding: 24px 18px; }
  .hero { padding-top: calc(var(--header-h) + 36px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
