/* ===== layout.css: header + footer partilhados por todo o site ===== */

:root {
    --verde: #c8f135;
    --branco: #fefefc;
    --preto: #000000;
}

* { box-sizing: border-box; scroll-behavior: smooth; }

/* "clip" em vez de "hidden", senão o header sticky deixa de funcionar */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

html { scroll-padding-top: 90px; }

/* ---------- Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(254, 254, 252, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: background 0.25s ease, border-color 0.25s ease;
}
header.scrolled {
    background: rgba(200, 241, 53, 0.6);
    border-bottom-color: rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 50px;
}
.logo { display: block; text-decoration: none; }
.logo img { height: 48px; width: auto; display: block; }

header nav a {
    color: var(--preto);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    margin-left: 32px;
}
header nav a:hover,
header nav a.ativo {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--verde);
}
header.scrolled nav a:hover,
header.scrolled nav a.ativo {
    text-decoration-color: var(--preto);
}

/* ---------- Footer ---------- */
footer {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 50px 40px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 14px;
    color: rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}
.footer-contactos { width: 100%; }

.subtitulo {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(0,0,0,0.5);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.contactos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}
.contacto-bloco h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.3px;
}
.contacto-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: rgba(0,0,0,0.7);
    margin-bottom: 10px;
    text-decoration: none;
}
.contacto-info svg { flex-shrink: 0; width: 18px; height: 18px; }
.contacto-info:hover { color: var(--preto); }

.redes-sociais { display: flex; gap: 14px; }
.redes-sociais a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.redes-sociais a:hover { transform: translateY(-2px) scale(1.08); }
.redes-sociais img { width: 32px; height: 32px; object-fit: contain; }

.footer-marca {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 70px;
}
.footer-marca img { height: 90px; width: auto; display: block; }

/* ---------- Botão escondido no computador ---------- */

.menu-toggle {
    display: none;
}

/* ---------- Telemóvel ---------- */
@media (max-width: 600px) {

    html {
        scroll-padding-top: 100px;
    }

    .header-inner {
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        padding: 10px 16px 12px;
    }

    .logo img {
        height: 34px;
    }

    /* ---------- Botão hamburger ---------- */

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        padding: 8px;
        border: none;
        background: transparent;
        cursor: pointer;
        border-radius: 8px;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--preto);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    /* Animação hamburger -> X */

    .menu-toggle.aberto span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.aberto span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.aberto span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }


    /* ---------- Dropdown ---------- */

    header nav {
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        background: rgba(254, 254, 252, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 14px;

        padding: 8px;

        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);

        /* fechado */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        pointer-events: none;

        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;

        gap: 2px;
        width: auto;
    }

    /* aberto */

    header nav.aberto {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    header nav a {
        display: block;
        width: 100%;

        padding: 13px 14px;

        margin: 0;

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

        border-radius: 9px;

        text-decoration: none;
        white-space: normal;
    }

    header nav a:hover,
    header nav a.ativo {
        text-decoration: none;
        background: rgba(200, 241, 53, 0.25);
    }

    header.scrolled nav a:hover,
    header.scrolled nav a.ativo {
        text-decoration: none;
        background: rgba(200, 241, 53, 0.35);
    }


    /* ---------- Footer ---------- */

    footer {
        padding: 50px 24px 30px;
    }

    .contactos-grid {
        flex-direction: column;
    }

    .footer-marca {
        margin-top: 50px;
    }

    .footer-marca img {
        height: 72px;
    }
}


.card {
    transition: transform 0.2s ease, background 0.2s ease;
}
.card:hover,
.card:active {
    transform: translateY(-4px);
    background: rgba(198, 253, 0, 0.132);
}