/* ============================================================
   DHF — Clinical Editorial Design System v2
   Gerado por: FrontendDev Agent | 2026-05-13
   ============================================================ */

/* ── F1: Tipografia ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* ── F2: Paleta ───────────────────────────────────────────── */
  --dhf-midnight: #0D1F35;
  --dhf-sage:     #4A7C59;
  --dhf-gold:     #C8963E;
  --dhf-cream:    #FDFAF5;
  --dhf-surface:  #F2EDE6;
  --dhf-white:    #FFFFFF;
  --dhf-text-muted: #6B7280;
  --dhf-shadow:   0 4px 24px rgba(13,31,53,0.08);
  --dhf-shadow-lg:0 20px 40px rgba(13,31,53,0.12);
  --dhf-border:   rgba(13,31,53,0.1);
}

/* ── Body ────────────────────────────────────────────────────── */
body {
  background-color: var(--dhf-cream);
  font-family: var(--font-body);
  color: var(--dhf-midnight);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--dhf-midnight);
  line-height: 1.2;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--dhf-midnight);
}

/* ── F1: Escala tipográfica fluida ───────────────────────────── */
body, p, li, td {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.75;
}

h1, body h1.item-title, body .page-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

h2 { font-size: clamp(1.4rem, 2.5vw, 2.2rem); line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 2vw, 1.7rem);   line-height: 1.3;  }
h4 { font-size: clamp(1rem, 1.5vw, 1.25rem); }
h5 { font-size: clamp(0.95rem, 1.3vw, 1.1rem); }
h6 { font-size: clamp(0.9rem, 1.2vw, 1rem); }

/* ── Logo ────────────────────────────────────────────────────── */
.logo-img, .logo-img-sm {
  max-height: 55px;
  width: auto;
  height: auto;
  margin: 0 auto;
}

/* ── F3: Header inteligente ──────────────────────────────────── */
#t4-header {
  background-color: var(--dhf-midnight);
  border-bottom: 2px solid var(--dhf-sage);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.25s ease;
}

#t4-header.scrolled {
  box-shadow: 0 2px 24px rgba(13,31,53,0.3);
  border-bottom-color: var(--dhf-gold);
}

.t4-header .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding-bottom: 0.35rem;
  position: relative;
  transition: color 0.2s ease;
}

.t4-header .nav-link::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--dhf-gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: left;
  position: absolute;
  bottom: 0; left: 0; right: 0;
}

.t4-header .nav-link:hover {
  color: var(--dhf-gold) !important;
}

.t4-header .nav-link:hover::after,
.t4-header .nav-link.active::after {
  transform: scaleX(1);
}

/* ── Badges e utility ────────────────────────────────────────── */
.dhf-badge {
  background: var(--dhf-sage);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── F4: Hero Section ────────────────────────────────────────── */
.dhf-hero-v2 {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--dhf-midnight);
  text-align: center;
  padding: 5rem 1.5rem;
}

.dhf-hero-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(74,124,89,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(200,150,62,0.10) 0%, transparent 50%);
  pointer-events: none;
}

.dhf-hero-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.dhf-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.dhf-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dhf-sage);
  background: rgba(74,124,89,0.12);
  border: 1px solid rgba(74,124,89,0.3);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.6s 0.1s both ease-out;
}

.dhf-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--dhf-white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.25s both ease-out;
}

.dhf-hero-title em {
  color: var(--dhf-gold);
  font-style: italic;
}

.dhf-hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.6s 0.4s both ease-out;
}

.dhf-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.55s both ease-out;
}

.dhf-hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: fadeUp 0.6s 0.7s both ease-out;
}

.dhf-hero-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dhf-hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--dhf-gold);
  line-height: 1;
}

.dhf-hero-stats span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Botões ───────────────────────────────────────────────────── */
.dhf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dhf-btn:hover { transform: translateY(-2px); text-decoration: none; }

.dhf-btn-gold {
  background: var(--dhf-gold);
  color: var(--dhf-midnight);
  box-shadow: 0 4px 20px rgba(200,150,62,0.3);
}

.dhf-btn-gold:hover {
  background: #b8832e;
  box-shadow: 0 8px 28px rgba(200,150,62,0.4);
  color: var(--dhf-midnight);
}

.dhf-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
}

.dhf-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
  color: white;
}

/* ── F5: Grid Editorial ───────────────────────────────────────── */
.dhf-grid-section {
  background: var(--dhf-surface);
  padding: 4rem 0;
}

