html {
  scroll-padding-top: 70px; 
}

#imgPerfil,#Intro{
    display:flex;
    position:relative;
    width:100%
}

#PerfilImg{
    border-radius:200px !important;
}

#NomDes{
    margin:auto;
    padding:10px;
}

#video{
    padding:40px;
}
#imgexp{
  width: 50%;
}

#BloqueExp,#BloqueProyecto{
    border-radius: 20px;
    border: 0.5px solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center;
}

#BloqueExp{
    border-color:#474536;
}

#Bloqueimgexp{
  display:flex;
  justify-content: center;
}

#BloqueProyecto{
    border-color:#435153;
}

body,#Experiencia,#Proyectos{
    background-color:#2e2e2e !important;
    color:white;
}

#BloqueExp:hover,#BloqueProyecto:hover{
 transform: scale(1.03);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}



#TituloSectionExp{
    color:#ffeb3b;
}

#TituloSectionProyectos{
    color:#00bcd4;
}

#TituloExp{
    color:white !important;
}

#TituloSectionLeng,#TituloSectionHer,#TituloSectionTesting{
    color:#e91e63
}

#TituloSectionEst{
    color:#8bc34a;
}

#inicio{
    height: 100vh;
    background: linear-gradient(to bottom, #2e2e2e 0%, #25313b 30%, #25313b 70%, #2e2e2e 100%);
}

@media (max-width: 768px) {
  #imgPerfil img, 
  #inicio img {
    width: 150px;
    height: auto;
    max-width: 100%;
    margin: 1rem auto;
    display: block;
    border-radius: 200px;
  }

  #Intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #NomDes {
    padding: 1rem;
    width:75% !important;
  }



  #BloqueExp,
  #BloqueProyecto {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  #BloqueExp .col-md-6,
  #BloqueProyecto .col-md-6 {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    padding: 0 !important;
  }

  #video {
    padding: 0 !important;
  }

  #BloqueExp video,
  #BloqueProyecto video {
    width: 100%;
    height: auto;
    border-radius: 12px;
  }


  #BloqueExp:hover,
  #BloqueProyecto:hover {
    transform: none;
    box-shadow: none;
  }
}

.ImgAndName {
  box-sizing: border-box;
  width: 150px;
  height: 170px;
  background-color: rgb(39, 38, 38);
  border-radius: 15px;
  margin: 10px;
  transition: 0.3s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}

.ImgAndName img.imglenguaje {
  width: auto;
  height: 60px;
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.ImgAndName:hover {
  box-shadow: 2px 2px 8px black;
  transform: scale(1.1);
}

#Lenguajes,#Herramientas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

#navExp:hover{
  color:#ffeb3b !important;
  transition:0.3s;
}

#navPro:hover{
  color:#00bcd4 !important;
  transition:0.3s;
}

#navTec:hover{
  color:#e91e63 !important;
  transition:0.3s;
}

#navEst:hover{
  color:#8bc34a !important;
  transition:0.3s;
}

@media (min-width: 992px) {
  nav.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030; 
  }

  body {
    padding-top: 70px; 
  }
}

.CertContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

.CertCard {
  width: 100%;
  max-width: 300px;
  background-color: rgb(39, 38, 38);
  border-radius: 15px;
  padding: 15px;
  box-sizing: border-box;
  text-align: center;
  color: white;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.CertCard:hover {
  box-shadow: 2px 2px 10px black;
  transform: scale(1.03);
}

.cert-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

.cert-title{
  font-size: 18px;
  margin: 5px 0;
}

.cert-year {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 10px;
}

.view-btn {
  background-color: #555;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.view-btn:hover {
  background-color: #777;
}

.close {
  position: absolute;
  top: 30px;
  right: 45px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.close:hover {
  color: #bbb;
}

@media (max-width: 480px) {
  .cert-img {
    height: 140px;
  }

  .CertCard {
    max-width: 90%;
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background-color: #25d366;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 40px;
  height: 40px;
}

#btnwpp:hover{
  cursor:pointer;
}

.logoredes{
  width:7vh;
  padding:5px;
}

.logoredes:hover{
  cursor:pointer;
}


#Footer{
  color: #575050;
}

#Footer:hover {
  background: linear-gradient(90deg, #c45cad, #14c0c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  transition:transform 0.3s ease;
}

#Nombre {
  background: linear-gradient(90deg, #75d475, #df8d11);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  transition:transform 0.3s ease;
}

#bio{
  padding-bottom:20px;
}

