/* ============================================================
   ASPLASTIC - Hoja de estilos principal
   Paleta: neutros + azul corporativo + verde acento
   ============================================================ */

:root {
  --color-primary: #0d2e54;
  --color-primary-dark: #081d36;
  --color-accent: #007c71;
  --color-accent-light: #4ca59a;
  --color-text: #2b2b2b;
  --color-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f8fb;
  --color-border: #e5e7eb;
  --color-whatsapp: #25d366;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(13, 46, 84, 0.06);
  --shadow-md: 0 8px 24px rgba(13, 46, 84, 0.1);
  --shadow-lg: 0 20px 48px rgba(13, 46, 84, 0.15);

  --container: 1200px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--color-primary); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
}
.section--alt { background: var(--color-bg-alt); }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.section__eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--color-accent);
  margin-bottom: .75rem;
}
.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
}
.section__lead {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Top bar ---------- */
.top-bar {
  background: var(--color-primary-dark);
  color: #d6e0ee;
  font-size: .85rem;
  padding: .5rem 0;
}
.top-bar__inner {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.top-bar__item--right { margin-left: auto; }
a.top-bar__item {
  text-decoration: none;
  transition: color .2s;
}
a.top-bar__item:hover {
  color: white;
  text-decoration: underline;
}

/* ---------- Header ---------- */
.header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  width: 100%;
  min-height: var(--header-h);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: .75rem;
  min-width: 0;
  line-height: 1;
}
.header__inner > * {
  line-height: 1.2;
}

.logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -.01em;
  color: var(--color-primary);
}
.logo__mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 800;
}
.logo__img {
  height: 44px;
  width: auto;
  display: block;
}
.logo--light { color: white; }
.logo--light .logo__mark { box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.logo--light .logo__img { filter: brightness(1.05); }

.nav__list {
  display: flex;
  gap: .35rem;
  align-items: center;
}
.nav__link {
  display: inline-block;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .02em;
  color: var(--color-text);
  position: relative;
  padding: .55rem 1rem;
  border-radius: 999px;
  transition: color .25s ease, background-color .25s ease, transform .25s ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: .2rem;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  transition: width .3s ease;
}
.nav__link:hover {
  color: var(--color-accent);
  background: rgba(0, 124, 113, .08);
}
.nav__link:hover::after { width: 24px; }
.nav__link:active { transform: scale(.96); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: .3s;
}

/* ---------- Hero / carrusel ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h) - 36px);
  height: calc(100dvh - var(--header-h) - 36px);
  min-height: 520px;
  max-height: 720px;
  overflow: hidden;
  background: var(--color-primary);
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__content {
  color: white;
  max-width: 720px;
}
.hero__eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  background: rgba(255,255,255,.15);
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero__title {
  color: white;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.hero__subtitle {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  opacity: .92;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: white;
  font-size: 1.8rem;
  z-index: 2;
  transition: background .2s;
  display: grid;
  place-items: center;
}
.hero__arrow:hover { background: rgba(255,255,255,.3); }
.hero__arrow--prev { left: 1.5rem; }
.hero__arrow--next { right: 1.5rem; }

.hero__dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 2;
}
.hero__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: background .2s, transform .2s;
}
.hero__dot.is-active {
  background: white;
  transform: scale(1.3);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .95rem;
  transition: all .2s ease;
  cursor: pointer;
}
.btn--primary {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,.6);
}
.btn--ghost:hover {
  background: white;
  color: var(--color-primary);
}
.btn--whatsapp {
  background: var(--color-whatsapp);
  color: white;
  justify-content: center;
  margin-top: 1.25rem;
  padding: .7rem 1.25rem;
  font-size: .9rem;
  align-self: flex-start;
}
.btn--whatsapp:hover { filter: brightness(1.1); }

/* ---------- Cards ---------- */
.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}
.card__title { color: var(--color-primary); }

/* ---------- Productos ---------- */
.product {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}
.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.product__img {
  height: 220px;
  background: var(--color-bg-alt);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.product__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 50%, rgba(13,46,84,0.04));
  pointer-events: none;
}
.product__img img {
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .35s;
}
.product:hover .product__img img {
  transform: scale(1.05);
}
.product__placeholder {
  font-size: 4rem;
  opacity: .85;
  filter: drop-shadow(0 4px 12px rgba(13,46,84,.15));
}
.product__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product__body h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.product__body p {
  color: var(--color-muted);
  font-size: .95rem;
  margin: 0 0 1rem;
  flex: 1;
}
.link {
  color: var(--color-accent);
  font-weight: 600;
  font-size: .9rem;
  transition: gap .2s;
}
.link:hover { color: var(--color-accent-light); }

