/* Codigo con variables globales */
/* Importa las variables */
@import url('variables.css');

/* Reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* General */
body {
  margin: 0;
  font-family: var(--font-family-main);
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

/* Contenedor principal */
.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Menú lateral */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background-color: var(--color-sidebar-bg);
  color: #020202;
  padding: 20px;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition-speed) ease;
}

.profile {
  text-align: center;
  margin-bottom: 20px;
}

.profile-image {
  width: var(--profile-img-size);
  height: var(--profile-img-size);
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--color-sidebar-border);
  margin-top: 15px;
}

.profile-name {
  font-weight: bold;
  font-size: 1.2rem;
}

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

.menu li {
  margin: 5px 0;
  text-align: center;
}

.menu a {
  display: block;
  padding: 10px;
  border-radius: var(--border-radius);
  transition: background var(--transition-speed);
}

.menu a:hover,
.menu a.active {
  background-color: var(--color-accent-1);
  font-weight: bold;
}

/* Selector de idioma (EN/ES) — fijo en la esquina superior derecha,
   visible tanto en escritorio como en móvil */
.lang-dropdown {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 210;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-btn-bg);
  border: 2px solid var(--color-sidebar-border);
  color: #020202;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.lang-switcher-btn:hover {
  background-color: var(--color-btn-hover);
  color: #ffffff;
}

.lang-current-flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
}

.lang-menu {
  display: none;
  position: absolute;
  top: 120%;
  right: 0;
  left: auto;
  background-color: #0b2226;
  border: 1px solid var(--color-sidebar-border);
  border-radius: 10px;
  padding: 6px;
  min-width: 180px;
  z-index: 210;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.lang-dropdown.open .lang-menu {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text);
  font-size: 0.92rem;
}

.lang-option:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.lang-option.active {
  color: var(--color-accent-2);
  font-weight: bold;
}

.lang-option .flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
}

@media (max-width: 480px) {
  .lang-dropdown {
    top: 12px;
    right: 12px;
  }
  .lang-switcher-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

/* Botón hamburguesa (oculto en escritorio) */
.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 200;
  width: 44px;
  height: 44px;
  background-color: var(--color-sidebar-border);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #020202;
  position: relative;
  transition: transform var(--transition-speed);
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -7px;
}

.menu-toggle span::after {
  top: 7px;
}

/* Overlay que aparece detrás del menú abierto en móvil */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
}

/* Contenido principal */
.main-content {
  flex-grow: 1;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: calc(var(--sidebar-width) + 20px);
}

/* Estilos de la página de inicio */
.welcome_inicio_contactos {
  text-align: center;
  margin-top: 100px;
  max-width: 700px;
}

.name {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  color: var(--color-accent-1);
}

.last-name {
  color: var(--color-accent-2);
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background-color: var(--color-btn-bg);
  color: #000;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: bold;
  transition: background var(--transition-speed);
}

.btn:hover {
  background-color: var(--color-btn-hover);
}

.social-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 40px;
}

.icon {
  background-color: var(--color-icon-bg);
  color: #ffffff;
  padding: 10px;
  border-radius: 50%;
  font-size: 1rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-speed);
}

.icon:hover {
  background-color: var(--color-accent-1);
}

.icon svg {
  width: 40px;
  height: 40px;
  fill: #000000;
}

/* diseño redes neuronales */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100vh;
  background: #010202;
  z-index: -1;
}

/* ==========================
   RESPONSIVE
========================== */

/* Tablet: el sidebar se angosta un poco */
@media (max-width: 992px) {
  :root {
    --sidebar-width: 210px;
  }
}

/* Móvil: sidebar se convierte en menú deslizable (off-canvas) */
@media (max-width: 768px) {

  .sidebar {
    background-color: #159599; /* sólido, sin transparencia */
  }

  :root {
    --sidebar-width: 240px;
    --profile-img-size: 110px;
  }

  .menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay.is-open {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: 80px; /* deja espacio para el botón hamburguesa */
  }

  .welcome_inicio_contactos {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 1rem;
  }
}

/* 
creo que este es de otra pagina */
.welcome {
  text-align: center;
  width: 100%;
}

.contact {
  margin-bottom: 20px;
}
