/* =========================================================
   === RESET ===
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

/* =========================================================
   === COLORES BASE ===
========================================================= */
:root {
  --fondo-principal: #1E2A38;
  --color-secundario: #E5E5E5;
  --acento: #2A9D8F;
  --texto-principal: #F8F9FA;
  --texto-secundario: #B0B0B0;
}

/* =========================================================
   === BODY ===
========================================================= */
body {
  background-color: var(--fondo-principal);
  color: var(--texto-principal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================================
   === NAVBAR ===
========================================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #162029;
  border-bottom: 2px solid var(--acento);
  position: relative;
  z-index: 1000;
  box-shadow: none;
  /* evita línea doble al cambiar modo */
}

.navbar .logo {
  font-size: 1.6rem;
  color: var(--texto-principal);
  font-weight: bold;
}

/* --- Menú estándar --- */
.nav {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  border-top: none;
  /* evita línea verde extra */
}

.nav a {
  color: var(--texto-principal);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--acento);
}

/* --- Botón Hamburguesa --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 21px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--texto-principal);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* --- Estado del ícono abierto --- */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* =========================================================
   === NAVBAR RESPONSIVE ===
========================================================= */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    flex-direction: column;
    align-items: center;
    background-color: #162029;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    display: none;
    padding: 1.5rem 0;
    border-top: none;
    /* quitamos línea que causaba el borde doble */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* sutil separación visual */
  }

  .nav.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* =========================================================
   === MODO CLARO NAVBAR ===
========================================================= */
.light-mode .navbar {
  border-bottom: 2px solid var(--acento);
  box-shadow: none;
}

.light-mode .nav {
  background-color: #f5f5f5;
  border-top: none;
}

/* =========================================================
   === PRESENTACIÓN PRINCIPAL ===
========================================================= */
.presentacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 60px 40px;
  max-width: 1100px;
  margin: 60px auto;
  background-color: #243240;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* --- Bloque Izquierdo --- */
.bloque-izquierdo {
  flex: 1;
  text-align: center;
  border-right: 2px solid var(--color-secundario);
  padding-right: 30px;
}

