/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* VARIABLES DE COLOR */
:root {
  --azul-aspandem: #0055A4;
  --gris-claro: #f4f4f4;
  --gris-oscuro: #333333;
  --blanco: #ffffff;
}

/* TIPOGRAFÍA GLOBAL */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Merriweather Sans', sans-serif;
  background-color: var(--gris-claro);
  color: var(--gris-oscuro);
  line-height: 1.6;
  text-align: center;
}

h1, h2 {
  color: var(--azul-aspandem);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

/* LAYOUT GENERAL */
section {
  padding: 2rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  margin-bottom: 0.5rem;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ENCABEZADO */
.header {
  width: calc(100% - 2rem);
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.logo-full {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* NAVEGACIÓN PRINCIPAL */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  width: calc(100% - 2rem);
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0.8rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.main-nav ul {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
}

.main-nav li {
  flex: 1;
  position: relative;
  animation: fadeSlideIn 0.5s ease forwards;
}

.main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 0 0.8rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
  background-color: var(--azul-aspandem);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1;
}

/* SUBMENÚ EMERGENTE */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 100%;
  opacity: 0;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-10px);
}

.submenu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.submenu a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 500;
  background-color: var(--azul-aspandem);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  line-height: 1.2;
  word-break: break-word;
}

.submenu a:hover,
.submenu a:focus {
  background-color: #0066cc;
  color: #ffdd57;
}

/* ICONO DE FLECHA */
.arrow {
  display: inline-block;
  font-size: 0.7rem;
  margin-left: 0.3rem;
  transition: transform 0.3s ease;
}

#toggle-areas[aria-expanded="true"] > .arrow {
  transform: rotate(180deg);
}

/* MENÚ HAMBURGUESA */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--azul-aspandem);
  margin-bottom: 0.5rem;
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 1rem;
    display: none;
  }

  .main-nav ul.show {
    display: flex;
  }

  .main-nav li {
    width: 100%;
  }

  .submenu {
    position: relative;
    background-color: var(--azul-aspandem);
    margin: 0 0.5rem;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: none;
    transform: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    width: auto;
    z-index: 10000; /* ¡Este es el truco! */
  }

  .submenu.show {
    opacity: 1;
    max-height: 1000px;
    display: flex;
    flex-direction: column;
  }

  .submenu a {
    background-color: transparent;
    border: none;
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
  }

  .submenu a:hover {
    background-color: #0066cc;
    color: #ffdd57;
  }

  .dropdown {
    z-index: 10000;
  }
}

/* ANIMACIONES */
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* PIE DE PÁGINA */
footer {
  background-color: #001f3f;
  color: var(--blanco);
  padding: 1rem;
  margin-top: 2rem;
  text-align: center;
}

/* CARRUSEL */
#carrusel {
  margin-bottom: 2rem;
}

.carousel-inner img {
  max-height: 500px;
  object-fit: cover;
}

.carousel-caption {
  background-color: rgba(0, 51, 102, 0.6);
  padding: 1rem 2rem;
  border-radius: 8px;
}

.carousel-caption h5 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #ffffff;
}

.carousel-caption p {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 1rem;
}


@media (max-width: 768px) {
  .main-nav ul li .submenu.show li a {
    background-color: #004e91; /* usa el tono azul institucional si ya lo aplicas en otros botones */
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    margin: 5px 0;
  }

  .main-nav ul li .submenu.show li a:hover {
    background-color: #003b6d; /* azul más profundo al hacer hover */
  }
}

.contacto-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  transition: transform 0.2s ease-in-out;
}

.contacto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.contacto-card .card-img-top {
  object-fit: cover;
  height: 180px;
  width: 100%;
}

.contacto-card .card-body {
  margin-top: auto;
  padding: 1rem 0.75rem 1.25rem;
  background-color: #f1f3f5;
  border-top: 1px solid #dee2e6;
  font-family: 'Poppins', sans-serif;
}

.contacto-card .card-text {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.35rem;
}

.contacto-card .card-body a {
  color: #0056b3;
  text-decoration: none;
}

.contacto-card .card-body a:hover {
  text-decoration: underline;
}

.trabaja-nosotros-form {
  max-width: 700px;
  margin: auto;
}

.trabaja-nosotros-form {
  max-width: 900px;
  margin: auto;
}

