:root {
  --blue-navy: #1f2a44;    /* azul-marinho institucional */
  --blue-accent: #2f5fa7; /* azul secundário (hover, links) */
  --beige-light: #f4f1ec;
  --beige-medium: #e8e3da;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #f4f1ec;
  color: #333;
}

header {
  padding: 16px 28px;
  border-bottom: 3px solid var(--blue-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--blue-navy);
}

header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  color: var(--beige-medium);
}

.subtitle {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: var(--beige-medium);
  font-style: italic;
  opacity: 0.85;
}

.updated {
  font-size: 14px;
  color: var(--beige-medium);
}


/* ===== DESKTOP (default) ===== */
.container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
}

.sidebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: #f4f1ec;
  padding: 0 24px;
  border-bottom: 1px solid #d8d2c7;
}

.sidebar button {
  flex: 1;
  text-align: center;
  width: 100%;
  /*padding: 14px;*/
  padding: 14px 16px;
  margin-bottom: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  color: #1f2a44;
  /*white-space: nowrap;*/
  position: relative;
}

.sidebar button,
#textContent {
  transition: all 0.2s ease;
}

.sidebar button:focus-visible {
  outline: 2px solid var(--blue-navy);
  outline-offset: 2px;
}


.sidebar button:hover {
  background: var(--beige-medium);
  color: var(--blue-accent);
}

.sidebar button.active {
  font-weight: 600;
  color: var(--blue-navy);
}

.sidebar button.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 3px;
  background: var(--blue-navy);
  border-radius: 2px;
}


.content {
  flex: 1;
  position: relative;
  background: #f4f1ec;
}

#textContent {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

#textContent h2 {
  font-size: 24px;
  color: #1f2a44;
  margin-bottom: 16px;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: #666;
  background: rgba(244, 241, 236, 0.85); /* bege translúcido */
  z-index: 10;
}


iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  background: #ffffff;
}


/* BOTÕES */

#toggleView,
#menuToggle {
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #c8c1b5;
  background: #ffffff;
  color: #1f2a44;
  cursor: pointer;
  border-radius: 4px;
}

#toggleView:hover,
#menuToggle:hover {
  background: #e8e3da;
}


/* ===== MOBILE MODE ===== */

/*body.mobile header {*/
/*  flex-direction: column;*/
/*  align-items: flex-start;*/
/*}*/

body.mobile #menuToggle {
  display: inline-block;
}

body.mobile .container {
  /*flex-direction: column;*/
  flex-direction: row;
}

body.mobile .sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  flex-direction: column;
  /*display: flex;*/
  /*overflow-x: auto;*/
  /*border-right: none;*/
  /*border-bottom: 1px solid #ddd;*/
  /*background: #f7f7f7;*/
  background: #ffffff;
  box-shadow: 2px 0 12px rgba(0,0,0,0.2);
  border-right: 1px solid #d8d2c7;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

/* Sidebar aberta */
body.mobile .sidebar.open {
  transform: translateX(0);
}

body.mobile .sidebar button {
  width: 100%;
  padding: 16px;
  border-bottom: 1px solid #e0dbd0;
  /*flex: 1;*/
  /*white-space: nowrap;*/
}

body.mobile .content {
  /*height: calc(100vh - 160px);*/
  margin-left: 0;
}


/* ===== RODAPÉ ===== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--beige-light);
  border-top: 3px solid var(--blue-navy);
  font-size: 14px;
  color: var(--blue-navy);
}

/* Logos */
.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Container fixo */
/*.footer-left img {
  height: 38px;         /* Altura padrão*/
/*  max-width: 90px;
  object-fit: contain;
  filter: grayscale(10%); /* uniformiza visual */
/*}*/

.footer-left .logo-box {
  width: 90px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-left .logo-box img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}



/* Texto institucional */
.footer-right {
  text-align: right;
  line-height: 1.4;
}

.footer-right strong {
  font-weight: 600;
  color: var(--blue-navy);
}

/* Ajuste para mobile*/
body.mobile .footer {
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

body.mobile .footer-right {
  text-align: center;
}
/* ===== FIGURES (TEXT PAGES) ===== */

.figure {
  margin: 24px auto;
  padding: 14px;
  max-width: 900px;              /* limite do container em desktop */
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-align: center;
}

.figure img {
  width: 100%;
  max-width: 800px;              /* controle real do tamanho da imagem */
  height: auto;
  border-radius: 10px;
}

.figure-caption {
  margin-top: 8px;
  font-size: 13px;
  color: #374151;
  font-style: italic;
}

/* ===== MOBILE ADJUSTMENTS ===== */

body.mobile .figure {
  padding: 12px;
  margin: 18px auto;
}

body.mobile .figure img {
  max-width: 100%;               /* ocupa toda a largura no celular */
}
