/* Reset general */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;  /* evita scroll horizontal */
}

body {
  background: #fff;
  color: #000;
  font-family: 'Arial', sans-serif;
  line-height: 1.5;
}

/* ================= HEADER Y NAVBAR ================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header .logo img {
  height: 100px;   
  width: auto;
  display: block;
  filter: none;
}

header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;          
  justify-content: center;  
  gap: 30px;                
  padding: 0;
}

header nav a {
  color: #002c80;
  text-decoration: none;
  font-size: 22px;
  transition: 0.3s;
}

header nav a:hover {
  opacity: 0.7;
}

header nav a.activo {
  border-bottom: 3px solid #002c80;
  padding-bottom: 5px;
  background-color: transparent;
  border-radius: 0;
}

header nav a.contacto {
  color: #fff;
  background-color: #002c80;
  padding: 8px 16px;
  border-radius: 20px;
}

/* ================= HERO ================= */
.hero-servicios {
  position: relative;
  height: 40vh;          
  min-height: 220px;     
  background: url('../images/servicios.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
  padding: 0;
  color: #fff;
}

.hero-contenido {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(32, 28, 76, 0.8);
  backdrop-filter: blur(5px);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  color: #fff;
  padding-left: 5%;
  text-align: left;
}

.hero-contenido h1 {
  font-size: 3.5em;
  margin-bottom: 10px;
  color: white;
  text-shadow: 3px 3px 6px rgb(250, 246, 246);
  position: relative;
  display: inline-block;
  z-index: 1;
}
.hero-contenido h1::after {
  content: "";
  display: block;
  width: 250px;
  height: 5px;
  background: #fff;
  margin-top: 8px;
  border-radius: 2px;
}
.hero-contenido h1::before {
  content: "";
  position: absolute;
  top: 0;
  height: 150px;
  left: -25px;
  width: 5px;
  background: #fff;
  border-radius: 3px;
  opacity: 0.9;
  z-index: 0;
}

.hero-contenido p {
  font-size: 1.1em;
  padding-left: 8%;
  line-height: 1.4;
  max-width: 380px;
  word-wrap: break-word;
}

/* ================= SECCIÓN SERVICIOS ================= */
.seccion-servicios {
  width: 100%;
  min-height: 90vh;      /* ocupa casi toda la pantalla para crecer */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
}

.servicios-grid {
  width: 100%;
  display: flex;
  justify-content: center;
}

.servicio-item {
  width: 100%;
  max-width: 1400px;     /* limita tamaño máximo en pantallas grandes */
}

.servicio-item img {
  width: 100%;
  height: auto;
  object-fit: contain;   /* muestra toda la imagen sin recortarla */
  display: block;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
  }

  header .logo img {
    height: 80px;
  }

  header nav ul {
    gap: 15px;
  }

  header nav a {
    font-size: 16px;
  }

  header nav a.contacto {
    font-size: 14px;
    padding: 6px 12px;
  }

  .hero-servicios {
    height: 30vh;     
    min-height: 180px;
  }

  .hero-contenido h1 {
    font-size: 2em;
  }

  .hero-contenido h1::before {
    height: 100px;
    left: -15px;
  }

  .hero-contenido p {
    font-size: 0.95em;
    padding-left: 5%;
    max-width: 280px;
  }

  .servicio-item img {
    max-width: 100%;
    height: auto;
  }
}
