/*
   Camada visual para o index.php do Observatório.
   Inclua este arquivo DEPOIS do <style> existente:
   <link rel="stylesheet" href="estilo-observatorio.css">
*/

:root {
  --primary: #06264a;
  --secondary: #0b66bd;
  --accent: #22c7d9;
  --ink: #13243a;
  --muted: #607086;
  --surface: #ffffff;
  --bg: #f3f7fb;
  --line: #dfe8f1;
  --shadow: 0 18px 55px rgba(10, 43, 76, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 94% 7%, rgba(34, 199, 217, .12), transparent 22rem),
    var(--bg);
  line-height: 1.55;
}

/* Cabeçalho */
.navbar {
  position: sticky;
  top: 0;
  min-height: 88px;
  padding: 12px clamp(20px, 5vw, 76px);
  background: rgba(4, 29, 58, .96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 28px rgba(0, 23, 48, .2);
}

.nav-logo img {
  height: 58px;
  max-width: min(260px, 38vw);
}

.nav-logo span {
  font-size: clamp(14px, 1.4vw, 19px);
  color: #fff;
  letter-spacing: .04em;
}

.nav-logo span i { color: var(--accent); }

.nav-menu {
  gap: clamp(12px, 1.6vw, 28px);
  font-size: 12px;
  letter-spacing: .015em;
}

.nav-menu a {
  position: relative;
  padding: 9px 0;
  color: rgba(255, 255, 255, .82);
}

.nav-menu a:not(.btn-login)::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  content: '';
  background: var(--accent);
  border-radius: 20px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.nav-menu a:hover { color: #fff; }
.nav-menu a:not(.btn-login):hover::after { transform: scaleX(1); }

.btn-login {
  padding: 9px 18px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--secondary), #1488d5);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 95, 190, .25);
}

.btn-login:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* Destaque inicial */
.slider-container {
  height: clamp(520px, 63vh, 700px);
  background: #041d3a;
}

.slide::after {
  background:
    linear-gradient(90deg, rgba(3, 26, 53, .94) 0%, rgba(3, 26, 53, .72) 42%, rgba(3, 26, 53, .12) 80%),
    linear-gradient(0deg, rgba(3, 26, 53, .35), transparent 45%);
}

.hero-content {
  left: clamp(24px, 9vw, 150px);
  max-width: min(670px, 72vw);
  padding: 0 0 0 25px;
  border-left: 3px solid var(--accent);
}

.hero-content h1 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 62px);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-transform: none;
  text-wrap: balance;
}

.hero-content p {
  max-width: 560px;
  margin-bottom: 30px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.75;
}

.hero-btn,
.btn-download {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--secondary), #138bd7);
  box-shadow: 0 12px 25px rgba(0, 79, 160, .28);
}

