/* ==============================
   STICKY FOOTER - Layout principal
   ============================== */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Contenedor principal que empuja el footer hacia abajo */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* El footer se mantiene al final */
#site-footer {
  margin-top: auto;
}

/* ==============================
   Estilos específicos del tema:
   Header, Hero, Servicios, Actualidad y Footer
   ============================== */

/* ----------------------------------------
   HEADER
   ---------------------------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Contenedor para el contenido principal (excluyendo header y footer) */
.content-container {
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 2rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #ffffff;
  position: relative;
  width: 100%;
}

.left-section {
  display: flex;
  align-items: center;
  gap: -0.5rem; /* Número negativo para juntarlos más */
}

/* Contenedor del logo - transparente */
.logo-box {
  border: 0;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent; /* Transparente */
  border-radius: 4px;
  min-width: 80px;
  max-width: 120px;
  margin-right: -0.5rem; /* Margen negativo adicional */
}

/* Contenedor del logotipo - transparente */
.logotipo-box {
  border: 0;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent; /* Transparente */
  border-radius: 4px;
  min-width: 180px;
  max-width: 280px; /* Aumentado de 240px para permitir un logotipo más grande */
}

/* Imagen del logo - ajustada a contenedor */
.logo-box img {
  max-width: 100%;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Imagen del logotipo - ajustada a contenedor con mayor tamaño */
.logotipo-box img {
  max-width: 100%;
  max-height: 160px; /* Aumentado de 140px a 160px */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.right-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 0.2rem; /* Reducido de 0.4rem a 0.2rem */
  align-items: center;
}

/* Eliminar estilos de lista del menú de WordPress */
.nav-links ul {
  display: flex;
  gap: 0.2rem; /* Reducido de 0.4rem a 0.2rem */
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

/* Enlaces del menú - sin animación, letra más gruesa y grande */
.nav-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 1.05rem; /* Aumentado de 0.95rem */
  font-weight: 500; /* Más gruesa */
  color: #333;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s; /* Solo transición simple */
}

.nav-links a:hover {
  color: #10375c;
  background-color: rgba(240, 240, 240, 0.3);
}

/* Selector de idioma dropdown - sin recuadro visible */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-current {
  border: none; /* Sin borde */
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.90rem;
  cursor: pointer;
  transition: color 0.2s;
  background-color: transparent; /* Transparente */
  min-width: 80px; /* Aumentado de 60px a 80px */
  text-align: center;
  position: relative;
  color: #333;
}

.lang-current:after {
  content: "▼";
  font-size: 0.7rem;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.lang-selector.active .lang-current:after {
  transform: rotate(180deg);
}

.lang-current:hover {
  color: #10375c;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.lang-selector.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.85rem;
}

.lang-option:hover {
  background-color: #f0f0f0;
}

.lang-option:first-child {
  border-radius: 4px 4px 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 4px 4px;
}

/* Botón "CONTÁCTANOS" - sin animación de deslizamiento, solo oscurecimiento */
.contact-button {
  display: inline-block;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(to right, rgba(16, 55, 92, 0.67), rgb(16, 55, 92));
  border: 1px solid #071326;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.contact-button:hover {
  background: linear-gradient(to right, rgba(12, 41, 69, 0.8), rgb(12, 41, 69)); /* Más oscuro */
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(16, 55, 92, 0.3);
}

.contact-button:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(16, 55, 92, 0.3);
}

/* Icono modo oscuro - transparente */
.icon-box {
  border: none; /* Sin borde */
  padding: 0.3rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent; /* Transparente */
  cursor: pointer;
  transition: opacity 0.2s;
}

.icon-box:hover {
  opacity: 0.7;
}

.icon-box img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* Separador rojo debajo del header - 1px */
.header-separator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px; /* 1px */
  background-color: #b00000;
}

/* ----------------------------------------
   FOOTER
   ---------------------------------------- */
/* ================
   FOOTER (GENERAL)
   ================ */
#site-footer {
  background-color: #10375c; /* Fondo azul oscuro */
  color: #ffffff; /* Texto blanco */
  padding: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  width: 100%;
  margin-top: auto;
}

/* ===============
   CUATRO COLUMNAS
   =============== */
.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 2rem;
}

/* Cada columna ocupa igual espacio, pero no menor a 200px */
.footer-col {
  flex: 1 1 200px; /* crece hasta ocupar espacio, pero mínimo 200px de ancho */
}

/* ----------------------------------------
   Columna 1: caja del logo y logotipo
   ---------------------------------------- */
/* Columna 1 centrada */
.footer-col-1 {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrar horizontalmente */
  justify-content: center; /* Centrar verticalmente */
}

/* Contenedor del logo */
.footer-logo-box {
  max-width: 240px; /* Duplicado de 120px a 240px */
  width: 100%;
  margin-bottom: 0; /* Sin espacio entre logo y logotipo */
  text-align: center;
}

/* Contenedor del logotipo */
.footer-logotipo-box {
  max-width: 280px; /* Mismo tamaño que el logotipo del header */
  width: 100%;
  margin-bottom: 0; /* Sin espacio después del logotipo */
  text-align: center;
}

