/* ======== ESTILOS GENERALES ======== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { overflow-x: hidden; }
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #f5f6fa;
  color: #333;
}

h1, h2, h3 { margin: 0; }

a {
  text-decoration: none;
  color: inherit;
}

.contenedor {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ======== CABECERA ======== */
.cabecera {
  background-color: #003366;
  color: white;
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.cabecera .contenedor {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

.cabecera h1 {
  font-size: 1.8rem;
  letter-spacing: 1px;
}

/* ======== MENÚ DESKTOP ======== */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: white;
  font-weight: 500;
  transition: 0.3s;
}

nav ul li a:hover {
  color: #ffd700;
}

/* ======== BOTÓN LLAMADA ======== */
.boton-llamada {
  background-color: #ffd700;
  color: #003366;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 20px;
  display: inline-block;
  transition: 0.3s;
}

.boton-llamada:hover {
  background-color: #ffcf40;
}

/* ======== MENÚ HAMBURGUESA ======== */
.hamburguesa {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
}

.hamburguesa span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Oculta en escritorio */
@media (min-width: 901px) {
  .hamburguesa {
    display: none !important;
  }
}

/* ======== HERO ======== */
.hero {
  background: url('../img/hero-desatascos.jpg') center/cover no-repeat;
  height: 80vh;
  position: relative;
  margin-top: 80px;
}

.hero .overlay {
  background-color: rgba(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 20px;
}

.texto-hero h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-align: center;
  margin-top: 10%;
}

.texto-hero p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.boton-principal {
  background-color: #ffd700;
  color: #003366;
  padding: 12px 25px;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.3s;
}

.boton-principal:hover {
  background-color: #ffcf40;
}

/* ======== HERO RESPONSIVE ======== */
@media (max-width: 768px) {
  .hero {
    height: auto;
    padding-top: 0;
    padding-bottom: 60px;
  }

  .texto-hero {
    padding: 0 20px;
  }

  .texto-hero h2 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .texto-hero p {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  .boton-principal {
    padding: 10px 25px;
    font-size: 1rem;
  }
}

/* ======== SERVICIOS ======== */
.servicios {
  padding: 80px 0;
  background-color: #fff;
  text-align: center;
}

.servicios h2 {
  margin-bottom: 40px;
  color: #003366;
}

.grid-servicios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  justify-items: center;
}

@media (max-width: 768px) {
  .grid-servicios {
    grid-template-columns: 1fr;
  }
}

.tarjeta-servicio, .card-servicio {
  background-color: #f9fafc;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-servicio:hover, .card-servicio:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.tarjeta-servicio img, .card-servicio img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.contenido-servicio, .contenido-card {
  padding: 25px;
}

.contenido-servicio h3, .contenido-card h3 {
  color: #003366;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.contenido-servicio p, .contenido-card p {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}

/* ======== QUIÉNES SOMOS ======== */
.quienes-somos {
  background-color: #f0f4f8;
  padding: 60px 20px;
  text-align: center;
}

.quienes-somos h2 {
  color: #003366;
  margin-bottom: 20px;
}

.quienes-somos p {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ======== HISTORIA ======== */
.historia {
  background-color: #fff;
  padding: 60px 20px;
}

.historia-contenido {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.historia-texto h2 {
  color: #003366;
  margin-bottom: 15px;
}

.historia-texto p {
  line-height: 1.7;
  margin: 12px 0;
}

.historia-imagen img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
  .historia-contenido {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* ======== NUESTROS VALORES ======== */
.valores {
  background: linear-gradient(180deg, #ffffff 0%, #eaf3ff 100%);
  padding: 60px 20px;
  text-align: center;
}

.valores h2 {
  color: #003366;
  margin-bottom: 40px;
}

.grid-valores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.valor {
  background-color: #f5f6fa;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.valor:hover {
  transform: translateY(-6px);
  background-color: #eaf3ff;
}

.valor h3 {
  color: #003366;
  margin-bottom: 10px;
}

/* ======== CONTACTO (MEJORADO) ======== */
.contacto {
  padding: 100px 20px 80px;
  background-color: #fff;
}

.contacto .contenedor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.contacto h2 {
  text-align: center;
  color: #003366;
  margin-bottom: 50px;
  grid-column: 1 / -1;
}

/* ======== FORMULARIO ======== */
.formulario {
  display: flex;
  flex-direction: column;
  background-color: #f7f9fc;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.formulario label {
  font-weight: 600;
  color: #003366;
  margin-bottom: 5px;
}

.formulario input,
.formulario textarea {
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background-color: white;
  transition: 0.3s;
}

.formulario input:focus,
.formulario textarea:focus {
  border-color: #003366;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

.formulario textarea {
  min-height: 120px;
  resize: none;
}

.formulario button {
  background-color: #003366;
  color: #ffd700;
  border: none;
  cursor: pointer;
  padding: 12px 25px;
  border-radius: 10px;
  font-weight: bold;
  align-self: flex-end;
  transition: 0.3s;
}

.formulario button:hover {
  background-color: #00264d;
}

/* ======== INFORMACIÓN DE CONTACTO ======== */
.info-contacto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f7f9fc;
  padding: 30px 35px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.info-contacto h3 {
  color: #003366;
  margin-bottom: 15px;
}

.info-contacto p {
  margin: 6px 0;
  line-height: 1.5;
}

.info-contacto strong {
  color: #003366;
}

.info-contacto a {
  color: #003366;
  font-weight: 600;
  text-decoration: underline;
}

.info-contacto a:hover {
  color: #001f4d;
}

/* ======== MAPA ======== */
.mapa {
  margin-top: 25px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 900px) {
  .contacto .contenedor {
    grid-template-columns: 1fr;
  }

  .formulario {
    padding: 25px;
  }

  .info-contacto {
    margin-top: 25px;
    padding: 25px;
  }

  .mapa iframe {
    width: 100%;
  }
}

/* ======== CTA ======== */
.cta {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

/* ======== FOOTER ======== */
.footer {
  background-color: #001f3f;
  color: #ddd;
  text-align: center;
  padding: 25px 10px;
  font-size: 0.9rem;
}

.footer a {
  color: #ffd700;
  transition: 0.3s;
}

.footer a:hover {
  color: #ffcf40;
}

/* ======== WHATSAPP ======== */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25D366;
  color: white;
  font-size: 1.8rem;
  padding: 14px 18px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.whatsapp-float:hover {
  background-color: #20b958;
  transform: scale(1.1);
}

/* ======== FIX FINAL MENÚ HAMBURGUESA ======== */
@media (max-width: 900px) {
  nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 38, 77, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 1200;
  }

  nav.activo {
    transform: translateX(0);
  }

  nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
  }

  nav ul li a {
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
  }

  nav ul li a:hover {
    color: #ffd700;
  }

  .cabecera nav .boton-llamada {
    background-color: #ffd700;
    color: #003366;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 25px;
    text-align: center;
    display: block;
    width: 70%;
  }

  .hamburguesa {
    display: flex !important;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1301;
    cursor: pointer;
  }

  .hamburguesa span {
    background: white;
    height: 3px;
    width: 28px;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburguesa.activo span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  .hamburguesa.activo span:nth-child(2) {
    opacity: 0;
  }
  .hamburguesa.activo span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
}
