/* ==========================================================================
   ESTILOS GENERALES
   ========================================================================== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;

}

/* Nota: Esta regla 'a' es muy agresiva. Pone todos los enlaces de la web en blanco.
   Considera hacerla más específica si causa problemas en otras secciones. */
a {
  color: #fff;
  text-decoration: none;
}

/* ==========================================================================
   CINTILLO SUPERIOR (Top Bar)
   ========================================================================== */
.top-bar {
  background-color: #FD073C;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  font-size: 0.95em;
  flex-wrap: wrap;
}

.top-bar .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar .left img {
  height: 40px;
}

.top-bar .right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar .right a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-bar .right a:hover {
  color: #FFD700;
}

.ligaInterna {
  color: #fff;
}

/* ==========================================================================
   ENCABEZADO DE PÁGINA (Hero Section)
   ========================================================================== */
.encabezado-inicio {
  background: linear-gradient(to right, #0077cc, #00aaff);
  color: #fff;
  text-align: center;
  padding: 80px 20px;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.encabezado-contenido h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  font-weight: 700;
}

.encabezado-contenido p {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn-contacto {
  background-color: #fff;
  color: #0077cc;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn-contacto:hover {
  background-color: #e0f0ff;
}

/* ==========================================================================
   NAVEGACIÓN PRINCIPAL (Menú y Submenús) - VERSIÓN CORREGIDA
   ========================================================================== */
#menuNav {
  width: 100%;
  background: #fff;
  color: #000;
  position: relative;
  font-family: Arial, Helvetica, sans-serif;
}

.menu-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  flex-wrap: nowrap;
  gap: 20px;
}

.menu-logo img {
  height: 38px;
  display: block;
}

/* --- Contenedor de la lista del menú --- */
.menu-list-container {
  flex: 1 1 auto;
}

#menuList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
}

#menuList > li {
  margin-left: 60px;
  position: relative; /* Clave para posicionar el submenú */
}

#menuList li a {
  display: block;
  padding: 10px 18px;
  color: #000;	/* cambiar el color de las letras*/
  text-decoration: none;
  transition: color 0.2s;
  font-size: 1rem;
  white-space: nowrap;
}

#menuList li a:hover {
  color: #E30614;
}

/* --- LÓGICA DE SUBMENÚS (ESCRITORIO) - VERSIÓN CORREGIDA Y REFUERZADA --- */
#menuNav #menuList .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #444; /* Un gris más claro para crear contraste */
  min-width: 220px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4); /* Sombra más marcada */
  z-index: 9999; /* z-index muy alto para asegurar que esté por encima de todo */
  border-radius: 4px;
  border-top: 3px solid #E30614; /* Un toque de color para que destaque */
}

#menuNav #menuList .submenu li {
  margin: 0;
  width: 100%;
}

#menuNav #menuList .submenu li a {
  padding: 8px 20px;
  font-size: 0.9rem;
  color: #fff !important; /* Forzamos el color blanco para evitar conflictos */
  border-bottom: 1px solid #555;
  transition: background-color 0.2s ease;
}

#menuNav #menuList .submenu li a:hover {
  background-color: #555; /* Un hover sutil */
  color: #fff !important;
}

/* Mostrar submenú al pasar el ratón sobre el <li> padre */
#menuNav #menuList .has-submenu:hover > .submenu {
  display: block;
}

/* --- Elementos del menú móvil (sin cambios) --- */
.menu-mobile-header {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  margin-left: 20px;
}

#menuToggle, #menuClose {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8em;
  cursor: pointer;
  padding: 10px;
}

.footer-logo-mobil {
  display: none;
  width: 120px;
  height: 120px;
  background-color: #fff;
  border-radius: 50%;
  padding: 4px;
  box-sizing: border-box;
  margin: 20px auto;
}

.footer-logo-mobil img {
  width: 100%;
  height: 100%;
  background-color: #000;
  border-radius: 50%;
  object-fit: contain;
}


/* ==========================================================================
   MEDIA QUERIES PARA RESPONSIVE DESIGN
   ========================================================================== */

