/* ==========================================================================
   Hugo Auto Sales — layout.css
   Header, navegación, footer, botón flotante y bloques estructurales.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--negro);
  color: #b6b9bd;
  font-size: 0.82rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
  padding-block: 6px;
}

.topbar__datos {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--t);
}

.topbar__item i {
  color: var(--rojo);
  font-size: 1.15em;
}

a.topbar__item:hover {
  color: var(--blanco);
}

.topbar__redes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar__red {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.05rem;
  transition: background var(--t), color var(--t);
}

.topbar__red:hover {
  background: var(--rojo);
  color: var(--blanco);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--blanco);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow var(--t), padding var(--t);
}

.header.is-fijo {
  box-shadow: var(--sombra-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  transition: min-height var(--t);
}

.header.is-fijo .header__inner {
  min-height: 68px;
}

.logo img {
  height: 46px;
  width: auto;
  transition: height var(--t);
}

.header.is-fijo .logo img {
  height: 38px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav__link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--negro);
  padding-block: 6px;
  transition: color var(--t);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--rojo);
  transition: width var(--t);
}

.nav__link:hover,
.nav__link.is-activo {
  color: var(--rojo);
}

.nav__link:hover::after,
.nav__link.is-activo::after {
  width: 100%;
}

.header__acciones {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburguesa {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  border-radius: var(--radio-sm);
  border: 1px solid var(--borde);
  padding: 0 12px;
}

.hamburguesa span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--negro);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

.hamburguesa.is-activo span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburguesa.is-activo span:nth-child(2) {
  opacity: 0;
}

.hamburguesa.is-activo span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Panel móvil */
.nav-movil {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(330px, 86vw);
  background: var(--negro);
  color: var(--blanco);
  padding: 28px 26px 40px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.nav-movil.is-abierto {
  transform: translateX(0);
}

.nav-movil__cerrar {
  align-self: flex-end;
  font-size: 1.8rem;
  color: var(--blanco);
  line-height: 1;
  margin-bottom: 10px;
}

.nav-movil__link {
  font-family: var(--font-title);
  font-size: 1.55rem;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid var(--borde-osc);
  transition: color var(--t), padding-left var(--t);
}

.nav-movil__link:hover,
.nav-movil__link.is-activo {
  color: var(--rojo);
  padding-left: 8px;
}

.nav-movil__pie {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.9rem;
  color: #a8abb0;
}

.nav-movil__pie a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-movil__pie i {
  color: var(--rojo);
  font-size: 1.2em;
}

.velo {
  position: fixed;
  inset: 0;
  background: rgba(17, 19, 21, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
  z-index: 250;
}

.velo.is-visible {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   Encabezado de página interna
   -------------------------------------------------------------------------- */

.page-head {
  position: relative;
  padding: clamp(60px, 8vw, 110px) 0;
  background: var(--negro);
  color: var(--blanco);
  overflow: hidden;
}

.page-head__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.28;
}

.page-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(17, 19, 21, 0.95) 30%, rgba(17, 19, 21, 0.5) 100%);
}

.page-head .contenedor {
  position: relative;
  z-index: 2;
}

.page-head h1 {
  margin-bottom: 12px;
}

.miga {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #a8abb0;
}

.miga a:hover {
  color: var(--rojo);
}

.miga i {
  font-size: 1em;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--negro);
  color: #a8abb0;
  padding-top: clamp(56px, 7vw, 88px);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 44px;
  padding-bottom: 56px;
}

.footer__logo {
  background: var(--blanco);
  border-radius: var(--radio-sm);
  padding: 12px 16px;
  display: inline-block;
  margin-bottom: 20px;
}

.footer__logo img {
  height: 42px;
}

.footer p {
  color: #a8abb0;
  font-size: 0.94rem;
}

.footer h4 {
  color: var(--blanco);
  font-size: 1.25rem;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.footer__lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.94rem;
}

.footer__lista a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color var(--t), gap var(--t);
}

.footer__lista a:hover {
  color: var(--rojo);
  gap: 14px;
}

.footer__contacto li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 0.94rem;
}

.footer__contacto i {
  color: var(--rojo);
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer__contacto a:hover {
  color: var(--blanco);
}

.footer__horario li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--borde-osc);
  font-size: 0.9rem;
}

.footer__horario span:last-child {
  color: var(--blanco);
  font-weight: 500;
}

.footer__horario .cerrado {
  color: var(--rojo);
}

.footer__redes {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer__red {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--borde-osc);
  font-size: 1.25rem;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}

.footer__red:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--blanco);
  transform: translateY(-3px);
}

/* Acceso discreto al panel administrativo */
.footer__admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 14px;
  padding: 3px 11px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  opacity: 0.6;
  transition: opacity var(--t), border-color var(--t), color var(--t);
}

.footer__admin:hover {
  opacity: 1;
  color: var(--rojo);
  border-color: var(--rojo);
}

.footer__base {
  border-top: 1px solid var(--borde-osc);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Botón flotante de WhatsApp
   -------------------------------------------------------------------------- */

.wa-flotante {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 190;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 100px;
  background: #25d366;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.4);
  transition: transform var(--t), background var(--t);
}

.wa-flotante i {
  font-size: 1.55rem;
}

.wa-flotante:hover {
  transform: translateY(-3px) scale(1.02);
  background: #1eb355;
}

.wa-flotante::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: pulso 2.4s ease-out infinite;
}

@keyframes pulso {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .nav {
    gap: 24px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 992px) {
  .nav,
  .header__acciones .btn {
    display: none;
  }

  .hamburguesa {
    display: flex;
  }

  .topbar__datos .topbar__item--horario {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar__inner {
    justify-content: center;
  }

  .topbar__datos {
    gap: 16px;
    justify-content: center;
  }

  .topbar__redes {
    display: none;
  }

  .topbar__item span {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .contenedor {
    padding-inline: 18px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer__base {
    justify-content: center;
    text-align: center;
  }

  .wa-flotante {
    right: 16px;
    bottom: 16px;
    padding: 14px;
  }

  .wa-flotante span {
    display: none;
  }

  .topbar__item--direccion {
    display: none;
  }
}
