/* ==========================================================================
   Impreexprés — hoja de estilos principal
   ========================================================================== */

:root {
  --navy: #1f2c56;
  --navy-700: #2b3a6b;
  --navy-900: #131b3a;
  --red: #b51e25;
  --red-600: #981920;
  --gold: #e0a82e;
  --ink: #1b2134;
  --muted: #5a6377;
  --line: #e3e7ef;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(19, 27, 58, .06), 0 2px 8px rgba(19, 27, 58, .05);
  --shadow-md: 0 10px 30px rgba(19, 27, 58, .10);
  --container: 1160px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--navy); letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red-600); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--navy-900); color: #d5dbee; font-size: .875rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar__list { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.topbar__list li, .topbar__list a { display: inline-flex; align-items: center; gap: .5rem; color: inherit; }
.topbar__list a:hover { color: #fff; }
.topbar .icon { color: #f08a8f; }
.social {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s;
}
.social:hover { background: var(--red); color: #fff; }
.social .icon { color: inherit; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow .2s;
}
.header.is-stuck { box-shadow: var(--shadow-md); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.brand img { width: 230px; }

.nav__list { display: flex; align-items: center; gap: .25rem; }
.nav__list a {
  display: block; padding: .6rem .9rem; border-radius: var(--radius-sm);
  color: var(--navy); font-weight: 600; font-size: .95rem; transition: background .2s, color .2s;
}
.nav__list a:hover { background: #eef1f8; color: var(--navy); }
.nav__list a[aria-current="page"] { color: var(--red); background: #fbeeee; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--navy); cursor: pointer; place-items: center;
}
.nav-toggle .icon { width: 22px; height: 22px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; text-align: center;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(181, 30, 37, .28); }
.btn--primary:hover { background: var(--red-600); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(31, 44, 86, .25); }
.btn--navy:hover { background: var(--navy-700); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #eef1f8; color: var(--navy); }
.btn--ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--lg { padding: 1.1rem 2rem; font-size: 1.05rem; }

/* ---------- Carrusel principal ---------- */
.hero { position: relative; height: clamp(420px, 64vh, 620px); overflow: hidden; background: var(--navy-900); color: #fff; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(19, 27, 58, .88) 0%, rgba(19, 27, 58, .6) 45%, rgba(19, 27, 58, .15) 100%);
}
.hero__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 640px; margin-inline: 0; }
.hero__inner { height: 100%; position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
.hero p { margin-top: 1rem; font-size: clamp(1rem, 1.5vw, 1.15rem); color: #dfe4f3; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.9rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .9rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.hero .eyebrow { color: var(--gold); }

.hero__controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 1.4rem; }
.hero__controls .container { display: flex; align-items: center; justify-content: space-between; }
.hero__dots { display: flex; gap: .5rem; }
.hero__dot { width: 28px; height: 6px; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .4); cursor: pointer; transition: background .2s, width .2s; }
.hero__dot[aria-current="true"] { width: 44px; background: #fff; }
.hero__arrows { display: flex; gap: .5rem; }
.hero__arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5); background: rgba(19, 27, 58, .35); color: #fff; cursor: pointer; transition: background .2s;
}
.hero__arrow:hover { background: var(--red); border-color: var(--red); }
.hero__arrow--prev .icon { transform: rotate(180deg); }

/* ---------- Encabezado de páginas internas ---------- */
.page-hero {
  position: relative; padding: clamp(3.5rem, 8vw, 5.5rem) 0; color: #fff; text-align: center;
  background: linear-gradient(rgba(19, 27, 58, .86), rgba(31, 44, 86, .86)), url(../images/banner4.jpg) center / cover no-repeat;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
.crumbs { display: flex; justify-content: center; gap: .5rem; margin-top: .8rem; font-size: .9rem; color: #c9d0e6; }
.crumbs a { color: #fff; }
.crumbs a:hover { color: var(--gold); }

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section--white { background: var(--surface); }
.section--tight { padding-top: 0; }
.section__head { max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section__head .eyebrow { justify-content: center; }
.section__head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
.section__head h2::after { content: ""; display: block; width: 64px; height: 4px; margin: 1rem auto 0; border-radius: 4px; background: var(--red); }
.lead { margin-top: 1.1rem; font-size: 1.1rem; color: var(--muted); }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--stack { grid-template-rows: auto 1fr; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.card { display: block; color: inherit; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfd6e6; }
.card h3 { font-size: 1.15rem; font-weight: 700; }
.card p { margin-top: .6rem; color: var(--muted); }
.card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.1rem;
  border-radius: 12px; background: #eef1f8; color: var(--navy);
}
.card__icon .icon { width: 26px; height: 26px; }
.card__icon img { width: 30px; height: 30px; }
.card__link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-weight: 700; color: var(--red); }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about__cards { display: grid; gap: 1.25rem; }
.statement { border-left: 5px solid var(--red); }
.statement h3 { font-size: 1.5rem; font-weight: 300; color: var(--ink); }
.statement h3 span { font-weight: 800; color: var(--red); }
.about__media img { margin-inline: auto; border-radius: var(--radius); }

/* ---------- Banda de llamada a la acción ---------- */
.cta { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.cta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta p { margin-top: .4rem; color: #cfd6ea; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Servicios ---------- */
.product { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.product__media { display: grid; place-items: center; height: 190px; padding: 1.5rem; background: #fff; border-bottom: 1px solid var(--line); }
.product__media img { max-width: 100%; max-height: 140px; width: auto; height: auto; }
.product__body { display: flex; gap: 1rem; padding: 1.5rem; }
.product__body .card__icon { margin: 0; }
.product__body p { margin-top: .3rem; }

.notes { display: grid; gap: .9rem; margin-top: 2rem; }
.note {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem;
  background: #f1f4fb; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; color: var(--navy);
}
.note .icon { width: 22px; height: 22px; color: var(--red); }

.service { display: flex; flex-direction: column; }
.service__media { display: grid; place-items: center; height: 170px; margin-bottom: 1.25rem; border-radius: var(--radius-sm); background: #f6f8fc; overflow: hidden; }
.service__media img { max-height: 150px; width: auto; transition: transform .3s; }
.service:hover .service__media img { transform: scale(1.05); }
.service__media .icon { width: 64px; height: 64px; color: var(--navy); stroke-width: 1.2; }
.service h3 { font-size: 1.05rem; letter-spacing: .02em; }
.checklist { margin-top: 1rem; display: grid; gap: .55rem; }
.checklist li { display: flex; align-items: flex-start; gap: .6rem; color: var(--muted); }
.checklist .icon { margin-top: .28em; color: var(--red); stroke-width: 2.4; }
.checklist--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Precios ---------- */
.pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem; }
.pay__qr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; background: #fff; }
.pay__button { flex: 1 1 280px; max-width: 420px; }

.table-card { padding: 0; overflow: hidden; }
.table-card__title { padding: 1.1rem 1.5rem; font-size: 1.1rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: .85rem 1.25rem; text-align: left; }
.table thead th { background: var(--navy); color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { border-top: 1px solid var(--line); transition: background .15s; }
.table tbody tr:hover { background: #f6f8fc; }
.table tbody th { font-weight: 700; color: var(--navy); }
.table .price { font-weight: 800; color: var(--red); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table td { color: var(--muted); }

.accounts { display: grid; gap: .6rem; margin-top: 1.1rem; }
.account {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfe;
}
.account dt { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.account dd { margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.accounts, .account div { min-width: 0; }
.copy {
  display: inline-flex; align-items: center; gap: .35rem; flex: none; padding: .4rem .7rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy);
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.copy:hover, .copy.is-done { background: var(--navy); border-color: var(--navy); color: #fff; }

.highlight {
  display: flex; flex-direction: column; justify-content: center; gap: .75rem; text-align: center; color: #fff;
  background: linear-gradient(140deg, var(--navy), var(--navy-900)); border: 0;
}
.highlight h3 { color: #fff; font-size: 1.35rem; }
.highlight p { margin: 0; color: var(--gold); font-weight: 700; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
.split p { margin-top: 1rem; font-size: 1.08rem; color: var(--muted); }
.split .btn { margin-top: 1.5rem; }

/* ---------- FactuWeb ---------- */
.access { max-width: 860px; margin-inline: auto; text-align: center; }
.access img { margin-inline: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.access p { margin-top: 1.75rem; font-size: 1.15rem; font-weight: 600; color: var(--muted); }
.access__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }

/* ---------- Contacto ---------- */
.hours { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 1.5rem; margin-bottom: 2rem; }
.hours p { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem; border-radius: 999px; background: #eef1f8; color: var(--navy); font-weight: 700; }
.hours .icon { color: var(--red); }

.info { text-align: center; }
.info .card__icon { margin-inline: auto; width: 60px; height: 60px; border-radius: 50%; background: var(--red); color: #fff; }
.info p { margin-top: 0; font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; }
.info p span { display: block; }

.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map iframe { display: block; width: 100%; height: clamp(320px, 50vh, 460px); border: 0; }

.form { max-width: 760px; margin-inline: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 700; color: var(--navy); }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; border: 1px solid #cfd6e6; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(31, 44, 86, .12); }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }

.result { max-width: 640px; margin-inline: auto; text-align: center; }
.result h2 { font-size: 1.8rem; }
.result h2 + h2 { margin-top: .5rem; color: var(--red); }
.result p { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }
.result .btn { margin-top: 1.75rem; }
.result--error p { color: var(--red-600); font-weight: 600; }

/* ---------- Pie de página ---------- */
.footer { background: var(--navy-900); color: #c3cbe2; font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 2.5rem; padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.footer h2 { margin-bottom: 1rem; color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.footer__brand { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.footer__brand span { color: #f08a8f; }
.footer p { margin-top: .6rem; }
.footer a { color: #c3cbe2; }
.footer a:hover { color: var(--gold); }
.footer__list { display: grid; gap: .55rem; }
.footer__list li, .footer__list a { display: flex; align-items: flex-start; gap: .6rem; }
.footer__list .icon { margin-top: .3em; color: #f08a8f; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.25rem 0; text-align: center; font-size: .88rem; }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: #fff; font-weight: 600; }

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.1rem; border-radius: 999px; background: #1faa59; color: #fff; font-weight: 700; font-size: .92rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22); transition: transform .2s, background .2s;
}
.whatsapp:hover { background: #17924b; color: #fff; transform: translateY(-2px); }
.whatsapp .icon { width: 22px; height: 22px; }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Adaptable ---------- */
@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none; padding: .75rem 1.25rem 1.25rem;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__list a { padding: .85rem 1rem; }
  .header__inner { min-height: 72px; }
  .brand img { width: 190px; }
  .about, .split { grid-template-columns: 1fr; }
  .about__media { order: -1; }
  .about__media img { max-width: 300px; }
  .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar__item--wide { display: none !important; }
  .grid--3, .grid--4, .form, .footer__grid { grid-template-columns: 1fr; }
  .hero::after { background: rgba(19, 27, 58, .72); }
  .hero__arrows { display: none; }
  .table th, .table td { padding: .75rem .9rem; }
  .whatsapp span { display: none; }
  .whatsapp { padding: .9rem; }
  .account { flex-wrap: wrap; }
}

@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; }
}

@media print {
  .topbar, .header, .hero__controls, .whatsapp, .cta, .footer__grid { display: none; }
  body { background: #fff; }
}
