/* index.css — Estilos exclusivos de la página de inicio (index.php). Se carga después de includes/css/styles.css. */

.hero {
  max-width: 1320px;
  margin: 54px auto 50px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  height: 530px;
}
.finder {
  border: 1px solid #777;
  border-radius: 20px;
  padding: 15px 22px 0;
  overflow: hidden;
  position: relative;
  background: white;
}
.finder-title {
  width: 100%;
  height: 99px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}
.tabs {
  display: flex;
  gap: 8px;
}
.tabs button {
  padding: 4px 8px;
  flex: 1;
  border-radius: 24px;
  background: var(--blue);
  color: white;
  font-size: 17px;
  white-space: nowrap;
}
.tabs button[aria-selected="false"] {
  opacity: 0.9;
}
.tabs button[aria-selected="true"] {
  box-shadow: inset 0 -3px 0 #526baa;
}
.finder > p {
  font-size: 11px;
  text-align: center;
  margin: 14px -4px;
  color: #333;
  line-height: 1.4;
}
#finder-form select {
  appearance: none;
  text-align: center;
  display: block;
  border: 1px solid #666;
  border-radius: 24px;
  height: 32px;
  width: 100%;
  margin-bottom: 7px;
  background: white;
  color: #4d4d4d;
  font-size: 14px;
  padding: 0 15px;
  cursor: pointer;
}
#finder-form .red-button {
  height: 32px;
  padding: 0;
  width: 100%;
  font-size: 17px;
}
.finder-tire {
  position: absolute;
  bottom: 0;
  left: 18px;
  width: calc(100% - 36px);
}
.promotions {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: #e9f1f6;
}
.slide {
  width: 100%;
  height: 100%;
  display: block;
}
.slide[hidden] {
  display: none;
}
.summer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slider-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 20px;
}
.slider-controls button {
  background: #ed0035;
  opacity: 0.55;
  width: 62px;
  height: 5px;
  padding: 0;
  position: relative;
}
.slider-controls button:after {
  content: "";
  position: absolute;
  inset: -12px 0;
}
.slider-controls button[aria-pressed="true"] {
  opacity: 1;
}
.services {
  position: relative;
  background: var(--blue);
  color: white;
  min-height: 752px;
  overflow: hidden;
}
.service-photo {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  background: url("assets/workshop.webp") center/cover no-repeat;
}
.service-content {
  position: relative;
  width: 65.5%;
  min-height: 752px;
  padding: 36px 4.3% 22px 5.1%;
  background: var(--blue);
  clip-path: polygon(0 0, 88.5% 0, 100% 100%, 0 100%);
}
.eyebrow {
  font-size: 35px;
}
.service-content h2 {
  font-size: 76px;
  line-height: 0.94;
  color: var(--red);
  margin: 10px 0 8px;
  letter-spacing: -1px;
}
.service-intro {
  font-size: 20px;
  line-height: 1.9;
  color: #e1e5ef;
}
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px 30px;
  margin: 28px 0 30px -10px;
  max-width: 850px;
}
.service-grid article {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-height: 92px;
}
.service-grid h3 {
  color: var(--red);
  font-size: 35px;
  line-height: 1.15;
}
.service-grid p {
  color: #e1e5ef;
  font-size: 16px;
  line-height: 1.7;
}
.icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.availability {
  font-size: 16px;
  text-align: right;
  color: #FFDA00;
  margin-right: -28px;
  margin-top: 8px;
}
.section-pad {
  padding: 66px max(5.1%, calc((100% - 1350px) / 2));
}
.brands {
  text-align: center;
}
.brands h2,
.closing h2 {
  font-size: 44px;
  line-height: 1.05;
  margin: 12px 0 14px;
}
.brands > p {
  color: #606778;
}
.brand-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 45px;
  flex-wrap: wrap;
}
.brand-row span {
  font: italic 800 27px var(--heading);
  color: var(--blue);
}
.closing {
  padding: 58px max(5.1%, calc((100% - 1350px) / 2));
  background: #f3f5fa;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  border-top: 1px solid #e0e4ef;
}
.closing p {
  font-size: 16px;
  line-height: 1.9;
  color: #535d72;
  margin-bottom: 24px;
  max-width: 570px;
}

/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (min-width: 1550px) {
  .service-content {
    padding-left: max(5.1%, calc((100vw - 1350px) / 2));
  }
  .services {
    max-height: 850px;
  }
}

