/* ============================================
   THEME.CSS — Paleta, Layout e Componentes
   Paleta: Azul Institucional + Verde Financeiro
   ============================================ */

:root {
  /* Paleta Principal */
  --color-primary:       #1a5276;   /* Azul institucional profundo */
  --color-secondary:     #1e8449;   /* Verde financeiro */
  --color-accent:        #2ecc71;   /* Verde vibrante de destaque */
  --color-warning:       #f39c12;   /* Âmbar para alertas */
  --color-danger:        #c0392b;   /* Vermelho para alertas críticos */

  /* Backgrounds */
  --color-bg:            #f4f6f9;
  --color-surface:       #ffffff;
  --color-surface-alt:   #eaf4fb;
  --color-hover:         #eaf4fb;
  --color-header-bg:     #0d2137;

  /* Texto */
  --color-heading:       #0d2137;
  --color-text:          #2c3e50;
  --color-text-light:    #5d6d7e;
  --color-muted:         #95a5a6;

  /* Bordas */
  --color-border:        #dce3ea;

  /* Sombras */
  --shadow-sm:           0 2px 8px rgba(26,82,118,0.08);
  --shadow-md:           0 4px 20px rgba(26,82,118,0.13);
  --shadow-lg:           0 8px 40px rgba(26,82,118,0.18);

  /* Bordas arredondadas */
  --radius-sm:           6px;
  --radius-md:           12px;
  --radius-lg:           20px;

  /* Transições */
  --transition:          0.25s ease;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-header-bg);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  border-bottom: 3px solid var(--color-accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--color-accent);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0d2137 0%, #1a5276 55%, #1e8449 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 1.5rem;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #ffffff;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

/* ============================================
   ALERTA LEGAL
   ============================================ */
.legal-alert {
  background: #fffde7;
  border-left: 5px solid var(--color-warning);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  font-size: 0.93rem;
  color: #5d4e00;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.legal-alert strong {
  color: #b7770d;
}

/* ============================================
   MAIN CONTENT GRID
   ============================================ */
.main-content {
  padding: 2.5rem 0 3rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

/* ============================================
   ARTICLE / SEÇÕES
   ============================================ */
.content-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  position: relative;
}

.content-section:last-child {
  margin-bottom: 0;
}

.section-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.content-section h2 {
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-accent);
}

.content-section h3 {
  color: var(--color-secondary);
  margin: 1.25rem 0 0.6rem;
}

.highlight-box {
  background: var(--color-surface-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.93rem;
  color: var(--color-text);
}

/* ============================================
   CARDS GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 90px;
}

.sidebar-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.sidebar-title {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
}

.info-bullets {
  list-style: none;
  padding: 0;
}

.info-bullets li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
  color: var(--color-text);
}

.info-bullets li:last-child {
  border-bottom: none;
}

.legal-sidebar {
  border-left: 4px solid var(--color-warning);
}

.legal-sidebar p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin: 0;
}

/* Perfis de investidor */
.profile-item {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.profile-item:last-child {
  margin-bottom: 0;
}

.profile-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.profile-item p {
  margin: 0;
  color: var(--color-text-light);
}

.conservador {
  background: #eafaf1;
  border-left: 3px solid var(--color-accent);
}

.moderado {
  background: #fef9e7;
  border-left: 3px solid var(--color-warning);
}

.arrojado {
  background: #fdf2f8;
  border-left: 3px solid #8e44ad;
}

/* ============================================
   PAGE HERO (páginas internas)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, #0d2137 0%, #1a5276 100%);
  padding: 3rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================
   LEGAL PAGE
   ============================================ */
.legal-page {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  max-width: 900px;
  margin: 2rem auto;
}

.legal-page h2 {
  color: var(--color-primary);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-page p {
  color: var(--color-text);
  font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-header-bg);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--color-accent);
}

/* Dados da empresa — fonte menor, opaca, espaçamento reduzido */
.footer-company {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.01em;
}

.footer-company p {
  margin-bottom: 0.2rem;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  max-width: 700px;
  line-height: 1.5;
}

.footer-disclaimer p {
  margin-bottom: 0.4rem;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 300px;
  }
}

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

  .sidebar {
    position: static;
  }

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

@media (max-width: 768px) {
  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: relative;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--color-header-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    gap: 0.2rem;
    z-index: 999;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 0.6rem 1rem;
  }

  .hero-content {
    padding: 2.5rem 1rem;
  }

  .content-section {
    padding: 1.5rem 1.25rem;
  }

  .legal-page {
    padding: 1.5rem 1.25rem;
  }

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

@media (max-width: 480px) {
  .logo-img {
    height: 38px;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }
}
