/* =========================================================
   INICIO · Estructura general
   ========================================================= */

.home {
  overflow-x: clip;
  background-color: var(--gris-claro);
}

.home-hero__inner,
.home-categories,
.home-vehicles {
  width: min(1120px, 90%);
  margin: 0 auto;
}

/* =========================================================
   HERO PRINCIPAL
   ========================================================= */

.home-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(76px, 9vw, 132px) 0;
  background-color: var(--azul-oscuro);
  color: var(--blanco);
}

/* Círculos decorativos del fondo */
.home-hero::after {
  position: absolute;
  z-index: -1;
  right: -140px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(22, 131, 255, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgba(22, 131, 255, 0.05),
    0 0 0 92px rgba(22, 131, 255, 0.035);
  content: "";
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
}

.home-hero__eyebrow,
.home-section__eyebrow {
  margin: 0 0 14px;
  color: var(--azul-brillante);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: clamp(50px, 7vw, 88px);
  line-height: 0.9;
}

.home-hero__description {
  max-width: 520px;
  margin: 0 0 32px;
  color: rgba(242, 245, 248, 0.78);
  font-size: 20px;
  line-height: 1.65;
}

/* Buscador del hero */
.vehicle-search {
  display: flex;
  max-width: 620px;
}

.vehicle-search input {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid transparent;
  background-color: var(--blanco);
  color: var(--gris-grafito);
  font: inherit;
  outline: none;
}

.vehicle-search input:focus {
  border-color: var(--azul-brillante);
}

.vehicle-search button {
  padding: 16px 28px;
  border: 0;
  background-color: var(--azul-brillante);
  color: var(--blanco);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background-color 0.25s ease;
}

.vehicle-search button:hover {
  background-color: var(--azul-principal);
}

/* Panel decorativo del hero */
.home-hero__visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.015)
  );
  box-shadow: 18px 18px 0 rgba(22, 131, 255, 0.16);
}

/* Marca decorativa grande */
.home-hero__visual::before {
  position: absolute;
  top: -36px;
  right: -20px;
  color: rgba(22, 131, 255, 0.13);
  content: "SR";
  font-family: "Barlow Condensed", sans-serif;
  font-size: 230px;
  font-weight: 700;
  line-height: 1;
}

/* Círculos internos del panel */
.home-hero__visual::after {
  position: absolute;
  top: 44px;
  left: 36px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px rgba(255, 255, 255, 0.025),
    0 0 0 48px rgba(255, 255, 255, 0.02);
  content: "";
}

.home-hero__visual-mark {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 2;
  color: var(--azul-brillante);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* Botón principal dentro del panel decorativo */
.home-hero__visual-button {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--azul-brillante);
  background-color: var(--azul-principal);
  color: var(--blanco);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.home-hero__visual-button span {
  font-size: 25px;
  transition: transform 0.25s ease;
}

.home-hero__visual-button:hover {
  border-color: var(--blanco);
  background-color: var(--azul-brillante);
  transform: translateY(-3px);
}

.home-hero__visual-button:hover span {
  transform: translateX(5px);
}

/* =========================================================
   SECCIONES DEL INICIO
   ========================================================= */

.home-categories,
.home-vehicles {
  padding: clamp(72px, 8vw, 112px) 0;
}

.home-categories {
  padding-bottom: 58px;
  border-bottom: 1px solid #dce2e8;
}

.home-vehicles {
  padding-top: 58px;
}

.home-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.home-section__header h2 {
  margin: 0;
  color: var(--azul-oscuro);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 0.95;
}

.home-section__intro {
  max-width: 300px;
  margin: 0;
  color: var(--gris-grafito);
  font-size: 14px;
  line-height: 1.6;
}

.home-section__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--azul-principal);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.home-section__link span {
  color: var(--azul-brillante);
  font-size: 20px;
  transition: transform 0.25s ease;
}

.home-section__link:hover span {
  transform: translateX(4px);
}

/* =========================================================
   TARJETAS DE CATEGORÍAS
   ========================================================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.category-card {
  position: relative;
  min-height: 132px;
  height: 132px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background-color: var(--azul-oscuro);
  color: var(--blanco);
  text-decoration: none;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease;
}

.category-card::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: "";
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.category-card:hover {
  background-color: var(--azul-principal);
  transform: translateY(-6px);
}

.category-card:hover::after {
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.2);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 0.95;
}

.category-card__body > span {
  font-size: 12px;
  font-weight: 600;
}

.category-card__body b {
  margin-left: 6px;
  font-size: 17px;
}

/* =========================================================
   VEHÍCULOS DESTACADOS
   ========================================================= */

.home-vehicles .vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-vehicles__empty {
  padding: 40px;
  background-color: var(--blanco);
  color: var(--gris-grafito);
  text-align: center;
}

/* Accesibilidad */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   RESPONSIVE · TABLET
   ========================================================= */

@media (max-width: 900px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
  }

  .home-hero__visual {
    max-width: 560px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-vehicles .vehicle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   RESPONSIVE · MOBILE
   ========================================================= */

@media (max-width: 600px) {
  .home-hero {
    padding: 68px 0 76px;
  }

  .home-hero__inner {
    gap: 56px;
  }

  .home-hero h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .vehicle-search {
    flex-direction: column;
    gap: 10px;
  }

  .vehicle-search input,
  .vehicle-search button {
    width: 100%;
  }

  .home-hero__visual {
    min-height: 250px;
    padding: 24px;
    box-shadow: 10px 10px 0 rgba(22, 131, 255, 0.16);
  }

  .home-hero__visual-mark {
    top: 22px;
    left: 22px;
  }

  .home-hero__visual-button {
    font-size: 19px;
  }

  .home-categories {
    padding-bottom: 42px;
  }

  .home-vehicles {
    padding-top: 42px;
  }

  .home-section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .home-section__header--vehicles {
    flex-direction: row;
    align-items: flex-end;
  }

  .category-grid,
  .home-vehicles .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 118px;
    height: 118px;
  }
}

@media (max-width: 430px) {
  .home-section__header--vehicles {
    flex-direction: column;
    align-items: flex-start;
  }
}
