* {
  box-sizing: border-box;
}

:root {
  --bg: #081321;
  --text: #f7f9fc;
  --muted: #b7c3d6;
  --glass: rgba(10, 23, 43, 0.72);
  --glass-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.13);
  --accent: #4ca6ff;
  --accent-2: #73c7ff;
  --success: #49d17d;
  --warning: #ffbf47;
  --danger: #ff6b6b;
  --background-image: url("../img/background.jpg");
  --page-overlay-top: rgba(8, 22, 42, .28);
  --page-overlay-bottom: rgba(8, 22, 42, .88);
  --section-bg: rgba(7,17,33,.72);
  --input-text: #fff;
  --card-hover: rgba(255,255,255,.10);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #a9c8d8;
  --text: #173958;
  --muted: #49677f;
  --glass: rgba(216, 232, 240, .76);
  --glass-soft: rgba(38, 91, 124, .14);
  --border: rgba(25, 82, 119, .42);
  --accent: #109bd2;
  --accent-2: #1875a2;
  --page-overlay-top: rgba(96, 151, 177, .06);
  --page-overlay-bottom: rgba(96, 151, 177, .16);
  --section-bg: rgba(211, 228, 236, .72);
  --input-text: #173958;
  --card-hover: rgba(16, 155, 210, .10);
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(var(--page-overlay-top), var(--page-overlay-bottom)),
    var(--background-image) center / cover fixed no-repeat,
    var(--bg);
  transition: color .25s ease, background-color .25s ease;
}

.background-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(76,166,255,.20), transparent 34%),
    radial-gradient(circle at 85% 15%, rgba(99,102,241,.13), transparent 30%),
    linear-gradient(180deg, rgba(6,13,25,.18), rgba(6,13,25,.86));
}

:root[data-theme="light"] .background-overlay {
  background: transparent;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 22px;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 22px 60px rgba(0,0,0,.20);
}

.topbar {
  min-height: 96px;
  padding: 18px 20px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  padding: 8px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--accent-2);
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
}

.status-area {
  display: flex;
  gap: 12px;
}

.status-card {
  min-width: 158px;
  padding: 12px 14px;
  border-radius: 15px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
}

.status-card strong {
  font-size: 22px;
  display: block;
  margin: 2px 0;
}

.status-card small {
  color: var(--muted);
  font-size: 11px;
}

.status-label {
  display: block;
  color: var(--accent-2);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .1em;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.weather-main strong {
  display: inline;
}

.hero {
  padding: 84px 20px 54px;
  text-align: center;
}

.hero-copy {
  max-width: 800px;
  margin: 0 auto 30px;
}

.hero h2 {
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -.04em;
}

.hero p {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.6;
}

.google-search {
  max-width: 780px;
  margin: 28px auto 20px;
  border-radius: 18px;
  padding: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.google-search input,
.internal-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--input-text);
  background: transparent;
  font: inherit;
}

.google-search input {
  min-height: 48px;
  font-size: 15px;
}

.google-search input::placeholder,
.internal-search input::placeholder {
  color: #99a9be;
}

.search-icon {
  font-size: 24px;
  padding-left: 10px;
  color: var(--muted);
}

.google-search button {
  border: 0;
  cursor: pointer;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #3578ff);
  color: #fff;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  padding: 13px 17px;
  border-radius: 13px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  transition: .2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
}

.section {
  margin-top: 22px;
  padding: 28px;
  border-radius: 22px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section h3 {
  margin: 5px 0 0;
  font-size: 24px;
}

.internal-search {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--glass-soft);
  border: 1px solid var(--border);
}

.category {
  margin-top: 26px;
}

.category:first-child {
  margin-top: 0;
}

.category-title {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #dbe6f4;
  margin-bottom: 12px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: block;
  min-height: 142px;
  padding: 18px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  transition: .22s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.10);
  border-color: rgba(115,199,255,.35);
}

.service-card .icon {
  font-size: 26px;
  margin-bottom: 15px;
}

.service-card strong {
  display: block;
  margin-bottom: 7px;
}

.service-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 0;
}

.notices {
  display: grid;
  gap: 10px;
}

.notice {
  padding: 15px 16px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
}

.notice.warning {
  border-left: 4px solid var(--warning);
}