/* --- Estilos para MÓVIL (pantallas de 900px o menos) --- */
@media (max-width: 900px) {
  .menu-bar {
    padding: 0 10px;
  }
  .menu-logo img {
    height: 60px;
  }
  .menu-mobile-header {
    display: flex;
  }
  .menu-list-container {
    position: fixed;
    top: 0;
    left: -420px;
    width: 400px;
    height: 100%;
    background: #222;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    padding-top: 20px;
    overflow-y: auto;
  }
  .menu-list-container.open {
    left: 0;
  }
  #menuList {
    flex-direction: column;
    align-items: flex-start;
  }
  #menuList > li {
    margin-left: 0;
    width: 100%;
    border-bottom: 1px solid #333;
  }
  #menuList li a {
    padding: 20px;
    width: 100%;
    font-size: 1.2rem;
  }
  .footer-logo-mobil {
    display: flex;
  }

  /* --- LÓGICA DE SUBMENÚS (MÓVIL) - VERSIÓN CORREGIDA --- */
  #menuNav #menuList .submenu {
    position: static;
    display: none;
    background-color: #444; /* Mismo fondo que en escritorio */
    box-shadow: none;
    border: none;
    border-left: 3px solid #E30614; /* Indicador visual en móvil */
  }

  #menuNav #menuList .submenu li a {
    padding-left: 40px; /* Sangría para indicar jerarquía */
    color: #fff !important; /* Forzamos el color blanco */
    background-color: transparent !important; /* Evitar fondos extraños */
  }

  #menuNav #menuList .submenu li a:hover {
    background-color: #555 !important;
  }

  /* La clase 'active' que añade JavaScript para mostrar el submenú */
  #menuNav #menuList .has-submenu.active > .submenu {
    display: block;
  }
}

/* --- Estilos para ESCRITORIO (pantallas de más de 900px) --- */
@media (min-width: 901px) {
  .menu-logo img {
    margin-left: 80px;
  }
  #menuClose {
    display: none !important;
  }
  .footer-logo-mobil {
    display: none !important;
  }
  .menu-mobile-header{
    display: none !important;
  }
}
#menuList .submenu-toggle::after {
  content: '▸';
  float: right;
  transition: transform 0.3s ease;
}

#menuList .has-submenu.active > .submenu-toggle::after {
  transform: rotate(90deg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-swc {
  background: #000;
  color: #fff;
  padding: 10px 0 0 0;
  font-family: Arial, sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-col {
  flex: 1 1 250px;
  margin: 10px 20px;
  text-align: center;
}

.footer-col a {
  color: #fff;
  text-decoration: none;
}

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

.footer-logo-img {
  width: 110px;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  margin-bottom: 10px;
}

.footer-slogan {
  font-size: 1em;
  margin: 0;
}

.footer-desc {
  font-size: 0.95em;
  margin: 10px 0 0 0;
}

.footer-contacto h3,
.footer-enlaces h3 {
  margin-top: 0;
  font-size: 1.1em;
  margin-bottom: 10px;
}

.footer-contacto p, .footer-contacto a {
  margin: 4px 0;
  color: #fff;
  font-size: 0.98em;
}

.footer-enlaces ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-enlaces ul li {
  margin-bottom: 8px;
}

.footer-enlaces ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.98em;
}

.footer-enlaces ul li a:hover {
  text-decoration: underline;
}

.footer-social {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.footer-social-icon {
  width: 28px;
  height: 28px;
  filter: invert(1);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-social-icon:hover {
  opacity: 1;
}

.footer-copy {
  background: #444;
  color: #fff;
  text-align: center;
  padding: 12px 0;
  font-size: 0.95em;
  margin-top: 30px;
  letter-spacing: 0.5px;
}

/* Media Query para FOOTER en Móvil (combinando las reglas duplicadas) */
@media (max-width: 900px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
  }

  .footer-col {
    margin: 20px 0;
  }

  .footer-logo-img {
    width: 150px; /* Un poco más grande en móvil */
  }

  .footer-enlaces ul li {
    margin-bottom: 14px;
  }

  .footer-enlaces a {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   ELEMENTOS FLOTANTES (WhatsApp, Scroll to Top)
   ========================================================================== */
.floating-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: auto;
}

.floating-cta .wa-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.floating-cta .wa-btn svg {
  width: 56px;
  height: 56px;
  display: block;
}

.floating-cta .scroll-top {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fd073c;
  border: none;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.floating-cta .scroll-top svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.floating-cta .scroll-top {
  display: none; /* Oculto hasta hacer scroll */
}

@media (max-width: 480px) {
  .floating-cta {
    right: 12px;
    bottom: 12px;
  }
  .floating-cta .wa-btn {
    width: 48px;
    height: 48px;
  }
  .floating-cta .wa-btn svg {
    width: 48px;
    height: 48px;
  }
  .floating-cta .scroll-top {
    width: 40px;
    height: 40px;
  }
}

/* Evita duplicados si existe otro #a_arriba en el DOM */
#a_arriba {
  display: none !important;
}