/* Variáveis CSS para cores e fontes */
:root {
    --color-primary: #1E3A5F; /* Azul escuro */
    --color-secondary: #E63946; /* Vermelho suave */
    --color-background: #F8F9FA; /* Fundo cinza claro */
    --color-text: #1E3A5F; /* Azul escuro para texto */
    --color-text-light: #595959; /* Cinza escuro */
    --font-title: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Estilos gerais */
body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 20px;
}

/* Cabeçalho */
header {
    text-align: center;
    margin-bottom: 40px;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher a {
    display: inline-block;
    width: 28px;
    height: 28px;

    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;

    border: none; /* remove borda */

    text-indent: -9999px;
    overflow: hidden;
    color: transparent;

    transition: transform 0.2s ease;
}

.language-switcher a:hover {
    transform: scale(1.1);
}

.language-switcher a:nth-of-type(1) {
    background-image: url('https://flagcdn.com/pt.svg');
}

.language-switcher a:nth-of-type(2) {
    background-image: url('https://flagcdn.com/gb.svg');
}

.language-switcher a:nth-of-type(3) {
    background-image: url('https://flagcdn.com/fr.svg');
}

.language-switcher a:nth-of-type(4) {
    background-image: url('https://flagcdn.com/es.svg');
}

header h1 {
    font-family: var(--font-title);
    font-size: 32px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

/* Navegação */
nav {
    background-color: #ffffff;
    border-bottom: 2px solid var(--color-secondary);
    padding: 10px 0;
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0;
}

nav ul li a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--color-secondary);
}

/* Conteúdo principal */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.hero p {
    font-size: 16px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pillar {
    text-align: center;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pillar:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.pillar h3 {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.pillar p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-secondary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #D62828;
}

.calculator {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.calculator label {
    display: block;
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 15px;
}

.calculator input,
.calculator select,
.calculator button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--color-secondary);
    border-radius: 5px;
    font-size: 14px;
    color: var(--color-text);
}

.calculator button {
    background-color: var(--color-secondary);
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calculator button:hover {
    background-color: #D62828;
}

.resultado {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--color-background);
    border: 1px solid var(--color-secondary);
    border-radius: 5px;
}

.resultado h3 {
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.resultado p {
    font-size: 16px;
    color: var(--color-text-light);
    margin: 5px 0;
}

.disclaimer {
    margin-top: 20px;
    font-size: 12px;
    color: var(--color-text-light);
    text-align: center;
}

.disclaimer a {
    color: var(--color-secondary);
    text-decoration: none;
}

.disclaimer a:hover {
    text-decoration: underline;
}

.tables {
    margin-top: 40px;
}

.tables h3 {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.tables p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 10px;
    border: 1px solid var(--color-text-light);
    text-align: left;
}

table th {
    background-color: var(--color-background);
    font-weight: 600;
}

/* Formulário de contacto */
.contact-form {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

.contact-form h3 {
    font-family: var(--font-title);
    color: var(--color-primary);
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 15px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--color-secondary);
    border-radius: 5px;
    font-size: 14px;
    color: var(--color-text);
}

.contact-form textarea {
    height: 120px;
}

.contact-form button {
    background-color: var(--color-secondary);
    color: #ffffff;
    font-weight: bold;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.contact-form button:hover {
    background-color: #D62828;
}

/* Rodapé */
footer {
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: var(--color-text-light);
}

footer a {
    color: var(--color-secondary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Menu Responsivo */
.menu-icon {
  display: none;
  font-size: 24px;
  cursor: pointer;

  /* cor base do ícone */
  color: #111;

  /* reset botão / remove “caixa” */
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

/* opcional: mantém a cor ao hover/active */
.menu-icon:hover,
.menu-icon:active {
  color: #111;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 28px;
    }

    /* CENTRAR o hamburger no nav (fix definitivo) */
    nav {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 10px;
        background-color: #ffffff;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    nav ul.active {
        display: flex;
    }

    .menu-icon {
        display: inline-flex;
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1;
    }

    .pillars {
        grid-template-columns: 1fr;
    }
}