/* Imagen del logo (footer) */
.footer-logo-box img {
  width: 100%; /* Ocupa todo el ancho del contenedor, pero no lo pasa */
  height: auto; /* Mantiene proporción */
  max-height: 90px; /* Duplicado de 45px a 90px */
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Imagen del logotipo (footer) */
.footer-logotipo-box img {
  width: 100%; /* Ocupa todo el ancho del contenedor, pero no lo pasa */
  height: auto; /* Mantiene proporción */
  max-height: 160px; /* Mismo tamaño que el logotipo del header */
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ----------------------------------------
   Columna 2, 3: Listas (Servicios y Políticas)
   ---------------------------------------- */
.footer-col-2 h4,
.footer-col-3 h4,
.footer-col-4 h4 {
  font-size: 1.8rem; /* Aumentado de 1.5rem a 1.8rem */
  margin-bottom: 0.75rem;
  color: #ffffff; /* Título en blanco */
}

.footer-col-2 ul,
.footer-col-3 ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col-2 ul li,
.footer-col-3 ul li {
  margin-bottom: 0.5rem;
}

.footer-col-2 a,
.footer-col-3 a {
  color: #ffffff;
  transition: color 0.2s;
}

.footer-col-2 a:hover,
.footer-col-3 a:hover {
  color: #ffffff; /* Si prefieres otro color al pasar, cámbialo aquí */
}

/* ----------------------------------------
   Columna 4: Contáctanos
   ---------------------------------------- */
.footer-col-4 p {
  margin: 0;
  color: #ffffff;
  line-height: 1.8; /* Aumentado el espaciado entre líneas */
}

.footer-col-4 a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
  display: block; /* Cada enlace en su propia línea */
  margin-bottom: 0.25rem; /* Espacio entre correo y teléfono */
}

.footer-col-4 a:hover {
  color: #ffffff; /* Si quieres un acento, cámbialo aquí */
}

/* ----------------------------------------
   Columna 4: Contáctanos con iconos
   ---------------------------------------- */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-item a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
  flex: 1;
}

.contact-item a:hover {
  color: #ffffff;
}

/* ===============
   DIVISOR (línea)
   =============== */
.footer-divider {
  width: 100%; /* Cambiado de 100vw a 100% */
  height: 2px; /* grosor del divisor */
  background-color: #ffffff; /* línea blanca */
  margin: 2rem 0;
  border: none;
  /* Removidas las propiedades de posicionamiento absoluto */
}

/* ==============================
   COPYRIGHT (parte inferior)
   ============================== */
.footer-copy {
  text-align: center;
  font-size: 0.85rem;
  color: #ffffff;
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 2rem;
}

.footer-copy a {
  color: #ffffff;
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
}

/* ==============================
   MODO OSCURO
   ============================== */
body.dark-mode {
  background-color: #050f1f; /* Nuevo fondo modo oscuro */
  color: #ffffff; /* Texto blanco por defecto */
}

body.dark-mode header {
  background-color: #050f1f; /* Mismo fondo que el body */
}

/* Divisor del header en modo oscuro - blanco */
body.dark-mode .header-separator {
  height: 1px;
  background-color: #ffffff; /* Blanco en modo oscuro */
}

/* Footer en modo oscuro */
body.dark-mode #site-footer {
  background-color: #071326; /* Fondo específico del footer en modo oscuro */
}

/* Divisor del footer en modo oscuro */
body.dark-mode .footer-divider {
  background-color: #10375c; /* Color específico para el divisor del footer */
}

/* Textos del footer con opacidad (excepto títulos) */
body.dark-mode .footer-col-2 a,
body.dark-mode .footer-col-3 a,
body.dark-mode .footer-col-4 p,
body.dark-mode .footer-col-4 a {
  color: rgba(255, 255, 255, 0.69); /* Opacidad para datos del footer */
}

/* Información de contacto con iconos en modo oscuro */
body.dark-mode .contact-item a {
  color: rgba(255, 255, 255, 0.69);
}

/* Títulos del footer siguen blancos */
body.dark-mode .footer-col-2 h4,
body.dark-mode .footer-col-3 h4,
body.dark-mode .footer-col-4 h4 {
  color: #ffffff; /* Títulos siguen blancos */
}

body.dark-mode .nav-links a {
  color: #ffffff;
}

body.dark-mode .nav-links a:hover {
  color: #ffffff;
  background-color: rgba(74, 74, 74, 0.3);
}

body.dark-mode .lang-current {
  color: #ffffff;
}

body.dark-mode .lang-current:hover {
  color: #ffffff;
}

body.dark-mode .lang-dropdown {
  background-color: #071326;
  border-color: #666;
}

body.dark-mode .lang-option {
  color: #ffffff;
}

body.dark-mode .lang-option:hover {
  background-color: #4a4a4a;
}

/* ==============================
   ESTILOS ADICIONALES PARA FORMULARIO DE CONTACTO
   ============================== */

/* Errores de campo */
.field-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Contador de caracteres */
.char-counter {
  font-size: 0.8rem;
  color: #6b7280;
  text-align: right;
  margin-top: 0.25rem;
}

.char-counter.over-limit {
  color: #dc2626;
}

/* Estados del botón */
.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Modo oscuro para errores */
body.dark-mode .field-error {
  color: #fca5a5;
}

body.dark-mode .form-group input.error,
body.dark-mode .form-group textarea.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

body.dark-mode .char-counter {
  color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .char-counter.over-limit {
  color: #fca5a5;
}

/* ==============================
   MEDIA QUERIES (Responsive)
   ============================== */
@media (max-width: 992px) {
  .footer-columns {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .content-container {
    padding: 0 1rem; /* Márgenes laterales más pequeños en móvil */
  }

  .footer-columns,
  .footer-copy {
    padding: 0 1rem;
  }

  .footer-columns {
    flex-direction: column;
    align-items: center;
  }

  .footer-col {
    width: 100%;
    max-width: 400px;
  }

  header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }

  .left-section {
    flex: 1 1 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .right-section {
    flex: 1 1 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-links ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  .contact-button {
    font-size: 0.90rem;
    padding: 0.45rem 0.8rem;
  }
}

@media (max-width: 576px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
