
/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Tipografía y fondo */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #f9f8f3;
  color: #333;
  line-height: 1.4;
}

/* Header */
header {
  background-color: #d9d8c9;
  text-align: center;
  padding: 40px 20px;
}
header .logo {
  width: 120px;
  max-width: 28%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 80px;
  display: inline-block;
  object-fit: cover;
}
header h1 {
  font-size: 24px;
  margin-bottom: 10px;
}
header p {
  font-size: 24px;
  color: #555;
}

/* Main (contenedor principal) */
main {}

/* Sección servicio: dos columnas */
.servicio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 10%;
  border-bottom: 1px solid #ddd;
  flex-wrap: nowrap;
}

/* Invertido en desktop si se necesita */
.servicio.invertido {
  flex-direction: row-reverse;
}

/* Contenedor de imagen */
.img-wrap {
  flex: 0 0 40%;
  max-width: 40%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  background: #fff;
}

/* Imagen responsiva */
.img-wrap img,
.servicio > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

/* Texto */
.texto {
  flex: 1 1 55%;
  min-width: 240px;
  text-align: left;
}
.texto h2 {
  font-size: 32px;
  color: #5a6b5a;
  margin-bottom: 8px;
}
.texto p {
  font-size: 18px;
  color: #555;
  margin-bottom: 15px;
}

/* Botón */
.boton {
  display: inline-block;
  padding: 10px 20px;
  background-color: #5a6b5a;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s, transform 0.12s;
}
.boton:hover {
  background-color: #08ee6f;
  transform: translateY(-2px);
}

/* Footer */
footer {
  background-color: #d9d8c9;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #555;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin: 0;
}

/* Responsive: reducir proporcionalmente sin reordenar */

/* Pantallas medianas */
@media (max-width: 1100px) {
  .servicio {
    padding: 32px 6%;
    gap: 18px;
  }
  .img-wrap {
    flex: 0 0 36%;
    max-width: 36%;
  }
  .texto {
    flex: 1 1 64%;
    min-width: 220px;
  }
  .img-wrap img {
    max-height: 360px;
  }
  header p {
    font-size: 20px;
  }
  .texto h2 {
    font-size: 28px;
  }
}

/* Pantallas pequeñas: mantener fila y encoger proporcionalmente */
@media (max-width: 760px) {
  header {
    padding: 28px 14px;
  }
  header h1 {
    font-size: 20px;
  }
  header p {
    font-size: 16px;
  }

  .servicio,
  .servicio.invertido {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
    padding: 20px 6%;
  }

  .img-wrap {
    flex: 0 0 32%;
    max-width: 32%;
    max-height: 260px;
  }
  .img-wrap img {
    max-height: 260px;
    object-fit: cover;
  }

  .texto {
    flex: 1 1 68%;
    min-width: 160px;
  }
  .texto h2 {
    font-size: 22px;
  }
  .texto p {
    font-size: 15px;
  }
  .boton {
    padding: 8px 16px;
    font-size: 15px;
  }
}

/* Pantallas muy estrechas: apilar para legibilidad */
@media (max-width: 420px) {
  .servicio,
  .servicio.invertido {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 5%;
    gap: 14px;
  }

  .img-wrap {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    max-height: none;
  }
  .img-wrap img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .texto {
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
  }
  .texto h2 {
    font-size: 20px;
  }
  .texto p {
    font-size: 14px;
  }
  .boton {
    padding: 8px 14px;
    font-size: 14px;
  }
}

/* Ajustes para móviles muy pequeños */
@media (max-width: 360px) {
  header h1 {
    font-size: 18px;
  }
  header p {
    font-size: 13px;
  }
  .logo {
    width: 80px;
  }
  .texto h2 {
    font-size: 18px;
  }
  .texto p {
    font-size: 13px;
  }
}
