/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (VARIABLES GLOBALES)
   ========================================================================== */
:root {
  /* --- Paleta de Colores Principal --- */
  --main-dark-blue: #011F55; /* Azul principal para encabezados y footer */
  --accent-color: #E30614;   /* Rojo acento para botones y enlaces activos */
  --cta-color: #FD073C;      /* Rojo más brillante para llamadas a la acción */
  --highlight-color: #FFD700; /* Dorado para hover en iconos */

  /* --- Colores de Texto --- */
  --text-light: #fff;         /* Texto claro sobre fondos oscuros */
  --text-dark: #333;         /* Texto oscuro principal */
  --text-muted: #b0b0b0;     /* Texto secundario o desactivado */

  /* --- Colores de Fondo --- */
  --bg-footer: #1d1d1b;      /* Fondo oscuro del footer */
  --bg-medium: #222;          /* Fondo para menú móvil y elementos oscuros */
  --bg-submenu: #444;        /* Fondo para submenús desplegables */
  --bg-submenu-hover: #555;   /* Hover para submenús */

  /* --- Bordes y Sombras --- */
  --border-color: #333;
  --shadow-default: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-strong: 0 8px 25px rgba(0,0,0,0.4);

  /* --- Fuentes --- */
  --font-family-default: 'Segoe UI', sans-serif;
  --font-family-menu: Arial, Helvetica, sans-serif;
}

/* ==========================================================================
   2. ESTILOS GLOBALES Y DE RESET
   ========================================================================== */
body {
  margin: 0;
  font-family: var(--font-family-default);
  background-color: #f4f4f4;
  color: var(--text-dark);
}

/* Regla general para enlaces, sobrescribir en componentes si es necesario */
a {
  color: inherit; /* Hereda el color del padre */
  text-decoration: none;
}

/* ==========================================================================
   3. COMPONENTES DE DISEÑO (EN ORDEN DE APARICIÓN)
   ========================================================================== */

/* --- 3.1 Barra Superior --- */
.top-bar {
  background-color: var(--main-dark-blue);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  font-size: 0.9em;
  flex-wrap: wrap;
}

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

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

.top-bar a {
  color: var(--text-light);
  font-size: 1.2em;
  transition: color 0.3s ease;
}

.top-bar a:hover {
  color: var(--highlight-color);
}

/* --- 3.2 Encabezado Principal (Hero Section) --- */
.encabezado-inicio {
  background: linear-gradient(to right, var(--main-dark-blue), var(--accent-color));
  color: var(--text-light);
  text-align: center;
  padding: 80px 20px;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow-default);
}

.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: var(--text-light);
  color: var(--main-dark-blue);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  transition: background 0.3s ease;
}

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

/* --- 3.3 Navegación Principal --- */
#menuNav {
  width: 100%;
  background: var(--text-light);
  position: relative;
  font-family: var(--font-family-menu);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

/* Iconos sociales en el menú (escritorio) */
.menu-social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.menu-social-icons a {
  color: var(--text-dark);
  font-size: 1.2em;
  transition: color 0.3s ease;
}

.menu-social-icons a:hover {
  color: var(--main-dark-blue);
}

/* 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;
  justify-content: flex-end;
}

#menuList > li {
  margin-left: 30px;
  position: relative;
}

/* Enlaces del menú principal */
#menuList li a {
  display: block;
  padding: 10px 18px;
  color: var(--text-dark);
  transition: color 0.2s;
  font-size: 1rem;
  white-space: nowrap;
}

#menuList li a:hover {
  color: var(--accent-color);
}

/* Lógica de Submenús (ESCRITORIO) */
#menuNav #menuList .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-submenu);
  min-width: 220px;
  box-shadow: var(--shadow-strong);
  z-index: 9999;
  border-radius: 4px;
  border-top: 3px solid var(--accent-color);
}

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

/* Quitar viñetas a todos los submenús */
#menuList .submenu {
  list-style: none;   /* elimina los puntitos */
  margin: 0;          /* opcional: quita márgenes */
  padding: 0;         /* opcional: quita sangría */
}
#menuNav #menuList .submenu li a {
  padding: 8px 20px;
  font-size: 0.9rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--bg-submenu-hover);
  transition: background-color 0.2s ease;
}

#menuNav #menuList .submenu li a:hover {
  background-color: var(--bg-submenu-hover);
}

#menuNav #menuList .has-submenu:hover > .submenu {
  display: block;
}

