* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.none {
  display: none;
}

#MejoresProyectos {
  display: flex;  
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

#MejoresProyectos h2 {
  font-size: 40px;
  margin: 50px 0 30px;
  font-weight: 200;
  text-align: center;
}

#MenuHS,
#MenuHU,
#MenuHC,
#MenuHA {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: #062F4F;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: right 0.4s ease;
  z-index: 200;
}

#MenuHS.active, 
#MenuHU.active, 
#MenuHC.active, 
#MenuHA.active {
  right: 0;
}

#MenuHS ul,
#MenuHU ul,
#MenuHC ul,
#MenuHA ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: start;
  display: flex;
  width: 80%;
  flex-direction: column;
  margin-left: 20px;
}

#MenuHS li,
#MenuHU li, 
#MenuHC li,
#MenuHA li {
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: start;
  padding: 10px 15px;
  border-radius: 8px;
  border: 5px solid transparent;
  transition: all .3s;
}

#MenuHS li:hover,
#MenuHU li:hover,
#MenuHC li:hover,
#MenuHA li:hover {
  background-color: #062640;
  border-left: 5px solid white;
}

#MenuHS a,
#MenuHU a,
#MenuHC a,
#MenuHA a {
  text-decoration: none;
  color: white;
  font-size: 30px;
  transition: color 0.3s;
}

.iDesplegable {
  color: white;
  font-size: 50px;
  margin: 0 10px;
  padding: 0 20px;
}

.HeaderLogin {
  background-color: #062F4F;
  padding: 5px 10px;
  border-radius: 8px;
}

#IconUserHU,
#IconUserHC,
#IconUserHA {
  cursor: pointer;
}

#Hero {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  position: relative;
}

.Hero__article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 50%;
}

.Hero__article:first-child {
  background-image: url(../Imagenes/FondoHome.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.Hero__article-div:last-child {
  display: flex;
  height: 70%;
  width: 100%;
  justify-content: center;
  align-items: center;
}


.Hero__article-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  padding: 0 10%;
  color: white;
  text-align: center;
}

#HeaderHS, 
#HeaderHU, 
#HeaderHC, 
#HeaderHA {
  margin: 50px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 80%;
}


#HeaderHS {
  width: 90%;
  margin: 50px 15px 30px;
}

#HeaderHS a, 
#HeaderHU a, 
#HeaderHC a, 
#HeaderHA a {
  color: white;
  text-decoration: none;
  font-size: 23px;
  margin: 0 5px;
  cursor: pointer;
}

#HeaderHS a::after, 
#HeaderHU a::after, 
#HeaderHC a::after, 
#HeaderHA a::after  {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: white;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.5s;
}

#HeaderHS a:hover::after, 
#HeaderHU a:hover::after, 
#HeaderHC a:hover::after, 
#HeaderHA a:hover::after {
  transform: scaleX(1);
}

h1 {
  font-size: 60px;
  font-weight: 800;
}

.Hero__article-div-p {
  margin: 20px 0 30px 0;
  font-size: 20px;
}

.Hero__article-div-button {
  border-radius: 8px;
  background-color: #062F4F;
  color: white;
  border: 1px solid rgb(255, 255, 255);
  padding: 20px 50px;
  font-size: 20px;
}

.black_div {
  background-color: #2C2C2C;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 20%;
  clip-path: polygon(0 58%, 100% 39%, 100% 100%, 0% 100%);
}

.Hero__article-div-h2 {
  font-size: 190px;
  color: black;
}

#Hero__article {
  background-image: url(../Imagenes/FondoManchado.png);
  display: flex;
  align-items: center;
  justify-content: center;
}

.LogoColegio {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  height: 135px;
  width: 135px;
  z-index: 100;
}

.CTPI {
  position: absolute;
  height: 70px;
}

.grua {
  top: 70%;
  left: 53%;
}

.luz {
  top: 35%;
  left: 56%;
}

.compu {
  top: 8%;
  left: 56%;
}

.tuerca {
  top: 50%;
  left: 90%;
}

.grafico {
  top: 20%;
  left: 90%;
}

.CTPOBA {
  z-index: 100;
  height: 70%;
  margin-bottom: 70px;
}

.IconoHS,
.IconoHU,
.IconoHC,
.IconoHA {
  display: none;
}

.IconoHS.visible-forced,
.IconoHU.visible-forced,
.IconoHC.visible-forced,
.IconoHA.visible-forced {
  display: block !important;
  position: absolute;
  top: 10%;
  left: 80%;
  font-size: 50px;
  cursor: pointer;
  color: white;
  z-index: 250;
}

@media (max-width: 1450px) {
  #HeaderHS a {
    font-size: 18px;
  }
}

@media (max-width: 1160px) {
  #HeaderHS a {
    font-size: 14px;
  }
}





@media (max-width: 1350px) {
  #HeaderHS a {
    font-size: 17px;
  }
}

@media (max-width: 1020px) {
  #HeaderHS {
    width: 95%;
  }
}

@media (max-width: 1160px) {
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 960px) {
  #HeaderHS a {
    font-size: 14px;
  }
}

button {
  cursor: pointer;
}


@media (max-width:1100px) { 

  h1 {
    font-size: 50px;
  }

  #HeaderHU a, 
  #HeaderHC a, 
  #HeaderHA a {
    font-size: 20px;
  }
}