.foto {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 5px solid var(--acento);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.foto:hover {
  transform: scale(1.05);
}

.bloque-izquierdo h2 {
  color: var(--texto-principal);
  font-size: 1.8rem;
}

.bloque-izquierdo h4 {
  color: var(--acento);
  font-weight: normal;
  margin-top: 8px;
}

/* --- Bloque Derecho --- */
.bloque-derecho {
  flex: 2;
}

.bloque-derecho h3 {
  color: var(--acento);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.bloque-derecho p {
  color: var(--texto-secundario);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.6;
}

.info-contacto p {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--texto-secundario);
}

/* =========================================================
   === BOTONES ===
========================================================= */
.btn {
  display: inline-block;
  background: var(--acento);
  color: var(--texto-principal);
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, transform 0.3s;
}

.btn:hover {
  background: #21867b;
  transform: scale(1.05);
}

/* =========================================================
   === SECCIÓN DOS BLOQUES ===
========================================================= */
.info-dos-bloques {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 30px;
  padding: 60px 40px;
  max-width: 1100px;
  margin: 60px auto;
  background-color: #243240;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border-top: 2px solid var(--acento);
}

.bloque-info {
  flex: 1;
  padding: 30px;
  background-color: #1E2A38;
  border-radius: 10px;
  color: var(--texto-principal);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.bloque-info:hover {
  background-color: #223246;
  transform: translateY(-5px);
}

.bloque-info h2 {
  color: var(--acento);
  font-size: 1.6rem;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--acento);
  padding-bottom: 8px;
}

.bloque-info p {
  color: var(--texto-secundario);
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 1rem;
}

.bloque-info span {
  color: var(--acento);
  font-size: 0.9rem;
}

/* =========================================================
   === SECCIÓN HERRAMIENTAS Y LENGUAJES ===
========================================================= */
.herramientas-lenguajes {
  background-color: #243240;
  padding: 60px 20px;
  text-align: center;
  margin-top: 60px;
  border-top: 2px solid var(--acento);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.herramientas-lenguajes h2 {
  font-size: 1.8rem;
  color: var(--texto-principal);
  margin-bottom: 40px;
}

.contenedor-hl {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

.bloque-hl {
  background-color: #1E2A38;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  flex: 1 1 350px;
  max-width: 450px;
}

.bloque-hl h3 {
  color: var(--acento);
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--acento);
  padding-bottom: 6px;
}

.logos-hl {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 15px;
}

.logos-hl img {
  width: 60px;
  height: 60px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(1);
}

.logos-hl a:hover img {
  transform: scale(1.2);
  filter: brightness(1.2);
}

/* =========================================================
   === FOOTER ===
========================================================= */
footer {
  background: #162029;
  color: var(--texto-secundario);
  text-align: center;
  padding: 1rem;
  margin-top: 60px;
  font-size: 0.9rem;
}

/* =========================================================
   === RESPONSIVE GENERAL ===
========================================================= */
@media (max-width: 900px) {
  .presentacion {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
  }

  .bloque-izquierdo {
    border-right: none;
    border-bottom: 2px solid var(--color-secundario);
    padding-bottom: 20px;
  }

  .foto {
    width: 160px;
    height: 160px;
  }

  .bloque-derecho {
    padding-top: 20px;
  }

  .info-dos-bloques {
    flex-direction: column;
    padding: 40px 20px;
  }

  .bloque-info {
    width: 100%;
  }
}

/* --- Pantallas grandes o TV --- */
@media (min-width: 1500px) {
  .presentacion {
    max-width: 1400px;
    padding: 80px;
  }

  .foto {
    width: 260px;
    height: 260px;
  }

  .bloque-derecho h3 {
    font-size: 2rem;
  }

  .bloque-derecho p {
    font-size: 1.2rem;
  }

  .info-dos-bloques {
    max-width: 1400px;
  }
}

/* =========================================================
   === OCULTAR SCROLL ===
========================================================= */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

html {
  scrollbar-width: none;
}

body {
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =========================================================
   === BOTÓN MODO OSCURO / CLARO ===
========================================================= */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--acento);
  color: var(--texto-principal);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, background-color 0.3s ease;
  z-index: 9999;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background-color: #21867b;
}

/* =========================================================
   === MODO CLARO GLOBAL ===
========================================================= */
:root.light-mode {
  --fondo-principal: #f5f5f5;
  --color-secundario: #d1d1d1;
  --acento: #2A9D8F;
  --texto-principal: #1E2A38;
  --texto-secundario: #555;
}

.light-mode body {
  background-color: var(--fondo-principal);
  color: var(--texto-principal);
}

.light-mode header,
.light-mode footer,
.light-mode .navbar {
  background-color: #eaeaea;
  color: var(--texto-principal);
  border-bottom: 2px solid var(--acento);
}

.light-mode .presentacion,
.light-mode .info-dos-bloques,
.light-mode .herramientas-lenguajes,
.light-mode .bloque-info,
.light-mode .formacion-container,
.light-mode .formacion-card {
  background-color: #ffffff;
  color: var(--texto-principal);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.light-mode .nav a {
  color: var(--texto-principal);
}

.light-mode .nav a:hover {
  color: var(--acento);
}

.light-mode .menu-toggle span {
  background-color: var(--texto-principal);
}

/* =========================================================
   === CORRECCIONES VISUALES NAV ===
========================================================= */
.light-mode .nav {
  background-color: #eaeaea;
  border-top: 2px solid var(--acento);
}

header,
.navbar {
  border-top: none !important;
  box-shadow: none !important;
}

.navbar {
  border-top: 0;
  margin-top: 0;
}