/* ======= RESET BÁSICO ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  position: relative;
}

main, 
section:first-of-type {
  margin-top: calc(150px + 2rem); /* espacio dinámico bajo el header */
}

/* En móviles, el header suele ser más alto */
@media (max-width: 768px) {
  main, 
  section:first-of-type {
    margin-top: calc(180px + 1rem);
  }
}

/* ======= WHATSAPP FLOAT ======= */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: transform 0.2s ease;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* ======= HEADER ======= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: #000;
  color: #fff;
  z-index: 1000;
  flex-wrap: wrap;
}

.logo img {
  height: 50px;
  width: auto;
}

header .logo h1 {
  font-size: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #f39c12;
}

.social a {
  margin-left: 0.5rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
}

.social img {
  width: 34px;
  height: auto;
  margin-left: 10px;
  transition: transform 0.2s ease;
}

.social img:hover {
  transform: scale(1.2);
}

/* ======= GALERÍA PRINCIPAL (4 EN FILA) ======= */
.galeria-principal {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 fotos por fila */
  gap: 1rem;
  padding: 2rem;
  margin-top: 130px; /* ajusta según te guste */
}

.galeria-principal .foto {
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 450px; /* puedes ajustar la altura */
}

.galeria-principal .foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsivo */
@media (max-width: 992px) {
  .galeria-principal {
    grid-template-columns: repeat(2, 1fr); /* 2 fotos por fila en tablet */
  }
}

@media (max-width: 600px) {
  .galeria-principal {
    grid-template-columns: 1fr; /* 1 por fila en celular */
  }
}


/* ======= SERVICIOS ======= */
.servicios {
  text-align: center;
  padding: 2rem 1rem;
}

.servicios h2 {
  margin-bottom: 1rem;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.servicio {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  background: #f9f9f9;
}

.servicio img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 1rem;
}

/* ======= MÁS DE NUESTRO TRABAJO ======= */
.trabajo {
  padding: 2rem 1rem;
  text-align: center;
}

.titulo-trabajo {
  text-align: center;
  margin-bottom: 2rem;
}

.trabajo-widgets {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .trabajo-widgets {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ======= SOBRE NOSOTROS ======= */
.sobre {
  padding: 2rem 1rem;
  text-align: center;
}

.mision-vision {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.mision-vision div {
  flex: 1;
  min-width: 250px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.mision-vision h3 {
  margin-bottom: 1rem;
  color: #f39c12;
}

/* ======= CONTACTO ======= */
.contacto {
  text-align: center;
  padding: 2rem 1rem;
  background: #f4f4f4;
}

.contacto form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 400px;
  margin: auto;
  width: 100%;
}

.contacto input {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contacto button {
  padding: 0.8rem;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ======= FOOTER ======= */
footer {
  text-align: center;
  padding: 1rem;
  background: #000;
  color: #fff;
}

footer .ubicacion {
  margin-top: 1rem;
}

/* ======= MEDIA QUERIES ======= */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .mision-vision {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  #map {
    width: 100%;
    height: 200px;
  }
}