@media (max-width: 900px) {

  #HeaderHS, 
  #HeaderHU, 
  #HeaderHC, 
  #HeaderHA {
    display: none;
  }

  #Hero {
    flex-direction: column-reverse;
    min-height: auto;
  }

  .Hero__article {
   height: auto;
   width: auto;
  }

  #Hero__article {
    height: auto ;
    position: relative;
    overflow: visible;
  }

  .CTPOBA {
    height: 400px;
    margin: 50px;
    padding: 40px 0;
  }

  .black_div {
    display: none;
  }

  .Hero__article:first-child {
    border-radius: 20px 20px 0 0;
  }

  .LogoColegio {
    top: 85%;
  }

  #MenuHS a,
  #MenuHU a,
  #MenuHC a,
  #MenuHA a,
  .iDesplegable {
    font-size: 30px;
  }

  #MenuHS li,
  #MenuHU li,
  #MenuHC li,
  #MenuHA li {
    margin: 0;
  }

  .CTPI {
    height: 50px;
  }

  .grua {
    top: 35%;
    left: 10%;
  }

  .luz {
    top: 20%;
    left: 20%;
  }

  .compu {
    top: 7%;
    left: 15%;
  }

  .tuerca {
    top: 30%;
    left: 70%;
  }

  .grafico {
    top: 15%;
    left: 75%;
  }

  .Hero__article-div:last-child {
    margin: 100px 0;
  }

  .IconoHS,
  .IconoHU,
  .IconoHC,
  .IconoHA {
    display: block;
    position: absolute;
    top: 10%;
    left: 80%;
    font-size: 50px;
    cursor: pointer;
    color: rgb(0, 0, 0);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 250;
    transition: background 0.3s;
  }

  .fa-times {
    color: white !important;
  }
}

@media (max-width:500px) {
  #HeaderHS a, 
  #HeaderHU a, 
  #HeaderHC a, 
  #HeaderHA a {
    font-size: 16px;
  }
}

.tops__article {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 30px 10px 0;
  padding: 10px 100px;
  gap: 20px;
}

.reverse {
  direction: rtl; /* invierte visualmente columnas */
}
.reverse > * {
  direction: ltr; /* mantiene texto y botones normales */
}

.tops__article-divImg {
  width: 100%;
  max-width: 622px;
  aspect-ratio: 622 / 350;
}
.tops__article-divImg-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  object-fit: cover;
}

.tops__article-lineas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 103%;
}

.tops__article-lineas::before,
.tops__article-lineas::after {
  content: "";
  width: 1px;
  flex: 1; 
  background-color: black;
}

.tops__article-lineas-circulo {
  margin: 10px;
  width: 35px;
  height: 35px;
  border: 1px solid black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  background-color: white;
  position: relative;
  z-index: 1;
}

.tops__article-divcard {
  width: 100%;
}

.tops__article-divcard-div-text {
  font-size: 20px;
}

.tops__article-divcard-buttons {
  display: flex;
  justify-content: start;
  gap: 30px;
}

.tops__article-divcard-buttons:last-child {
  margin: 30px 0;
}

.tops__article-divcard-buttons-button {
  font-size: 20px;
  padding: 10px 20px;
  border-radius: 10px;
}

.blanco {
  background-color: white;
  border: 2px solid #062F4F;
}
.azul {
  background-color: #062F4F;
  color: #FEE9E7;
  border: none
}

.article-wrapper {
  position: relative; 
}


.article-overlay {   
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 15vh;
}


.article-overlay .btn-overlay {
  padding: 10px 30px;
  border-radius: 10px;
  background-color: #062F4F;
  color: #FEE9E7;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}
.article-overlay .btn-overlay:hover {
  background-color: #084070;
}

@media (max-width: 768px) {
  .tops__article {
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
  }

  /* Orden correcto */
  .tops__article-lineas {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    margin: 15px 0;
    color: black;
  }

  .tops__article-divImg {
    order: 2;
    width: 90%;      
    max-width: 400px; 
  }

  .tops__article-divcard {
    order: 3;
    width: 90%;    
    max-width: 500px;
    margin-top: 15px;
  }

  /* Líneas horizontales */
  .tops__article-lineas::before,
  .tops__article-lineas::after {
    content: "";
    height: 1px;
    width: 34vw !important;     
    margin: 0 10px; 
    background-color: black;
  } 

  /* Círculo como en desktop */
  .tops__article-lineas-circulo {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid black;
    background: white;
    color: black;   
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .tops__article {
    padding: 0 20px;
  }

  .tops__article-divcard-buttons-button:first-child {
    display: none;
  }

  .tops__article-divcard-buttons-button {
    padding: 10px 20px;
    border-radius: 10px;
    align-self: center;
  }

  .tops__article-divcard-buttons {
    justify-content: center;
  }

}

@media (max-width: 560px) {
  .IconoHS,
  .IconoHU,
  .IconoHC,
  .IconoHA {
    left: 70%;
    padding: 10px;
  }
}

@media (max-width: 400px) {

  h1 {
    font-size: 30px;
  }

  .Hero__article-div-button {
    padding: 15px;
  }

  .IconoHS,
  .IconoHU,
  .IconoHC,
  .IconoHA {
    left: 65%;
    top: 5%;
  }
}