#IniContainer{
  padding:20px;
}


.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  will-change: opacity, transform; /* Mejora el rendimiento de la animación */
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

#divcontacto{
  justify-content: center;
  display: flex;
}

#contact{
  width:30%;
}

#inicio {
    padding: 2rem 0;
}

#Nombre {
    font-weight: 700;
    margin-bottom: 1rem;
}

#bio {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.acciones .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* Estilos para los logos de redes */
.redes-container {
    gap: 15px;
}

.logoredes {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.logoredes:hover {
    transform: scale(1.1);
}

#inicio {
    padding: 2rem 0;
}

#Nombre {
    font-weight: 700;
    margin-bottom: 1rem;
}

#bio {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.acciones .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* Estilos para los logos de redes */
.redes-container {
    gap: 15px;
}

.logoredes {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.logoredes:hover {
    transform: scale(1.1);
}

#bloquetextoa1qa{
  padding:15px;
}

/* Estilos específicos para mobile */
@media (max-width: 768px) {
  /* Ajustes generales */
  body {
    padding-top: 0 !important; /* Elimina el padding-top en mobile */
  }
  
  /* Sección inicio */
  #inicio {
    height: auto !important;
    padding: 2rem 0 !important;
  }
  
  #Nombre {
    font-size: 1.8rem !important;
    margin-top: 1rem;
  }
  
  #bio {
    font-size: 0.9rem;
    padding: 0 1rem 1rem !important;
  }
  
  .logoredes{
    width:10vh !important;
  }

  .acciones {
    margin-top: 1rem;
  }
  
  /* Secciones experiencia y proyectos */
  #Experiencia, 
  #Proyectos, 
  #Tecnologias, 
  #Estudios {
    padding: 2rem 0 !important;
  }
  
  .container {
    padding: 0 1rem !important;
  }
  
  h2 {
    font-size: 1.8rem !important;
    margin-bottom: 2rem !important;
  }
  
  /* Bloques de experiencia/proyectos */
  #BloqueExp, 
  #BloqueProyecto {
    margin-bottom: 2rem !important;
    padding: 1.2rem !important;
  }
  
  /* Videos */
  #BloqueExp video, 
  #BloqueProyecto video {
    margin-bottom: 1rem;
  }
  
  /* Tecnologías */
  .ImgAndName {
    width: 120px !important;
    height: 140px !important;
    margin: 5px !important;
  }
  
  .imglenguaje {
    height: 50px !important;
  }
  
  /* Certificados */
  .CertContainer {
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .CertCard {
    max-width: 90% !important;
    margin-bottom: 1rem;
  }
  
  /* Footer */
  footer {
    padding: 2rem 0 !important;
  }
  
  #contact {
    width: 50% !important;
    margin-bottom: 1rem;
  }
  
  /* Ajuste de botón WhatsApp */
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
  }
  
  .whatsapp-float img {
    width: 35px;
    height: 35px;
  }
  
  /* Ajuste de márgenes para textos */
  h4, h5, h6, p {
    margin-bottom: 0.8rem !important;
  }
}

