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

/* Estilo para titulo y logo*/
.logoMain {
    display: flex;
    flex-wrap: wrap;
    background-color: black;
    color: white;
    padding: 1rem;
    height: 180px;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.logoMain img {
    width: clamp(180px, 28vw, 350px);
}

.logoMain .titulo {
    max-width: 700px;
    text-align: center;
    font-family: 'Source Sans 3', sans-serif;
}

.logoMain .titulo h1 {
    font-size: clamp(1rem, 2vw, 1.6rem);
    margin: 0.5rem 0;
}

header {
  background-color: black;
}

/* Estilo para menú */
nav {
    background-color: black;
    position: relative;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo de los enlaces del menú */
.nav-links{
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    gap: 20px;
}

.nav-links li {
  margin-right: 5px 10px;
}

.nav-links a {
  color: white;
  padding: 10px 10px;
  display: block;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.8s ease;
}

.nav-links li:hover {
  background-color: darkorange;
  border-radius: 10px;
}

/* Estilo de reducción del menú */
.menu-icon, .close-icon {
  display:none;
  cursor: pointer;
  font-size: 2rem;
  color: white;
  margin-right: 20px;
}

#menu-toggle {
  display: none;
}

/* Estilo del Carousel */
.carousel-container {
  margin:0 auto;
  max-width: auto;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to top, rgba(0,0,0,0.8));
}

.carousel {
  height: 50vh;
  max-height: 600px;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  display: block;
}

/* Estilo para el texto del carousel */
.carousel-text {
  padding: 60px 250px;
  padding-top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  position: absolute;
  color: white;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.carousel-text h1 {
  margin-bottom: 15px;
  margin-right: 30%;
  color: #00B050;
  font-weight: bold;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.carousel-text h2 {
  margin-bottom: 10px;
  color: white;
  font-weight: bold;
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.carousel-text p {
  max-width: 800px;
  color: white;
  font-size: clamp(0.8rem, 1.5vw, 1.2rem);
  line-height: 1.5;
}

/* Estilo para los botones del carousel */
button.prev, button.next {
  background-color: #312f2f;
  padding: 15px;
  width: 50px;
  height: 50px;
  top: 50%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  transform: translateY(-50%);
}

button.prev:hover, button.next:hover {
  background-color: #00B050;
}

button.prev {
  left: 20px;
}

button.next {
  right: 20px;
}

/* Estilo para los indicadores */
.carousel-indicador {
  left: 50%;
  bottom: 20px;
  gap: 10px;
  position: absolute;
  display: flex;
  transform: translateX(-50%);
}

.indicador {
  width: 15px;
  height: 15px;
  background-color: #00B050;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicador.active {
  background-color: #ecf0f1;
  transform: scalae(1.2);
}

/* Estilo para la sección de nosotros */
.nosotros {
  width: 85%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-left: 150px;
}

.nosotros img {
  width: 250px;
  margin-top: 70px;
}


/* Estilo de botones de sección nosotros*/
.boton {
  position: relative;
  display: flex;
  width: 250px;
  height: 70px;
  justify-content: center;
  align-items: center;
  background-color: black;
  border: none;
  color: white;
  font-size: 25px;
  padding: 10px 25px;
  cursor: pointer;
  border-radius: 12px;
  margin-top: 70px;
  margin-bottom: 20px;
}

.boton:hover {
  background-color: darkorange;
  transition: background-color 0.3s ease;
}

/* Estilo de la caja de información de los botones */
#cajainfo{
  display: none;
  width: 65%;
  padding: 20px;
  background-color: rgb(221, 223, 222);
  border: none;
  border-radius: 10px;
  color: rgb(54, 54, 54);
  margin-left: 27%;
  box-shadow: 00 4px 8px rgba(0, 0, 0, 0.1);
 }

#info_cont {
  margin: 0;
  font-size: 18px;
}

#info_cont li {
  margin-left: 50px;
}

.texto_final {
  display: flex;
  color: #028658;
  font-size: 50px;
  font-weight: bold;
  width: auto;
  height: 150px;
  justify-content: center;
  align-items: center;
}

/* Footer */
footer {
    background-color: black;
    color: darkorange;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px 0;
    min-height: 200px;
}

footer h4, footer ul {
    color: white;
    font-weight: normal;
}

footer ul {
    list-style-type: none;
    padding-left: 0;
    margin: 10px 20px;
}

