/* Header */

#header-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 32px;
  pointer-events: none;
  visibility: hidden; 
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.3s ease, padding 0.3s ease, border-bottom-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: var(--main-background);
  border-bottom-color: var(--gray-600);
}

.header-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: auto;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-600);
  background-color: var(--main-background);
  transition: padding 0.3s ease;
}

.site-header.scrolled .header-container {
  padding: 0.5rem 0;
  border-bottom: none;
}

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

.logo-container {
  width: 25%;
}

/* NAV - Escritorio */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
}

.header-menu a {
  font-size: var(--text-md-size);
  line-height: var(--text-md-line-height);
  color: var(--white);
  text-decoration: none;
  display: block;
  padding: 1rem 1.5rem;
  transition: opacity 0.15s ease-in-out;
}

.header-menu:hover a {
  opacity: 0.4;
}

.header-menu a:hover {
  opacity: 1;
}

/* Botones de sesión */
.sessionButtons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.sessionButtons a {
  text-align: center;
}

/* Botón hamburguesa (oculto en escritorio) */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: inherit;
}

.icon {
  width: 32px;
  height: 32px;
  stroke: currentColor;
}

.icon-close {
  display: none; /* Oculto por defecto */
}

@media only screen and (max-width: calc(1600px + 3rem)) {
    .header-container {
        margin: auto 1.5rem;
    }
}


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

    /* Header */   

    .header-container {
        max-width: 100%;
        margin: auto 1.5rem;
        padding: 1.5rem 0;
        position: relative;
    }

    /* Mostramos botón hamburguesa y ocultamos menú */
    .menu-toggle {
        display: flex;
    }

    .header-nav {
        position: absolute;
        top: 100%;
        left: calc(0px - 1.5rem);
        width: 100vw;
        display: none;
        flex-direction: column;
        align-items: center;
        background-color: var(--main-background);
        padding: 2rem 0;
        z-index: 1000;
        transition: opacity 0.3s ease, transform 0.3s ease;
}

    /* Cuando el menú está activo (al hacer click en el botón) */
    .header-nav.active {
        display: flex;
    }

    .header-menu {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .header-menu a {
        font-size: var(--text-xl-size);
    }

    .header-menu--item {
        margin: 0;
    }

    /* Botones dentro del menú */
    .sessionButtons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .sessionButtons .button {
        width: 80%;
    }
}

@media only screen and (max-width: 768px) {
    
    /* Header */

    .header-nav {
        padding: 1.5rem 0;
    }

    .sessionButtons .button {
        width: 90%;
font-size: var(--text-md-size);
line-height: var(--text-md-line-height);
    }