* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #f4f4f4;
    line-height: 1.6;
}

/* HEADER E MENU */
header {
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 3px solid #006400;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

header img {
    height: 60px;
}

/* MENU PRINCIPAL */
nav {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
}

nav a {
    text-decoration: none;
    color: #006400;
    font-weight: 600;
    padding: 15px;
    transition: background 0.3s;
    border-radius: 5px;
}

nav a.active {
    background: #006400;
    color: white;
}

.objetivo-btn {
    background-color: #006400;
    color: white;
    font-size: 18px;
    padding: 18px 20px;
    font-weight: bold;
    border-radius: 5px;
}

.menu-cadeado-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.menu-btn, .cadeado-btn {
    font-size: 30px;
    color: #006400;
    cursor: pointer;
}

@media (min-width: 769px) {
    .menu-btn { display: none; }
    .cadeado-btn { display: block; }
    nav a:last-child { margin-right: 100px; }
    /* Para desktop: itens ativos (exceto o que tem a classe "objetivo") terão padding vertical menor */
    nav a.active:not(.objetivo) {
         padding-top: 10px;
         padding-bottom: 10px;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background: #006400;
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    nav.active { display: flex; }
    nav a {
        color: white;
        padding: 20px;
        border-bottom: 1px solid white;
        width: 100%;
        text-align: center;
    }
    /* Na versão mobile, o link ativo ("Objetivo") terá fundo branco e letras verdes */
    nav a.active {
        background: white;
        color: #006400;
    }
    .objetivo-btn {
        background-color: white;
        color: #006400;
    }
    .menu-cadeado-container {
        position: absolute;
        top: 15px;
        right: 20px;
    }
    .menu-btn, .cadeado-btn { display: block; }
}

/* Estilo do Modal */
.login-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    padding: 30px;
    justify-content: center;
    align-items: center;
}
.login-menu .modal-content {
    display: flex;
    background-color: white;
    width: 70%;
    max-width: 900px;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Apenas o lado esquerdo é mantido */
.login-left {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.login-left h3 {
    margin-bottom: 20px;
}
.login-left input {
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
}
.login-left input[type="submit"], .login-left .action-btn {
    background-color: #006400;
    color: white;
    border: none;
    cursor: pointer;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin: 5px 0;
    border-radius: 5px;
    width: 100%;
    text-align: center;
}
.login-left input[type="submit"]:hover, .login-left .action-btn:hover {
    background-color: #004d00;
}
.login-left .divider {
    height: 2px;
    background-color: #006400;
    margin: 15px 0;
}
.login-right .btn {
    margin-bottom: 15px;
    padding: 15px;
    text-align: center;
    background-color: #006400;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.login-right .btn:hover {
    background-color: #004d00;
}
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}
.close-modal:hover {
    color: #004d00;
}
@media (max-width: 768px) {
    .login-menu .modal-content {
        flex-direction: column;
        width: 90%;
    }
    .login-left, .login-right { width: 100%; }
}



/* SEÇÃO PRINCIPAL */
.main-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
    text-align: left;
}
.main-section h2 {
    color: #006400;
    margin-bottom: 20px;
    font-size: 32px;
}
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.card p {
    text-align: justify;
}
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}
.logo {
    width: 300px;
    height: auto;
}


/* MENU UTILIZADOR - Mobile (apenas alterações de cores; layout original mantido) */
.user-menu {
    display: none;
    position: absolute;
    right: 20px;
    top: 60px;
    background: white;
    border-top: 3px solid #006400;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.user-menu.active {
    display: block;
}
.user-menu .user-name {
    background: #006400;
    color: white;
    font-weight: bold;
    padding: 12px;
    text-align: center;
}
.user-menu a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #006400;
    transition: background 0.3s;
    text-align: left;
}
.user-menu a:hover {
    background: #f4f4f4;
}

@media (max-width: 768px) {
    .user-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        background: white;
        width: 100%;
        flex-direction: column;
        align-items: center;
        z-index: 1001;
        border-radius: 0;
    }
    .user-menu.active {
        display: flex;
    }
    .user-menu .user-name {
        font-size: 20px;
        padding: 20px;
        border-bottom: 1px solid #ccc;
        width: 100%;
        text-align: center;
        background: #006400;
        color: white;
    }
    .user-menu a {
        font-size: 16px;
        padding: 15px;
        border-bottom: 1px solid #ccc;
        width: 100%;
        text-align: center;
        background: white;
        color: #006400;
        text-decoration: none;
    }
    .user-menu a:hover {
        background: #f4f4f4;
    }
}

/* MENU GEAR - Desktop */
.gear-menu {
    display: none;
    position: absolute;
    right: 20px;
    top: 60px;
    background: white;
    border-top: 3px solid #006400;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.gear-menu.active {
    display: block;
}
.gear-menu a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #006400;
    transition: background 0.3s;
    text-align: left;
}
.gear-menu a:hover {
    background: #f4f4f4;
}

/* MENU GEAR - Mobile */
@media (max-width: 768px) {
    .gear-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        background: white;
        width: 100%;
        flex-direction: column;
        align-items: center;
        z-index: 1001;
        border-radius: 0;
    }
    .gear-menu.active {
        display: flex;
    }
    .gear-menu a {
        font-size: 16px;
        padding: 15px;
        border-bottom: 1px solid #ccc;
        width: 100%;
        text-align: center;
        background: white;
        color: #006400;
        text-decoration: none;
    }
    .gear-menu a:hover {
        background: #f4f4f4;
    }
}

.erro-msg {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}
.forgot-password {
    text-align: center;
    margin-top: 10px;
}
.forgot-password a {
    color: #006400;
    text-decoration: underline;
    font-size: 14px;
}
.forgot-password a:hover {
    color: #004d00;
}

