/* ==========================================================================
   ARLAUTO · Mecánica y Neumáticos — Motril
   Paleta: rojo/verde del logo Arlauto + naranja BestDrive sobre base blanca
   ========================================================================== */

:root {
  --rojo: #E0111C;
  --rojo-osc: #B70D16;
  --rojo-suave: #FCE9EA;
  --verde: #8DC63F;
  --verde-osc: #0C8F43;
  --verde-suave: #EFF7E2;
  --naranja: #F9A51A;
  --naranja-osc: #A96F00;
  --naranja-suave: #FFF3DC;
  --ink: #1B1C1E;
  --texto: #4E5459;
  --borde: #ECEDEF;
  --fondo-gris: #F7F8FA;
  --blanco: #fff;
  --sombra: 0 10px 30px rgba(20, 20, 25, .08);
  --sombra-alta: 0 18px 45px rgba(20, 20, 25, .14);
  --radio: 16px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.15rem, 4.2vw + .8rem, 3.35rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 2.4vw + .7rem, 2.35rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid rgba(224, 17, 28, .45);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---------- Barra superior ---------- */
.topbar {
  background: var(--ink);
  color: #E9EAEC;
  font-size: .85rem;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 38px;
}

.topbar p { margin: 0; }
.topbar strong { color: var(--naranja); font-weight: 700; }

.topbar-tel {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s;
}
.topbar-tel:hover { color: var(--naranja); }
.topbar-tel svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow .25s;
}
.header.con-sombra { box-shadow: var(--sombra); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 96px;
}

.brand { display: flex; align-items: center; gap: 1.1rem; }
.brand img { width: auto; height: 64px; }
.brand-separador {
  width: 1px;
  height: 44px;
  background: var(--borde);
  flex: none;
}
.brand-bestdrive { height: 39px !important; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-weight: 600;
}

.nav > a:not(.nav-cta) {
  position: relative;
  padding: .35em 0;
  transition: color .2s;
}
.nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2.5px;
  border-radius: 2px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.nav > a:not(.nav-cta):hover { color: var(--rojo); }
.nav > a:not(.nav-cta):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--borde);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.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); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .78em 1.55em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-rojo {
  background: var(--rojo);
  color: #fff;
  box-shadow: 0 6px 18px rgba(224, 17, 28, .3);
}
.btn-rojo:hover { background: var(--rojo-osc); box-shadow: 0 10px 24px rgba(224, 17, 28, .35); }

.btn-verde {
  background: var(--verde-osc);
  color: #fff;
  box-shadow: 0 6px 18px rgba(12, 143, 67, .28);
}
.btn-verde:hover { background: #0A7A39; box-shadow: 0 10px 24px rgba(12, 143, 67, .33); }

.btn-naranja {
  background: var(--naranja);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(249, 165, 26, .35);
}
.btn-naranja:hover { filter: brightness(.93); }

.nav-cta { font-size: .95rem; padding: .65em 1.3em; }

/* ---------- Etiquetas y utilidades ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .45em 1em;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.badge svg { width: 14px; height: 14px; fill: currentColor; }
.badge-naranja { background: var(--naranja-suave); color: var(--naranja-osc); }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: .8rem;
}
.eyebrow-naranja { color: var(--naranja-osc); }

.marca-rojo { color: var(--rojo); }
.marca-naranja { color: var(--naranja); }

.checks {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.checks li {
  position: relative;
  padding-left: 2rem;
  font-weight: 500;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: .12em;
  width: 1.35em; height: 1.35em;
  border-radius: 50%;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/62% no-repeat;
}
.checks-naranja li::before { background-color: var(--naranja); }

.enlace {
  color: var(--rojo);
  font-weight: 600;
  transition: color .2s;
}
.enlace:hover { color: var(--rojo-osc); text-decoration: underline; }

.enlace-grande {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  transition: color .2s;
}
.enlace-grande:hover { color: var(--rojo); }

.mini { font-size: .92rem; color: var(--texto); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 8% 10%, var(--rojo-suave) 0%, transparent 55%),
    var(--blanco);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--texto);
  max-width: 34em;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.1rem;
}

/* Composición visual del hero */
.hero-visual {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swoosh {
  position: absolute;
  top: -14%;
  right: -22%;
  width: 120%;
  height: 128%;
  z-index: 0;
}

.logo-card {
  position: relative;
  z-index: 1;
  width: min(92%, 520px);
  transform: rotate(-2deg);
}
.logo-card img {
  filter: drop-shadow(0 20px 34px rgba(20, 20, 25, .28));
}

.chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  background: var(--blanco);
  border-radius: 999px;
  box-shadow: var(--sombra);
  padding: .55em 1.05em;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  animation: flotar 5.5s ease-in-out infinite alternate;
}
.chip svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.chip-1 { top: 7%; left: 2%; color: var(--rojo); }
.chip-2 { bottom: 12%; right: 0; color: var(--verde-osc); animation-delay: 1.4s; }
.chip-3 { bottom: 2%; left: 12%; color: var(--naranja-osc); animation-delay: 2.6s; }

@keyframes flotar {
  from { transform: translateY(-6px); }
  to   { transform: translateY(8px); }
}

/* ---------- Franja de confianza ---------- */
.franja {
  border-block: 1px solid var(--borde);
  background: var(--blanco);
}

.franja-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-block: 1.6rem;
}

