/* =========================================
   RESET BÁSICO
========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Se quiseres compensar o header fixo, podes descomentar:
main {
    padding-top: 80px;
}
*/

/* =========================================
   HEADER – GLASSMORPHISM FIXO
========================================= */
.topbar {
    position: fixed;          /* FIXO NO TOPO */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;

    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);

    padding: 12px 0;
}

/* Container genérico */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Flex header */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo */
.logo img {
    height: 46px;
    display: block;
    border: 5px;
}

/* =========================================
   MENU DESKTOP
========================================= */
.desktop-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.desktop-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 26px;
}

.desktop-menu a {
    position: relative;
    font-size: 0.98rem;
    font-weight: 500;
    text-decoration: none;
    color: #222;
    padding-bottom: 3px;
    transition: color 0.2s ease;
}

/* sublinhado suave ao hover */
.desktop-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #00b0ff, #0073e6);
    transition: width 0.25s ease;
}

.desktop-menu a:hover {
    color: #0073e6;
}

.desktop-menu a:hover::after {
    width: 100%;
}

/* =========================================
   LANGUAGE SWITCHER (DESKTOP)
========================================= */
.lang-switcher {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);

    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    font-size: 0.82rem;
    font-weight: 600;
    color: #222;

    user-select: none;
}

/* triangulo do dropdown (se quiseres, senão tira) */
/*
.lang-btn::after {
    content: "▾";
    font-size: 0.72rem;
}
*/

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 90px;

    display: none;
    padding: 6px 0;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lang-switcher.active .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.lang-dropdown a:hover {
    background: #f3f4f6;
    color: #0073e6;
}

/* =========================================
   HAMBURGER (MOBILE)
========================================= */
.hamburger {
    width: 26px;
    height: 22px;
    display: none;           /* aparece no mobile mais baixo */
    flex-shrink: 0;
    cursor: pointer;

    display: none;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: #111;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* animação em X */
.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* =========================================
   MOBILE NAV
========================================= */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    max-width: 80%;
    height: 100vh;
    padding: 80px 22px 40px;

    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    box-shadow: -6px 0 30px rgba(0, 0, 0, 0.18);

    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;

    z-index: 3000;
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-nav a {
    font-size: 1.02rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

/* línguas no mobile */
.mobile-lang {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-lang a {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 0.86rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* =========================================
   OVERLAY (FUNDO ESCURO)
========================================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 2500;
}

.overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* =========================================
   RESPONSIVO
========================================= */

/* Tablets e abaixo */
@media (max-width: 900px) {

    .desktop-menu {
        display: none;
    }

    .lang-switcher {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-flex {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Ecrãs muito pequenos */
@media (max-width: 480px) {

    .logo img {
        height: 40px;
    }

    .topbar {
        padding: 10px 0;
    }

    .container {
        padding: 0 14px;
    }
}

/* BOTÃO X DO MENU MOBILE */
.mobile-close {
    position: absolute;
    top: 2px;          /* mais para cima → altura do logo */
    left: 22px;

    font-size: 34px;   /* maior */
    font-weight: 300;

    cursor: pointer;
    user-select: none;

    color: #111;

    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-close:hover {
    opacity: 1;
    transform: scale(1.08);
}
