/* RESET */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: 80px;
}

/* 🔝 HEADER */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 30px;
  box-sizing: border-box;

  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
}

.slogan {
  color: white;
  font-size: 14px;
  margin: 0;
  letter-spacing: 0.5px;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
}

nav a:hover {
  text-decoration: underline;
}

/* 🖼️ HERO BASE */
.hero {
  position: relative;
  height: 400px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: flex-start;   /* 🔥 arriba */
  justify-content: flex-start; /* 🔥 izquierda */

  padding: 80px 60px; /* 🔥 separación del borde */
}

/* 🎯 IMÁGENES POR PÁGINA */
.hero-home {
  background-image: url("img/fondop.jpg");
}

.hero-services {
  background-image: url("img/fondo2.jpg");
}

.hero-projects {
  background-image: url("img/FondoProyecto.jpg");
}

.hero-contact {
  background-image: url("img/FondoContact.jpg");
}

.hero-about {
  background-image: url("img/FondoAbout.jpg");
}


/* TEXTO HERO */
.contenido {
  max-width: 500px;
  color: white;
}

.servicios {
  font-size: 14px;
  letter-spacing: 1px;
}

.descripcion {
  font-size: 18px;
  margin: 10px 0;
}

/* BOTÓN */
.btn {
  display: inline-block;
  background: #0072ff;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.btn:hover {
  background: #0056cc;
}

/* 🧱 SECCIONES */
.servicios, .proyectos, .contacto {
  padding: 60px;
  text-align: center;
}

/* 🧾 TITULOS */
.servicios h2,
.proyectos h2,
.contacto h2 {
  font-size: 32px;
  margin-bottom: 30px;
}

/* CARDS */
.cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 10px;
  min-width: 200px;
}

/* 🖼️ GALERÍA */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.galeria img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.about {
  padding: 60px;
  max-width: 800px;
  margin: auto;
  text-align: center;
}

.about h2 {
  font-size: 32px;
  margin-bottom: 30px;
}

.about p {
  font-size: 17px;
  margin-bottom: 20px;
  line-height: 1.6;
  color: #333;
}

.about-features {
  margin-top: 20px;
  font-weight: bold;
}

