:root {
            --primary: #012b56; --secondary: #0056b3; --accent: #00bcd4; --text: #333; --bg: #f8f9fa;
        }
        body { font-family: 'Montserrat', sans-serif; background: var(--bg); margin: 0; padding: 0; color: var(--text); }
        
        /* NAVBAR */
        .navbar { background: #011b38; color: #fff; padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.3);}
        .nav-logo a { display: flex; align-items: center; text-decoration: none; }
        .nav-logo img { height: 75px; object-fit: contain; }
        .nav-logo span { font-size: 20px; font-weight: 800; letter-spacing: 1px; color: var(--accent); display: flex; align-items: center; gap:10px; }
        .nav-menu { display: flex; gap: 20px; font-size: 14px; font-weight: 500; align-items: center;}
        .nav-menu a { color: #fff; text-decoration: none; transition: 0.3s; }
        .nav-menu a:hover { color: var(--accent); }
        .btn-login { background: var(--secondary); padding: 8px 20px; border-radius: 20px; font-weight: 600; }

        /* CARROSSEL HERO */
        .slider-container { position: relative; width: 100%; height: 500px; overflow: hidden; background: #011b38; }
        .slide { position: absolute; top:0; left:0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; z-index: 1; }
        .slide.active { opacity: 1; z-index: 2; }
        .slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
        .slide::after { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to right, rgba(1,27,56,0.95) 0%, rgba(1,27,56,0.3) 100%); }
        .hero-content { position: absolute; top: 50%; transform: translateY(-50%); left: 5%; z-index: 3; color: #fff; max-width: 650px; }
        .hero-content h1 { font-size: 42px; font-weight: 800; margin: 0 0 15px 0; line-height: 1.2; text-transform: uppercase; }
        .hero-content p { font-size: 16px; margin: 0 0 30px 0; opacity: 0.9; line-height: 1.6; }
        .hero-btn { display: inline-block; background: var(--secondary); color: #fff; padding: 15px 35px; border-radius: 30px; font-weight: 700; text-decoration: none; transition: 0.3s; }
        .hero-btn:hover { background: #004494; transform: translateY(-2px); }
        .slider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 30px; box-sizing: border-box; z-index: 5; pointer-events: none; }
        .slider-nav button { pointer-events: auto; background: rgba(0,0,0,0.5); color: #fff; border: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; font-size: 20px; transition: 0.3s; }
        .slider-nav button:hover { background: var(--accent); }

        /* QUADRADOS (STATS) FLUTUANTES */
        .stats-wrapper {position: relative; z-index: 10; padding: 0 40px; }
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 1200px; margin: 0 auto; }
        .stat-card { background: #fff; border-radius: 8px; padding: 25px 20px; display: flex; align-items: center; gap: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.08); border-bottom: 4px solid var(--accent); }
        .stat-card i { font-size: 40px; color: var(--secondary); }
        .stat-info h3 { margin: 0; font-size: 26px; color: var(--primary); }
        .stat-info span { font-size: 11px; font-weight: 600; color: #777; text-transform: uppercase; letter-spacing: 0.5px; }

        /* ESTUDOS E PESQUISAS */
        .section-wrapper { padding: 80px 20px; text-align: center; max-width: 1200px; margin: auto; }
        .section-header h2 { color: var(--primary); font-size: 28px; margin: 0 0 5px 0; }
        .section-header p { color: #666; margin: 0 0 40px 0; }
        
        .estudos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
        .estudo-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; text-align: left; }
        .estudo-capa { width: 100%; height: 320px; object-fit: cover; }
        .estudo-corpo { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
        .estudo-corpo h4 { font-size: 15px; color: var(--primary); margin: 0 0 15px 0; font-weight: 700; }
        .btn-download { margin-top: auto; background: var(--primary); color: white; text-align: center; padding: 12px; border-radius: 5px; text-decoration: none; font-weight: 600; font-size: 13px; display: block; }
        
        /* SEÇÕES DINÂMICAS */
        .dynamic-section { padding: 60px 20px; background: #fff; text-align: center; border-top: 1px solid #eee; }
        .dynamic-section h2 { color: var(--primary); font-size: 28px; margin-bottom: 10px; }
        .dynamic-section p { color: #555; max-width: 700px; margin: 0 auto 30px auto; }
        .dynamic-btn { border: 2px solid var(--primary); color: var(--primary); padding: 10px 30px; border-radius: 30px; font-weight: 700; text-decoration: none; display: inline-block; transition: 0.3s; }
        .dynamic-btn:hover { background: var(--primary); color: #fff; }

        /* PAINEL ADMIN GIGANTE (TABBED) */
        .admin-dashboard { background: #fff; margin: 40px auto; max-width: 1200px; border-radius: 12px; box-shadow: 0 0 20px rgba(0,0,0,0.1); overflow: hidden; border: 2px solid var(--accent); }
        .admin-header { background: var(--primary); color: #fff; padding: 20px; text-align: center; font-size: 20px; font-weight: 700; }
        .admin-tabs { display: flex; background: #f1f5f9; border-bottom: 2px solid #ddd; flex-wrap: wrap;}
        .admin-tab { flex: 1; padding: 15px; text-align: center; font-weight: 600; cursor: pointer; color: #555; transition: 0.3s; border-right: 1px solid #ddd; min-width:150px;}
        .admin-tab.active { background: #fff; color: var(--primary); border-bottom: 3px solid var(--accent); }
        .admin-content { padding: 30px; display: none; }
        .admin-content.active { display: block; }
        
        .form-row { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
        .form-group { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
        .form-group label { font-weight: 600; font-size: 13px; margin-bottom: 5px; color: #444; }
        .form-group input, .form-group textarea { padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-family: inherit; }
        .btn-submit { background: var(--accent); color: #fff; border: none; padding: 12px 20px; border-radius: 5px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 10px; }
        
        .admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
        .admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle;}
        .admin-table th { background: #f8f9fa; color: var(--primary); }

        .footer { background: var(--primary); color: #fff; text-align: center; padding: 20px; margin-top: 50px; font-size: 13px; }
        
        @media (max-width: 992px) { .estudos-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 600px) { .estudos-grid { grid-template-columns: 1fr; } .hero-content h1 { font-size: 30px; } .nav-menu { display: none; } }

        /*
   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; }
}