/* ---------- CTA box ---------- */
.cta-box {
  margin-top: 3rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-box h3 { color: white; margin-bottom: .25rem; }
.cta-box p { margin: 0; opacity: .9; }
.cta-box .btn--primary {
  background: white;
  color: var(--color-primary);
}
.cta-box .btn--primary:hover {
  background: var(--color-bg-alt);
}

/* ---------- Servicios ---------- */
.service {
  text-align: center;
  padding: 1.5rem 1rem;
}
.service__icon {
  font-size: 2.5rem;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  background: var(--color-bg-alt);
  border-radius: 50%;
}
.service h3 { font-size: 1.1rem; }
.service p { color: var(--color-muted); font-size: .95rem; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 2rem;
  border-left: 3px solid var(--color-accent);
}
.timeline__item {
  position: relative;
  padding: .75rem 0 1.5rem 1.5rem;
}
.timeline__item::before {
  content: '';
  position: absolute;
  left: -2.6rem;
  top: 1rem;
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 4px solid var(--color-bg-alt);
}
.timeline__year {
  display: inline-block;
  font-weight: 700;
  color: white;
  background: var(--color-accent);
  font-size: .9rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.timeline__heading {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin: .25rem 0 .5rem;
}
.timeline__item p {
  margin: 0;
  color: var(--color-muted);
}
.timeline__item p strong {
  color: var(--color-text);
}

/* ---------- Clientes ---------- */
.clients {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}
.clients__logo {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  place-items: center;
  min-height: 130px;
  transition: all .25s;
}
.clients__logo:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}
.clients__logo img {
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- Contacto ---------- */
.contact-perks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.perk {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s;
}
.perk:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}
.perk__icon {
  font-size: 1.15rem;
}

.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}
.contact__form {
  background: white;
  padding: 2.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.contact__form-title {
  font-size: 1.35rem;
  margin-bottom: .35rem;
}
.contact__form-lead {
  color: var(--color-muted);
  margin: 0 0 1.5rem;
  font-size: .95rem;
}
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.btn--full {
  width: 100%;
  justify-content: center;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.contact__form textarea {
  margin-bottom: 1rem;
  resize: vertical;
  min-height: 120px;
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,124,113,.15);
}

.contact__info {
  background: linear-gradient(160deg, var(--color-primary), var(--color-accent));
  padding: 2.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: white;
  display: flex;
  flex-direction: column;
}
.contact__info h3 {
  color: white;
  font-size: 1.35rem;
  margin-bottom: .35rem;
}
.contact__info-lead {
  color: rgba(255,255,255,.85);
  margin: 0 0 1.75rem;
  font-size: .95rem;
}
.contact__list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
  flex: 1;
}
.contact__list li {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}
.contact__list li > div {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.contact__list strong {
  color: white;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .15rem;
  opacity: .8;
}
.contact__list a,
.contact__list span {
  color: white;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity .2s;
}
.contact__list a:hover { opacity: .8; }
.contact__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-primary-dark);
  color: #cbd5e0;
  padding-top: 4rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}
.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.footer__list li,
.footer__social li { margin-bottom: .5rem; }
.footer__list a,
.footer__social a {
  color: #cbd5e0;
  font-size: .9rem;
  transition: color .2s;
}
.footer__list a:hover,
.footer__social a:hover { color: var(--color-accent-light); }
.footer__social {
  display: flex;
  gap: .75rem;
}
.footer__social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 700;
}
.footer__social a:hover {
  background: var(--color-accent);
  color: white;
}
.footer__tagline {
  color: #9aa5b6;
  font-size: .9rem;
  margin-top: 1rem;
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  text-align: center;
  font-size: .85rem;
  color: #9aa5b6;
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: white;
  border: none;
  outline: none;
  text-decoration: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  z-index: 999;
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  background: #20bf5a;
}
.whatsapp-float:focus,
.whatsapp-float:active {
  outline: none;
  text-decoration: none;
}
.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
  display: block;
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .clients { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 72px; }

  .top-bar { display: none; }

  .container { padding: 0 1rem; }

  /* Compensa el header fixed (que ya no ocupa espacio en el flujo) */
  body { padding-top: var(--header-h); }

  /* Header FIXED en móvil con z-index máximo para imponerse sobre cualquier UI nativa */
  .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 99999 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    padding: 8px 0;
    box-sizing: border-box;
    transform: translateZ(0);
  }
  .header__inner {
    min-height: 56px;
    line-height: 1;
  }

  .logo { font-size: 1.4rem; gap: .55rem; }
  .logo__img { height: 38px; width: 38px; }

  /* Hero recalculado para móvil */
  .hero {
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    min-height: 460px;
  }
  .hero__title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .hero__subtitle { font-size: 1rem; }

  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: white;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-110%);
    transition: transform .3s ease;
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.25rem;
  }
  .nav__link {
    display: block;
    padding: .85rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .clients { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr; }

  .cta-box { text-align: center; justify-content: center; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }

  .hero__arrow--prev { left: .5rem; }
  .hero__arrow--next { right: .5rem; }

  .section { padding: 3.5rem 0; }

  /* WhatsApp flotante un poco más pequeño */
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 1rem;
    right: 1rem;
  }
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

/* Pantallas muy pequeñas (iPhone SE, Galaxy A pequeños) */
@media (max-width: 380px) {
  .logo__text { display: none; }
  .logo__img { height: 32px; width: 32px; }
}