.franja-item {
  display: flex;
  align-items: center;
  gap: .9rem;
}
.franja-item svg {
  width: 34px; height: 34px;
  flex: none;
  fill: none;
  stroke: var(--rojo);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.franja-item svg .tick { stroke: var(--verde-osc); stroke-width: 2.2; }
.franja-item p { margin: 0; display: grid; line-height: 1.35; }
.franja-item strong { font-weight: 700; }
.franja-item span { font-size: .88rem; color: var(--texto); }

/* ---------- Secciones ---------- */
.seccion { padding-block: clamp(3.5rem, 8vw, 6rem); }
.seccion-gris { background: var(--fondo-gris); }

.seccion-cabecera {
  max-width: 640px;
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}
.seccion-cabecera p { color: var(--texto); font-size: 1.08rem; margin: 0; }

/* ---------- Servicios ---------- */
.grid-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1.4rem;
}

.tarjeta {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.7rem 1.5rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra);
  border-color: transparent;
}
.tarjeta h3 { margin-bottom: .4em; }
.tarjeta p { margin: 0; color: var(--texto); font-size: .97rem; }

.tarjeta-icono {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.tarjeta-icono svg {
  width: 27px; height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icono-rojo    { background: var(--rojo-suave);    color: var(--rojo); }
.icono-verde   { background: var(--verde-suave);   color: var(--verde-osc); }
.icono-naranja { background: var(--naranja-suave); color: var(--naranja-osc); }

/* ---------- Neumáticos ---------- */
.neumaticos-inner {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.foto-marco {
  position: relative;
  width: min(100%, 400px);
  margin-inline: auto;
}
.foto-marco::before {
  content: "";
  position: absolute;
  inset: 22px -16px -16px 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--rojo), var(--naranja));
  opacity: .9;
}
.foto-marco img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--sombra-alta);
}

.neumaticos-texto p { color: var(--texto); max-width: 36em; }

.marcas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.marca-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: .9em 1.95em;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 18px;
  transition: transform .2s, box-shadow .2s;
}
.marca-logo:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra);
}
.marca-logo img {
  height: 42px;
  width: auto;
  max-width: 165px;
  object-fit: contain;
}
.marca-logo-barum img {
  height: 84px;
  max-width: 200px;
}

/* ---------- Galería del taller ---------- */
.galeria {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}

.galeria figure {
  margin: 0;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.galeria figure:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
}

.galeria img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.galeria figcaption {
  padding: 1rem 1.15rem 1.2rem;
}

.galeria-titulo {
  display: flex;
  align-items: center;
  gap: .55em;
  font-size: .98rem;
  font-weight: 700;
  margin: 0 0 .35em;
}
.galeria-titulo::before {
  content: "";
  flex: none;
  width: .55em; height: .55em;
  border-radius: 50%;
  background: var(--verde);
}

.galeria-texto {
  margin: 0;
  font-size: .87rem;
  color: var(--texto);
  line-height: 1.5;
}

/* ---------- BestDrive ---------- */
.bestdrive-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.bestdrive-texto p { color: var(--texto); max-width: 38em; }
.bestdrive-texto .checks { margin-bottom: 0; }

