/* ===========================================
   HEADER
=========================================== */

#header{
    background: #fff;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:999;
    transition:all .35s ease;
}

.header-container{
    display:flex;
    align-items:center;
    justify-content:space-between;
    height:95px;
}

.logo img{
    width:210px;
    height:auto;
}

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

.main-menu ul{
    display:flex;
    align-items:center;
    gap:42px;
}

.main-menu li{
    position:relative;
}

.main-menu a{
    font-size:15px;
    font-weight:600;
    color:var(--primary);
    transition:.3s;
}

.main-menu a:hover{
    color:var(--accent);
}

/* ===========================================
   AÇÕES
=========================================== */

.header-buttons{

    display:flex;

    align-items:center;

    gap:18px;

}

.phone{

    color:var(--primary);

    font-weight:700;

}

.phone:hover{

    color:var(--accent);

}

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

.mobile-button{

    display:none;

    width:46px;

    height:46px;

    position:relative;

    border:0;
    background:transparent;
    cursor:pointer;

}

.mobile-button span{

    position:absolute;

    left:10px;

    width:26px;

    height:2px;

    background:var(--primary);

    transition:.35s;

}

.mobile-button span:nth-child(1){

    top:14px;

}

.mobile-button span:nth-child(2){

    top:22px;

}

.mobile-button span:nth-child(3){

    top:30px;

}

/* ===========================================
   HEADER APÓS SCROLL
=========================================== */

#header.scrolled{

    top:15px;

}

#header.scrolled .header-container{

    width:min(94%,1320px);

    margin:auto;

    padding:0 35px;

    border-radius:26px;

    height:78px;

    background:rgba(255,255,255,.82);

    backdrop-filter:blur(18px);

    box-shadow:var(--shadow-md);

}

#header.scrolled .main-menu a{

    color:var(--text);

}

#header.scrolled .phone{

    color:var(--text);

}

#header.scrolled .mobile-button span{

    background:var(--text);

}

/* ===========================================
   MEGA MENU
=========================================== */

.main-menu li:hover .mega-menu{

    opacity:1;

    visibility:visible;

    transform:translateY(0);

}

.mega-menu{

    position:absolute;

    left:50%;

    transform:translateX(-50%) translateY(20px);

    top:55px;

    width:720px;

    background:white;

    border-radius:24px;

    padding:40px;

    box-shadow:var(--shadow-lg);

    opacity:0;

    visibility:hidden;

    transition:.35s;

}

.mega-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:40px;

}

.mega-menu h4{

    margin-bottom:20px;

    font-size:18px;

}

.mega-menu ul{

    display:flex;

    flex-direction:column;

    gap:12px;

}

.mega-menu a{

    color:var(--text);

    font-size:15px;

}

.mega-menu a:hover{

    color:var(--primary);

}

/* ===========================================
   MENU MOBILE LATERAL
=========================================== */

.mobile-menu{

    position:fixed;

    top:0;

    right:-100%;

    width:340px;

    max-width:90vw;

    height:100vh;

    background:white;

    z-index:998;

    padding:120px 40px;

    transition:.4s ease;

    box-shadow:-10px 0 40px rgba(0,0,0,.12);

}

.mobile-menu.active{

    right:0;

}

.mobile-menu ul{

    display:flex;

    flex-direction:column;

    gap:24px;

}

.mobile-menu a{

    color:var(--text);

    font-size:18px;

    font-weight:600;

}

@media (max-width:992px){
    .header-container{height:78px;}
    .logo img{width:170px;}
    .main-menu,.header-buttons{display:none;}
    .mobile-button{display:block;z-index:1000;}
    .mobile-button.active span:nth-child(1){top:22px;transform:rotate(45deg);}
    .mobile-button.active span:nth-child(2){opacity:0;}
    .mobile-button.active span:nth-child(3){top:22px;transform:rotate(-45deg);}
    .mobile-menu{padding:105px 34px 40px;}
}
