/* =============== VARIABLES GLOBALES =============== */
:root {
  --color-primario: rgb(0, 185, 216);
  --color-secundario: #FFFFFF;
  --color-texto: #333333;
  --color-fondo: #F8F9FA;
  --color-bordes: rgb(0, 140, 191);
  --fuente-principal: 'Poppins', 'Times New Roman', Arial;
  --espaciado-xs: 0.5rem;
  --espaciado-sm: 1rem;
  --espaciado-md: 1.5rem;
  --espaciado-lg: 2rem;
  --espaciado-xl: 3rem;
  --sombra-suave: 0 2px 8px rgba(0,0,0,0.1);
  --sombra-media: 0 4px 12px rgba(0,0,0,0.15);
  --radio-borde: 8px;
  --grosor-borde: 1px;
}

/* RESET Y ESTILOS BASE */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente-principal);
  line-height: 1.6;
  color: var(--color-texto);
  background-color: var(--color-fondo);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.header {
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--espaciado-sm) 5%;
  background-color: var(--color-secundario);
  box-shadow: var(--sombra-suave);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  height: 50px;
  transform: scale(1.3);
  transition: transform 0.3s;
}

.logo:hover {
  transform: scale(1.2);
}

/* MENÚ NAVEGACIÓN - ESCRITORIO (VISIBLE POR DEFECTO) */
.nav-menu {
  display: block;
}

.nav-menu ul {
  display: flex;
  gap: var(--espaciado-lg);
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-texto);
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  padding: var(--espaciado-xs) 0;
  transition: color 0.3s;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primario);
  transition: width 0.5s;
}

.nav-menu a:hover {
  color: var(--color-primario);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* Menu activo para escritorio */
.nav-menu a.activo {
  color: var(--color-primario);
}

.nav-menu a.activo::after {
  width: 100%;
}

/* MENÚ HAMBURGUESA - OCULTO EN ESCRITORIO */
.menu-mobile {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1001;
}

.menu-mobile .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 3px 0;
  background-color: var(--color-texto);
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

/* Overlay para menú móvil - OCULTO EN ESCRITORIO */
.menu-overlay {
  display: none;
}

/* CONTENIDO PRINCIPAL */
.main-content {
  flex: 1;
  padding: var(--espaciado-xl) 5%;
}

.contenido-pagina {
  max-width: 1200px;
  margin: 0 auto;
}


/* FOOTER */
.footer {
  background-color: var(--color-primario);
  color: var(--color-secundario);
  padding: var(--espaciado-md);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--espaciado-md);
  margin-top: var(--espaciado-sm);
}

.social-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.3s;
}

.social-icon:hover {
  transform: translateY(-3px);
}

/* TIPOGRAFÍA UNIFICADA */
.titulo-principal {
  font-size: 2.5rem;
  margin-bottom: var(--espaciado-md);
  font-weight: 700;
  text-align: center;
  color: var(--color-primario);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--espaciado-md);
  font-weight: 600;
  position: relative;
  padding-bottom: var(--espaciado-xs);
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-primario);
}

p {
  margin-bottom: var(--espaciado-sm);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* =============== BOTÓN MANUAL DE USUARIO =============== */
.btn-manual-usuario {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--color-primario);
  color: var(--color-secundario);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--sombra-media);
  z-index: 10000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.btn-manual-usuario:hover {
  transform: scale(1.1);
  background: var(--color-bordes);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-manual-usuario .tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: var(--color-texto);
  color: var(--color-secundario);
  padding: 8px 12px;
  border-radius: var(--radio-borde);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-weight: normal;
  z-index: 10001;
}

.btn-manual-usuario:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* =============== ESTILOS ESPECÍFICOS PARA BOTÓN MANUAL =============== */
.boton_manual_usuario {
  width: 75%;
  display: block;
  margin: auto;
}

/* Responsive para la imagen del manual */
@media (max-width: 768px) {
  .boton_manual_usuario {
    width: 65%;
  }
}

@media (max-width: 480px) {
  .boton_manual_usuario {
    width: 60%;
  }
}

/* =============== DISEÑO RESPONSIVE  ============== */

/* TABLETS (768px - 991px) */
@media (max-width: 991px) {
  .titulo-principal {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .nav-menu ul {
    gap: var(--espaciado-md);
  }
  
  .nav-menu a {
    font-size: 1rem;
  }
}

/* MÓVILES (768px hacia abajo) */
@media (max-width: 768px) {
  /* Ocultar menú de escritorio y mostrar hamburguesa */
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-secundario);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    padding: 100px 2rem 2rem 2rem;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }
  
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    transform: translateX(0);
  }
  
  .nav-menu.active ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  
  .nav-menu.active li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu.active li:last-child {
    border-bottom: none;
  }
  
  .nav-menu.active a {
    display: block;
    padding: 1rem 0;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: var(--radio-borde);
  }
  
  .nav-menu.active a:hover {
    background-color: rgba(0, 185, 216, 0.1);
    color: var(--color-primario);
    padding-left: 1rem;
  }
  
  .nav-menu.active a::after {
    display: none;
  }
  
  /* Menu activo para móvil */
  .nav-menu.active a.activo {
    background-color: rgba(0, 185, 216, 0.1);
    color: var(--color-primario);
    padding-left: 1rem;
  }
  
  /* Mostrar hamburguesa en móvil */
  .menu-mobile {
    display: flex;
  }
  
  /* Mostrar overlay en móvil */
  .menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Estado activo del botón hamburguesa */
  .menu-mobile.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .menu-mobile.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-mobile.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .titulo-principal {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .main-content {
    padding: var(--espaciado-lg) var(--espaciado-sm);
  }
  
  .header {
    padding: var(--espaciado-sm);
  }
  
  /* Botón manual de usuario en móvil */
  .btn-manual-usuario {
    width: 55px;
    height: 55px;
    bottom: 25px;
    right: 25px;
    font-size: 1.3rem;
    min-width: 55px;
    min-height: 55px;
    touch-action: manipulation;
  }
  
  .btn-manual-usuario .tooltip {
    font-size: 0.75rem;
    padding: 6px 10px;
    bottom: 65px;
    right: -10px;
  }
  
  /* Asegurar que ningún otro elemento tape el botón */
  .footer {
    position: relative;
    z-index: 1;
  }
}

/* MÓVILES PEQUEÑOS (480px hacia abajo) */
@media (max-width: 480px) {
  .titulo-principal {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  .logo {
    height: 40px;
  }
  
  .nav-menu.active {
    width: 100%;
  }
  
  .header {
    padding: var(--espaciado-xs) var(--espaciado-sm);
  }
  
  .btn-manual-usuario {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 1.2rem;
  }
}

/* ESCRITORIO GRANDE (1200px hacia arriba) */
@media (min-width: 1200px) {
  .header {
    padding: var(--espaciado-sm) 8%;
  }
  
  .main-content {
    padding: var(--espaciado-xl) 8%;
  }
}

/* ESCRITORIO MUY GRANDE (1400px hacia arriba) */
@media (min-width: 1400px) {
  .header {
    padding: var(--espaciado-sm) 10%;
  }
  
  .main-content {
    padding: var(--espaciado-xl) 10%;
  }
  
  .contenido-pagina {
    max-width: 1300px;
  }
}