/* 🔄 Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🧱 Estilo general */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* 📝 Enlaces */
a {
  color: #0077b6;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* 🔷 Navegación */
nav {
  background-color: #004e89;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  position: sticky; /* no fijo, se queda arriba al hacer scroll */
  top: 0;
  z-index: 1000;
}

.nav-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav .logo {
  font-size: 1.5em;
  font-weight: bold;
}

nav .menu {
  list-style: none;
  gap: 20px;
}

nav .menu li a {
  color: white;
  font-weight: 500;
}

nav .menu li a:hover {
  color: #90e0ef;
}

.menu-toggle {
  display: none;
  font-size: 2em;
  cursor: pointer;
  color: white;
  z-index: 1001;
}

/* 🏠 Hero */
.hero {
  position: relative;
  padding: 100px 20px;
  text-align: center;
  color: white;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
              url("img/camion-fondo.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

.hero-camion,
.hero-quienes {
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
              url("img/camion-fondo.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

.hero-text {
  max-width: 800px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2em;
}

.hero .cta {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: white;
  color: #0077b6;
  font-weight: bold;
  border-radius: 5px;
}

.hero .cta:hover {
  background: #caf0f8;
}

/* 📦 Servicios */
.servicios {
  padding: 40px 20px;
  text-align: center;
}

.servicios h2 {
  font-size: 2em;
  margin-bottom: 20px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: 250px;
  text-align: center;
  display: block;
  color: inherit;
}

.card:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #0077b6;
}

.card p {
  font-size: 0.95em;
}

/* 📞 Footer */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9em;
}

/* 📬 Formulario */
.formulario {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.formulario label {
  font-weight: bold;
}

.formulario input,
.formulario textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
}

.formulario button {
  padding: 12px;
  background-color: #0077b6;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.formulario button:hover {
  background-color: #00b4d8;
}

/* 📲 WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.whatsapp-float img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* 🛠️ Animación */
main {
  animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 📚 Bloques */
.quienes {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.bloque {
  background: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bloque h2 {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #0077b6;
}

.bloque p,
.bloque ul {
  font-size: 1em;
  color: #333;
}

.bloque ul {
  list-style: none;
  padding-left: 0;
}

.bloque ul li::before {
  content: "✔️ ";
  margin-right: 8px;
}

.cta-container {
  text-align: center;
  margin-top: 40px;
}

.cta-container .cta {
  padding: 12px 24px;
  background: #0077b6;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.cta-container .cta:hover {
  background: #00b4d8;
}

/* —————— SECCIÓN MATERIALES 100% RESPONSIVE —————— */
/* Contenedor general */
.materiales {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Grilla: 3 columnas en desktop, 2 en tablet, 1 en móvil */
.grid-materiales {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Tarjeta */
.item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;         /* ocupa todo el ancho de su columna */
}

/* Imagen: se escala con la tarjeta, mantiene proporción y no excede altura */
.item img {
  width: 100%;         /* siempre al ancho del .item */
  height: auto;        /* proporción natural */
  max-height: 180px;   /* como tope para desktop */
  object-fit: contain; /* no recorta */
  border: 1px solid #ddd;
  padding: 5px;
  background: #f9f9f9;
  border-radius: 5px;
}

/* Títulos y textos */
.item h3 {
  margin-top: 15px;
  font-size: 1.1em;
  color: #0077b6;
}
.item p {
  font-size: 0.9em;
  margin-top: 10px;
  color: #555;
}

/* Ajustes de columnas según ancho */
@media (max-width: 992px) {
  .grid-materiales {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-materiales {
    grid-template-columns: 1fr;
  }
  
  /* Opcional: si quieres que la imagen no supere X px en móvil, ajusta max-height */
  .item img {
    max-height: 150px;
  }
}
/* —————— MENÚ RESPONSIVE —————— */
/* Oculta el toggle en desktop y muestra el menú en línea */
@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  nav .menu {
    display: flex;
    gap: 20px;
  }
}

/* En móviles: muestra el toggle y esconde el menú */
/* 🖥️ Mostrar menú en escritorio */
@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  nav .menu {
    display: flex;
    gap: 20px;
  }

  nav .menu li a {
    color: white;
    font-weight: 500;
    text-decoration: none;
  }

  nav .menu li a:hover {
    color: #90e0ef;
  }
}

/* 📱 En móviles: muestra el toggle y esconde el menú */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    font-size: 2em;
    cursor: pointer;
    color: white;
    background: none;
    border: none;
    z-index: 1001;
  }

  nav .menu {
    display: none;
    flex-direction: column;
    background-color: #004e89;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    z-index: 1000;
  }

  nav .menu.active {
    display: flex;
  }

  nav .menu li {
    margin-bottom: 10px;
  }

  nav .menu li a {
    font-size: 1.1em;
    color: white;
    text-decoration: none;
  }

  /* 👇 Asegura que el contenido esté por debajo del menú */
  main,
  header,
  section {
    position: relative;
    z-index: 1;
  }
}

  .hero {
    padding: 60px 15px;
    background-attachment: scroll;
  }

  .hero-text h1 {
    font-size: 1.8em;
  }

  .hero-text p {
    font-size: 1.1em;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full {
    grid-column: span 1;
  }
}

/* 📱 Extra pequeño */
@media (max-width: 480px) {
  .card {
    width: 100%;
  }

  .hero h1 {
    font-size: 1.6em;
  }

  .hero p {
    font-size: 1em;
  }

  .bloque {
    padding: 20px;
  }

  .bloque h2 {
    font-size: 1.4em;
  }
}
/* ——— Validación de formulario ——— */
input:invalid,
textarea:invalid {
  border: 1px solid #e63946;
}

input:valid,
textarea:valid {
  border: 1px solid #2a9d8f;
}

#form-errors {
  color: #e63946;
  margin-bottom: 15px;
}
/* 🖥️ Mostrar menú en escritorio */
@media (min-width: 769px) {
  nav .menu {
    display: flex;
    gap: 20px;
  }

  .menu-toggle {
    display: none;
  }
}







