/* ==========================================
   CSS Global Unificado - Estilo Público & Home
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Amarante&family=Special+Elite&display=swap');

/* --------- Design tokens --------- */
:root {
  /* Cores principais */
  --primary: #464081;
  --secondary: #5bbafa;
  --text: #333;
  --text-light: #777;
  
  --brand-500: #464081;     /* índigo/roxo principal */
  --brand-400: #5b64c4;
  --accent-500: #5bbafa;    /* azul ação secundária */
  --accent-600: #3a9edb;
  
  --ok-500: #10b981;
  --warn-500: #f59e0b;
  --danger-500: #ef4444;

  /* Bordas, sombras, raios */
  --radius: 8px;
  --border: #ddd;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --bg-light: #f8f9fc;

  /* Alternativo para home visual mais “cartaz / cordel” */
  --card: #ffffff;
  --line: #e6e8ee;
  --text-900: #111827;
  --text-700: #374151;
  --text-500: #6b7280;
  --bg-home: #f5f7fb;
}

/* --------- Reset básico --------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  color: var(--font-color);
  font-family: 'Special Elite', cursive;
  text-align: center;
}

h1, h2, h3 {
  font-family: 'Amarante', cursive;
}

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

a:hover {
  text-decoration: underline;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 40px;
  animation: fadeIn 0.8s ease-in-out;
}

/* --------- Título principal --------- */
main h1 {
  font-family: 'Amarante', cursive;
  font-size: 2.4em;
  color: var(--font-color);
  margin-bottom: 40px;
  text-transform: uppercase;
  text-shadow: 1px 1px #fff, -1px -1px rgba(0, 0, 0, 0.15);
}

/* --------- Botões genéricos --------- */
button,
.btn {
  background-color: var(--primary);
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover,
.btn:hover {
  background-color: var(--secondary);
  color: white;
}

/* --------- Formulários --------- */
form {
  margin-bottom: 30px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  transition: border 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  outline: none;
}

textarea {
  resize: vertical;
}

/* --------- Tabelas --------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background: white;
  box-shadow: var(--shadow);
}

th,
td {
  padding: 12px 15px;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background-color: #f0f0f0;
  color: #333;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* --------- Paginação --------- */
.paginacao {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.paginacao a {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.paginacao a.pagina-ativa {
  background-color: var(--primary);
  color: white;
  font-weight: bold;
  border-color: var(--primary);
}

.paginacao a:hover {
  background-color: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* --------- Alerta / Mensagens --------- */
.alert {
  padding: 12px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95em;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* --------- Responsividade global --------- */
@media (max-width: 768px) {
  main {
    padding: 40px 16px;
  }

  .form-busca {
    flex-direction: column;
  }

  .form-busca input[type="text"],
  .form-busca button {
    width: 100%;
    border-radius: var(--radius) !important;
  }
}

/* ==========================================
   HOME / VISUAL ESPECIAL
   ========================================== */
main.home {
  animation: fadeIn 0.8s ease-in-out;
  padding: 40px 20px;
  background: var(--bg-home);
}

.home {
  display: block;
  padding-inline: clamp(8px, 2.5vw, 24px);
  padding-block: 8px;
  padding: 40px 20px;
}

/* ===== Efeitos de entrada (“reveal”) ===== */
.reveal { opacity:0; transform: translateY(14px); transition: .55s ease; }
.reveal.in { opacity:1; transform: none; }

/* ===== HERO (carrossel full-width) ===== */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #000;
  color: #fff;
  border-radius: var(--radius);
}

.slides {
  background-size: cover;
  background-position: center;
  height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-track {
  display: flex;
  width: 100%;
  transition: transform .6s ease;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: clamp(44vh, 56vh, 62vh);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.55));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(16px, 7vw, 88px);
}

.hero-overlay h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 10px;
}

.hero-overlay p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  opacity: .95;
  margin: 0 0 16px;
}

.hero .btn {
  --btn-bg: var(--brand-500);
  background: var(--btn-bg);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  text-decoration: none;
  display: inline-block;
}

.hero .btn:hover {
  filter: brightness(.94);
}

.hero-prev,
.hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  border: none;
  font-size: 24px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 10;
}

.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-prev:hover,
.hero-next:hover {
  background: rgba(0,0,0,.5);
}

/* ===== Bloco SEMED ===== */
.bloco-semed {
  padding: clamp(10px, 2vw, 24px) 0;
}
.semed-container {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  grid-template-columns: 170px 1fr;
  padding: clamp(14px, 2.5vw, 24px);
}
.semed-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.semed-texto h2 {
  color: var(--brand-500);
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}
.semed-texto p {
  color: var(--text-700);
  line-height: 1.55;
}

/* ===== Destaques (cards) ===== */
.destaques {
  max-width: 1280px;
  margin: clamp(6px, 2vw, 18px) auto;
}
.destaques > h2 {
  margin: 8px 2px 12px;
  color: var(--brand-500);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}
.destaques-container {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.destaque-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.destaque-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.destaque-card .media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.destaque-card .info {
  padding: 12px 14px;
}
.destaque-card .info h3 {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 1.05rem;
  line-height: 1.3;
}
.destaque-card .info p {
  margin: 0 0 10px;
  color: var(--text-700);
}
.destaque-card .btn {
  --btn-bg: transparent;
  color: var(--brand-500);
  border: 1.5px solid var(--brand-500);
}

/* ===== Notícias (grid) ===== */
.noticias {
  max-width: 1280px;
  margin: clamp(8px, 2.4vw, 22px) auto;
}
.noticias > h2 {
  margin: 8px 2px 12px;
  color: var(--brand-500);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}
.noticias-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.noticia-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .2s ease;
}
.noticia-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.noticia-card .media img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.noticia-card .info {
  padding: 12px 14px;
}
.noticia-card .info h3 {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 1.02rem;
}
.noticia-card .info p {
  margin: 0 0 10px;
  color: var(--text-700);
}
.noticia-card .meta {
  display: block;
  color: #6b7280;
  margin-bottom: 10px;
}

/* ===== Botões base (coerentes com o painel) ===== */
.btn {
  --btn-bg: var(--brand-500);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  transition: .2s ease;
}
.btn:hover {
  filter: brightness(.94);
}
.btn-primary { --btn-bg: var(--brand-500); }
.btn-secondary {
  background: transparent;
  color: var(--brand-500);
  border: 1.5px solid var(--brand-500);
}

/* ===== Chamamento ===== */
.chamamento {
  max-width: 1180px;
  margin: clamp(8px, 2.4vw, 22px) auto;
}
.chamamento-container {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1.25fr;
  padding: clamp(14px, 2.5vw, 24px);
}
.chamamento-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.chamamento-texto h2 {
  margin: 0 0 8px;
  color: var(--brand-500);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}
.chamamento-texto p {
  color: var(--text-700);
  margin: 0 0 12px;
  line-height: 1.55;
}
.chamamento .btn {
  --btn-bg: var(--brand-500);
}

/* --------- Utilitários básicos --------- */
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
section {
  scroll-margin-top: 80px;
}

/* ===== Animação fadeIn ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsividade adicional ===== */
@media (max-width: 1024px) {
  .hero-slide { height: 48vh; }
}
@media (max-width: 900px) {
  .semed-container { grid-template-columns: 1fr; }
  .chamamento-container { grid-template-columns: 1fr; }
  .hero-slide { height: 42vh; }
}