/* NOME DO ARQUIVO: amam-frontend.css
   VERSÃO: 5.1.0 - Ajuste Mobile conforme menu.html e correção Submenu
*/

:root {
    --am-azul-amam: #0bbcd6;
    --am-azul-escuro: #089ab0;
    --am-roxo-amam: #5b2c83;
    --am-roxo-profundo: #3a1c54;
    --am-cinza-escuro: #1a1a1a;
    --am-branco: #ffffff;
    --am-header-height: 100px;
    --am-bg-claro: #f4f7f9;
}

#amam-exclusive-wrapper, #amam-exclusive-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    list-style: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* Header Fixo */
#amam-exclusive-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--am-header-height);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #eee;
    z-index: 999999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: height 0.3s ease;
}

#amam-spacer {
    display: block;
    width: 100%;
    height: var(--am-header-height);
}

.amam-header-container {
    width: 100%;
    max-width: 1250px; 
    margin: 0 auto;
    padding: 0 30px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.amam-logo img {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}
.amam-logo a:hover img { transform: scale(1.05); }

/* MENU DESKTOP */
.amam-navbar {
    display: flex;
    align-items: center;
}

.amam-nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.amam-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Links Desktop */
.amam-nav-link {
    color: var(--am-cinza-escuro) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.amam-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--am-azul-amam);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.amam-nav-link:hover, .amam-nav-link.active { color: var(--am-azul-amam) !important; }
.amam-nav-link:hover::after, .amam-nav-link.active::after { width: 100%; }

/* Submenu Desktop */
.amam-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 3px solid var(--am-azul-amam);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    padding: 10px 0;
    display: block;
}

.amam-nav-item:hover .amam-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.amam-submenu li { width: 100%; display: block; }

.amam-submenu .amam-nav-link {
    padding: 12px 20px;
    font-size: 13px !important;
    text-transform: none !important;
    display: block;
    width: 100%;
    color: #555 !important;
    text-align: left;
}
.amam-submenu .amam-nav-link::after { display: none; }
.amam-submenu .amam-nav-link:hover {
    background-color: #f4f7f9;
    color: var(--am-azul-amam) !important;
}

.amam-caret { font-size: 10px; margin-left: 4px; opacity: 0.6; }

/* Hamburger */
.amam-hamburger {
    display: none;
    cursor: pointer;
    z-index: 1000001;
}
.amam-bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--am-cinza-escuro);
    border-radius: 3px;
}

/* --- MOBILE (Baseado no padrão menu.html) --- */
@media (max-width: 992px) {
    
    .amam-hamburger { display: block; }

    .amam-hamburger.active .amam-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--am-azul-amam);
    }
    .amam-hamburger.active .amam-bar:nth-child(2) { opacity: 0; }
    .amam-hamburger.active .amam-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--am-azul-amam);
    }

    /* Container do Menu Mobile */
    .amam-nav-menu {
        position: fixed;
        left: -100%;
        top: var(--am-header-height);
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        height: auto;
        min-height: calc(100vh - var(--am-header-height));
        align-items: stretch; /* Garante que o item ocupe a largura */
        justify-content: flex-start;
        padding: 20px 0;
        gap: 0;
        border-top: 1px solid #f0f0f0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        transition: 0.4s ease;
        overflow-y: auto;
    }

    /* Ajuste para barra do admin WP */
    body.admin-bar .amam-nav-menu { top: calc(var(--am-header-height) + 32px); }
    @media screen and (max-width: 782px) {
        body.admin-bar .amam-nav-menu { top: calc(var(--am-header-height) + 46px); }
    }

    .amam-nav-menu.active { left: 0; }

    /* Item e Link Mobile - Padrão menu.html */
    .amam-nav-item {
        width: 100%;
        height: auto;
        display: block; /* Remove flexbox do pai para permitir fluxo natural */
        margin: 0;
    }

    .amam-nav-link {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 20px 0; /* Padrão solicitado */
        font-size: 16px !important;
        border-bottom: 1px solid #f9f9f9;
        text-align: center;
    }

    .amam-nav-link:hover { background-color: var(--am-bg-claro); }
    .amam-nav-link::after { display: none; }

    /* Submenu Mobile */
    .amam-submenu {
        position: static; /* Flui no conteúdo */
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        width: 100%;
        padding: 0;
        background-color: #fafafa;
        display: none; /* Escondido por padrão */
    }

    .amam-submenu.mobile-open {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

    .amam-submenu .amam-nav-link {
        padding: 15px 0; /* Um pouco menor para diferenciar */
        font-size: 14px !important;
        color: #666 !important;
        padding-left: 0;
        border-bottom: 1px solid #eee;
    }
    
    .amam-caret {
        transition: transform 0.3s;
    }
    .amam-nav-item.submenu-active > .amam-nav-link .amam-caret {
        transform: rotate(180deg);
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}