header{
    width: 100%;
    height: 60px;
    background-color: rgba(255, 0, 0, 0);
    position: fixed;
    display: flex;
    justify-content: center;
     z-index: 100;

    transition: background-color .3s ease;
}

header{
    width: 100%;
    height: 60px;
    position: fixed;
    display: flex;
    justify-content: center;
    z-index: 100;
}

/* El pseudo-elemento SIEMPRE existe */
header::before{
    content: "";
    position: absolute;
    inset: 0;

    backdrop-filter: blur(10px);
    background-color:rgba(206, 185, 231, 0.418);
    border-radius: 0 0 10px 10px;

    opacity: 0;

    transition: opacity 1s ease;

    z-index: -1;
}

/* Solo cambiamos opacidad */
.header-scroll::before{
    opacity: 1;
}

nav{
    padding: 10px;
    display: flex;
    gap: 3vh 0;
    flex-direction: column;
    position: fixed;
    width: 40%;
    height: 100vh;
    top: 0;
    right: 0;
    border-radius: 20px 0 0 0;
    text-align: right;

    /* === OCULTAR MENÚ === */
    transform: translateX(250%);
    transition: transform .3s ease;
}
nav a{
  font-family: 'normal';
  color: var(--color-terciario);
  font-size: 1.1rem;
}

nav a.activo{
    color: var(--color-primario);
    font-weight: bold;
}
nav.active{
      transform: translateX(0);
      opacity: 1;
      background: #f0ecf4;
}
.logo-nav{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px
}
nav a:last-child{
    margin-top: 5vh;
}
header > a:first-of-type{
  display: flex;
  align-items: center;
  gap:  0 10px;
  
}
header span{
  font-family: 'cursiva';
  font-size: 1.5rem;
  color: var(--color-secundario);
}
header a img{
    padding: 5px;   
    width: 60px;
}

#overlay{
    position: fixed;
    inset: 0;

    background-color: rgba(0,0,0,.5);

    opacity: 0;
    pointer-events: none;

    transition: opacity .3s ease;

    z-index: 80;

}

#overlay.active{
    opacity: 1;
     pointer-events: all;
    
}


    .ordenar {
      text-align: center;
    
      padding: 7px;
      border-radius: 30px;
      color: aliceblue;      
      background-color: var(--color-primario);
      animation: pulse 1.5s infinite;

    }

  .ordenar:hover{
    background-color: rgb(183, 122, 252);
  }


/*--------------------------------------------------------------------Boton Hamburguesa----------------------------------------------------------------------------*/
.hamburger{
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    position: fixed;
    right: 0;
    bottom: 0;
    margin: 16px;
    z-index: 999;
}
header > a:first-of-type span{
  font-family: 'cursiva';
  font-size: 1.5rem;
  color: var(--color-secundario);
}


/*------------------------------------------------Visual Tablets-------------------------------*/
@media (min-width: 768px){
  
    /* === Nav para tablets === */
    nav{
      text-align: center;
      width: 35%;
    }
    .logo-nav{
      align-items: center;
    }
    nav a{
    color: rgb(77, 76, 76);
    font-size: 1.2rem;
    }
  }


  /*----------------------------------------Visual Escritorio-------------------------------------*/
@media (min-width: 1024px){

   /* === Header para Escritorio === */

  .logo-nav{
    display: none;
  }
    /* === Nav para Escritorio === */

    header{
      height: 90px;
      justify-content: space-between;
      align-items: center;
    }
    nav{
    position: static;
    flex-direction: row;
    gap: 0 20px;
    width: 50%;
    height: auto;
    justify-content: flex-end;
    margin-right: 3vw;


    /* === MOSTRAR MENÚ === */
    transform: translateX(0);

    }

    nav.active{
      background-color: transparent;
    }

    header > a:first-of-type{
      margin-left: 20px;
    }

    nav a:last-child{
    margin-top: 0;
}
header span{
  font-family: 'cursiva';
  font-size: 1.8rem;
  color: var(--color-secundario);
}
header a img{
    padding: 5px;   
    width: 65px;
}
nav a:last-child{
    margin-left: 10vh;
}
nav a{
   font-size: 1.2rem;
}
.hamburger{
  opacity:0;
  pointer-events: none;
    visibility: hidden;
    transition: opacity .3s ease;
}

    .ordenar {
      min-width: 130px;
      padding: 5px;
      border-radius: 30px;
      color: aliceblue;      
      background-color: var(--color-primario);

    }
}



@keyframes pulse{

    0%{
        transform: scale(1);
    }

    50%{
        transform: scale(1.08);
    }

    100%{
        transform: scale(1);
    }

}