/* ==========================================================================
   CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================================================== */
:root {
    /* Podes ajustar estas variáveis de acordo com o teu sistema global */
    --primary-blue: #0039b3;
    --secondary-blue: #002680;
    --gray-text: #6c757d;
}

body {
    overflow-x: hidden;
}

.main {
    padding-bottom: 50px;
}

/* ==========================================================================
   CONTAINER TÍTULO E FORMULÁRIO (SELECTS)
   ========================================================================== */
.containerTitulo {
    width: 100%;
    margin: 0 auto 30px;
    text-align: center;
}

.containerTitulo .titulo {
    color: var(--primary-blue);
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* SELECT ESTILO */
.select-estilo {
    min-width: 250px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

/* Hover & Focus do Select */
.select-estilo:hover {
    border-color: #0b5ed7;
}

.select-estilo:focus {
    outline: none;
    border-color: #0b5ed7;
    box-shadow: 0 0 0 2px rgba(11, 94, 215, 0.2);
}

/* ==========================================================================
   IFRAME MAPA
   ========================================================================== */
.Mapas {
    display: block;
    width: 100%;
    max-width: 1700px;
    height: 650px;
    margin: 20px auto;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
}

/* ==========================================================================
   CONTAINER PRINCIPAL (LAYOUT ASIMÉTRICO)
   ========================================================================== */
.container {
    display: flex;
    gap: 40px;
    padding: 20px;
    width: 95%;
    margin: 0 auto;
    align-items: flex-start;
    background: #006eff0a; 
    border-radius: 12px;
}

/* LADO ESQUERDO: TEXTO FIXO (STICKY) */
.esquerda {
    width: 55%;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.esquerda h1 {
    font-size: 32px;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.esquerda h2 {
    font-size: 18px;
    color: var(--secondary-blue);
    margin-bottom: 20px;
}

.esquerda p {
    text-align: justify;
    line-height: 1.7;
}

/* LADO DIREITO: DASHBOARD COM ROLAGEM INTERNA */
.direita {
    width: calc(45% - 40px); /* Desconto do gap para alinhamento perfeito */
    height: fit-content;        /* Baseado na altura da tela, evita o scroll infinito */
    overflow-y: auto;
    padding-right: 10px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Customização da Barra de Rolagem da Direita */
.direita::-webkit-scrollbar {
    width: 4px;
}

.direita::-webkit-scrollbar-thumb {
    background: #1f4e3d;
    border-radius: 10px;
}

/* ==========================================================================
   CARDS DE CONTEÚDO (PLANILHAS / GRÁFICOS)
   ========================================================================== */
.planilhas {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.planilhas p {
    color: var(--gray-text);
}

/* Elementos de Gráfico e Tabela */
.conteudoGrafico,
.conteudoTabela {
    width: 100%;
}

/* ==========================================================================
   BOTÕES DE AÇÃO E EFEITOS
   ========================================================================== */

/* Botões de Download */
.containerBTN {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.BTN {
    display: inline-block;
    flex: 1;
    min-width: 160px;
    max-width: 200px;
    padding: 10px 20px;
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.BTN:hover {
    background-color: var(--secondary-blue);
}

/* Ícones animados nos botões de download */
.BTN i {
    display: inline-block;
    transition: transform 0.6s ease;
}

.BTN:hover i {
    transform: rotate(270deg);
}

/* Botões de Alternância (Tabela / Gráfico) */
.containerToggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btnToggle {
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    background: #e5e5e5;
    transition: 0.3s;
}

.btnToggle.active {
    background: #0d6efd;
    color: #fff;
}

/* ==========================================================================
   ESTILIZAÇÃO DAS TABELAS
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Permite scroll horizontal apenas na tabela se for muito larga */
    -webkit-overflow-scrolling: touch;
}

.tabela-padrao {
    width: 100%;
    border-collapse: collapse;
}

.tabela-padrao th {
    background-color: #0039b3;
    color: white;
    padding: 10px;
    border: 1px solid #333;
}

.tabela-padrao td {
    padding: 10px;
    border: 1px solid #333;
}

.tabela-padrao tbody tr:nth-child(odd) {
    background-color: #eef3ff;
}

.tabela-padrao tbody tr:nth-child(even) {
    background-color: #d8e3ff;
}

.tabela-padrao td:first-child {
    font-weight: bold;
}


.imagemBanner img{
    width: 100%;
    height: auto;
    margin-top: -20px;
}

/* ==============================
   CONTAINER SUGESTÕES
============================== */

.informacoes-container {
  width: 97%;
  max-width: 1400px;
  margin: 50px auto 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}


/* ==============================
   CARD
============================== */

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;

  padding: 18px 20px;

  background: #ffffff;

  border: 1px solid #dce3ee;
  border-radius: 15px;

  box-sizing: border-box;
}

.blue{
    background-color: #e7f0ff;
}

.white{
    background: #ffff;
}


/* ==============================
   ÍCONE
============================== */

.info-icon {
  flex: 0 0 58px;

  width: 58px;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
}

.info-icon svg {
  width: 32px;
  height: 32px;

  fill: none;
  stroke: #0b4aa2;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ==============================
   CONTEÚDO
============================== */

.info-content {
  flex: 1;
  min-width: 0;
}

.info-content h2 {
  margin: 3px 0 12px;

  color: #073f91;

  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.info-content p {
  margin: 0 0 16px;

  color: #333333;

  font-size: 14px;
  line-height: 1.55;
}

.info-content p:last-of-type {
  margin-bottom: 0;
}


/* ==============================
   FORMULÁRIO
============================== */

/* ==============================
   INPUTS DO FORMULÁRIO
============================== */

.sugestao-form input[type="text"] {
    display: block;

    width: 100%;
    height: 42px;

    padding: 10px 12px;

    box-sizing: border-box;

    border: 1px solid #bfc7d4;
    border-radius: 7px;

    background: #ffffff;
    color: #333333;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


/* ==============================
   PLACEHOLDER
============================== */

.sugestao-form input[type="text"]::placeholder {
    color: #8a8a8a;
}


/* ==============================
   FOCO
============================== */

.sugestao-form input[type="text"]:focus {
    border-color: #1769aa;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(23, 105, 170, 0.10);
}


/* ==============================
   HOVER
============================== */

.sugestao-form input[type="text"]:hover {
    border-color: #8fa4bd;
}


/* ==============================
   LABEL DOS INPUTS
============================== */

.sugestao-form label {
    display: block;

    margin-bottom: 8px;

    color: #222222;

    font-size: 14px;
    line-height: 1.4;

    font-weight: 700;
}


/* ==============================
   ESPAÇAMENTO ENTRE CAMPOS
============================== */

.sugestao-form input[type="text"] + label {
    margin-top: 15px;
}

.sugestao-form {
  display: block;
  margin-top: 18px;
}

.sugestao-form label {
  display: block;

  margin-bottom: 8px;

  color: #222222;

  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.sugestao-form textarea {
  display: block;

  width: 100%;
  min-height: 90px;

  padding: 12px;

  box-sizing: border-box;

  resize: vertical;

  border: 1px solid #bfc7d4;
  border-radius: 7px;

  background: #ffffff;

  color: #333333;

  font-family: inherit;
  font-size: 13px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.sugestao-form textarea::placeholder {
  color: #8a8a8a;
}

.sugestao-form textarea:focus {
  border-color: #1769aa;

  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.10);
}

/* ==============================
   BOTÃO
============================== */

.sugestao-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  margin-top: 10px;
  padding: 10px 18px;

  border: none;
  border-radius: 6px;

  background: #0645a5;
  color: #ffffff;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.sugestao-form button:hover {
  background: #053a8a;
}

.sugestao-form button:active {
  transform: translateY(1px);
}

.sugestao-form button svg {
  width: 17px;
  height: 17px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==============================
   TABLET
============================== */

@media (max-width: 900px) {

  .informacoes-container {
    grid-template-columns: 1fr;
  }

}


/* ==============================
   CELULAR
============================== */

@media (max-width: 600px) {

  .informacoes-container {
    display: flex;
    flex-direction: column;

    gap: 15px;

    padding: 10px;
  }

  .info-card {
    gap: 13px;

    padding: 16px;
    border-radius: 13px;
  }

  .info-icon {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;
  }

  .info-icon svg {
    width: 27px;
    height: 27px;
  }

  .info-content h2 {
    margin-top: 1px;

    font-size: 17px;
  }

  .info-content p {
    font-size: 13px;
    line-height: 1.5;
  }

  .sugestao-form {
    margin-top: 15px;
  }

  .sugestao-form label {
    font-size: 13px;
  }

  .sugestao-form textarea {
    min-height: 100px;
  }

  .sugestao-form button {
      width: auto;
  }

}


/* ==============================
   CELULAR PEQUENO
============================== */

@media (max-width: 400px) {

  .info-card {
    padding: 14px;
  }

  .info-icon {
    flex: 0 0 42px;

    width: 42px;
    height: 42px;
  }

  .info-icon svg {
    width: 24px;
    height: 24px;
  }

  .info-content h2 {
    font-size: 16px;
  }

}

/* ==========================================================================
   REGRAS DE RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */

/* Tablets e Ecrãs Médios */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        width: 95%;
        padding: 15px;
    }

    /* Transforma as colunas em blocos de largura total */
    .esquerda, 
    .direita {
        width: 100%;
        position: static; /* Desativa o sticky para fluir normalmente */
    }

    .direita {
        max-height: none; /* Remove a limitação de altura e o scroll interno */
        overflow: visible;
        padding-right: 0;
    }
}

/* Smartphones (Telemóveis) */
@media (max-width: 768px) {
    .containerTitulo .titulo {
        font-size: 20px;
        padding: 0 10px;
    }

    .select-estilo {
        width: 100%; /* Selects ocupam a largura total no ecrã do telemóvel */
    }

    .Mapas {
        height: 350px;    /* Reduz a altura do Iframe para não ocupar o ecrã todo */
        border-radius: 0; /* Remove arredondamento nas bordas para preenchimento lateral */
    }

    .esquerda h1 {
        font-size: 24px;
    }

    .planilhas {
        padding: 15px;
    }

    .containerToggle {
        width: 100%;
    }

    .btnToggle {
        flex: 1;
        text-align: center;
        font-size: 13px;
    }
}

.destaqueTitle{
    font-size: 20px;
    color: var(--primary-blue);
    font-weight: bold;
    border-left: 4px solid var(--primary-blue);
    padding-left: 10px;
}