header{
  position: absolute; 
  right: 0;
  width: auto;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  opacity: 0.7;
  padding: 0.5em;
  border:1px solid black; ;
  border-radius: 0 0 0 5px;
}

header > nav > ul {
  display: flex;
  gap: 2em;
  padding-right: 0.5em;
  padding-left: 0.5em;
}


body {
  background-color: rgb(23, 22, 22);
  color: white;
}

.fondo_pantalla {
  position: relative; 
  min-height: 70vh; 
  display: flex;
  flex-direction: column;
  align-items: center; 
}

.fondo_pantalla::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url(/assets/fondo_escritorio.jpg);
  background-size: cover;
  background-position: center;
  filter: opacity(45%); 
  z-index: -1;
}


h1{
  width: 35%;
  font-family: "Raleway";
  margin-top: 1em; 
  border: 2px solid black;
  border-radius: 8px; 
  font-size: 70px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

main{
  display: flex;
  flex-direction: column; 
  align-items: center; 
  padding-top: 25px; 
  padding-bottom: 20px
}

section#caja_flotante {
  width: 65%; 
  margin-top: 3em;
  padding: 2em;
  border: 2px solid black;
  background-color: rgba(0, 0, 0, 0.5); 
  border-radius: 8px; 
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  
}

#sobre_mi {
  font-family: "Open Sans";
  font-size: 40px;
  margin-bottom: 1em;
  display: flex;
  justify-content: center;
}

#text_about_me {
  font-family: "Open Sans";
  font-size: 20px;
  margin-bottom: 2em;
  text-align: center; 
}


#title_tecnologias {
  font-family: "Open Sans";
  margin-top: 2em;
  font-size: 30px; 
  display: flex;
  justify-content: center;
  margin-bottom: 1em;
}

#caja_tarjetas {
  font-family: "Open Sans";
  width: 80%; 
  margin:  auto;
  padding: 2em;
  border: 2px solid black;
  display: flex;
  justify-content: space-around;
  background-color: rgba(255, 255, 255, 0.1); 
  border-radius: 8px;
}

.tarjetas {
  border: 1px solid rgb(12, 12, 12);
  padding: 1.5em;
  margin-bottom: 1em; 
  display: flex;
  flex-direction: column;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5); 
  border-radius: 5px;
}

.tarjetas > h3 {
  margin-bottom: 0.8em;
}

.tarjetas > img {
  width: 120px; 
  height: auto;
  filter: grayscale(100%);
  transition: filter 0.5s;
}
.tarjetas > img:hover{
  filter: grayscale(0%);
}

.tarjetas:hover{
  background-color: rgb(12, 12, 12);
}

#estudios_idiomas{
  width: 80%;
  margin: auto;
  display: flex;
  justify-content: space-around;
  padding: 20px 0;
}

#estudios_idiomas > div{
  flex-basis: 70%;
  display: flex;
  flex-direction: column;
  align-items: center; 
}

.titulo_estudios{
  font-family: "Open Sans";
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-size: 30px;
  display: flex;
  text-align: center;
}

.caja_estudios{
  font-family: "Open Sans";
  padding: 1em;
  width: 80%;
  font-size: 20px;
  background-color: rgba(255, 255, 255, 0.1); 
  border: 2px solid rgb(12, 12, 12);
  border-radius: 8px; 
  box-sizing: border-box;
  text-align: center;
}

.caja_estudios > ul > li{
  list-style-type: disc;
  list-style-position: inside;
}

.actividades_favoritas{
  font-family: "Open Sans";
  min-height: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#titulo_actividades{
  font-size: 30px;
  padding-top: 3em;
  text-align: center;
}

#caja_formulario{
  width: 40%;
  display: flex;
  flex-direction: column;
  align-self: center;
  margin-top: 1em;
}

section > form > label{
  margin-top: 1em;
}

section > form > input,
section > form >textarea{
  background-color: rgba(255, 255, 255, 0.1); 
  color: white;
  border: 2px solid rgb(12, 12, 12);
  border-radius: 8px; 
  padding: 0.5em;
}

section > form > ::placeholder{
  padding-left: 7px;
}

#caja_formulario > button{
  margin-top: 0.6em;
  align-self: flex-end;
  width: 150px;
  height: 30px;
  color: rgb(180, 179, 179);
  background-color: rgba(255, 255, 255, 0.1); 
  border: 1px solid rgb(12, 12, 12);
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

#caja_formulario > button:hover{
  background-color: rgb(12, 12, 12);
  transform: scale(1.05);
}

#tarjetas_actividades{
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.contenedor_mis_actividades{
  font-family: "Open Sans";
  width: 180px;
  height: 300px;
  background-color: rgba(255, 255, 255, 0.1); 
  border: 2px solid rgb(12, 12, 12);
  border-radius: 8px;
  margin: 2em;
  padding: 2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contenedor_mis_actividades:hover{
  background-color: rgb(12, 12, 12);
}

.contenedor_mis_actividades > h3{
  font-size: 25px;
  padding-bottom: 0.5em;
  flex-grow: 1;
}

.contenedor_mis_actividades > p{
  padding-top: 0.5em;
  flex-grow: 1;
}

.contenedor_mis_actividades > img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid rgb(12, 12, 12);
  border-radius: 6px;  
  margin-bottom: 10px;
}

/* --- ESTILOS RESPONSIVOS PARA MÓVILES --- */
@media (max-width: 768px) {
    /* HEADER Y NAVEGACIÓN */
    header {
        position: static;
        width: 100%;
        text-align: center;
        border-radius: 0;
    }

    header > nav > ul {
        justify-content: center;
        gap: 1em;
        padding: 0.5em 0;
    }

    header > nav > ul > li > a {
        font-size: 14px;
    }
    
    /* ENCABEZADO PRINCIPAL Y SECCIÓN "SOBRE MÍ" */
    h1 {
        width: 90%;
        font-size: 40px;
    }

    section#caja_flotante {
        width: 90%;
    }

    #sobre_mi {
        font-size: 30px;
    }

    #text_about_me {
        font-size: 16px;
    }

    /* SECCIÓN DE TECNOLOGÍAS */
    #title_tecnologias,
    #titulo_actividades {
        font-size: 25px;
    }

    #caja_tarjetas {
        width: 90%;
        flex-direction: column; /* Apila las tarjetas verticalmente */
        align-items: center;
        padding: 1em;
    }

    .tarjetas {
        width: 80%;
        margin-bottom: 1em;
        align-items: center; 
    }

    /* SECCIÓN DE ESTUDIOS E IDIOMAS */
    #estudios_idiomas {
        width: 90%;
        flex-direction: column; /* Apila los contenedores verticalmente */
        padding: 10px 0;
        gap: 20px;
    }

    .titulo_estudios {
        font-size: 25px;
        margin-top: 1em;
    }
    
    .caja_estudios {
        width: 100%;
    }

    /* SECCIÓN DE FORMULARIO */
    #caja_formulario {
        width: 90%;
        align-self: center;
    }
}