body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.pre-header {
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  font-size: 1.1rem;
}
.pre-header a,
#contacto a {
  text-decoration: none;
  color: black;
}
.contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.contact-info a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.contact-info a:hover,
.info a:hover {
  opacity: 0.8;
}
header {
  padding: 1rem 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  font-size: 1.25rem;
}
header h1 {
  margin: 0;
  font-size: 24px;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  justify-content: end;
  margin: 0;
  padding: 0;
}
nav ul li a {
  color: black;
  text-decoration: none;
}
nav ul li a:hover {
  text-decoration: underline;
}
.banner {
  position: relative;
  width: 100%;
  height: 500px;
  background: url("../img/placas-solares.webp") no-repeat center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
}
.description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.description p {
  font-size: 36px;
  font-weight: bolder;
  padding: 1rem;
  max-width: 70ch;
}
.about {
  display: flex;
  gap: 2rem;
  height: 420px;
}
.about img {
  width: 50%;
  height: 100%;
  object-fit: cover;
}
.about .text {
  width: 50%;
  box-sizing: border-box;
  max-width: 65ch;
}
h2 {
  font-size: 1.5rem;
  margin-top: 0rem;
  margin-bottom: 1rem;
}
.about p {
	font-size: 16px;
	line-height: 1.25;
}

#servicios,
#contacto {
  background-color: #f5f5f5;
}

#servicios .container,
#proyectos .container,
#contacto .container,
.about {
  padding: 2rem;
}
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 1rem;
}
.service {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}
.service h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.brand-logos {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
}
.brand-logos img {
  width: 200px;
  height: 100px;
}
.projects {
  display: grid;
  align-items: start;
  justify-content: start;
  grid-template-columns: repeat(
    auto-fill,
    minmax(350px, 1fr)
  ); /* Auto-responsive layout */
  gap: 1.5rem;
}
figure {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  transition: transform 0.3s ease;
  margin: 0;
}
figure:hover {
  transform: scale(1.05); /* Slight zoom effect on hover */
}
figure img {
  width: 100%;
  height: 500px; /* Fixed height for uniformity */
  transition: opacity 0.3s ease;
  border-radius: 0.5rem;
  aspect-ratio: 750 / 1000;
}
figure figcaption {
  position: absolute;
  bottom: 7px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 1.1rem;
  text-align: center;
  border-radius: 0 0 0.5rem 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  width: 100%;
}
figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}
#contacto .info {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 2rem;
}
.info span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.info a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 1rem 0;
}
footer a {
  color: white;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .pre-header {
    padding: 1rem;
    font-size: 1rem;
    flex-direction: column;
  }

  .pre-header span#horario {
    display: none;
  }

  .contact-info {
    gap: 1rem;
    flex-direction: column;
  }

  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    font-size: 1rem;
  }

  .banner {
    height: 400px;
  }

  .about {
    flex-direction: column;
    height: auto;
  }

  .about img,
  .about .text {
    width: 100%;
    height: auto;
  }

  .about .text {
    padding: 1rem;
  }

  .about h2 {
    font-size: 1.25rem;
  }

  .about p {
    font-size: 16px;
    line-height: 1.5;
  }

  .description p {
    font-size: 20px;
    font-weight: bolder;
    padding: 2rem;
  }

  #proyectos h2 {
    font-size: 1.5rem;
  }

  .projects {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .project img {
    height: 180px;
  }

  #contacto .info {
    flex-direction: column;
    gap: 1rem;
    align-items: start;
    justify-content: start;
  }

  #servicios .container,
  #proyectos .container,
  #contacto .container {
    padding: 1rem;
  }

  .about {
    padding: 1rem 0;
  }

  .brand-logos {
    gap: 1rem;
  }

  .brand-logos img {
    width: 120px;
    height: 80px;
  }

  .services {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  figure figcaption {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1280px) {
  .pre-header {
    padding: 0.5rem 5rem;
  }

  header {
    padding: 1rem 5rem;
  }

  #servicios .container,
  #proyectos .container,
  #contacto .container,
  .about {
    padding: 2rem 5rem;
  }

  .about p {
    font-size: 16px;
    line-height: 1.5;
  }

 }

@media (min-width: 1536px) {
  .projects {
    grid-template-columns: repeat(
      3,
      minmax(350px, 1fr)
    );
  }
 }

@media (min-width: 1800px) {
  #servicios .container,
  #proyectos .container,
  #contacto .container,
  .about {
    padding: 2rem 20rem;
  }

  .projects {
    grid-template-columns: repeat(
      3,
      minmax(350px, 1fr)
    );
    gap: 2.5rem;
  }

  .services, .about {
    gap: 5rem;
  }
 }
