/* ================= BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", sans-serif;
    padding-top: 110px;
}

/* ================= CONTAINER ================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ================= TOPBAR ================= */
.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    font-size: 14px;
}

.topbar a {
    color: #444;
    text-decoration: none;
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar a:hover {
    color: #0d3b66;
}

/* ================= NAVBAR ================= */
.navbar {
    position: fixed;
    top: 40px;
    width: 100%;
    background: #0d3b66;
    z-index: 999;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

/* MENU DESKTOP */
.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

/* underline elegante */
.nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: #fca311;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ================= HAMBURGUER PREMIUM ================= */
.hamburger {
    display: none;
    width: 24px;
    height: 16px; /* altura final reduzida */
    position: relative;
    cursor: pointer;
    z-index: 1100;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 2px; 
    background: #fff;
    border-radius: 2px;
    left: 0;
    transition: all 0.35s ease;
}

/* linhas posicionadas proporcionalmente à altura */
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 7px; } /* centro */
.hamburger span:nth-child(3) { bottom: 0; }

/* ANIMAÇÃO → vira X */
.hamburger.active span:nth-child(1) { transform: rotate(45deg); top: 7px; }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); bottom: 7px; }

/* ================= OVERLAY ================= */
.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .hamburger {
        display: block;
    }

    /* 🔥 MENU NÃO COBRE HEADER */
    .nav-links {
        position: fixed;
        top: 110px; /* altura dos dois headers */
        right: -100%;
        width: 260px;
        height: calc(100% - 110px);
        background: #0d3b66;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transition: 0.4s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 16px;
        padding: 12px;
        border-radius: 6px;
    }

    .nav-links a:hover {
        background: rgba(255,255,255,0.1);
    }

    /* 🔥 HEADER 1 OTIMIZADO */
    .topbar-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 5px 10px;
        height: auto;
    }

    /* lado esquerdo agora em coluna */
    .top-left {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .top-left a {
        font-size: 12px;
        line-height: 1.2;
    }

    /* lado direito mantém alinhado */
    .top-right {
        display: flex;
        align-items: center;
    }

    .top-right a {
        font-size: 12px;
        white-space: nowrap;
    }
}