/* ============================================================
   MOBILE MENU - CSS RESPONSIVO
   Menu hamburger e overlay totalmente otimizado para mobile
   ============================================================ */

:root {
    --gold: #EDD06E;
    --gold-alt: #c5a059;
    --black: #0a0a0a;
    --dark: #1a1a1a;
    --text-light: #f4f4f4;
    --border-color: #222;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   BOTÃO HAMBURGER
   ============================================================ */

.btn-hamburger {
    display: none;
    position: relative;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10000;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.btn-hamburger:hover {
    transform: scale(1.1);
}

.btn-hamburger:hover span {
    background: var(--gold);
}

/* Animação hamburger ao abrir */
.btn-hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.btn-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.btn-hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ============================================================
   MENU OVERLAY
   ============================================================ */

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(26, 26, 26, 0.98) 100%);
    backdrop-filter: blur(10px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.nav-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 80% 80% at 50% 50%,
        rgba(237, 208, 110, 0.05) 0%,
        transparent 70%);
    pointer-events: none;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
    animation: slideInMenu 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Previne scroll quando menu está aberto */
body.menu-open {
    overflow: hidden;
}

/* ============================================================
   HEADER DO MENU
   ============================================================ */

.nav-overlay-header {
    position: sticky;
    top: 0;
    z-index: 10001;
    background: linear-gradient(180deg, rgba(10, 10, 10, 1) 0%, rgba(10, 10, 10, 0.95) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    min-height: 70px;
}

.nav-overlay-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    animation: slideInLogo 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInLogo {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.closebtn {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    line-height: 1;
}

.closebtn:hover {
    background: rgba(237, 208, 110, 0.1);
    color: var(--gold);
    transform: scale(1.15);
}

/* ============================================================
   LINKS DO MENU
   ============================================================ */

.nav-overlay > a,
.nav-overlay-items a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    padding: 16px 20px;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    letter-spacing: 0.5px;
}

.nav-overlay > a:first-of-type:not(.nav-overlay-toggle) {
    margin-top: 10px;
}

.nav-overlay > a::before,
.nav-overlay-items a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--gold), var(--gold-alt));
    border-radius: 3px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-overlay > a:hover,
.nav-overlay-items a:hover {
    color: var(--gold);
    padding-left: 24px;
}

.nav-overlay > a:hover::before,
.nav-overlay-items a:hover::before {
    height: 100%;
}

/* ============================================================
   GRUPOS DE MENU COM ACCORDION
   ============================================================ */

.nav-overlay-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.nav-overlay-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    font-weight: 700;
    color: var(--text-light);
    background: none;
    border: none;
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border-left: 3px solid transparent;
    text-align: left;
    letter-spacing: 0.5px;
}

.nav-overlay-toggle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--gold), var(--gold-alt));
    border-radius: 3px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-overlay-toggle:hover {
    color: var(--gold);
    padding-left: 24px;
}

.nav-overlay-toggle:hover::before {
    height: 100%;
}

.nav-overlay-label {
    flex: 1;
    font-weight: 700;
}

.nav-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gold);
}

.nav-overlay-toggle.open .nav-toggle-icon {
    transform: rotate(45deg);
}

/* ============================================================
   ITENS DO ACCORDION
   ============================================================ */

.nav-overlay-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(237, 208, 110, 0.02);
}

.nav-overlay-items.open {
    max-height: 600px;
}

.nav-overlay-items a {
    padding: 14px 20px 14px 40px;
    font-size: clamp(0.95rem, 3.5vw, 1.2rem);
    font-weight: 500;
    color: rgba(244, 244, 244, 0.8);
    border-left: none;
    position: relative;
}

.nav-overlay-items a::before {
    left: 20px;
}

.nav-overlay-items a:hover {
    padding-left: 48px;
    color: var(--gold);
    background: rgba(237, 208, 110, 0.05);
}

/* ============================================================
   BOTÃO DE AÇÃO
   ============================================================ */

.btn-menu-orcamento {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-alt) 100%);
    color: #000 !important;
    margin: 20px 20px 30px 20px;
    padding: 16px 24px !important;
    border-radius: 8px;
    font-weight: 800 !important;
    font-size: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(237, 208, 110, 0.2);
    transition: var(--transition);
    cursor: pointer;
    border-left: none !important;
}

.btn-menu-orcamento:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(237, 208, 110, 0.3);
    padding-left: 24px !important;
}

/* ============================================================
   SEPARADORES
   ============================================================ */

.nav-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, transparent, rgba(10, 10, 10, 0.5));
    pointer-events: none;
}

/* ============================================================
   RESPONSIVO - DESKTOP
   ============================================================ */

@media (min-width: 769px) {
    .btn-hamburger {
        display: none !important;
    }

    .nav-overlay {
        display: none !important;
    }
}

/* ============================================================
   RESPONSIVO - TABLET
   ============================================================ */

@media (max-width: 768px) and (min-width: 481px) {
    .btn-hamburger {
        display: flex !important;
    }

    .nav-overlay > a:not(.nav-overlay-toggle) {
        font-size: 1.3rem;
        padding: 14px 20px;
    }

    .btn-menu-orcamento {
        margin: 16px 20px 24px 20px;
        padding: 14px 20px !important;
    }
}

/* ============================================================
   RESPONSIVO - MOBILE PEQUENO
   ============================================================ */

@media (max-width: 480px) {
    .btn-hamburger {
        display: flex !important;
        width: 44px;
        height: 44px;
        padding: 6px;
    }

    .btn-hamburger span {
        width: 20px;
        height: 2px;
    }

    .nav-overlay-header {
        min-height: 60px;
        padding: 12px 16px;
    }

    .nav-overlay-logo {
        height: 36px;
    }

    .closebtn {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .nav-overlay > a:not(.nav-overlay-toggle) {
        font-size: 1.1rem;
        padding: 12px 16px;
    }

    .nav-overlay-toggle {
        font-size: 1.1rem;
        padding: 12px 16px;
    }

    .nav-overlay-items a {
        font-size: 0.95rem;
        padding: 12px 16px 12px 36px;
    }

    .nav-overlay-items a::before {
        left: 16px;
    }

    .nav-overlay-items a:hover {
        padding-left: 44px;
    }

    .btn-menu-orcamento {
        margin: 12px 16px 20px 16px;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* ============================================================
   SCROLL BEHAVIOR
   ============================================================ */

.nav-overlay {
    scroll-behavior: smooth;
}

.nav-overlay::-webkit-scrollbar {
    width: 6px;
}

.nav-overlay::-webkit-scrollbar-track {
    background: transparent;
}

.nav-overlay::-webkit-scrollbar-thumb {
    background: rgba(237, 208, 110, 0.3);
    border-radius: 3px;
}

.nav-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(237, 208, 110, 0.6);
}