/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 1350px) and (min-width: 901px) {
  .hero {
    margin: 45px 6% 42px;
    grid-template-columns: 23.5% 1fr;
    height: 36vw;
    gap: 1.7vw;
  }
  .finder {
    padding: 12px 16px 0;
  }
  .finder-title {
    height: 6.6vw;
    margin-bottom: 5px;
  }
  .tabs button {
    font-size: 13px;
  }
  .finder > p {
    font-size: 10px;
    margin: 10px -7px;
  }
  #finder-form select {
    height: 28px;
    font-size: 12px;
    margin-bottom: 5px;
  }
  #finder-form .red-button {
    height: 28px;
    font-size: 14px;
  }
  .finder-tire {
    width: calc(100% - 28px);
    left: 14px;
  }
  .services,
  .service-content {
    min-height: 50vw;
  }
  .service-content {
    padding-top: 2.5vw;
  }
  .eyebrow {
    font-size: 2.3vw;
  }
  .service-content h2 {
    font-size: 5.05vw;
  }
  .service-intro {
    font-size: 1.33vw;
  }
  .service-grid {
    gap: 2.8vw 2vw;
    margin-top: 1.8vw;
    margin-bottom: 1.5vw;
  }
  .service-grid article {
    gap: 1vw;
    min-height: 6vw;
  }
  .service-grid h3 {
    font-size: 2.32vw;
  }
  .service-grid p {
    font-size: 1.1vw;
  }
  .icon {
    width: 4.8vw;
    height: 4.8vw;
  }
  .availability {
    font-size: 1.08vw;
  }
}

/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 900px) {
  .hero {
    margin: 25px 5% 30px;
    display: flex;
    flex-direction: column-reverse;
    gap: 20px;
    height: auto;
  }
  .promotions {
    aspect-ratio: 976/528;
    border-radius: 13px;
  }
  .finder {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 12px 22px;
    min-height: 270px;
  }
  .finder-title {
    height: auto;
    width: 100%;
    max-width: 220px;
    grid-row: 1/3;
    align-self: center;
  }
  .tabs {
    grid-column: 2;
  }
  .tabs button {
    font-size: 14px;
    padding: 8px;
  }
  .finder > p {
    grid-column: 2;
    margin: 0;
    font-size: 11px;
  }
  #finder-form {
    grid-column: 2;
  }
  .finder-tire {
    display: none;
  }
  #finder-form select {
    height: 35px;
    font-size: 14px;
  }
  #finder-form .red-button {
    height: 36px;
    font-size: 15px;
  }
  .services {
    min-height: 0;
    display: flex;
    flex-direction: column-reverse;
  }
  .service-photo {
    position: relative;
    height: 360px;
    width: 100%;
    background-position: center 70%;
  }
  .service-content {
    width: 100%;
    clip-path: none;
    padding: 35px 6%;
    min-height: 0;
  }
  .eyebrow {
    font-size: 25px;
  }
  .service-content h2 {
    font-size: 54px;
  }
  .service-intro {
    font-size: 16px;
    line-height: 1.7;
  }
  .service-grid {
    gap: 25px 20px;
    margin: 28px 0;
  }
  .service-grid article {
    gap: 12px;
    min-height: 85px;
  }
  .service-grid h3 {
    font-size: 28px;
  }
  .service-grid p {
    font-size: 14px;
  }
  .icon {
    width: 53px;
    height: 58px;
  }
  .availability {
    font-size: 12px;
    text-align: left;
    margin: 0;
  }
  .section-pad {
    padding: 42px 6%;
  }
  .brands h2,
  .closing h2 {
    font-size: 36px;
  }
  .brand-row {
    justify-content: center;
    gap: 25px 35px;
  }
  .closing {
    padding: 38px 6%;
    gap: 35px;
    grid-template-columns: 1fr;
  }
  .slider-controls {
    bottom: 12px;
  }
  .desktop {
    display: none;
  }
}

/* ADAPTACIÓN DE PANTALLA O PREFERENCIAS */
@media (max-width: 480px) {
  .finder {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .finder-title {
    grid-row: auto;
    width: 225px;
    margin: auto;
  }
  .tabs,
  .finder > p,
  #finder-form {
    grid-column: 1;
  }
  .finder > p {
    font-size: 12px;
  }
  .finder {
    gap: 12px;
  }
  #size-fields,
  #vehicle-fields {
    display: flex;
    gap: 6px;
  }
  #vehicle-fields[hidden],
  #size-fields[hidden] {
    display: none;
  }
  #finder-form select {
    min-width: 0;
    font-size: 13px;
  }
  .promotions {
    margin: 0 -1%;
  }
  .service-content h2 {
    font-size: 44px;
  }
  .service-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .service-grid article {
    min-height: 70px;
  }
  .service-grid h3 {
    font-size: 29px;
  }
  .service-grid p {
    font-size: 15px;
  }
  .service-photo {
    height: 270px;
  }
  .brands h2 {
    font-size: 33px;
  }
  .brand-row span {
    font-size: 23px;
  }
  .slider-controls {
    bottom: 8px;
  }
  .slider-controls button {
    width: 40px;
  }
}
