/* ========================================
   HEADER
======================================== */

header {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: var(--header-mobile);

  padding-inline: var(--page-padding-mobile);

  background-color: var(--color1);

  z-index: 1000;

  box-shadow: 0 3px 10px rgba(65, 42, 29, 0.12);
}


/* ========================================
   CONTENEDOR
======================================== */

.wrapper-header {
  width: 100%;
  height: 100%;
  max-width: var(--max-width);

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ========================================
   LOGO
======================================== */

.logo {
  width: 130px;
  height: auto;
}


/* ========================================
   ICONOS MOBILE
======================================== */

.icon-menu,
.icon-cross {
  display: block;

  font-size: 1.5rem;

  color: var(--color5);

  cursor: pointer;
}


.icon-menu {
  position: relative;

  z-index: 1001;
}


/* ========================================
   MENÚ MOBILE
======================================== */

.menu {
  position: fixed;
  top: 0;
  right: 0;

  width: min(80%, 320px);
  height: 100vh;

  padding: 2rem;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  gap: 2rem;

  background-color: var(--color1);

  opacity: 0;
  visibility: hidden;

  transform: translateX(100%);

  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    visibility 0.3s ease;

  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);

  z-index: 1002;
}


/* Fondo oscuro */

.menu::before {
  content: "";

  position: fixed;
  inset: 0;

  background-color: rgba(0, 0, 0, 0.35);

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.3s ease;

  z-index: -1;
}


/* Menú abierto */

.menu.visible {
  opacity: 1;
  visibility: visible;

  transform: translateX(0);
}


.menu.visible::before {
  opacity: 1;
}


/* ========================================
   LISTA
======================================== */

.lista-menu {
  width: 100%;

  display: flex;
  flex-direction: column;

  align-items: flex-end;

  gap: 0.5rem;
}


.lista-menu li {
  width: 100%;

  text-align: right;
}


.lista-menu a {
  display: block;

  padding: 0.5rem 0;

  color: var(--color5);

  font-size: 1rem;
  font-weight: 600;

  transition: color 0.2s ease;
}


.lista-menu a:hover {
  color: var(--color3);
}


/* ========================================
   TABLET
======================================== */

@media screen and (min-width: 768px) {

  header {
    height: var(--header-desktop);

    padding-inline: var(--page-padding-tablet);
  }


  .logo {
    width: 150px;
  }


  .icon-menu,
  .icon-cross {
    font-size: 1.8rem;
  }


  .lista-menu a {
    font-size: 1.15rem;
  }

}


/* ========================================
   DESKTOP
======================================== */

@media screen and (min-width: 1024px) {

  header {
    padding-inline: var(--page-padding-desktop);
  }


  /* Logo */

  .logo {
    width: 180px;
  }


  /* Ocultamos hamburguesa */

  .icon-menu,
  .icon-cross {
    display: none;
  }


  /* Menú horizontal */

  .menu {
    position: static;

    width: auto;
    height: auto;

    padding: 0;

    display: block;

    background-color: transparent;

    opacity: 1;
    visibility: visible;

    transform: none;

    box-shadow: none;
  }


  .menu::before {
    display: none;
  }


  .lista-menu {
    width: auto;

    flex-direction: row;

    align-items: center;

    gap: 0.5rem;
  }


  .lista-menu li {
    width: auto;

    text-align: center;
  }


  .lista-menu a {
    padding: 0.5rem 0.75rem;

    font-size: 0.95rem;
    font-weight: 500;

    border-radius: 4px;
  }


  .lista-menu a:hover {
    color: var(--color4);

    background-color: rgba(65, 42, 29, 0.05);
  }

}