@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Playwrite+IN:wght@100..400&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Smooch+Sans:wght@100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 4.5rem;
  --body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: rgba(25, 25, 79, 1);
  --title-color: hsl(0, 0%, 0%);
  --text-color: hsl(230, 12%, 40%);
  --body-color: hsl(230, 100%, 98%);
  --container-color: hsl(230, 100%, 97%);
  --border-color: hsl(230, 25%, 80%);
  --nav-color: hsl(0, 0%, 100%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-fixed: 100;
  --z-modal: 1000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--body-font);
  scrollbar-width: none;
  background-color: var(--body-color);
  overflow-x: hidden;
}

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

.stat-box .texto {
  font-size: 30px;
  font-weight: bold;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 1.5rem;
  background-color: var(--nav-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  height: 55px;
  position: relative;
  z-index: var(--z-fixed);
}


main {
  background-size: cover;
  min-height: calc(100vh - 55px - 60px); /* Altura total menos header e footer */
  padding-bottom: 70px; /* Espaço para o footer */
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 0.75rem;
}

.nav__link {
  font-size: var(--font-semi-bold);
  color: var(--title-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
  font-weight: bold;
  white-space: nowrap;
}

.nav__link:hover {
  background-color: var(--first-color);
  color: #fff;
}

.nav__link--sair {
  gap: 8px;
  background-color: #e63946;
  color: #fff;
  text-decoration: none;
  border-radius: 16px;
  font-weight: bold;
  transition: background 0.3s ease;
  padding: 0.5rem 1rem;
}

.nav__link--sair:hover {
  background-color: #d62828;
}

.nav__logo img {
  height: 30px;
  width: auto;
}

.nav__logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.nav_logo p {
  margin-left: 10px;
}

.nav__logo-text {
  margin-left: 10px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.main {
  width: 100%;
  min-height: 225px;
  background-color: var(--first-color);
}

.hero__content h1,
.hero__content p {
  color: #fff;
}

.parent {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(1, 1fr);
}

.parent div {
  color: aqua;
  background-color: rgba(208, 53, 16, 1);
  width: 118px;
  height: 80px;
  border-radius: 10px;
}

.container-component {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  width: 100%;
  background-color: #19194F;
  min-height: 225px;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.text-content {
  max-width: 55%;
  color: #fff;
  margin-left: 3%;
  flex: 1;
  min-width: 300px;
}

.text-content h1 {
  font-size: 31px;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.2;
}

.text-content p {
  font-size: 12px;
  margin-bottom: 10px;
  color: #dcdcdc;
  line-height: 1.4;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stat-box {
  background-color: rgba(208, 53, 16, 1);
  padding: 6px 12px;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
  color: white;
  min-width: 120px;
}

.stat-box span {
  display: block;
  font-size: 14px;
  font-weight: bold;
}

.image-content {
  flex-shrink: 0;
  margin-top: 15px;
}

.image-content img {
  max-width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: 6px;
  object-fit: cover;
}

.containes-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  margin-top: 26px;
 /* padding: 0 15px;*/
  flex-wrap: wrap;
}

.card {
  background: #fff;
  padding: 15px 20px;
  border-radius: 20px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  min-height: 76px;
  width: 700px;
  font-size: 18px;
  font-weight: bold;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 250px;
  max-width: 300px;
}

/* Barra colorida na lateral esquerda */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  border-radius: 10px 0 0 10px;
}

/* Coluna de título + porcentagem */
.texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Títulos maiores e pretos */
.titulo {
  font-size: 18px;
  color: #000;
  margin-bottom: 5px;
}

.percent {
  font-size: 15px;
  margin-top: 3px;
}

/* Ícone imagem */
.icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* Tipos de card */
.normal {
  color: #2e7d32;
}

.normal::before {
  background: #2e7d32;
}

.atencao {
  color: #fbc02d;
}

.atencao::before {
  background: #fbc02d;
}

.risco {
  color: #d32f2f;
}

.risco::before {
  background: #d32f2f;
}

.moderado {
  color: #FF9C4A;
}

.moderado::before {
  background: #FF9C4A;
}

.offline {
  color: #757575;
}

.offline::before {
  background: #757575;
}

.container-coluna {
  display: flex;
  gap: 20px;
  margin: 25px auto;
  padding: 0 20px;
  max-width: 1400px;
  flex-wrap: wrap;
}

/* ----------- COLUNA ESQUERDA ----------- */
.col-esquerda {
  flex: 2;
  min-width: 300px;
}

.titulo-coluna {
  font-size: 25px;
  font-weight: bold;
  margin-bottom: 15px;
}

.sinalizacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fffbfb0c;
  border-radius: 10px;
  padding: 10px 15px;
  margin-bottom: 10px;
  width: 100%;
  border: 1px solid #ddd;
  min-height: 75px;
  flex-wrap: wrap;
}

.info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}

.icone {
  width: 12px;
  height: 40px;
  border-radius: 5px;
  flex-shrink: 0;
}

.icone.amarelo {
  background: #fbc02d;
}

.icone.vermelho {
  background: #d32f2f;
}

.texto-info {
  font-size: 13px;
}

.texto-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.data {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

/* ----------- COLUNA DIREITA ----------- */
.col-direita {
  flex: 1;
  min-width: 300px;
}

.alerta-card {
  background: rgba(254, 0, 0, 1);
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: bold;
  min-height: 150px;
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
}

.alerta-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.alerta-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  background: rgba(51, 27, 117, 1);
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: background 0.3s;
  white-space: nowrap;
}

.btn:hover {
  background: #1e28cc;
}

.alerta-data {
  font-size: 12px;
  white-space: nowrap;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(25, 25, 79, 1);
  color: white;
  text-align: center;
  padding: 10px 5px;
  z-index: var(--z-fixed);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
}

.footer-text {
  text-align: center;
  font-size: 14px;
  flex: 1;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============ MEDIA QUERIES ============ */

/* Para telas pequenas (smartphones) */
@media screen and (max-width: 768px) {
  .nav {
    padding: 0 1rem;
  }
  
    .icon img {
    display: none;
  }
  .nav__list {
    gap: 0.5rem;
  }
  
  .nav__link {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  
  .nav__logo-text {
    display: none;
  }
  
  .container-component {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
  }
  
  .text-content {
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 20px;
  }
  
  .text-content h1 {
    font-size: 24px;
  }
  
  .image-content img {
    margin-right: 0;
    width: 100%;
    max-width: 350px;
    display: none;
  }
  
  .stats {
    justify-content: center;
  }
  
  .containes-cards {
    gap: 15px;
  }
  
  .card {
    width: 100%;
    /*max-width: 300px;*/
    min-height: 70px;
  }
  
  .container-coluna {
    flex-direction: column;
    margin-left: 0;
    padding: 0 15px;
  }
  
  .sinalizacao {
    width: 100%;
  }
  
  .alerta-card {
    width: 100%;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Para a resolução específica 800×1130 (monitor em pé) */
@media screen and (min-width: 800px) and (max-width: 1130px) and (min-height: 1130px) {
  body {
    font-size: 14px;
  }
  
  main {
    height: auto;
    min-height: calc(1130px - 55px - 60px);
  }
  
  .container-component {
    flex-direction: row;
    text-align: left;
    padding: 25px;
    height: auto;
  }
  
  .text-content {
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 25px;
  }
  
  .text-content h1 {
    font-size: 28px;
  }
  
  .image-content img {
    margin-right: -20px;
    width: 90%;
    max-width: 500px;
    margin-left: 10px;
  }
  
  .containes-cards {
    grid-template-columns: repeat(3, 1fr);
    display: flex;
    gap: 20px;
    padding: 0 30px;
  }
  
  .card {
    width: 200%;
    height: 90px;
    font-size: 20px;
  }
  
  .container-coluna {
    flex-direction: column;
    margin-left: 0;
    padding: 0 30px;
  }
  
  .col-esquerda,
  .col-direita {
    width: 100%;
  }
  
  .sinalizacao {
    width: 100%;
  }
  
  .alerta-card {
    width: 100%;
    height: auto;
    padding: 25px;
  }
  
  .nav {
    padding: 0 1.5rem;
  }
  
  .nav__link {
    padding: 0.6rem 0.8rem;
  }
}

/* Para tablets em modo paisagem */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .container-component {
    flex-direction: row;
    padding: 15px 20px;
  }
  
  .text-content {
    max-width: 50%;
  }

    .icon img {
    display: none;
  }
  
  .image-content img {
    width: 300px;
    height: 150px;
  }
  
  .containes-cards {
    grid-template-columns: repeat(3, 1fr);
    display: grid;
    gap: 15px;
  }
  
  .card {
    width: 100%;
  }
}

/* Para desktops pequenos */
@media screen and (min-width: 1024px) and (max-width: 1280px) {
  .container-coluna {
    max-width: 1200px;
    margin: 25px auto;
  }
  
  .sinalizacao {
    width: 100%;
  }
  
  .alerta-card {
    width: 100%;
  }
}

/* Para telas muito grandes */
@media screen and (min-width: 1440px) {
  .container-coluna {
    max-width: 1400px;
    margin: 30px auto;
  }
  
  .containes-cards {
    max-width: 1400px;
    margin: 30px auto;
  }
  
  .container-component {
   /* max-width: 1400px;*/
    margin: 0 auto;
  }
}

/* Para telas muito pequenas (smartphones pequenos) */
@media screen and (max-width: 480px) {
  .nav {
    padding: 0 0.5rem;
  }
    .icon img {
    display: none;
  }
  .nav__logo img {
    height: 25px;
  }
  
  .nav__link {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
  
  .text-content h1 {
    font-size: 20px;
  }
  
  .stat-box {
    min-width: 100px;
    font-size: 11px;
  }
  
  .card {
    min-width: 160px;
    padding: 12px 15px;
  }
  
  .titulo {
    font-size: 14px;
  }
  
  .percent {
    font-size: 18px;
  }
  
  .icon img {
    width: 35px;
    height: 35px;
  }
  
  .alerta-card strong {
    font-size: 18px;
  }
  
  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Ajustes para evitar overflow horizontal */
@media screen and (max-width: 400px) {
  .nav__list {
    gap: 0.3rem;
  }

    .icon img {
    display: none;
  }
  
  .nav__link {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }
  
  .containes-cards {
    padding: 0 10px;
  }
  
  .container-coluna {
    padding: 0 10px;
  }
}  

/* CARD GERAL */
.apac-card {
  width: 90%;
  margin: 70px;
  margin-bottom: 10px;
}

/* HEADER */
.apac-header {
  display: flex;
  align-items: stretch; /* faz a logo acompanhar a altura do texto */
  gap: 20px;
}

/* LOGO */
.logo-box {
  border: 1.5px solid #000;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
}

.logo-box img {
  height: 100%;        /* ocupa a altura do container */
  max-height: 60px;    /* controla para não estourar */
  object-fit: contain;
}

/* TÍTULO */
.title-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title-box h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.title-box p {
  font-size: 14px;
  color: #555;
  margin-top: 4px;
}

/* WRAPPER GERAL */
.apac-precipitation-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 0px 70px;
}

/* CONTAINER */
.apac-precipitation-table-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* TABELA */
.apac-precipitation-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 950px;
}

.apac-precipitation-table th,
.apac-precipitation-table td {
  border: 1px solid #dcdcdc;
  padding: 6px 10px;
  text-align: center;
}

.apac-precipitation-table thead th {
  background-color: #f3f3f3;
  font-weight: 600;
}

/* COLUNA REGIÕES */
.apac-region-name {
  text-align: left;
  font-weight: 600;
  background-color: #ffffff;
}

/* LEGENDA */
.apac-precipitation-legend {
  min-width: 260px;
  font-size: 13px;
}

/* CABEÇALHO */
.apac-legend-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-weight: 700;
  margin-bottom: 6px;
}

/* LINHAS */
.apac-legend-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 2px;
}

/* CATEGORIAS (cores) */
.apac-cat-sem-chuva {
  background-color: #e6e6e6;
}

.apac-cat-fraca {
  background-color: #cfcfcf;
}

.apac-cat-fraca-moderada {
  background-color: #9fd0ff;
}

.apac-cat-moderada {
  background-color: #fff200;
}

.apac-cat-moderada-forte {
  background-color: #ffb300;
}

.apac-cat-forte {
  background-color: #e60000;
  color: #fff;
}

