@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
:root {
  --primary-color: #a50000;
  --light-color: #fff;
  --light-color-hover: #ffbbbb;
  --dark-color: #000;
  --gray: #8d8d8d;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
ul,
li {
  list-style: none;
}
a {
  text-decoration: none;
}
svg {
  width: 16px;
  height: 16px;
  fill: var(--light-color);
}

header {
  top: 0;
  z-index: 10;
  display: flex;
  width: 100%;
  position: fixed;
  align-items: center;
  justify-content: space-between;
  background-color: var(--primary-color);
  color: var(--light-color);
  font-weight: 600;
  a {
    color: var(--light-color);
  }
}
header #logo {
  background-color: var(--light-color);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
header #logo img {
  width: 100px;
  height: 100px;
  padding: 0.5rem;
}
header button {
  background: transparent;
  border: none;
  display: flex;
  justify-content: end;
  padding: 1.5rem;
}
header button svg {
  width: 30px;
  height: 30px;
}
header ul li a:hover {
  color: var(--light-color-hover);
}
header .menu {
  height: 100svh;
  position: absolute;
  top: 100px;
  right: 0;
  width: 0%;
  display: flex;
  flex-direction: column;
  transition: 0.1s ease;
  visibility: hidden;
  a {
    color: transparent;
  }
}
header .menu_desplegable {
  visibility: visible;
  width: fit-content;
  height: 100svh;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 1.5rem;
  top: 100px;
  right: 0;
  padding: 1rem;
  background-color: var(--primary-color);
  z-index: 100;
  li a {
    color: var(--light-color);
    display: flex;
    justify-content: end;
  }
}
header .menu_desplegable .reparaciones_desplegable,
.menu_desplegable .servicios_desplegable {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 1rem;
  padding-top: 1rem;
  padding-right: 1.5rem;
}
main {
  margin-top: 100px;
}
#carousel {
  background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 20%,
      rgba(0, 0, 0, 0.8) 80%
    ),
    url(../img/wallapop.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-color);
}
#carousel button:first-child {
  position: absolute;
  bottom: 0;
  right: 50%;
}
#carousel button:last-child {
  position: absolute;
  bottom: 0;
  left: 50%;
}
#carousel div {
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  color: var(--light-color);
}
#carousel div h1 {
  font-size: 3rem;
}
#carousel div a {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  transition: 0.2s ease;
}
#carousel div a:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}
#carousel button {
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 100%;
  padding: 0.7rem;
  margin: 1.5rem;
  transition: 0.2s ease;
}
main #prestaciones {
  background-color: var(--gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}
main #prestaciones div {
  background-color: var(--light-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-wrap: pretty;
  gap: 2rem;
  border-radius: 1rem;
  padding: 2rem;
}
main #prestaciones div img {
  width: 100px;
}
main #reparacion_movil {
  padding: 1rem;
}
main #reparacion_movil h2 {
  font-weight: 500;
  color: var(--primary-color);
}
main #reparacion_movil div img {
  width: 350px;
}
.contenedor-beneficios {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 4rem 2rem;
}
.reparacion_confiable {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.reparacion_confiable img {
  width: 100%;
  border-radius: 1rem;
}
/* Estilo base de las tarjetas */
.card {
  padding: 1.5rem 1rem;
  border-radius: 8px;
  text-align: center;
  color: white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Iconos */
.card .icono {
  width: 200px;
  height: auto;
  margin-bottom: 1rem;
}

/* Títulos */
.card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

/* Textos */
.card p {
  font-size: 1rem;
  line-height: 1.5;
}
/* Tarjetas rojas */
.card.rojo {
  background-color: #b70000;
}

/* Tarjetas oscuras */
.card.oscuro {
  background-color: #0b0f14;
}

footer {
  background-color: var(--primary-color);
  color: var(--light-color);
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}
footer a {
  color: var(--light-color);
}
footer a:hover {
  text-decoration: underline;
}
footer div {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
footer div .redes_sociales {
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}
footer div .redes_sociales a svg {
  width: 24px;
  height: 24px;
}
footer div span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
footer div .copyright {
  border-top: 1px solid var(--light-color);
  display: flex;
  align-items: center;
}

/* Media query para ordenador */
@media screen and (min-width: 768px) {
  header #logo {
    width: 25%;
  }
  header button {
    display: none;
  }
  header .menu {
    visibility: visible;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    position: relative;
    width: fit-content;
    height: fit-content;
    top: 0;
    right: 0;
    padding-right: 4rem;
    a {
      color: var(--light-color);
    }
  }
  header .menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  header .menu .reparaciones_desplegable {
    position: absolute;
    top: 60px;
    background-color: var(--primary-color);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    width: 305px;
    gap: 1rem;
    visibility: hidden;
  }
  header .menu .servicios_desplegable {
    position: absolute;
    top: 60px;
    background-color: var(--primary-color);
    padding: 1rem;
    visibility: hidden;
  }
  main #carousel div {
    max-width: 50%;
  }
  main #carousel button:hover {
    transform: scale(1.2);
  }
  main #carousel button:first-child {
    position: absolute;
    bottom: 50%;
    right: auto;
    left: 0;
  }
  main #carousel button:last-child {
    position: absolute;
    bottom: 50%;
    left: auto;
    right: 0;
  }
  main #prestaciones {
    height: 80vh;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    justify-content: center;
  }
  main #prestaciones div {
    min-height: 400px;
    max-width: 33%;
    text-wrap: pretty;
  }
  main #prestaciones div img {
    width: 80px;
  }
  main #reparacion_movil {
    height: 80vh;
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
  main #reparacion_movil div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
  }
  main #reparacion_movil div img {
    width: 500px;
  }
  main #reparacion_movil h2 {
    text-wrap: pretty;
    font-size: 52px;
  }
  .beneficios {
    padding: 2rem;
    background-color: #ffffff;
  }
  .reparacion_confiable {
    padding: 2rem;
    display: flex;
    flex-direction: row;
    gap: 2rem;
  }
  .reparacion_confiable h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
  }
  .reparacion_confiable .imagen img {
    width: 750px;
    border-radius: 1rem;
  }
  /* Grid de las tarjetas */
  .contenedor-beneficios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 4rem 2rem;
  }

  /* Estilo base de las tarjetas */
  .card {
    padding: 2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    color: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  }

  /* Iconos */
  .card .icono {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
  }

  /* Títulos */
  .card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: bold;
  }

  /* Textos */
  .card p {
    font-size: 1rem;
    line-height: 1.5;
  }
  footer {
    padding: 2rem 4rem 0rem 4rem;
    background-color: var(--primary-color);
    color: var(--light-color);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  footer div {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 2.5rem;
    font-size: 14px;
  }
  footer div h2 {
    font-size: 16px;
  }
  footer div p,
  a {
    color: var(--light-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  footer div a:hover {
    text-decoration: underline;
  }
  footer div .redes_sociales {
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
  footer div .redes_sociales a svg {
    width: 24px;
    height: 24px;
  }
  footer div .copyright {
    border-top: 1px solid var(--light-color);
    align-items: center;
    grid-column: span 3;
  }
}