/* --- 3.4 Footer --- */
.footer-swc {
  background-color: var(--main-dark-blue);
  color: var(--text-light);
  padding: 40px 20px 10px;
  font-family: var(--font-family-menu);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

/* Columna 1: Logo y Slogan */
.footer-logo {
  text-align: center;
}

.footer-logo-img {
  width: 160px;
  height: 160px;
  background: var(--text-light);
  border-radius: 50%;
  padding: 15px;
  margin-bottom: 35px;
  box-sizing: border-box;
  margin-left:20%;
}

.footer-slogan {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 0 10px 0;
  color: var(--main-dark-blue);
  background-color: var(--text-light);
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
}

.footer-desc {
  font-size: 0.9em;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Columna 2: Contacto */
.footer-contacto h3,
.footer-enlaces h3 {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: var(--text-light);
  border-bottom: 2px solid var(--main-dark-blue);
  display: inline-block;
  padding-bottom: 5px;
}

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

.footer-contact-list li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.95em;
}

.footer-contact-list .footer-icon {
  margin-right: 15px;
  color: var(--main-dark-blue);
  background-color: var(--text-light);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.footer-contact-list a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-contact-list a:hover {
  color: var(--main-dark-blue);
}

.footer-social {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
  gap: 15px;
}

.footer-social a {
  color: var(--text-light);
  font-size: 1.5em;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer-social a:hover {
  color: var(--main-dark-blue);
  transform: scale(1.1);
}

/* Columna 3: Enlaces */
.footer-enlaces ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-enlaces ul li a {
  color: var(--text-muted);
  position: relative;
  padding-left: 15px;
  transition: color 0.3s ease;
}

.footer-enlaces ul li a::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--main-dark-blue);
  transition: transform 0.3s ease;
}

.footer-enlaces ul li a:hover {
  color: var(--text-light);
}

.footer-enlaces ul li a:hover::before {
  transform: translateX(5px);
}

/* Copyright */
.footer-copy {
  background: var(--accent-color);
  color: var(--text-light);
  text-align: center;
  padding: 12px 0;
  font-size: 0.95em;
  margin-top: 30px;
  letter-spacing: 0.5px;
}

.footer-copy a {
  color: var(--text-light);
}

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

/* --- 3.5 Elementos Flotantes (CTAs) --- */
.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: var(--shadow-strong);
}

.floating-cta .scroll-top {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cta-color);
  border: none;
  color: var(--text-light);
  cursor: pointer;
  box-shadow: var(--shadow-strong);
}

/* ==========================================================================
   4. DISEÑO RESPONSIVO Y MEDIA QUERIES
   ========================================================================== */

/* --- Estilos para MÓVIL (pantallas de 900px o menos) --- */
@media (max-width: 900px) {
	.top-bar-right{display:none !important}
  /* Navegación */
  .menu-bar {
    padding: 0 10px;
  }
  .menu-logo img {
    height: 50px;
  }
  .menu-social-icons {
    display: none; /* Ocultar iconos sociales en móvil */
  }
  .menu-mobile-header {
    display: flex;
	padding: 10px 0;
	margin:20px;
  }
  .menu-list-container {
    position: fixed;
    top: 0;
    left: -420px;
    width: 400px;
    height: 100%;
    background: var(--main-dark-blue);
    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 rgba(255,255,255,0.1);
  }
  #menuList li a {
    padding: 20px;
    width: 100%;
    font-size: 1.2rem;
    color: var(--text-light);
  }
  #menuClose {
    color: var(--text-light);
  }
  .footer-logo-mobil {
    display: flex;
  }
  #menuNav #menuList .submenu {
    position: static;
    background-color: rgba(0,0,0,0.2);
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--accent-color);
  }
  #menuNav #menuList .submenu li a {
    padding-left: 40px;
  }
  #menuNav #menuList .submenu li a:hover {
    background-color: rgba(0,0,0,0.2);
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
  }
  .footer-col {
    width: 100%;
    min-width: unset;
  }
  .footer-contact-list li {
    justify-content: center;
  }
  .footer-social {
    justify-content: center;
  }

  /* Elementos flotantes */
  .floating-cta {
    right: 12px;
    bottom: 12px;
  }
  .floating-cta .wa-btn, .floating-cta .scroll-top {
    width: 48px;
    height: 48px;
  }
}

  .menu-mobile-header{
	padding: 10px;
	margin:20px;
	  }

/* --- Estilos para ESCRITORIO (pantallas de más de 900px) --- */
@media (min-width: 901px) {
  .menu-mobile-header,
  #menuClose,
  .footer-logo-mobil {
    display: none !important;
  }
}

/* --- 3.5 Elementos Flotantes (CTAs) --- */
.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: var(--shadow-strong);
}

.floating-cta .scroll-top {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex; /* Cambiado a flex para centrar el SVG */
  align-items: center;
  justify-content: center;
  background: var(--cta-color);
  border: none;
  color: var(--text-light);
  cursor: pointer;
  box-shadow: var(--shadow-strong);
  display: none; /* Oculto por defecto */
}

/* Clase para mostrar el botón de scroll */
.floating-cta .scroll-top.show {
  display: flex;
}

#menuList .has-submenu > a.submenu-toggle::after {
  content: "▾";              /* flecha hacia abajo */
  margin-left: 6px;
  font-size: 0.8em;
  display: inline-block;
  transition: transform 0.3s;
}

/* Cuando el submenú está activo, rota la flecha */
#menuList .has-submenu.active > a.submenu-toggle::after {
  transform: rotate(180deg); /* apunta hacia arriba */
}