/* Botones al estilo Brabus / Mansory. Se carga la última (después de motion.css).
   No cambia ningún color: usa los mismos de antes, solo cambia la forma y el movimiento.
   - Rectángulos limpios, más altos y anchos, mayúsculas muy espaciadas.
   - Esquina cortada en diagonal en los botones macizos.
   - Al pasar el ratón el color de relleno entra barriendo desde la izquierda
     (en vez de cambiar de golpe) y la flecha se alarga con una línea fina. */

:root { --btn-ease: cubic-bezier(.7, 0, .2, 1); --btn-cut: 12px; }

/* ------------------------------------------------------------ base común */
a.kicker.group:is(.min-h-11, .min-h-14),
.hero-cita,
.sv-btn,
header a.kicker.bg-accent {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  letter-spacing: .3em;
  font-size: .7rem;
  font-weight: 600;
  transition: color .45s var(--btn-ease) .08s, border-color .45s var(--btn-ease), translate .5s var(--ease-out-expo);
}
a.kicker.group:is(.min-h-11, .min-h-14),
.sv-btn { min-height: 3.5rem; padding-inline: 2.1rem; gap: 1rem; }
.hero-cita { min-height: 4rem; padding-inline: 2.5rem; font-size: .78rem; box-shadow: none; }
header a.kicker.bg-accent { padding-inline: 1.4rem; }

/* Capa de relleno que barre de izquierda a derecha (sustituye al brillo de motion.css) */
a.kicker.group:is(.min-h-11, .min-h-14)::after,
.hero-cita::after,
.sv-btn::after,
header a.kicker.bg-accent::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill, var(--color-bone));
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .6s var(--btn-ease);
  pointer-events: none;
}
@media (hover: hover) {
  a.kicker.group:is(.min-h-11, .min-h-14):hover::after,
  .hero-cita:hover::after,
  .sv-btn:hover::after,
  header a.kicker.bg-accent:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
}