.notice.info {
  border-left: 4px solid var(--accent);
}

.notice.danger {
  border-left: 4px solid var(--danger);
}

.notice strong {
  display: block;
  margin-bottom: 5px;
}

.notice span {
  color: var(--muted);
  font-size: 13px;
}

.support-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 26px;
  align-items: center;
}

.support-section p {
  color: var(--muted);
  line-height: 1.5;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-card {
  padding: 15px;
  border-radius: 14px;
  background: rgba(255,255,255,.065);
  border: 1px solid var(--border);
}

.contact-card strong {
  display: block;
  margin-bottom: 8px;
}

.contact-card span,
.contact-card a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.7;
}

.contact-card a:hover {
  color: white;
}

footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 25px 10px 4px;
  color: #93a2b6;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.no-results {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-section {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .status-area {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 650px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .topbar {
    flex-direction: column;
  }

  .status-area {
    width: 100%;
  }

  .status-card {
    flex: 1;
    min-width: 140px;
  }

  .hero {
    padding: 55px 8px 36px;
  }

  .google-search {
    grid-template-columns: auto 1fr;
  }

  .google-search button {
    grid-column: 1 / -1;
  }

  .section {
    padding: 20px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .internal-search {
    min-width: 0;
    width: 100%;
  }

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

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


/* ===== Ajustes de layout: topo compacto + foco no conteúdo ===== */

.topbar {
  min-height: 74px;
  padding: 10px 14px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.brand {
  gap: 11px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  padding: 6px;
}

.brand h1 {
  font-size: 17px;
}

.brand .eyebrow {
  font-size: 9px;
}

.topbar-search {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 50px;
  border-radius: 14px;
  padding: 5px 6px 5px 2px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  box-shadow: none;
}

.topbar-search input {
  min-height: 38px;
  font-size: 14px;
}

.topbar-search .search-icon {
  font-size: 21px;
  padding-left: 9px;
}

.topbar-search button {
  min-height: 38px;
  padding: 0 17px;
  border-radius: 10px;
}

.status-area {
  gap: 8px;
}

.status-card {
  min-width: 125px;
  padding: 8px 10px;
  border-radius: 12px;
}

.status-card strong {
  font-size: 18px;
  margin: 1px 0;
}

.status-card small {
  font-size: 9px;
}

.status-label {
  font-size: 8px;
}

.weather-main {
  gap: 5px;
}

.compact-hero {
  padding: 48px 20px 32px;
}

.compact-hero .hero-copy {
  margin-bottom: 20px;
}

.compact-hero h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  margin-bottom: 9px;
}

.compact-hero p {
  max-width: 720px;
}

.section {
  margin-top: 16px;
}

@media (max-width: 1000px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .status-area {
    justify-content: flex-end;
  }
}

@media (max-width: 650px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .brand {
    width: 100%;
  }

  .topbar-search {
    order: 2;
  }

  .status-area {
    order: 3;
    width: 100%;
  }

  .status-card {
    flex: 1;
  }

  .compact-hero {
    padding: 38px 8px 26px;
  }

  .topbar-search {
    display: grid;
    grid-template-columns: auto 1fr auto;
  }

  .topbar-search button {
    grid-column: auto;
  }
}


/* ===== Cards compactos ===== */

.cards-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  min-height: 108px;
  padding: 13px 14px;
  border-radius: 14px;
}

.service-card .icon {
  font-size: 21px;
  margin-bottom: 10px;
}

.service-card strong {
  font-size: 13px;
  margin-bottom: 5px;
}

.service-card p {
  font-size: 10.5px;
  line-height: 1.35;
}

.category {
  margin-top: 20px;
}

.category-title {
  margin-bottom: 9px;
}

