/* ===== Global ===== */
body, html {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Segoe UI', sans-serif !important;
  color: #050505 !important;
  /* Nuevo fondo */
  background-color: #90adf0 !important;
  background-image: url("img/fondo.png") !important;
  background-repeat: repeat !important;
  background-attachment: fixed !important;
}


/* ===== HEADER ===== */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo img {
  height: 50px;
}

/* ===== NAV DESKTOP ===== */
.nav-links {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 70px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: #005baa;
  border-bottom-color: #005baa;
  background: transparent;
}

/* ===== SUBMENÚ DESKTOP ===== */
.menu-item-has-children {
  position: relative;
}

.menu-item-has-children .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-top: 2px solid #005baa;
  border-radius: 0 0 8px 8px;
  padding: 8px 0;
  min-width: 280px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li a {
  display: block;
  padding: 10px 20px;
  color: #444;
  font-size: 13.5px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: normal;
}

.sub-menu li a:hover {
  background: #f0f7ff;
  color: #005baa;
  border-left-color: #005baa;
}

/* Flecha */
.arrow {
  font-size: 0.65rem;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.25s;
}

.menu-item-has-children:hover .arrow {
  transform: rotate(180deg);
}

/* ===== HAMBURGUESA ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: #005baa;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: block;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}
.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.07);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease;
  }

  .nav.open {
    max-height: 600px;
    opacity: 1;
    pointer-events: all;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .nav-links li {
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-links > li > a {
    height: auto;
    padding: 14px 24px;
    justify-content: space-between;
    border-bottom: none;
  }

  .nav-links > li > a:hover,
  .nav-links > li > a.active {
    background: #f5faff;
    border-bottom: none;
  }

  .sub-menu {
    position: static !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #f8f9fb !important;
    padding: 0 !important;
    min-width: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease !important;
  }

  .menu-item-has-children.submenu-open .sub-menu {
    max-height: 500px;
  }

  .menu-item-has-children.submenu-open .arrow {
    transform: rotate(180deg);
  }

  .sub-menu li a {
    padding: 11px 24px 11px 38px !important;
    border-left: none !important;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #555;
  }

  .sub-menu li a:hover {
    background: #e0f0ff !important;
    color: #005baa !important;
    border-left: none !important;
  }
}

/* ===== HERO ===== */
.hero-pagina {
  background: linear-gradient(135deg, #005baa 0%, #003f7f 100%);
  color: white;
  padding: 4rem 1rem;
  margin-top: 70px; /* Ajusta según la altura de tu header */
  text-align: center;
}

.hero-pagina h1 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-pagina p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
}

/* ===== TÍTULOS DE SECCIÓN ===== */
.section-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #005baa;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #005baa;
  border-radius: 2px;
}

/* Alineación izquierda para títulos específicos */
.section-title.text-left {
  text-align: left;
}

.section-title.text-left::after {
  left: 0;
  transform: none;
}

/* ===== SECCIONES DE DOS COLUMNAS ===== */
.two-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.two-col-section img {
  border-radius: 20px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.two-col-section img:hover {
  transform: scale(1.02);
}

.two-col-section p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* ===== TARJETAS DE MISIÓN Y VISIÓN ===== */
.mission-vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.mv-card {
  background: #f5f9ff;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid #e0f0ff;
  transition: all 0.3s ease;
}

.mv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,91,170,0.1);
}

.mv-card i {
  font-size: 3rem;
  color: #005baa;
  margin-bottom: 1rem;
}

.mv-card h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #005baa;
  margin-bottom: 1rem;
}

.mv-card p {
  color: #555;
  line-height: 1.8;
}

/* ===== SECCIÓN DE FINES (tarjetas) ===== */
.fines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.fin-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid #eaeef2;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.fin-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,91,170,0.15);
  border-color: #005baa;
}

.fin-card i {
  font-size: 3rem;
  color: #005baa;
  margin-bottom: 1rem;
}

.fin-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #003f7f;
  margin-bottom: 1rem;
}

.fin-card p {
  color: #666;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-pagina h1 {
    font-size: 2.3rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .two-col-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .two-col-section div:first-child {
    order: 2;
  }
  
  .two-col-section div:last-child {
    order: 1;
  }
  
  .mission-vision-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-pagina h1 {
    font-size: 2rem;
  }
  
  .hero-pagina p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .fin-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-pagina {
    padding: 3rem 1rem;
  }
  
  .hero-pagina h1 {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .mv-card h3 {
    font-size: 1.5rem;
  }
} 



/* ===== FOOTER ===== */
.footer-empresarial {
  background: #1a1a1a;
  color: #eee;
  padding: 3rem 1rem 0;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.footer-logo-section {
  flex: 1.5 1 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo img {
  height: 45px;
  width: auto;
}

.footer-logo span {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
}

.footer-logo-section p {
  margin-top: 1rem;
  line-height: 1.6;
  color: #ccc;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #333;
  border-radius: 50%;
  color: #fff;
  transition: all 0.3s;
  text-decoration: none;
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-icon:hover:nth-child(1) { background: #1877f2; }
.social-icon:hover:nth-child(2) { background: #1da1f2; }
.social-icon:hover:nth-child(3) { background: linear-gradient(45deg, #f09433, #d62976, #962fbf, #4f5bd5); }
.social-icon:hover {
  transform: translateY(-3px);
}

.footer-links, .footer-contacto {
  flex: 1 1 200px;
}

.footer-links h4, .footer-contacto h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #b0d8ff;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contacto p {
  line-height: 1.6;
  margin: 0.5rem 0;
}

.footer-contacto p a {
  color: #b0d8ff;
  text-decoration: none;
}

.footer-contacto p a:hover {
  text-decoration: underline;
}

/* Barra legal */
.footer-legal-bar {
  background: #1a1a1a;
  margin-top: 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid #444;
}

.footer-legal-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 2rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.footer-legal-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
}

.footer-legal-links a:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

.footer-copyright {
  color: #888;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .contacto-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-logo {
    justify-content: center;
  }
  .footer-social {
    justify-content: center;
  }
  .footer-legal-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .footer-legal-links {
    gap: 1.5rem;
    justify-content: center;
  }
  .footer-legal-links a:not(:last-child)::after {
    right: -1rem;
  }
}

@media (max-width: 480px) {
  .footer-legal-links {
    gap: 1rem;
    flex-direction: column;
  }
  .footer-legal-links a:not(:last-child)::after {
    display: none;
  }
}