/* Header base */
.header-principal {
    position: relative;
    height: 700px;
    width: 100%;
    background-image: url("../img/fondo-header-5.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* animation: zoomSuave 12s infinite alternate ease-in-out; */
}

@media (min-width: 768px) { 
  .header-principal {
    background-size: 110%;
  }
  
  @keyframes zoomSuave {
    0% {
      background-size: 110%;
    }
    100% {
      background-size: 125%; /* aumenta suavemente */
    }
  }
}

.header-principal::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40%;  /* qué tanto se desvanece */
  /* background: linear-gradient(
      to bottom,
      rgba(251, 186, 0, 0) 0%,   
      rgba(251, 186, 0, 1) 100% 
  ); */
}

/* Degradado negro → transparente */
.header-principal .header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,        /* negro sólido */
    rgba(0, 0, 0, 0.95) 25%,    /* sigue muy negro */
    rgba(0, 0, 0, 0.85) 50%,    /* todavía oscuro en la mitad */
    rgba(0, 0, 0, 0.65) 75%,    /* empieza a suavizar */
    rgba(0, 0, 0, 0.35) 90%,    /* transición suave */
    rgba(0, 0, 0, 0) 100%       /* finalmente transparente */
);
    z-index: 1;
}

/* Contenido interno */
.header-contenido {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}



/* Logo */

.header-logo {
  background-color: #fff;
  border-radius: 0 0 5px 5px;
  margin-bottom: 4rem;
  margin-top: 8rem;
}

@media (min-width: 768px) { 
  .header-logo {
    margin-bottom: 2rem;
    margin-top: 0;
  }
}

.header-logo img {
  border-radius: 0 0 5px 5px;
  width: 100%;
  max-width: 550px;
  object-fit: contain;
}




/* Menú */

.header-contenido .barra {
  margin-top: 3rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 2rem;
}

@media (min-width: 768px) { 
  .header-contenido .barra {
    margin-top: 0;
    gap: 0;
    align-items: end;
  }
}


.menu-hamburguer {
  margin-top: 3rem;
}
.menu-hamburguer:hover {
  cursor: pointer;
}

@media (min-width: 768px) { 
  .menu-hamburguer {
    display: none;
  }
}

.header-menu  {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: 0.3s ease-in-out;
  margin-top: 0.5rem;
}

@media (min-width: 768px) { 
  .header-menu {
    opacity: 1;
    max-height: none!important;
    overflow: visible;
    visibility: visible;
  }
}

.mostrar {
  opacity: 1;
  max-height: 35rem;
  visibility: visible;
}

.header-menu ul {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  flex-direction: column;
  
  font-family: var(--fuente-titulos);
  text-transform: uppercase;
}

@media (min-width: 768px) { 
  .header-menu ul {
    flex-direction: row;
    gap: 0;
    /* border-top: 1px solid var(--color-secundario); */
    
  }
}

.header-menu ul li {
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) { 
  .header-menu ul {
    position: relative;
  }

  .header-menu ul li {
    position: relative;
  }

  .header-menu ul .menu-item::after {
    content: "";
    position: absolute!important;
    bottom: 10%;
    right: 0%;             /* empieza desde la mitad */
    width: 1px;            /* controla qué tanto ocupa */
    height: 75%;
    background: #fbb8008f;    
  }

  .header-menu ul .menu-item:last-child::after   {
    content: none;
  }
}

.header-menu ul .current-menu-item a {
  color: var(--color-secundario);
  box-shadow: inset 0 -4px 0px -1px var(--color-secundario);

}

.header-menu ul li a {
  position: relative;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 500;
  display: block;
  width: 100%;
  white-space: nowrap;
  transition: .3s ease-in-out;
}

.header-menu ul li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-blanco); /* color del fondo animado */
  z-index: -1;
  transition: width 0.4s ease;
}

.header-menu ul li a:hover::before {
  width: 100%;
}

.header-menu ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* línea en la parte inferior */
  width: 0;
  height: 3px; /* grosor de la línea */
  background-color: var(--color-secundario); /* color de la línea */
  transition: width 0.5s ease-in-out;
}