.hero-btn { padding: 14px 25px; }
.hero-btn:hover { background: linear-gradient(135deg, #0a5baa, #0b83ca); }

.slider-nav { padding: 0 clamp(16px, 3vw, 48px); }

.slider-nav button {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .38);
  backdrop-filter: blur(8px);
}

.slider-nav button:hover { background: var(--accent); color: var(--primary); }

/* Indicadores */
.stats-wrapper {
  z-index: 12;
  padding: 0 clamp(16px, 4vw, 64px);
  margin-top: -58px;
}

.stats-grid { max-width: 1280px; gap: 16px; }

.stat-card {
  min-height: 132px;
  padding: 24px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(223, 232, 241, .9);
  border-bottom: 0;
  border-radius: 15px;
  box-shadow: 0 12px 28px rgba(5, 37, 71, .12);
  transition: transform .22s ease, box-shadow .22s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.stat-card::before {
  width: 4px;
  height: 52px;
  flex: 0 0 4px;
  content: '';
  background: linear-gradient(var(--accent), #1685ca);
  border-radius: 99px;
}

.stat-card i { font-size: 34px; color: var(--secondary); }
.stat-info h3 { font-size: clamp(24px, 2vw, 31px); line-height: 1.15; }
.stat-info span { color: var(--muted); letter-spacing: .07em; }

/* Estudos */
.section-wrapper {
  max-width: 1280px;
  padding: 100px clamp(16px, 4vw, 44px) 90px;
}

.section-header { max-width: 650px; margin: 0 auto 45px; }

.section-header h2,
.dynamic-section h2 {
  color: var(--primary);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -.035em;
}

.section-header h2::after {
  display: block;
  width: 46px;
  height: 4px;
  margin: 17px auto;
  content: '';
  background: var(--accent);
  border-radius: 99px;
}

.section-header p { margin-bottom: 0; color: var(--muted); font-size: 16px; }
.estudos-grid { gap: 20px; }

.estudo-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(5, 37, 71, .06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.estudo-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-7px);
}

.estudo-capa { height: 340px; }
.estudo-corpo { padding: 22px; }
.estudo-corpo h4 { font-size: 16px; line-height: 1.5; }

.btn-download {
  padding: 12px 16px;
  transition: transform .2s ease, filter .2s ease;
}

.btn-download:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }

#btnMostrarMaisEstudos {
  box-shadow: 0 10px 22px rgba(6, 38, 74, .18);
}

/* Áreas criadas pelo painel */
.dynamic-section {
  padding: 84px clamp(20px, 6vw, 80px);
  background: linear-gradient(135deg, #fff, #edf7fb);
  border-top: 1px solid var(--line);
}

.dynamic-section:nth-of-type(even) { background: #fff; }
.dynamic-section p { max-width: 680px; color: var(--muted); font-size: 16px; }

.dynamic-btn {
  padding: 12px 24px;
  border: 0;
  color: #fff;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(6, 38, 74, .15);
}

.dynamic-btn:hover { color: #fff; background: var(--secondary); transform: translateY(-2px); }

/* Administração */
.admin-dashboard {
  max-width: 1280px;
  margin: 50px auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.admin-header { padding: 22px; background: linear-gradient(120deg, var(--primary), #0a4a83); }
.admin-tabs { background: #f4f8fb; border-bottom: 1px solid var(--line); }
.admin-tab { border-right-color: var(--line); }
.admin-tab.active { border-bottom-color: var(--accent); }
.admin-content { padding: clamp(20px, 4vw, 38px); }

.form-group input,
.form-group textarea {
  border-color: #c9d7e4;
  border-radius: 8px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 3px solid rgba(34, 199, 217, .2);
  border-color: var(--accent);
}

.btn-submit { border-radius: 8px; }

.footer {
  margin-top: 0;
  padding: 30px 20px;
  background: #041d3a;
  color: rgba(255, 255, 255, .75);
}

@media (max-width: 1100px) {
  .navbar { gap: 18px; }
  .nav-menu { gap: 12px; font-size: 11px; }
  .estudos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .navbar { position: relative; flex-wrap: wrap; min-height: auto; }
  .nav-menu { order: 3; width: 100%; padding-top: 4px; overflow-x: auto; }
  .nav-menu a { flex: 0 0 auto; }
  .slider-container { height: 560px; }
  .hero-content { max-width: calc(100vw - 48px); padding-left: 16px; }
  .stats-wrapper { margin-top: -32px; padding: 0 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 108px; }
  .estudo-capa { height: min(110vw, 400px); }
}

@media (max-width: 520px) {
  .navbar { padding: 12px 16px; }
  .nav-logo img { height: 48px; }
  .nav-logo span { font-size: 13px; }
  .hero-content h1 { font-size: 33px; }
  .slider-nav { top: auto; bottom: 24px; }
  .slider-nav button { width: 40px; height: 40px; }
  .section-wrapper { padding-top: 72px; }
  .estudos-grid { grid-template-columns: 1fr; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .admin-tab { min-width: 165px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
