@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;700&family=Source+Sans+3:wght@300;400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vermelho: #c0392b;
  --vermelho-escuro: #922b21;
  --vermelho-claro: #f5b7b1;
  --vermelho-glow: rgba(192, 57, 43, 0.15);
  --preto: #111111;
  --cinza-bg: #f7f6f3;
  --cinza-borda: #e2dfd9;
  --cinza-texto: #6b6b6b;
  --branco: #ffffff;
  --dourado: #c9a84c;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-signature: 'Cormorant Garamond', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 40px rgba(192,57,43,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cinza-bg);
  color: var(--preto);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   TOPBAR - Refined dark bar
   ══════════════════════════════════════════════ */
.topbar {
  background: #0a0a0a;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--vermelho);
}
.topbar .marca { color: var(--vermelho); font-weight: 700; }
.topbar .sub { color: #555; }

/* ══════════════════════════════════════════════
   HEADER - Elegant sticky header
   ══════════════════════════════════════════════ */
.header {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0 40px;
  display: flex;
  align-items: stretch;
  min-height: 88px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

/* ── LOGO BLOCK ── */
.logo-block {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 36px 14px 0;
  border-right: 1px solid rgba(0,0,0,0.06);
  margin-right: 36px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.logo-block:hover { opacity: 0.85; }

.logo-moldura {
  width: 62px;
  height: 62px;
  border: 2px solid rgba(192,57,43,0.2);
  border-radius: 4px;
  background: var(--branco);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(192,57,43,0.08);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.logo-block:hover .logo-moldura {
  border-color: rgba(192,57,43,0.4);
  box-shadow: 0 2px 20px rgba(192,57,43,0.15);
}
.logo-moldura::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 0.5px solid rgba(192,57,43,0.15);
  border-radius: 2px;
  pointer-events: none;
}
.logo-moldura img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.logo-txt { display: flex; flex-direction: column; gap: 0; }
.logo-txt .title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--preto);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.logo-txt .divrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.logo-txt .divrow::before,
.logo-txt .divrow::after {
  content: '';
  height: 1.5px;
  background: linear-gradient(90deg, var(--vermelho), transparent);
  flex: 1;
  min-width: 12px;
}
.logo-txt .divrow::after {
  background: linear-gradient(90deg, transparent, var(--vermelho));
}
.logo-txt .divrow span {
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--vermelho);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Legacy logo-area (hide) */
.logo-area { display: none; }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
nav a {
  font-size: 11px;
  color: #555;
  text-decoration: none;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
nav a:hover { color: var(--vermelho); }
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--vermelho);
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 1px;
}
nav a:hover::after { width: 100%; left: 0; }

.search-bar {
  display: flex;
  align-items: center;
  background: var(--cinza-bg);
  border: 1px solid var(--cinza-borda);
  border-radius: 8px;
  padding: 8px 14px;
  gap: 8px;
  transition: all 0.3s ease;
}
.search-bar:focus-within {
  border-color: var(--vermelho);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
  background: var(--branco);
}
.search-bar input {
  border: none;
  background: transparent;
  font-size: 12px;
  color: #333;
  width: 180px;
  outline: none;
  font-family: var(--font-body);
}
.search-bar svg { flex-shrink: 0; }

/* ══════════════════════════════════════════════
   HERO - Modern dark section (red + black)
   ══════════════════════════════════════════════ */
.hero {
  background: #0a0a0a;
  padding: 80px 40px 64px;
  position: relative;
  overflow: hidden;
}

/* Diagonal accent line */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--vermelho), transparent);
}

/* Subtle gradient glow */
.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(192,57,43,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-inner.hero-centered {
  flex-direction: column;
  align-items: flex-start;
}

.hero-text { flex: 1; max-width: 680px; }

.hero-text .hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--vermelho);
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-text .hero-eyebrow::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--vermelho);
  border-radius: 1px;
}

.hero h2 {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--branco);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h2 span {
  color: #e74c3c;
  position: relative;
}
.hero h2 span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--vermelho), transparent);
  opacity: 0.5;
}

.hero p {
  font-size: 16px;
  color: #888;
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  position: relative;
  padding-top: 24px;
}
.hero-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--vermelho), transparent);
}
.stat { text-align: left; }
.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: #e74c3c;
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-size: 10px;
  color: #666;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 600;
}