footer ul.ligas li::before {
    content: "\2794";
    margin-right: 15px;
    font-weight: bold;
    font-size: 15px;
    color: darkorange;
}

.accesos, .contacto {
    margin: 30px 0;
    width: 400px; /* Ancho fijo para las columnas */
    line-height: 1.6;
}

.uam {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    width: 200px; /* Ancho fijo para la columna del logo */
}

.uam img {
    height: 80px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.uam img:hover {
    opacity: 1;
}

.ligas a {
  text-decoration: none;
  font-weight: bold;
  color: inherit;
  transition: 
    transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1.5),
    color 0.2s ease;
}

.ligas a:hover {
  transform: scale(1.1) translateX(5px);
  color: darkorange;
  text-shadow: 0 0 5px rgba(255, 140, 0, 0.3);
}

/* Estilo para miembros */
.miembrosini {
    display: flex;
    position: relative;

    img {
        width: 100%;
        height: 180px;
    }

    h1 {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: white;
      font-size: 2.5rem;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      text-align: center;
    }
}

/* Estilo de coordinación de miembros */
.areas {
  margin-top: 20px;
  margin-left: 40px;
  margin-right: 100px;
  font-size: clamp(1rem, 2vw, 1.5rem);

  hr {
    border: #444 solid 4px;
  }
}

/* Estilo de titulo de investigadores miembros*/
.areas2 {
  margin-top: 10px;
  margin-left: 40px;
  margin-right: 100px;
  font-size: clamp(1rem, 2vw, 1.5rem);

  hr {
    border: #444 solid 4px;
  }
}

/* Estilos de titulo de investigación */
.investigacionini {
    position: relative;
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.imginv {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.6);
}

.investigacion-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    margin-right: 300px;
}

.tituloinv {
    font-size: clamp(2rem, 4vw, 4rem);
    margin: 0;
    text-shadow: 0 0 20px rgba(0,0,0,0.7);
    font-weight: 800;
}

.proyectos-inv {
  margin-top: 20px;
  margin-left: 40px;
  margin-right: 100px;
  font-size: clamp(1rem, 2vw, 1.5rem);

  hr {
    border: #444 solid 4px;
  }
}

/* Estilo para texto de proyecto de investigación */
.proy-contenedor {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 90%;
    margin: 2rem auto;
}

.proy-texto {
    padding: 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #dddddd 0%, #d5d8dd 100%);
    color: #2c3e50; 
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
}

.proy-texto p {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.5rem);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.proy-texto:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Contenedor de proyectos  */
.contenedor-proy {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding: 40px;
  max-width: 1900px;
  margin: 0 auto;
  margin-top: -40px;
  gap: 80px;
}

/* Caja de proyecto con ajustes para la imagen */
.cajaproyecto {
  background: #1a1a1a;
  border-radius: 15px;
  padding: 30px;
  max-width: 300px;
  margin: 30px auto;
  margin-top: 80px; 
  text-align: center;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px #016ac0;
  border: 1px solid #333;
  position: relative; 
}

/* Estilo para la imagen ORIGINAL (sin recortar) */
.cajaproyecto .imgproy {
  width: auto; 
  height: auto; 
  max-width: 100%; 
  max-height: 200px; 
  object-fit: contain; 
  margin: -50px auto 20px;
  border-radius: 10px;
  display: block;

}

/* Ajustes para hover */
.cajaproyecto:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(6, 111, 248, 0.5);

}

.cajaproyecto:hover .imgproy {
  border-color: #0068bd;
}

/* Texto y otros elementos (mantén esto igual) */
.cajaproyecto .posicion {
  color: #00B050;
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 1px;
}


/* Estilo de contenedor de miembros */
.miembros-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding: 40px;
  max-width: 1900px;
  margin: 0 auto;
  margin-top: -40px;
}

.cajamiembros {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 30px;
  max-width: 280px;
  margin: 40px auto;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-align: center;
  overflow: hidden;
  margin-bottom: 4px;
}

.cajamiembros::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  animation: borderAnimation 3s infinite alternate;
}