.bestdrive-card {
  background: linear-gradient(135deg, #FFB43A, #F7941D);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3rem);
  color: #fff;
  box-shadow: 0 20px 45px rgba(249, 165, 26, .35);
  text-align: center;
}

.bd-logo { display: grid; gap: .1rem; }
.bd-nombre {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.bd-sub {
  font-size: 1rem;
  font-weight: 600;
  opacity: .95;
}
.bd-linea {
  height: 3px;
  width: 72px;
  background: #fff;
  border-radius: 3px;
  margin: 1.4rem auto;
  opacity: .85;
}
.bd-frase {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  opacity: .97;
}

/* ---------- Contacto ---------- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: stretch;
}

.contacto-info {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.dato { display: flex; gap: 1rem; }
.dato h3 { margin-bottom: .25em; }
.dato p { margin: 0 0 .3em; color: var(--texto); }

.dato-icono {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.dato-icono svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contacto-botones {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  padding-top: .4rem;
  border-top: 1px solid var(--borde);
}

.contacto-mapa {
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  min-height: 420px;
}
.contacto-mapa iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* ---------- Pie ---------- */
.footer {
  background: #161719;
  color: #C9CCD1;
  font-size: .95rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.footer-logo {
  width: auto;
  height: 52px;
  background: var(--blanco);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 1rem;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: .9em;
}

.footer-col nav { display: grid; gap: .45rem; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--naranja); }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 1.1rem;
  font-size: .85rem;
  color: #8B8F95;
}
.footer-legal p { margin: 0; }

/* ---------- Botón flotante WhatsApp ---------- */
.fab-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--verde-osc);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(12, 143, 67, .45);
  transition: transform .2s, background-color .2s;
}
.fab-whatsapp:hover { transform: scale(1.08); background: #0A7A39; }
.fab-whatsapp svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Barra fija móvil ---------- */
.barra-movil {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  background: var(--blanco);
  border-top: 1px solid var(--borde);
  box-shadow: 0 -6px 20px rgba(20, 20, 25, .08);
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.barra-movil a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: .55rem 0 .6rem;
  font-size: .74rem;
  font-weight: 700;
}
.barra-movil svg { width: 21px; height: 21px; fill: currentColor; }
.barra-movil a:nth-child(1) { color: var(--rojo); }
.barra-movil a:nth-child(2) { color: var(--verde-osc); }
.barra-movil a:nth-child(3) { color: var(--naranja-osc); }

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 400px; margin-top: .5rem; }
  .swoosh { right: -30%; width: 135%; }

  .bestdrive-inner,
  .neumaticos-inner { grid-template-columns: 1fr; }
  .neumaticos-visual { order: 2; }
  .foto-marco { width: min(80%, 340px); }

  .galeria { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanco);
    border-bottom: 1px solid var(--borde);
    box-shadow: var(--sombra);
    padding: .6rem 1.2rem 1.2rem;
    display: none;
  }
  .nav.abierto { display: flex; }
  .nav > a:not(.nav-cta) { padding: .8em 0; border-bottom: 1px solid var(--borde); }
  .nav > a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin-top: 1rem; justify-content: center; }
  .nav-toggle { display: flex; }

  .franja-inner { grid-template-columns: 1fr 1fr; gap: 1.2rem; }

  .contacto-grid { grid-template-columns: 1fr; }
  .contacto-mapa { min-height: 340px; }

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

@media (max-width: 767px) {
  .fab-whatsapp { display: none; }
  .barra-movil { display: grid; }
  body { padding-bottom: 64px; }

  .topbar-inner { justify-content: center; }
  .topbar-tel { display: none; }
}

@media (max-width: 620px) {
  .hero-visual { min-height: 330px; }
  .logo-card { width: min(100%, 440px); }
  .chip-1 { top: 0; left: 0; }
  .chip-2 { bottom: 6%; right: 0; }
  .chip-3 { display: none; }

  .franja-inner { grid-template-columns: 1fr; gap: 1rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .galeria { grid-template-columns: 1fr; }
}

/* ---------- Accesibilidad: reducir movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .tarjeta:hover, .fab-whatsapp:hover { transform: none; }
}
