
/* =================================================
   AKIPERTO — HEADER
   Desktop, mobile e acessibilidade
   ================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #32511b;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.25),
        0 24px 64px rgba(0, 0, 0, 0.50);
}

.header-container {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 50px;
    box-sizing: border-box;
}

/* LOGÓTIPO */

.site-header .logo {
    flex: 0 1 auto;
    min-width: 0;
}

.site-header .logo a {
    display: inline-flex;
    align-items: center;
}

.site-header .logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 70%;
    max-height: 50px;
    object-fit: contain;
    margin: 10px 0;
}

/* NAVEGAÇÃO DESKTOP */

.desktop-nav {
    margin-left: auto;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 40px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.desktop-nav a {
    display: inline-block;

    font-family: 'akipertoFont', sans-serif;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.05rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    text-decoration: none;

    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: #a3d45d;
}

/* ACESSIBILIDADE */

.site-header a:focus-visible,
.mobile-menu summary:focus-visible {
    outline: 3px solid #a3d45d;
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* MENU MOBILE — ESCONDIDO EM DESKTOP */

.mobile-menu {
    display: none;
}

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

@media (max-width: 768px) {

    .header-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;

    padding: 8px 16px;
}

    /* Logótipo alinhado à esquerda */

.site-header .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-width: 0;
}

.site-header .logo img {
    width: auto;
    max-width: min(48vw, 190px);
    max-height: 40px;
    margin: 4px 0;
}

    /* Esconder navegação desktop */

    .desktop-nav {
        display: none;
    }

    /* Botão hambúrguer */

    .mobile-menu {
        display: block;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        min-width: 44px;
    }

    .mobile-menu summary {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;
        box-sizing: border-box;

        list-style: none;
        cursor: pointer;
        border-radius: 6px;
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu summary::marker {
        content: "";
    }

    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;

        width: 24px;
        height: 24px;
    }

    .hamburger-icon span {
        display: block;
        width: 24px;
        height: 2px;

        background: #fff;
        border-radius: 2px;

        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }

    /* Transformação do ícone em X */

    .mobile-menu[open] .hamburger-icon span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu[open] .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu[open] .hamburger-icon span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Painel suspenso */

    .mobile-menu nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        background: #32511b;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
    }

    .mobile-menu nav ul {
        display: flex;
        flex-direction: column;
        gap: 0;

        max-width: 1200px;
        margin: 0 auto;
        padding: 8px 16px 16px;

        list-style: none;
    }

    .mobile-menu nav a {
        display: block;
        padding: 14px 12px;

        color: #fff;
        font-family: 'akipertoFont2', sans-serif;
        font-size: 1rem;
        text-decoration: none;
        text-transform: uppercase;
        border-radius: 4px;
    }

    .mobile-menu nav a:hover,
    .mobile-menu nav a:focus-visible {
        color: #a3d45d;
        background: rgba(255, 255, 255, 0.07);
    }
}

/* MOVIMENTO REDUZIDO */

@media (prefers-reduced-motion: reduce) {
    .desktop-nav a,
    .hamburger-icon span {
        transition: none;
    }
}