.trabaja-nosotros-form h1,
.trabaja-nosotros-form p {
  text-align: center;
}

.trabaja-nosotros-form p {
  font-size: 1.1rem;
  line-height: 1.6;
}


.servicios {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.columna-texto {
  width: 50%;
  font-size: 1rem;
  line-height: 1.6;
}

.columna-fotos {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.marco-gris {
  background-color: #ccc;
  height: 250px; /* Ajusta la altura según la longitud del texto */
  margin-bottom: 20px;
  border: 1 px solid #999;
}

h2 {
  color: #2C3E50; /* Título principal */
}

h3 {
  color: #0077b6; /* Subtítulos en azul llamativo */
  margin-top: 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
}

h3 {
  color: #0077b6;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  font-size: 1.2rem;
}

hr {
  border: none;
  border-top: 2px solid #ccc;
  margin: 2rem 0 1rem;
}

h3 {
  color: #0077b6;
  font-size: 1.2rem;
  margin-top: 0;
}

hr {
  border: none;
  border-top: 2px solid #ccc;
  margin: 2rem 0 1rem;
}

/***** Estilos específicos solo para Área de Servicios *****/

.servicios h3 {
  color: var(--azul-aspandem);
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 0;
  border: none !important;
}

.servicios hr {
  border: none;
  border-top: 2px solid #ccc;
  margin: 2rem 0 1rem;
}

/* 🛠 Corrección para mantener altura visual consistente */
main {
  min-height: 700px; /* Aumenta si lo ves necesario */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.trabaja-form {
  background-color: white;
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-align: left;
}

.trabaja-form h2 {
  text-align: center;
  color: var(--azul-aspandem);
  margin-bottom: 1rem;
}

.trabaja-form p {
  text-align: center;
  margin-bottom: 2rem;
}

.trabaja-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trabaja-form input,
.trabaja-form textarea {
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: var(--gris-claro);
}

.trabaja-form button {
  padding: 1rem;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--azul-aspandem);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.trabaja-form button:hover {
  background-color: #0066cc;
}.formulario-trabaja {
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

.campo-formulario {
  margin-bottom: 15px;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

input,
textarea,
button {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

button {
  background-color: #2A5DB0;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #1e4a8a;
}



.mision {
  padding: 50px 0;
  background-color: #f2f2f2;
}

.contenido-mision {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto;
}

.imagen-mision {
  max-width: 45%;
  border-radius: 10px;
}

.texto-mision {
  max-width: 45%;
}

.texto-mision h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.texto-mision p {
  font-size: 1.1rem;
  line-height: 1.6;
}



.servicio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.servicio img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.texto-servicio {
  flex: 1;
  min-width: 250px;
}

/* Adaptacin mvil */
@media screen and (max-width: 768px) {
  .servicio {
    flex-direction: column;
    text-align: center;
  }

  .texto-servicio {
    padding-top: 10px;
  }
}

.otros-servicios .card {
  overflow: hidden;
}

.otros-servicios .card img {
  width: 100%;
  height: 200px; /* ajusta segn el diseo que quieras */
  object-fit: cover;
  display: block;
}


.contacto-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #ffffff;
}

.contacto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contacto-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.contacto-card .card-body {
  padding: 1rem;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
}

.contacto-card .card-text {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: #333;
}


img {
  max-width: 100%;
  height: auto;
}

/* Mostrar el botn hamburguesa en pantallas pequeas */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-nav ul.active {
    display: flex;
  }

  .main-nav li {
    flex: none;
  }
}

/* Ocultar men por defecto en pantallas pequeas */
@media (max-width: 768px) {
  .main-nav ul {
    display: none;
    flex-direction: column;
    background-color: #f2f2f2;
    padding: 10px;
  }

  .main-nav ul.active {
    display: flex;
  }

  .submenu {
    display: none;
    flex-direction: column;
    padding-left: 15px;
  }

  .submenu.show {
    display: flex;
  }

  .hamburger {
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
    margin: 10px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    background: none;
    border: none;
    color: #004080;
    margin: 10px auto; /* Centrado horizontal */
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
  }

  .hamburger:hover {
    background-color: #004080;
    color: white;
  }
}














/* BARRA SEPARADORA */
.barra