.contact-box {
  background: white;
  padding: 40px;
  max-width: 500px;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-box h3 {
  margin-bottom: 10px;
}

.contact-box p {
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.cta {
  background: #0072ff;
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.cta h2 {
  margin-bottom: 20px;
}

.hero h2,
.servicios,
.descripcion {
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 10px;
  border-radius: 5px;
}

.slogan {
  font-size: 14px;
}

.why {
  padding: 60px 20px;
  background: #f8f9fb;
  text-align: center;
}

.why h2 {
  font-size: 32px;
  margin-bottom: 40px;
}

.why-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: auto;
}

.why-box {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: left;
  font-size: 15px;

  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.why-box:hover {
  transform: translateY(-5px);
  transition: 0.3s;
}

.servicios h2,
.contacto h2 {
  text-align: center;
}

.servicios,
.contacto {
  text-align: center;
}

.servicios,
.contacto {
  text-align: center;
}

.cards {
  display: flex;
  justify-content: center; /* 🔥 centra las tarjetas */
  gap: 20px;
}

.servicios h2,
.contacto h2 {
  margin-bottom: 30px;
}

h2 {
  text-align: center;
}

p {
  text-align: center;
}

.btn {
  display: inline-block;
  margin: 20px auto;
}

.contacto {
  text-align: center;
}

.btn {
  display: block;
  width: fit-content;
  margin: 20px auto;
}

header {
  display: flex;
  justify-content: space-between; /* logo izquierda / menú derecha */
  align-items: center;
  padding: 15px 30px;

  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;

  background: rgba(0,0,0,0.7);
}

/* LOGO */
.logo {
  height: 60px;
  object-fit: contain;
}


nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: #0072ff;
  left: 0;
  bottom: -5px;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}


.btn {
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.05);
}


header {
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


.card {
  background: linear-gradient(135deg, #f5f7fa, #e4ecf7);
  padding: 25px;
  border-radius: 10px;
  max-width: 300px;

  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-align: left;

  transition: 0.3s;
}


.card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.card p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}


.card {
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.galeria img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;

  transition: transform 0.3s ease; /* 🔥 animación suave */
}

.galeria img:hover {
  transform: scale(1.05); /* 🔥 zoom pequeño */
}


.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

/* CONTENEDOR */
.img-box {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

/* IMAGEN */
.img-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* TEXTO (OCULTO) */
.img-box span {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);

  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 5px;

  opacity: 0;
  transition: opacity 0.3s ease;
}

/* HOVER */
.img-box:hover img {
  transform: scale(1.05);
}

.img-box:hover span {
  opacity: 1;
}

.img-box span {
  font-size: 13px;
  letter-spacing: 1px;
}


.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  margin-bottom: 15px;
}

.servicios {
  background: white;
}

.hero input {
  display: none;
}

.hero h1,
.hero p {
  background: rgba(0,0,0,0.6);
  padding: 15px;
  border-radius: 10px;
  display: inline-block;
}

header {
  background: linear-gradient(90deg, #0057cc, #ff8c1a);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1100px;
  margin: auto;
}

/* centra las últimas 2 */
.card:nth-child(4) {
  grid-column: 1 / 2;
  justify-self: end;
}

.card:nth-child(5) {
  grid-column: 3 / 4;
  justify-self: start;
}


.promo {
  grid-column: 2 / 3; /* 🔥 centro */
  text-align: center;
}


.promo {
  background: linear-gradient(135deg, #0072ff, #ff7b00);
  color: white;
  padding: 30px;
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.promo p {
  margin-bottom: 15px;
}

.promo .btn {
  background: white;
  color: #0072ff;
  padding: 10px;
  border-radius: 5px;
  text-decoration: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1100px;
  margin: auto;
}

.promo {
  transform: scale(1.05);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* 🔥 FORZAR POSICIONES */
.card:nth-child(1) { grid-column: 1; grid-row: 1; }
.card:nth-child(2) { grid-column: 2; grid-row: 1; }
.card:nth-child(3) { grid-column: 3; grid-row: 1; }

.card:nth-child(4) { grid-column: 1; grid-row: 2; }

/* 🔥 PROMO AL CENTRO */
.promo {
  grid-column: 2;
  grid-row: 2;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1100px;
  margin: auto;
}


@media (max-width: 768px) {
  
  /* HEADER */
  header {
    flex-direction: column;
    align-items: center;
  }

  nav {
    margin-top: 10px;
  }

  /* HERO TEXTO */
  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

  /* SERVICIOS (CARDS) */
  .cards {
    grid-template-columns: 1fr; /* 🔥 una columna */
  }

  /* GALERÍA */
  .galeria {
    grid-template-columns: 1fr;
  }

  /* IMÁGENES */
  .card img {
    height: 200px;
  }

  /* TEXTO GENERAL */
  h2 {
    font-size: 24px;
  }

}


@media (max-width: 768px) {
  .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {

  /* HEADER */
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
  }

  /* LOGO */
  .logo {
    height: 50px;
  }

  /* HERO (BANNER) */
  .hero {
    height: auto;
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

  /* SECCIONES */
  section {
    padding: 40px 20px;
  }

  /* TITULOS */
  h2 {
    font-size: 24px;
  }

  /* CARDS (SERVICES) */
  .cards {
    grid-template-columns: 1fr;
  }

  .card {
    max-width: 100%;
  }

  /* GALERIA */
  .galeria {
    grid-template-columns: 1fr;
  }

  /* IMAGENES */
  .card img,
  .galeria img {
    height: 200px;
  }

  /* BOTONES */
  .btn {
    width: 100%;
    text-align: center;
  }

  /* ABOUT TEXTO */
  .about {
    text-align: center;
  }

}