/* Ajustes extra para pantallas muy pequeñas */
@media (max-width: 480px) {
  #Nombre {
    font-size: 1.6rem !important;
  }
  
  h2 {
    font-size: 1.6rem !important;
  }
  
  .ImgAndName {
    width: 100px !important;
    height: 120px !important;
    font-size: 0.9rem;
  }
  
  .imglenguaje {
    height: 40px !important;
  }
  
  #bio {
    font-size: 0.85rem !important;
  }
  
  .whatsapp-float {
    bottom: 10px;
    right: 10px;
    padding: 8px;
  }
  
  .whatsapp-float img {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  /* Ajustes generales */
  body {
    font-size: 0.95rem;
  }
  
  /* Sección inicio */
  #inicio {
    padding: 3rem 0 !important;
  }
  
  #Intro {
    display: flex;
    flex-direction: row !important; /* Fuerza disposición horizontal */
    align-items: flex-start; /* Alinea al inicio */
  }

  /* Columna de texto */
  #NomDes {
    width: 60% !important;
    padding-right: 2rem;
    order: 1; /* Asegura que el texto va primero */
  }

  /* Columna de imagen */
  .col-md-5 {
    width: 40% !important;
    order: 2; /* Asegura que la imagen va después */
    display: flex !important;
    justify-content: center;
  }

  /* Imagen de perfil */
  #PerfilImg {
    max-width: 220px !important;
    margin-top: 0 !important;
    align-self: flex-start; /* Alinea la imagen arriba */
  }

  /* Contenedor de redes sociales - CENTRADO */
  .redes-container {
    display: flex !important;
    width: 100% !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
    margin-top: 1rem;
  }

  /* Iconos */
  .logoredes {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important; /* Evita que se encojan */
  }

  /* Ajuste adicional para asegurar centrado */

  /* Experiencia y proyectos */
  #Experiencia, 
  #Proyectos {
    padding: 3rem 0 !important;
  }
  
  #BloqueExp, 
  #BloqueProyecto {
    flex-direction: column;
  }
  
  #BloqueExp .col-md-6, 
  #BloqueProyecto .col-md-6 {
    width: 100% !important;
    padding: 0 !important;
  }
  
  /* Tecnologías */
  .ImgAndName {
    width: 140px !important;
    height: 150px !important;
    margin: 8px !important;
  }
  
  .imglenguaje {
    height: 65px !important;
  }
  
  /* Certificados */
  .CertContainer {
    justify-content: space-around;
  }
  
  .CertCard {
    max-width: 45% !important;
    margin-bottom: 1.5rem;
  }
  
  /* Redes sociales */
  
  /* Videos */
  #BloqueExp video, 
  #BloqueProyecto video {
    margin-bottom: 1.5rem;
  }
  
  /* Textos */
  h2 {
    font-size: 2rem !important;
  }
  
  h3 {
    font-size: 1.3rem !important;
  }
  
  /* Footer */
  footer {
    padding: 2.5rem 0 !important;
  }
  
  #contact {
    width: 25% !important;
  }
}

@media (min-width: 768px) and (max-width: 992px) and (orientation: landscape) {
  #Intro {
    flex-direction: row !important;
  }
  
  #NomDes {
    width: 55% !important;
  }
  
  #PerfilImg {
    max-width: 220px !important;
  }
}

.acciones .btn {
  padding: 0.6rem 1.8rem !important;
  font-size: 1rem !important;
}

@media (min-width: 768px) and (max-width: 992px) {
  
}

.lang-mobile-btn {
  position: fixed;
  bottom: 90px; /* 10px arriba del botón de WhatsApp */
  right: 20px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2c3e50, #34495e);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.lang-mobile-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  background: linear-gradient(145deg, #34495e, #2c3e50);
}

.lang-flag {
  width: 24px;
  height: auto;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

/* Asegura que no aparezca en desktop */
@media (min-width: 992px) {
  .lang-mobile-btn {
    display: none !important;
  }
}

/* Ajuste para móviles pequeños */
@media (max-width: 400px) {
  .lang-mobile-btn {
    bottom: 80px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  .lang-flag {
    width: 22px;
  }
}