.cajamiembros.izt::before {
    background: linear-gradient(to right, #01d15f, #00B050);
}

.cajamiembros.cua::before {
    background: linear-gradient(to right, #f88222, #ff7300);
}

.cajamiembros.xoc::before {
    background: linear-gradient(to right, #096bff, #0059df);
}

.cajamiembros.azc::before {
    background: linear-gradient(to right, #ff3300, #e72300);
}

@keyframes borderAnimation {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.cajamiembros .imgmiembro {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10%;
  border: 3px solid #f5f5f5;
}

.cajamiembros h2 {
  color: #1d1d1d;
  font-size: 1.5rem;
  margin: 10px 0 5px;
}

.cajamiembros .position {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}
 
.cajamiembros.izt .position {
  color: #00B050
}

.cajamiembros.cua .position {
  color: #ff7300
}

.cajamiembros.xoc .position {
  color: #0059df
}

.cajamiembros.azc .position {
  color: #e72300
}

.cajamiembros .speacialty {
  color: #666666;
  margin: 15px 0 20px;
  font-size: 15px;
}

.cajamiembros .logoIco {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.cajamiembros .logoIco img {
  width: 25px;
  opacity: 0.6;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.cajamiembros .logoIco img:hover {
  opacity: 1;
  transform: scale(-3px);
}

/* Estilos para el div de reparación */
  .reparacion {
      background-color: white;
      border-radius: 10px;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 30px;
  }
  
  .reparacion:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }
  
  /* Estilos para la imagen */
  .reparacion img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      margin-bottom: 20px;
      transition: transform 0.3s ease;
  }
  
  .reparacion:hover img {
      transform: scale(1.03);
  }

/* Responsive */

@media (max-width: 1300px){
  .nosotros {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-left: 0;
    }

    .texto_final {
        font-size: 30px;
        text-align: center;
        margin-left: -20px;
    }

    #cajainfo {
        width: auto;
        margin-left:500px;
        padding: 20px;
        margin-top: 5%;
        margin-left: 0;
        background-color: #f2f2f2;
        border: 1px solid #ccc;
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .boton {
        width: 200px;
        height: 50px;
        font-size: 20px;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
  /* Estilo de reducción del menú */
  nav {
    padding: 30px 20px;
    position: relative;
    justify-content: space-between;
    z-index: 10;
  }

  .nav-links {
    padding: 10px 0;
    width: 100%;
    left: -100%;
    top: 60px;
    position: absolute;
    background-color: black;
    flex-direction: column;
    align-items: center;
    z-index: 5;
  }

  .nav-links li {
    margin: 10px 0;
    text-align: center;
  }

  /* Estilo de reducción del menú */
  #menu-toggle:checked ~ .nav-links {
    left: 0;
  }

  #menu-toggle:not(:checked) ~ .menu-icon {
    display: block;
  }

  #menu-toggle:checked ~ .close-icon {
    display: block;
    position: absolute;
    right: 20px;
    top: 10px;
  }

  #menu-icon, .close-icon {
    background-color: black;
    z-index: 2;
  }

  .nav-links {
    transition: left 0.3s ease-in-out;
  }

  /* Estilo para el carousel */
  .carousel {
    height: 50vh;
    position: relative;
    z-index: 1; 
  }

  .carousel-text { 
    padding: 90px;
    padding-top: 400px;
  }

  button.prev, button.next {
    width: 40px;
    height: 40px;
    font-size: 20px;
    z-index: 2;
  }

  footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: auto;
    }
    
  .accesos, .contacto, .uam {
      margin: 20px 0;
      width: 100%;
  }
  
  footer ul {
      margin: 10px 0;
  }
  
  footer ul.ligas li {
      text-align: left;
      margin-left: 20%;
  }

  .cajamiembros {
    margin: 20px auto;
  }

  .gradient-text-blocks {
      padding: 0 1rem;
  }
  
  .text-block {
      padding: 1.2rem;
  }

  .cajaproyecto {
    max-width: 280px;
  }

  .contenedor-proy {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
  }

  .cajaproyecto {
    max-width: 250px;
    margin-top: 2.5rem;
    padding: 1rem;
  
  }
  
  .cajaproyecto .imgproy {
    max-height: 140px;
    margin: -2.5rem auto 0.5rem;
  }

  .reparacion {
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                padding: 40px;
            }
            
            .reparacion img {
                max-width: 100%;
                margin-bottom: 0;
                margin-right: 30px;
            }
  }

@media (max-width: 480px) {
    footer ul.ligas li {
        margin-left: 10%;
    }
    
    .uam img {
        height: 60px;
    }
  }
