/* ================= HEADER ================= */
.header {
  top: 0;
  left: 0;
  width: 100%;
  height: 140px;
  z-index: 1000;
  flex-shrink: 0;
  background-image: url("/assets/img/bannerTechnology.png");
  background-size: contain;
  background-position: center;
  background-repeat: repeat;
  min-height: 90px;
  border-bottom: none;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 90px;
  display: block;
}

.nav {
  display: flex;
  gap: 12px;
}

.menu-button {
  height: 38px;
  padding: 0 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, #5adaff, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ================= GLOBAL ================= */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-y: auto;    /* permite scroll vertical */
  background-color: hsl(240, 89%, 7%);
  color: #f8f9fa;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.main-container {
  max-width: 1200px;
  width: 90%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* ← cambio clave */
}
 .main-visual {
  max-width: 900px;
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
}

.wiki-intro {
  display: flex;
  flex-direction: column;
  height: 90%;
}

.wiki-intro h2 {
  margin-top: 4px;
  margin-bottom: 8px;
  /* antes suele ser ~20px */
}

.wiki-intro p {
  margin-top: 0;
}

/* ============================== HOME – IMAGEN E2E ============================== */
.home-intro .e2e-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* importante */
  margin-top: 0px;
  transition: transform 0.3s ease;
}

.home-intro .e2e-image {
  width: auto;
  height: auto;
  max-width: 90vw;
  /* nunca más ancho que la pantalla */
  max-height: 50vh;
  /* nunca más alto que la pantalla visible */
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* 🔑 CLAVE: NO usamos scale() libre*/
.home-intro .e2e-image:hover {
  transform: scale(1.04);
}

.e2e-image {
  max-width: 900px;
  width: 100%;
  border-radius: 12px;
}
/* ============================== LIGHTBOX ==============================
.image-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.image-lightbox.active {
  display: flex;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 15px #000;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* ================= FOOTER ================= */
.footer {
  width: 100%;
  height: auto;
  /* Ajustable a contenido */
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  /* Permite dos líneas verticales */
  align-items: center;
  justify-content: center;
  margin-top: 5px;
  padding: 10px 0;
  /* Un poco de espacio vertical */
}

.footer p {
  max-width: 1200px;
  margin: 0 auto 5px auto;
  /* Separación entre líneas */
}

.footer-wiki a {
  color: #00bfff;
  /* Color del enlace, podés cambiar */
  font-weight: bold;
  text-decoration: none;
}

.footer-wiki a:hover {
  text-decoration: underline;
  /* Efecto al pasar mouse */
}

/* ================= NOTEBOOK / LAPTOP ================= */
@media (max-width: 1400px) {

  /* Imagen un poco más chica y proporcional al viewport */
  .home-intro .e2e-image {
    max-height: 50vh;
  }

  /* Evita espacio vertical innecesario */
  .wiki-intro {
    height: auto;
  }
}

/* ================= TABLET GRANDE ================= */
@media (max-width: 900px) {
  .header-inner {
    padding: 10px 16px;
  }

  .nav {
    gap: 8px;
  }

  .menu-button {
    font-size: 13px;
    height: 34px;
  }

  /* Mejor usar vh en vez de % */
  .home-intro .e2e-image {
    max-height: 55vh;
    width: auto;
  }
}

/* ================= TABLET / MOBILE GRANDE ================= */
@media (max-width: 768px) {

  html,
  body {
    overflow-y: auto;
    /* aseguramos scroll vertical*/
  }

  main {
    height: auto;
  }

  .home-intro .e2e-image {
    max-height: 60vh;
    max-width: 95vw;
  }
}

/* ================= MOBILE MEDIANO ================= */
@media (max-width: 576px) {
  .main-container {
    width: 94%;
    /* más aire lateral */
  }

  .home-intro .e2e-image {
    max-height: 50vh;
    max-width: 95vw;
  }
}

/* ================= CELULAR ESTÁNDAR (375–430px) ================= */
@media (max-width: 480px) {
  body {
    overflow-y: auto;
  }

  .main-container {
    width: 94%;
    /*margin: 95px auto 0;*/
    /* título un poco más arriba */
  }

  .header {
    height: 69px;
  }

  .logo img {
    height: 55px;
  }

  .menu-button {
    font-size: 12px;
    padding: 0 12px;
    height: 30px;
  }

  .home-intro .e2e-image {
    max-height: 48vh;
    max-width: 95vw;
  }

  .footer {
    font-size: 0.65rem;
  }
}

/* ================= MINI REAL 320x568 ================= */
@media (max-width: 359px) and (max-height: 600px) {
  html {
    height: auto;
  }

  body {
    height: auto;
    min-height: auto;
    display: block;
    /* rompe el flex */
    overflow-y: auto;
    /* activa scroll */
  }

  main {
    display: block;
    /* rompe centrado vertical */
    height: auto;
  }

  .main-container {

    width: 94%;
  }

  .home-intro .e2e-image {
    width: 92vw;
    max-height: none;
    /* no limitar por vh */
  }

  .footer {
    margin-top: 12px;
  }
}

/* ================= 360x780 – AJUSTE PROPORCIONAL REAL ================= */
@media (width: 360px) and (min-height: 700px) {

  html,
  body {
    overflow: hidden;
  }

  main {
    align-items: flex-start;
  }

  .main-container {
    margin-top: 70px;
  }

  .wiki-intro h2 {
    margin-top: 0;
    margin-bottom: 4px;
  }

  .wiki-intro p {
    margin-bottom: 6px;
  }

  .home-intro .e2e-image {
    max-height: calc(100dvh - 300px);
    width: auto;
  }

  .footer {
    margin-top: 5px;
    padding: 4px 0;
  }


/*@media (max-width: 768px) {
  main {
    overflow: visible;
    align-items: flex-start;
  }*/


/*@media (max-width: 400px) and (min-height: 700px) {
  .main-container {
    margin-top: 65px;
    /* antes estaba más alto
  }*/

  .wiki-intro h2 {
    margin-top: 0;
  }
}
/* MOBILE – contenido pegado debajo del header */
@media (max-width: 768px) {

  main {
    height: auto;
    justify-content: flex-start; /* contenido debajo del header */
    align-items: center; /* mantiene centrado horizontal */
  }

/* MOBILE – header proporcional real */

  .header {
    height: 80px;   /* altura fija real en mobile */
  }
  .main-container {
    margin-top: 4px; /* debajo del header */
  }
 .wiki-intro h1 {
    margin-top: 4px;  /* pequeño espacio real debajo del header */
  }
   .home-intro .e2e-image {
    max-height: 60vh;
    max-width: 95vw;
  }

}
@media (orientation: landscape) and (max-height: 500px) {

  html, body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  main {
    align-items: flex-start;
  }

  .home-intro .e2e-image {
    max-height: 70vh;
  }

}