.dhf-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.dhf-card-featured {
  grid-row: 1 / 3;
}

.dhf-card {
  background: var(--dhf-white);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--dhf-border);
  opacity: 0;
  transform: translateY(32px);
}

.dhf-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease,
              box-shadow 0.3s ease, border-color 0.3s ease;
}

.dhf-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--dhf-shadow-lg);
  border-color: var(--dhf-sage);
}

.dhf-card-img {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--dhf-surface);
}

.dhf-card-featured .dhf-card-img { height: 100%; min-height: 320px; }

.dhf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.dhf-card:hover .dhf-card-img img { transform: scale(1.04); }

.dhf-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dhf-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dhf-sage);
  margin-bottom: 0.75rem;
}

.dhf-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--dhf-midnight);
  margin-bottom: 0.75rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.dhf-card-featured .dhf-card-title { font-size: 1.5rem; }

.dhf-card:hover .dhf-card-title { color: var(--dhf-sage); }

.dhf-card-excerpt {
  font-size: 0.9rem;
  color: var(--dhf-text-muted);
  line-height: 1.65;
  flex: 1;
}

.dhf-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dhf-midnight);
  text-decoration: none;
  margin-top: 1.25rem;
  transition: color 0.2s ease, gap 0.2s ease;
}

.dhf-card-link:hover { color: var(--dhf-sage); gap: 0.7rem; text-decoration: none; }

/* ── Media containment ───────────────────────────────────────── */
img, video, iframe, figure { max-width: 100%; height: auto; }

.item-page img, .article-content img, .com_content img {
  max-width: 100%;
  display: block;
  margin: 1.5rem auto;
  border-radius: 10px;
}

/* ── F6: Responsividade ──────────────────────────────────────── */
.t4-wrapper {
  max-width: min(1400px, 95vw);
  margin-inline: auto;
}

@media (max-width: 991px) {
  .dhf-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .dhf-card-featured { grid-row: auto; }
}

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

  .dhf-hero-v2 { min-height: 100svh; padding: 4rem 1rem; }
  .dhf-hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .dhf-hero-actions { flex-direction: column; align-items: center; }

  h1, body h1.item-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  h2 { font-size: clamp(1.2rem, 5vw, 1.6rem); }
}

@media (max-width: 768px) {
  .dhf-hero-v2 { min-height: 100svh; }
  body .item-page, body .article-body, body .article-content {
    padding: 1rem 0.75rem;
  }
}

@media (min-width: 1400px) {
  .dhf-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

/* ── Category blog (Joomla fallback) ─────────────────────────── */
.blog .items-row, .blog-featured .items-row {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
}
.blog .items-row .item, .blog-featured .items-row .item {
  flex: 1 1 300px; max-width: 100%;
}

/* ============================================================
   DHF — Somente Hamburger (remove mega-menu horizontal)
   DHF-HAMBURGER-ONLY
   ============================================================ */

/* Ocultar mega-menu horizontal e seus togglers em todas as resoluções */
.t4-megamenu .navbar-nav.level0,
#t4-megamenu-mainmenu,
.t4-megamenu-outer,
button.navbar-toggler[data-bs-target="#t4-megamenu-mainmenu"] {
  display: none !important;
}


/* ============================================================
   DHF — Category Badge: editorial gradient strip (base da imagem)
   DHF-CAT-BADGE-V1
   ============================================================ */

/* De: balão flutuante top-left
   Para: strip de gradiente integrado na base da imagem */
.card .position-absolute.top-0.start-0.rounded-pill {
  top: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  width: 100%;
  border-radius: 0 !important;
  background: linear-gradient(to top,
    rgba(13,31,53,0.90) 0%,
    rgba(13,31,53,0.35) 55%,
    transparent 100%) !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2.5rem 0.9rem 0.6rem !important;
  gap: 0.35rem;
  align-items: center;
}

/* Ícone: branco, discreto */
.card .position-absolute.top-0.start-0.rounded-pill img.icon-20 {
  filter: brightness(0) invert(1);
  opacity: 0.85;
  width: 13px !important;
  height: 13px !important;
  margin-right: 0.3rem !important;
}

/* Label: branco nítido, ultra-compacto */
.card .position-absolute.top-0.start-0.rounded-pill span {
  color: rgba(255,255,255,0.95) !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.14em !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}