.header-menu ul li a:hover::after {
  width: 100%;
}

.header-menu ul li a:hover {
  /* background-color: var(--color-blanco); */
  color: var(--color-secundario);
}



@media (min-width: 768px) { 
  .header-menu ul li a {
    padding: 1rem 2rem;
  }
}

.redes-sociales {
  
  text-align: right;
  z-index: 9;
  position: relative;
  margin: 0.5rem 1rem;
}

@media (min-width: 768px) { 
  .redes-sociales {
    position: absolute;
    right: 0;
    margin-right: 2rem;
  }
}

.header-titulo {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;  /* por encima de todo */
    text-align: center;
    width: 100%;
    display: none;
}

@media (min-width: 768px) { 
  .header-titulo {
      top: 60%;
      left: 50%;
      transform: translate(-50%, -50%);
      display: block;
  }
}

.header-titulo h1 {
  color: var(--color-blanco);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 3.5rem;
  font-weight: 500;
  transform: scaleY(1.2);
  font-family: var(--fuente-secundaria);
}

@media (min-width: 768px) { 
  .header-titulo h1 {
    font-size: 7rem;
  }
}


/* Animaciones al titulo del hero principal */
.ml1 {
  font-weight: 900;
  font-size: 3.5em;
}

.ml1 .letter {
  display: inline-block;
  line-height: 1em;
}

.ml1 .text-wrapper {
  position: relative;
  display: inline-block;
  padding-top: 0.1em;
  padding-right: 0.05em;
  padding-bottom: 0.15em;
}

.ml1 .line {
  opacity: 0;
  position: absolute;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: var(--color-secundario);
  transform-origin: 0 0;
}

.ml1 .line1 { top: 0; }
.ml1 .line2 { bottom: 0; }


/* Estilos al boton del  portafolio */
.btn-portafolio {
  position: absolute;
  top: 40%;
  left: 20%;
  background-color: var(--color-secundario);
  padding: 1rem 3rem;
  z-index: 99;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  transition: .3s ease-in;
}

@media (min-width: 552px) { 
  .btn-portafolio {
    top: 40%;
    left: 25%;
  }
}

@media (min-width: 610px) { 
  .btn-portafolio {
    top: 46%;
    left: 30%;
  }
}

@media (min-width: 768px) { 
  .btn-portafolio {
    top: 75%;
    left: 33%;
  }
}

@media (min-width: 994px) { 
  .btn-portafolio {
    top: 75%;
    left: 42.5%;
  }
}

.btn-portafolio:hover {
  background-color: #bd8b03;
  transform: scale(1.1);
}

/* Estilos a la clase que fija el menu en la parte superior despues de hacer scroll, como es un estilo global lo pongo aca */
@media (min-width: 992px) { 
    .fixed-top {
        position: fixed!important;
        width: 100%;
        top: 0;
        left: 0;
        background-color: var(--color-negro);
        padding: 1rem 5rem;
        height: 12rem;
        z-index: 1000!important;
        transition: background-color .3s ease-in-out;
        display: flex;
        flex-direction: row;
    }

    .fixed-top .header-logo {
      max-width: 350px;
    }

    .fixed-top .redes-sociales {
        display: none;
    }

    .fixed-top .header-right {
        margin-bottom: 0;
    }

    .admin-bar .fixed-top {
        top: 32px;
    }

    .fixed-top .header-logo {
        transform: translateX(0);
        opacity: 1;
        animation: fromLeft 0.4s ease-in forwards;
    }
    .fixed-top .menu-principal {
        transform: translateX(0);
        opacity: 1;
        animation: fromRight 0.4s ease-in forwards;
    }

    @keyframes fromLeft {
        from { transform: translateX(-100%); opacity: 0;}
        to { transform: translateX(0); opacity: 1;}
    }
    @keyframes fromRight{
        from { transform: translateX(100%); opacity: 0;}
        to { transform: translateX(0); opacity: 1;}
    }
}

