/* =========================================================
   AP Transportes Refrigerados — Hoja de estilos
   Paleta basada en el azul de marca del logo.
   ========================================================= */

:root {
  /* Marca */
  --brand:        #1e5aaa;   /* azul del logo */
  --brand-600:    #1b4f96;
  --brand-700:    #163f78;
  --brand-navy:   #0a2547;   /* azul profundo para fondos oscuros */
  --brand-navy-2: #0d2e57;
  --brand-light:  #2f74d0;
  --cyan:         #17a2c9;   /* acento frío secundario */
  --ice-100:      #eaf3ff;
  --ice-50:       #f4f9ff;

  /* Neutros */
  --white:   #ffffff;
  --slate-900: #0f1e33;
  --slate-700: #33445c;
  --slate-500: #667892;
  --slate-300: #cdd8e6;
  --line:      #e2ebf6;

  --danger: #e23b3b;

  /* Sistema */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(10, 37, 71, .08);
  --shadow:    0 12px 30px rgba(10, 37, 71, .10);
  --shadow-lg: 0 24px 60px rgba(10, 37, 71, .16);
  --container: 1160px;
  --font:  'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Poppins', var(--font);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--slate-900); line-height: 1.15; font-weight: 700; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.text-gradient {
  background: linear-gradient(100deg, var(--brand-light), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-light));
  color: #fff; box-shadow: 0 10px 22px rgba(30, 90, 170, .30);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(30, 90, 170, .38); }
.btn--ghost { background: rgba(255,255,255,.85); color: var(--brand-700); border-color: var(--line); }
.btn--ghost:hover { background: #fff; border-color: var(--brand-light); color: var(--brand); transform: translateY(-2px); }
.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s, border-color .25s, background .25s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; height: 74px; gap: 18px; }
.brand { margin-right: auto; display: inline-flex; align-items: center; }
.brand__logo { height: 52px; width: auto; }
.footer__logo { height: 74px; width: auto; }
.header__tools { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; align-items: center; gap: 8px; padding: 5px 7px 5px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.lang-switch:hover { border-color: var(--brand-light); box-shadow: 0 3px 12px rgba(30, 90, 170, .14); }
.lang-switch__globe { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--slate-500); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.lang-switch:hover .lang-switch__globe { stroke: var(--brand); }
.lang-switch__track { display: inline-flex; gap: 2px; padding: 3px; background: var(--ice-100); border-radius: 999px; }
.lang-switch__track span { font-family: var(--font-head); font-weight: 700; font-size: 11.5px; letter-spacing: .02em; line-height: 1; padding: 5px 9px; border-radius: 999px; color: var(--slate-500); transition: color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease); }
.lang-switch__track span.is-active { background: linear-gradient(120deg, var(--brand), var(--brand-light)); color: #fff; box-shadow: 0 3px 8px rgba(30, 90, 170, .30); }
.nav__cta--mobile { display: none; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__link {
  font-weight: 500; font-size: 15px; color: var(--slate-700); position: relative; padding: 4px 0;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--brand); transition: width .25s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--brand); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--brand-navy); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 104px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 520px at 80% -10%, rgba(47,116,208,.16), transparent 60%),
    radial-gradient(900px 520px at 10% 10%, rgba(23,162,201,.12), transparent 55%),
    linear-gradient(180deg, var(--ice-50), #fff 72%);
}
.hero__inner { max-width: 860px; margin-inline: auto; text-align: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); color: var(--brand-700);
  font-weight: 600; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(23,162,201,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(23,162,201,0); } 100% { box-shadow: 0 0 0 0 rgba(23,162,201,0); } }

.hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; margin: 22px 0 18px; letter-spacing: -.02em; }
.hero__subtitle { font-size: 1.14rem; color: var(--slate-700); max-width: 620px; margin-inline: auto; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 28px; justify-content: center; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 18px 24px; justify-content: center; }
.hero__badges li { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; color: var(--slate-700); }
.hero__badges svg { width: 18px; height: 18px; fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Animación compartida (botón WhatsApp, pines del mapa) */
@keyframes bob { 50% { transform: translateY(-12px); } }

/* ---------- Secciones ---------- */
.section { padding: 92px 0; }
.section--soft { background: var(--ice-50); }
.section__head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section__eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section__eyebrow--light { color: var(--cyan); }
.section__title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; }
.section__title--light { color: #fff; }
.section__lead { margin-top: 14px; color: var(--slate-500); font-size: 1.08rem; }
.section__lead--light { color: rgba(255,255,255,.8); }

/* ---------- Cards / servicios ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--cyan)); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card--accent { border-color: rgba(226,59,59,.25); background: linear-gradient(180deg, #fff, #fff8f8); }
.card--accent::before { background: linear-gradient(90deg, var(--danger), #ff8a5c); }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card__icon--blue { background: var(--ice-100); } .card__icon--blue svg { stroke: var(--brand); }
.card__icon--cyan { background: #e2f6fc; } .card__icon--cyan svg { stroke: var(--cyan); }
.card__icon--red  { background: #fdeaea; } .card__icon--red svg { stroke: var(--danger); }
.card__title { font-size: 1.22rem; margin-bottom: 10px; }
.card__text { color: var(--slate-500); font-size: .98rem; }

/* ---------- Seguridad (oscuro) ---------- */
.section--dark { background: var(--brand-navy); background-image: radial-gradient(900px 400px at 90% 0%, rgba(47,116,208,.25), transparent 60%), linear-gradient(180deg, var(--brand-navy), #071a35); }
.security__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.security__card { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 30px 26px; transition: transform .25s var(--ease), border-color .25s; }
.security__card:hover { transform: translateY(-6px); border-color: rgba(47,116,208,.55); }
.security__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: rgba(47,116,208,.18); border: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; }
.security__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.security__card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 9px; }
.security__card p { color: rgba(255,255,255,.72); font-size: .98rem; }

/* ---------- Cobertura ---------- */
.coverage { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.coverage__map svg { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.route { stroke-dasharray: 7 7; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.pin { animation: bob 4s ease-in-out infinite; }
.pin:nth-child(4) { animation-delay: -1.5s; }
.coverage__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.coverage__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.coverage__item strong { display: block; color: var(--slate-900); font-family: var(--font-head); margin-bottom: 5px; }
.coverage__item span { font-size: .92rem; color: var(--slate-500); }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; position: relative; }
.step__num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(120deg, var(--brand), var(--brand-light)); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; margin-bottom: 16px; box-shadow: 0 8px 18px rgba(30,90,170,.3); }
.step h3 { font-size: 1.12rem; margin-bottom: 7px; }
.step p { color: var(--slate-500); font-size: .95rem; }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.about__list { margin-top: 24px; display: grid; gap: 13px; }
.about__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--slate-700); }
.about__list svg { flex: none; width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; background: var(--brand); border-radius: 50%; padding: 4px; }
.about__values { display: grid; gap: 16px; }
.value { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.value__icon { grid-row: span 2; width: 50px; height: 50px; border-radius: 12px; background: var(--ice-100); display: grid; place-items: center; }
.value__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.value h3 { font-size: 1.08rem; align-self: end; }
.value p { font-size: .92rem; color: var(--slate-500); align-self: start; }

/* ---------- Flota ---------- */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 236px 236px;
  grid-template-areas:
    "big big tall"
    "a   a   tall";
  gap: 16px;
}
.fleet-item { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--ice-100); }
.fleet-item img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .6s var(--ease); }
.fleet-item:hover img { transform: scale(1.06); }
.fleet-item::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(10, 37, 71, .30), transparent); opacity: 0; transition: opacity .3s; pointer-events: none; }
.fleet-item:hover::after { opacity: 1; }
.fleet-item:nth-child(1) { grid-area: big; }
.fleet-item:nth-child(2) { grid-area: tall; }
.fleet-item:nth-child(3) { grid-area: a; }

/* ---------- Contacto ---------- */
.section--cta { background: var(--brand-navy); background-image: radial-gradient(800px 400px at 10% 0%, rgba(23,162,201,.2), transparent 55%), linear-gradient(160deg, var(--brand-700), var(--brand-navy)); }
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
.contact__methods { margin-top: 30px; display: grid; gap: 18px; }
.contact__methods li { display: flex; align-items: center; gap: 15px; }
.contact__icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.contact__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact__label { display: block; font-size: 12.5px; color: rgba(255,255,255,.6); font-weight: 500; }
.contact__methods a, .contact__methods div > span:last-child { color: #fff; font-weight: 600; font-size: 1rem; }
.contact__methods a:hover { color: var(--cyan); }

.contact__form { background: #fff; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg); }
.form__row { display: grid; gap: 7px; margin-bottom: 16px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__row label { font-size: 13.5px; font-weight: 600; color: var(--slate-900); }
.form__row label span { color: var(--danger); }
.form__row input, .form__row select, .form__row textarea {
  font-family: inherit; font-size: 15px; color: var(--slate-900);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; background: var(--ice-50);
  transition: border-color .2s, box-shadow .2s, background .2s; width: 100%; resize: vertical;
}
.form__row input:focus, .form__row select:focus, .form__row textarea:focus {
  outline: none; border-color: var(--brand-light); background: #fff; box-shadow: 0 0 0 4px rgba(47,116,208,.12);
}
.form__row input.invalid { border-color: var(--danger); background: #fff5f5; }
.form__note { margin-top: 12px; font-size: 12.5px; color: var(--slate-500); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: #071a35; color: rgba(255,255,255,.72); padding-top: 60px; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; padding-bottom: 44px; }
.footer__logo { background: #fff; padding: 11px 15px; border-radius: 14px; margin-bottom: 18px; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
.footer__brand p { font-size: .95rem; max-width: 320px; }
.footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.footer__nav h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; font-family: var(--font-head); }
.footer__nav a { display: block; font-size: .93rem; padding: 5px 0; color: rgba(255,255,255,.7); transition: color .2s, transform .2s; }
.footer__nav a:hover { color: var(--cyan); transform: translateX(3px); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; font-size: 13px; gap: 12px; flex-wrap: wrap; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(37,211,102,.45); transition: transform .2s var(--ease);
  animation: bob 4s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; }

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

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .coverage, .about, .contact { grid-template-columns: 1fr; }
  .cards, .security__grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .fleet-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 210px 210px;
    grid-template-areas:
      "big  big"
      "tall a";
  }
}

@media (max-width: 520px) {
  .fleet-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 220px);
    grid-template-areas: "big" "tall" "a";
  }
}

@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 12px 22px 26px; box-shadow: var(--shadow-lg);
    transform: translateY(-140%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav__cta--desktop { display: none; }
  .nav__cta--mobile { display: inline-flex; margin-top: 16px; }
  .nav-toggle { display: flex; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .section { padding: 64px 0; }
  .cards, .steps, .coverage__grid, .form__grid, .security__grid { grid-template-columns: 1fr; }
  .footer__bottom-inner { justify-content: center; text-align: center; }
}

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