/* ==================================
   HEADER & NAVIGATION
   ================================== */

.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid rgba(var(--color-border), 0.1);
}

.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--spacing-md);
    padding: 1rem 3rem;
}

@media screen and (min-width: 990px) {
    .header {
        padding: 2rem 3rem;
    }
}

/* Logo */
.header__heading {
    margin: 0;
    justify-self: start;
}

.header__heading-link {
    text-decoration: none;
    display: block;
}

.header__heading-logo {
    display: block;
    max-width: 22rem;
    width: auto;
    height: auto;
}

/* Navigation desktop */
.header__inline-menu {
    justify-self: center;
    display: none;
}

@media screen and (min-width: 990px) {
    .header__inline-menu {
        display: block;
    }
}

.list-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.header__menu-item {
    position: relative;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.06rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
    transition: opacity var(--transition-base);
}

.header__menu-item:hover {
    opacity: 0.7;
}

/* Menu item wrapper for dropdown */
.header__menu-item-wrapper {
    position: relative;
}

/* Mega menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 24rem;
    background: var(--color-bg);
    border: 1px solid rgba(18, 18, 18, 0.1);
    padding: var(--spacing-md);
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.header__menu-item-wrapper:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu__content {
    width: 100%;
}

.mega-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu__list li {
    border-bottom: 1px solid rgba(18, 18, 18, 0.05);
}

.mega-menu__list li:last-child {
    border-bottom: none;
}

.mega-menu__list a {
    display: block;
    padding: 1rem 0;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 400;
    transition: opacity var(--transition-base);
    color: var(--color-text);
}

.mega-menu__list a:hover {
    opacity: 0.6;
}

/* Icônes header */
.header__icons {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    justify-self: end;
}

.header__icon {
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.header__icon:hover {
    opacity: 0.7;
}

.header__icon svg {
    width: 2rem;
    height: 2rem;
}

/* Menu mobile */
.menu-drawer-container {
    display: block;
}

@media screen and (min-width: 990px) {
    .menu-drawer-container {
        display: none;
    }
}

.menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 1000;
    overflow-y: auto;
}

.menu-drawer-container[open] .menu-drawer {
    transform: translateX(0);
}

.menu-drawer__navigation {
    padding: var(--spacing-lg);
}

.menu-drawer__menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-drawer__menu-item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(18, 18, 18, 0.1);
    font-size: 1.7rem;
    font-weight: 700;
    display: block;
    text-decoration: none;
}

/* SVG icons */
.svg-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 2rem;
    height: 2rem;
}

.icon-caret {
    width: 1rem;
    height: 1rem;
}

/* Skip link */
.skip-to-content-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: var(--spacing-sm);
    background: var(--color-heading);
    color: var(--color-bg);
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content-link:focus {
    top: 0;
}