@import url('https://fonts.googleapis.com/css2?family=Sora:wght@100..800&display=swap');

:root {
  --brand-green: #2f7d3a;
  --brand-green-deep: #1e5527;
  --brand-lime: #5e8c14;
  --brand-graphite: #1f2430;

  --background: #f6f8f4;
  --foreground: #1f2a22;
  --card: #ffffff;
  --card-foreground: #1f2a22;
  --popover: #ffffff;
  --popover-foreground: #1f2a22;
  --primary: #2f7d3a;
  --primary-foreground: #ffffff;
  --secondary: #eaf2e8;
  --secondary-foreground: #1e5527;
  --muted: #eaf2e8;
  --muted-foreground: #586458;
  --accent: #5e8c14;
  --accent-foreground: #ffffff;
  --border: #dde7da;
  --input: #dde7da;
  --ring: #2f7d3a;
  --chart-1: #2f7d3a;
  --chart-2: #8cc63f;
  --chart-3: #1e5527;
  --chart-4: #a7d36a;
  --chart-5: #6f9b6f;
  --radius: 0.75rem;
  --sidebar: #1e5527;
  --sidebar-foreground: #e7f1e7;
  --sidebar-primary: #8cc63f;
  --sidebar-primary-foreground: #143d1b;
  --sidebar-accent: #2f7d3a;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #2c6b35;
  --sidebar-ring: #8cc63f;
}

.dark {
  --background: #090d0a;
  --foreground: #f2f7f3;
  --card: #111712;
  --card-foreground: #f2f7f3;
  --popover: #111712;
  --popover-foreground: #f2f7f3;
  --primary: #8cc63f;
  --primary-foreground: #143d1b;
  --secondary: #172219;
  --secondary-foreground: #dde7da;
  --muted: #172219;
  --muted-foreground: #8aa38e;
  --accent: #8cc63f;
  --accent-foreground: #143d1b;
  --border: #1d2b1f;
  --input: #1d2b1f;
  --ring: #8cc63f;
  --sidebar: #0b100c;
  --sidebar-border: #141c15;
}

/* Estilos Globais Base */
* {
  border-color: var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
}

/* Efeito Glassmorphism nos Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(221, 231, 218, 0.6);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease;
}

.dark .glass-card {
  background: rgba(17, 23, 18, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(29, 43, 31, 0.5);
}

/* Efeito Glassmorphism na Sidebar */
.glass-sidebar {
  background: rgba(30, 85, 39, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(44, 107, 53, 0.4);
}

.dark .glass-sidebar {
  background: rgba(11, 16, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(29, 43, 31, 0.5);
}

/* Indicador de Leitura (Scroll Progress) */
#scroll-indicator-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  z-index: 100;
}

#scroll-indicator {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-lime));
  transition: width 0.1s ease-out;
}

/* Efeito Parallax sutil para imagens de fundo */
@media (min-width: 1024px) {
  .parallax-bg {
    background-attachment: fixed;
  }
}

/* Transições de animação de scroll (Intersection Observer) */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gráfico customizado */
.chart-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Cabeçalho Estilo Pro Campus (Verde com logo sobressaindo) */
.pro-campus-header {
  background-color: #265231 !important;
  height: 56px;
  border-bottom: 2.5px solid var(--sidebar-primary);
  overflow: visible !important;
}

.pro-campus-logo-container {
  position: absolute;
  top: 4px;
  left: 2rem;
  z-index: 50;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  transition: transform 0.3s ease;
}

.pro-campus-logo-container:hover {
  transform: scale(1.05);
}

.pro-campus-logo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background-color: #ffffff;
  object-fit: contain;
}

.pro-campus-logo-container-mobile {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.pro-campus-logo-container-mobile:hover {
  transform: translateX(-50%) scale(1.05);
}

.pro-campus-logo-mobile {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background-color: #ffffff;
  object-fit: contain;
}

/* Ocultar barra de rolagem horizontal */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Estilos para os links do menu do topo */
.nav-link {
  color: var(--sidebar-foreground);
  position: relative;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  height: 36px;
}
.nav-link:hover, .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 8px;
  right: 8px;
  height: 3px;
  background-color: var(--sidebar-primary);
  border-radius: 9999px;
}

/* Estilos para os sublinks do dropdown do menu */
.dropdown-link {
  color: var(--sidebar-foreground) !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  height: 32px;
}
.dropdown-link:hover, .dropdown-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Container de animação do dropdown */
.dropdown-menu-container {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0) scale(0.95);
  padding-top: 8px;
  width: 12rem; /* w-48 */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.relative.group:hover .dropdown-menu-container {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

/* Ajuste de scroll para cabeçalho fixo */
section[id] {
  scroll-margin-top: 90px;
}

/* Ajustes de Impressão */
@media print {
  .no-print {
    display: none !important;
  }

  .print-full {
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: none !important;
    background-color: transparent !important;
    transition: none !important;
  }

  section {
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
    min-height: auto !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  section:last-child {
    break-after: avoid;
    page-break-after: avoid;
  }

  .rounded-2xl,
  [class*="rounded"] {
    break-inside: avoid;
  }

  @page {
    size: A4 landscape;
    margin: 1.2cm 1.5cm;
  }

  body {
    font-size: 10pt;
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  #scroll-indicator-container {
    display: none !important;
  }
}