/* ------------------------------------------------- macizo rojo (pedir cita) */
a.kicker.bg-accent.group,
.hero-cita,
.sv-btn-red,
header a.kicker.bg-accent {
  --btn-fill: var(--color-bone);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--btn-cut)), calc(100% - var(--btn-cut)) 100%, 0 100%);
  box-shadow: none;
}
header a.kicker.bg-accent { --btn-cut: 9px; }
.sv-btn-red { --btn-fill: #a50f16; }
@media (hover: hover) {
  a.kicker.bg-accent.group:hover,
  header a.kicker.bg-accent:hover,
  .hero-cita:hover { background-color: var(--color-accent); color: var(--color-ink); }
  .sv-btn-red:hover { background: var(--color-accent); }
}

/* -------------------------------------------------------- contorno fino */
a.kicker.group:is(.min-h-11, .min-h-14).border,
.sv-btn-line { --btn-fill: var(--color-accent); border-width: 1px; background: transparent; }
.sv-btn-line { --btn-fill: #fff; }
@media (hover: hover) {
  a.kicker.group:is(.min-h-11, .min-h-14).border:hover { background-color: transparent; }
  .sv-btn-line:hover { background: transparent; }
  section.isolate[aria-labelledby="coches-title"] a.kicker.group:is(.min-h-11, .min-h-14).border:hover { background-color: transparent; }
}
section.isolate[aria-labelledby="coches-title"] a.kicker.group:is(.min-h-11, .min-h-14).border { --btn-fill: #fff; }

/* Marcas de esquina en los de contorno (detalle tipo Brabus) */
a.kicker.group:is(.min-h-11, .min-h-14).border::before,
.sv-btn-line::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 10px 1px,
    linear-gradient(currentColor, currentColor) 0 0 / 1px 10px,
    linear-gradient(currentColor, currentColor) 100% 100% / 10px 1px,
    linear-gradient(currentColor, currentColor) 100% 100% / 1px 10px;
  background-repeat: no-repeat;
  transition: opacity .3s;
}
@media (hover: hover) {
  a.kicker.group:is(.min-h-11, .min-h-14).border:hover::before,
  .sv-btn-line:hover::before { opacity: 0; }
}

/* ---------------------------------------------- flecha con línea larga */
a.kicker.group:is(.min-h-11, .min-h-14) > span:has(+ svg)::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 2.2rem;
  height: 1px;
  margin: 0 -1.7rem -.1em 1.1rem;
  background: currentColor;
  transition: width .6s var(--btn-ease);
}
a.kicker.group:is(.min-h-11, .min-h-14) > span + svg { width: .9rem; height: .9rem; stroke-width: 1.5; }
a.kicker.group:is(.min-h-11, .min-h-14) > span + svg path { d: path("M13 6l6 6-6 6"); }
a.kicker.group:is(.min-h-11, .min-h-14):hover > span + svg { transform: none; }
@media (hover: hover) {
  a.kicker.group:is(.min-h-11, .min-h-14):hover > span:has(+ svg)::after { width: 3.4rem; }
}

/* Iconos (WhatsApp, teléfono) más finos y en línea con el texto */
.hero-cita svg, .sv-btn svg, header a.kicker.bg-accent svg { width: 1rem; height: 1rem; }

/* Botón cuadrado de llamar (móvil) */
header a.size-11.border { border-width: 1px; }

/* Foco de teclado visible y recto */
a.kicker.group:is(.min-h-11, .min-h-14):focus-visible,
.hero-cita:focus-visible,
.sv-btn:focus-visible,
header a.kicker.bg-accent:focus-visible { outline: 1px solid currentColor; outline-offset: -6px; }

@media (prefers-reduced-motion: reduce) {
  a.kicker.group:is(.min-h-11, .min-h-14)::after, .hero-cita::after, .sv-btn::after, header a.kicker.bg-accent::after,
  a.kicker.group:is(.min-h-11, .min-h-14) > span::after { transition: none; }
}

/* "Saltar al contenido": oculto hasta que se llega con el teclado
   (las reglas de arriba para los botones rojos de la cabecera lo dejaban visible) */
header a.sr-only:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
header a.sr-only:focus { position: absolute; top: .5rem; left: .5rem; z-index: 100; }

/* ------------------------------------------------------------------ móvil
   Botones a todo el ancho y alineados, sin textos partidos en dos líneas */
@media (max-width: 39.99rem) {
  a.kicker.group:is(.min-h-11, .min-h-14), .sv-btn { padding-inline: 1.1rem; letter-spacing: .2em; justify-content: center; }
  a.kicker.group:is(.min-h-11, .min-h-14) > span:has(+ svg)::after { width: 1.3rem; margin-left: .7rem; margin-right: -1rem; }

  /* Portada */
  .hero-cita { width: 100%; justify-content: center; padding-inline: 1rem; letter-spacing: .14em; font-size: .8rem; white-space: nowrap; }
  .hero-cita > span:has(+ svg)::after { display: none; }
  section[aria-labelledby="hero-title"] div.reveal.flex-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; margin-top: 1.75rem; }
  section[aria-labelledby="hero-title"] div.reveal.flex-wrap > a { min-height: 3.25rem; padding-inline: .6rem; gap: .5rem; letter-spacing: .18em; background: #0b0c0e59; backdrop-filter: blur(4px); }
  section[aria-labelledby="hero-title"] div.reveal.flex-wrap > a > span::after { display: none; }
  /* Velo más ligero para que se vean los coches */
  section[aria-labelledby="hero-title"] .bg-gradient-to-t { background-image: linear-gradient(to top, #0b0c0ec0, #0b0c0e4d 30%, #0b0c0e14 55%, #0b0c0e14 80%, #0b0c0e8c); }

  /* Páginas de servicio */
  .sv-ctas { display: grid; grid-template-columns: 1fr; }
  .sv-btn { width: 100%; }
  .sv-price { justify-self: stretch; min-width: 0; }
  .sv-tile { min-height: 0; flex-direction: row; align-items: center; gap: 1rem; padding: 1.1rem 3rem 1.1rem 1.1rem; }
  .sv-tile .sv-ico { flex-shrink: 0; width: 2.75rem; height: 2.75rem; padding: .6rem; }
  .sv-tile p { margin-top: 0; font-size: 1.05rem; }
  .sv-tile-n { top: 50%; right: 1.1rem; translate: 0 -50%; }

  /* Logos de renting (coches.html): dos por fila y más bajos */
  .renting-logos { grid-template-columns: 1fr 1fr; }
  .renting-logo { height: 5rem; padding: 1rem; }
  .renting-logo img { max-height: 2.2rem; }
  .renting-logo .renting-txt { font-size: 1rem; letter-spacing: .08em; }

  /* Mapa del pie: la etiqueta arriba para que no la tape el botón */
  footer a[href*="google.com/maps"] .bottom-5.left-4 { top: 1rem; bottom: auto; }
}

/* Flecha del botón "Pedir cita en el taller" (portada): una sola pieza, sin línea suelta */
a.kicker.group.hero-cita.min-h-14 > span:has(+ svg)::after { display: none; }
a.kicker.group.hero-cita.min-h-14 > span + svg { width: 1.35rem; height: 1.35rem; stroke-width: 1.75; margin-left: .15rem; transition: transform .5s var(--btn-ease); }
a.kicker.group.hero-cita.min-h-14 > span + svg path { d: path("M3 12h17M14 6l6 6-6 6"); }
@media (hover: hover) {
  a.kicker.group.hero-cita.min-h-14:hover > span + svg { transform: translateX(5px); }
}
