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

#header {
    width: 100%;
    background: #ffffff;
    font-family: inherit;
}


/* =====================================================
   CONTAINER
   ===================================================== */

#header .containerWidth {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}


/* =====================================================
   BARRA SUPERIOR
   ===================================================== */

.top-bar {
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
    font-size: 12px;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    font-weight: 600;
}

.dot-red {
    width: 8px;
    height: 8px;
    display: inline-block;
    background: #e30613;
    border-radius: 50%;
}

/* =====================================================
   ÁREA CENTRAL
   ===================================================== */

.middle-header {
    width: 100%;
    background: #ffffff;
    padding: 15px 0;
}

.middle-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


/* =====================================================
   LOGO
   ===================================================== */

.logo-link {
    display: flex;
    align-items: center;
    flex: 0 0 28%;
    max-width: 28%;
    text-decoration: none;
}

.logo-link img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 85px;
}

.logo-text {
    color: #111111;
    font-size: 24px;
    font-weight: 700;
}


/* =====================================================
   BANNER - GRANDE À DIREITA
   ===================================================== */

.header-banner-wrapper {
    flex: 1 1 72%;
    width: 72%;
    max-width: none;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

.header-banner-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.header-banner-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
    border-radius: 4px;
}


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

.main-nav-bar {
    width: 100%;
    background: #e30613;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu > li {
    position: relative;
}

.main-menu .anchor {
    display: block;
    padding: 13px 16px;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.main-menu .anchor:hover {
    background: #b3000b;
}

.main-menu .eleicoes-link {
    color: #ffcc00;
}


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

.mega-menu-dropdown {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;

    min-width: 550px;

    padding: 20px;

    background: #ffffff;

    border-top: 3px solid #e30613;

    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);

    z-index: 1000;
}

.main-menu > li.has-mega-menu:hover .mega-menu-dropdown {
    display: flex;
    gap: 25px;
}

.mega-menu-column {
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.mega-menu-column a {
    color: #333333;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}

.mega-menu-column a:hover {
    color: #e30613;
}


/* =====================================================
   BUSCA
   ===================================================== */

.header-search-box {
    position: relative;

    display: flex;
    align-items: center;
}

.btn-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 8px;

    background: transparent;
    border: 0;

    color: #ffffff;

    font-size: 22px;

    cursor: pointer;
}

.search-input-wrapper {
    display: none;

    position: absolute;

    top: 100%;
    right: 0;

    width: 260px;

    padding: 8px;

    background: #ffffff;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

    z-index: 1100;
}

.search-input-wrapper.active {
    display: block;
}

.search-input-wrapper form {
    display: flex;
    gap: 5px;
}

.search-input-wrapper input {
    flex: 1;

    min-width: 0;

    padding: 8px 10px;

    border: 1px solid #cccccc;

    outline: none;
}

.search-input-wrapper button {
    padding: 8px 12px;

    background: #e30613;

    border: 0;

    color: #ffffff;

    cursor: pointer;
}


/* =====================================================
   BOTÃO MOBILE
   ===================================================== */

.mobile-menu-toggle {
    display: none;
}


@media screen and (max-width: 768px) {

    #header .containerWidth {
        width: 94%;
    }

    /* =========================
       ÁREA CENTRAL
       ========================= */

    .middle-header {
        padding: 10px 0;
    }

    .middle-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }


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

    .logo-link {
        width: auto;
        max-width: 100%;
        flex: none;
        justify-content: center;
    }

    .logo-link img {
        width: auto;
        max-width: 90%;
        max-height: 60px;
    }


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

    .header-banner-wrapper {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        overflow: hidden;
    }

    .header-banner-wrapper a {
        width: 100%;
        height: auto;
    }

    .header-banner-wrapper img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }


    /* =========================
       NAVEGAÇÃO
       ========================= */

    .main-nav-bar {
        width: 100%;
    }

    .nav-container {
        display: block;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        padding: 14px 15px;
        background: #e30613;
        border: 0;
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }

    .main-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: #b3000b;
        margin: 0;
        padding: 0;
    }

    .main-menu.active {
        display: flex;
    }

    .main-menu > li {
        width: 100%;
    }

    .main-menu .anchor {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 18px;
        box-sizing: border-box;
        border-top: 1px solid rgba(255,255,255,0.15);
    }


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

    .mega-menu-dropdown {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        max-width: none;
        box-sizing: border-box;
        padding: 15px 20px;
        background: #ffffff;
        border: 0;
        border-left: 4px solid #e30613;
        box-shadow: none;
    }

    .main-menu > li.has-mega-menu.open > .mega-menu-dropdown {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mega-menu-column {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mega-menu-column a {
        display: block;
        width: 100%;
        padding: 11px 5px;
        color: #333333;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1px solid #eeeeee;
    }

    .mega-menu-column a:hover {
        color: #e30613;
        background: #f8f8f8;
    }

    .main-menu > li.has-mega-menu.open .arrow {
        transform: rotate(180deg);
    }

    .header-search-box {
        display: none;
    }
}