/* ── HERO SIGNATURE ── */
.hero-signature {
  font-family: var(--font-signature);
  font-size: 16px;
  color: rgba(192,57,43,0.45);
  letter-spacing: 0.08em;
  font-style: italic;
  font-weight: 400;
  position: absolute;
  bottom: 0;
  right: 0;
  transition: color 0.3s ease;
}
.hero-signature:hover {
  color: rgba(192,57,43,0.7);
}

/* ══════════════════════════════════════════════
   MAIN LAYOUT
   ══════════════════════════════════════════════ */
.main-wrap {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  padding: 32px 40px;
  max-width: 1200px;
}

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
}

.sidebar h3 {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cinza-borda);
}
.cat-list { list-style: none; }
.cat-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 2px;
  font-weight: 500;
}
.cat-list li a:hover,
.cat-list li a.ativo {
  background: var(--branco);
  color: var(--vermelho);
  box-shadow: var(--shadow-md);
  font-weight: 600;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   PROTOCOL CARDS - Refined
   ══════════════════════════════════════════════ */
.section-title {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cinza-borda);
}

.protocols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--branco);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.card:hover {
  border-color: rgba(192,57,43,0.25);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(192,57,43,0.1);
  transform: translateY(-4px);
}

.card-top {
  height: 3px;
  background: var(--vermelho);
  flex-shrink: 0;
  transition: height 0.3s ease;
}
.card:hover .card-top { height: 5px; }

.card-body {
  padding: 16px 16px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-tag {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--vermelho);
  margin-bottom: 5px;
}
.card-titulo {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--preto);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.card-desc {
  font-size: 12px;
  color: var(--cinza-texto);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 12px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0ede8;
  padding-top: 10px;
}
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--cinza-bg);
  color: #666;
  border: 1px solid var(--cinza-borda);
  font-weight: 500;
}
.arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cinza-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vermelho);
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.card:hover .arrow {
  background: var(--vermelho);
  color: var(--branco);
  box-shadow: 0 2px 8px rgba(192,57,43,0.3);
}

.badge-destaque {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--vermelho), var(--vermelho-escuro));
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(192,57,43,0.25);
}

.card-rascunho {
  border: 1.5px dashed #ddd !important;
  background: #fafaf8;
  cursor: default;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   FOOTER - With prominent Paulo Figueroa signature
   ══════════════════════════════════════════════ */
footer {
  background: #0a0a0a;
  color: #555;
  padding: 24px 40px;
  font-size: 11px;
  letter-spacing: 0.08em;
  border-top: 2px solid var(--vermelho);
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
footer .footer-center {
  text-align: center;
  flex: 1;
}
footer .footer-center span { color: var(--vermelho); font-weight: 600; }

/* ── ASSINATURA PAULO FIGUEROA ── */
footer .footer-signature {
  font-family: var(--font-signature);
  font-size: 18px;
  color: var(--vermelho);
  letter-spacing: 0.06em;
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  padding-left: 20px;
  transition: all 0.3s ease;
  text-shadow: 0 0 20px rgba(192,57,43,0.15);
}
footer .footer-signature::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 1px;
  background: var(--vermelho);
  opacity: 0.5;
}
footer .footer-signature:hover {
  color: #e74c3c;
  text-shadow: 0 0 30px rgba(192,57,43,0.3);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .main-wrap { grid-template-columns: 1fr; padding: 20px 16px; }
  .sidebar { display: none; }

  .header {
    padding: 0 16px;
    min-height: 68px;
    flex-wrap: wrap;
  }
  .logo-block {
    padding: 10px 16px 10px 0;
    border-right: none;
    margin-right: 0;
    gap: 12px;
  }
  .logo-moldura { width: 46px; height: 46px; }
  .logo-moldura img { width: 38px; height: 38px; }
  .logo-txt .title { font-size: 12px; letter-spacing: 0.08em; }
  .logo-txt .divrow span { font-size: 8px; }

  .header-right { flex-wrap: wrap; gap: 12px; }
  .search-bar input { width: 130px; }
  nav { display: none; }

  .hero { padding: 48px 16px 40px; }
  .hero-inner { text-align: center; }
  .hero-inner.hero-centered { align-items: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-stats::before { display: none; }
  .hero-text .hero-eyebrow { justify-content: center; }
  .hero-signature { position: relative; margin-top: 24px; text-align: center; }

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

  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 16px;
  }
  footer .footer-signature {
    padding-left: 0;
    font-size: 16px;
  }
  footer .footer-signature::before { display: none; }
}

@media (max-width: 480px) {
  .logo-txt .title { font-size: 11px; }
  .hero h2 { font-size: 28px; }
}