/* ===== Modal de comunicados ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 18, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.alert-modal {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 22px;
  text-align: center;
  animation: modalIn .22s ease;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  background: rgba(255,255,255,.08);
  font-size: 24px;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255,255,255,.15);
}

.modal-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.alert-modal h3 {
  font-size: 25px;
  margin: 6px 0 16px;
}

.modal-body {
  text-align: left;
}

.modal-message {
  padding: 14px 15px;
  border-radius: 13px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  margin-top: 10px;
}

.modal-message:first-child {
  margin-top: 0;
}

.modal-message.info {
  border-left: 4px solid var(--accent);
}

.modal-message.warning {
  border-left: 4px solid var(--warning);
}

.modal-message.danger {
  border-left: 4px solid var(--danger);
}

.modal-message.success {
  border-left: 4px solid var(--success);
}

.modal-message strong {
  display: block;
  margin-bottom: 6px;
}

.modal-message p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.modal-action {
  margin-top: 20px;
  min-width: 130px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), #3578ff);
  font-weight: 700;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1050px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card {
    min-height: 104px;
  }
}

@media (max-width: 420px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Área principal mais compacta ===== */
.compact-hero {
  padding: 24px 18px 16px;
}

.compact-hero .hero-copy {
  margin-bottom: 12px;
}

.compact-hero h2 {
  font-size: clamp(27px, 3.4vw, 42px);
  margin: 4px 0 6px;
}

.compact-hero p {
  font-size: 13px;
  line-height: 1.45;
}

.hero-actions {
  gap: 8px;
}

.action-btn {
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 12px;
}

/* ===== Ícones personalizados PNG / ICO ===== */
.service-icon-img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
}

.action-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.action-icon-emoji {
  font-size: 16px;
}

.service-card .icon {
  min-height: 25px;
  display: flex;
  align-items: center;
}

@media (max-width: 650px) {
  .compact-hero {
    padding: 22px 8px 14px;
  }

  .compact-hero h2 {
    font-size: 28px;
  }
}

/* ===== Identidade Lagoa + seletor de tema ===== */
.theme-switcher {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass-soft);
}

.theme-option {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.theme-option:hover {
  color: var(--text);
}

.theme-option.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(16, 155, 210, .28);
}

.theme-option:focus-visible {
  outline: 3px solid rgba(76, 166, 255, .35);
  outline-offset: 2px;
}

:root[data-theme="light"] .glass {
  box-shadow: 0 18px 45px rgba(32, 103, 145, .13);
}

:root[data-theme="light"] .topbar {
  border-top: 3px solid #159ed4;
}

:root[data-theme="light"] .logo {
  background: #fff;
  box-shadow: 0 5px 16px rgba(29, 105, 148, .14);
}

:root[data-theme="light"] .google-search button,
:root[data-theme="light"] .modal-action {
  background: linear-gradient(135deg, #119ed5, #2d75ad);
}

:root[data-theme="light"] .service-card,
:root[data-theme="light"] .contact-card,
:root[data-theme="light"] .action-btn,
:root[data-theme="light"] .notice,
:root[data-theme="light"] .modal-message {
  background: rgba(224, 237, 243, .92);
  border-color: rgba(25, 82, 119, .40);
}

:root[data-theme="light"] .service-card:hover,
:root[data-theme="light"] .action-btn:hover {
  background: #d5e8f0;
  border-color: rgba(12, 116, 160, .62);
  box-shadow: 0 10px 24px rgba(30, 111, 154, .12);
}

:root[data-theme="light"] .category-title {
  color: #28516e;
}

:root[data-theme="light"] .internal-search input::placeholder {
  color: #365b73;
  opacity: 1;
}

:root[data-theme="light"] .hero .eyebrow {
  color: #8bdcff;
  text-shadow: 0 1px 2px rgba(4, 31, 54, .85);
}

:root[data-theme="light"] .hero h2 {
  color: #f4fbff;
  text-shadow: 0 2px 8px rgba(4, 31, 54, .72);
}

:root[data-theme="light"] .hero p {
  color: #d9edf7;
  text-shadow: 0 1px 4px rgba(4, 31, 54, .72);
}

:root[data-theme="light"] .contact-card a:hover {
  color: var(--accent);
}

:root[data-theme="light"] footer {
  color: #f2faff;
  font-weight: 600;
  text-shadow:
    0 1px 2px rgba(4, 31, 54, .95),
    0 0 6px rgba(4, 31, 54, .72);
}

@media (max-width: 1000px) {
  .theme-switcher {
    align-self: center;
  }
}

@media (max-width: 650px) {
  .status-area {
    align-items: stretch;
  }

  .theme-switcher {
    grid-template-columns: repeat(2, minmax(34px, 1fr));
    flex: 0 0 82px;
  }
}
