/* Páginas-filhas de ESG (Ambiental, Social, Governança, Compromissos,
   Indicadores). Folha própria para não misturar com hunks locais de
   theme.css nem com o hub (assets/css/esg.css). */

.mrn-esg-voltar {
  padding: 48px 0;
  background: #F3F7F4;
}

@media (min-width: 1024px) {
  .mrn-esg-voltar {
    padding: 64px 0;
  }
}

.mrn-esg-voltar-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .mrn-esg-voltar-inner { padding: 0 24px; }
}

@media (min-width: 1024px) {
  .mrn-esg-voltar-inner { padding: 0 32px; }
}

.mrn-esg-voltar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #006129;
  font-weight: 600;
  text-decoration: none;
}

.mrn-esg-voltar-link:hover,
.mrn-esg-voltar-link:focus-visible {
  color: #08340D;
}

/* Social — carrossel. Sem JS a segunda volta some e a primeira vira grade. */
.mrn-esg-soc-cab {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .mrn-esg-soc-cab {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.mrn-esg-soc-setas {
  display: none;
  gap: 8px;
}

.mrn-esg-soc.is-js .mrn-esg-soc-setas {
  display: flex;
}

.mrn-esg-soc-seta {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #80C6A6;
  border-radius: 999px;
  background: transparent;
  color: #80C6A6;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mrn-esg-soc-seta:hover,
.mrn-esg-soc-seta:focus-visible {
  background: #80C6A6;
  color: #fff;
}

.mrn-esg-soc-viewport {
  overflow: hidden;
}

.mrn-esg-soc-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .mrn-esg-soc-track { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .mrn-esg-soc-track { grid-template-columns: 1fr 1fr 1fr; }
}

.mrn-esg-soc-card[aria-hidden="true"] {
  display: none;
}

.mrn-esg-soc-card {
  border-radius: 1rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid rgba(128, 198, 166, 0.25);
  box-shadow: 0 4px 24px rgba(0, 97, 41, 0.07);
}

.mrn-esg-soc.is-js .mrn-esg-soc-viewport {
  overflow: hidden;
}

.mrn-esg-soc.is-js .mrn-esg-soc-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

.mrn-esg-soc.is-js .mrn-esg-soc-card,
.mrn-esg-soc.is-js .mrn-esg-soc-card[aria-hidden="true"] {
  display: block;
  flex-shrink: 0;
  width: 340px;
}

/* Governança — abas. */
#governanca-pilares::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 158, 90, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 158, 90, 1) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

#governanca-pilares::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  opacity: 0.07;
  background: radial-gradient(ellipse, rgba(255, 158, 90, 1) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.mrn-esg-gov-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 20px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(255, 158, 90, 0.14);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  color: inherit;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.mrn-esg-gov-item.is-active {
  background: rgba(255, 158, 90, 0.09);
  border-color: rgba(255, 158, 90, 0.55);
  box-shadow: 0 0 24px rgba(255, 158, 90, 0.20), 0 4px 20px rgba(0, 0, 0, 0.20);
  transform: scale(1.025);
}

.mrn-esg-gov-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 158, 90, 0.10);
  border: 1px solid rgba(255, 158, 90, 0.20);
  color: rgba(255, 158, 90, 0.70);
}

.mrn-esg-gov-item.is-active .mrn-esg-gov-icon {
  background: rgba(255, 158, 90, 0.22);
  border-color: rgba(255, 158, 90, 0.45);
  box-shadow: 0 0 14px rgba(255, 158, 90, 0.30);
  color: #FF9E5A;
}

.mrn-esg-gov-corpo {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mrn-esg-gov-titulo {
  font-weight: 600;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.90);
}

.mrn-esg-gov-item.is-active .mrn-esg-gov-titulo {
  color: #FF9E5A;
}

.mrn-esg-gov-texto {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.50);
}

.mrn-esg-gov-item.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 2px;
  border-radius: 999px;
  background: #FF9E5A;
}

/* Biblioteca ESG — filtros. */
.mrn-esg-bib-filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.mrn-esg-bib-filtro {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: #1C1D1F;
  border: 1px solid rgba(28, 29, 31, 0.18);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mrn-esg-bib-filtro.is-active,
.mrn-esg-bib-filtro:hover,
.mrn-esg-bib-filtro:focus-visible {
  background: #006129;
  color: #fff;
  border-color: #006129;
}

.mrn-esg-bib-filtro:hover:not(.is-active),
.mrn-esg-bib-filtro:focus-visible:not(.is-active) {
  background: rgba(0, 97, 41, 0.08);
  color: #006129;
  border-color: #006129;
}

.mrn-esg-report-card {
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.mrn-esg-report-card:hover,
.mrn-esg-report-card:focus-within {
  border-color: rgba(0, 97, 41, 0.35);
  box-shadow: 0 8px 32px rgba(0, 97, 41, 0.10);
  transform: translateY(-4px);
}

.mrn-esg-pilar-card {
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, transform 0.3s;
}

.mrn-esg-pilar-card:hover {
  transform: translateY(-6px);
}

.mrn-esg-btn-outline {
  transition: background 0.3s, color 0.3s;
}

.mrn-esg-btn-outline:hover,
.mrn-esg-btn-outline:focus-visible {
  background: #006129;
  color: #fff;
}

/* Rios animados dos indicadores. */
.mrn-esg-nums::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 900px;
  height: 340px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.08;
  background: radial-gradient(ellipse, rgba(128, 198, 166, 1) 0%, transparent 70%);
  filter: blur(60px);
}

.mrn-esg-nums-rios {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
}

.mrn-esg-rio--1 { stroke-dasharray: 2000; animation: mrn-esg-rio-1 18s linear infinite; }
.mrn-esg-rio--2 { stroke-dasharray: 2400; animation: mrn-esg-rio-2 22s linear infinite 2s; }
.mrn-esg-rio--3 { stroke-dasharray: 1600; animation: mrn-esg-rio-3 15s linear infinite 4s; }
.mrn-esg-rio--4 { stroke-dasharray: 2200; animation: mrn-esg-rio-4 20s linear infinite 1s; }
.mrn-esg-rio--5 { stroke-dasharray: 1800; animation: mrn-esg-rio-5 17s linear infinite 3s; }

@keyframes mrn-esg-rio-1 { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }
@keyframes mrn-esg-rio-2 { from { stroke-dashoffset: 2400; } to { stroke-dashoffset: 0; } }
@keyframes mrn-esg-rio-3 { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
@keyframes mrn-esg-rio-4 { from { stroke-dashoffset: 2200; } to { stroke-dashoffset: 0; } }
@keyframes mrn-esg-rio-5 { from { stroke-dashoffset: 1800; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mrn-esg-rio {
    animation: none;
  }

  .mrn-esg-soc.is-js .mrn-esg-soc-setas {
    display: none;
  }

  .mrn-esg-soc.is-js .mrn-esg-soc-track {
    display: grid;
    grid-template-columns: 1fr;
    transform: none !important;
    will-change: auto;
  }

  @media (min-width: 640px) {
    .mrn-esg-soc.is-js .mrn-esg-soc-track { grid-template-columns: 1fr 1fr; }
  }

  @media (min-width: 1024px) {
    .mrn-esg-soc.is-js .mrn-esg-soc-track { grid-template-columns: 1fr 1fr 1fr; }
  }

  .mrn-esg-soc.is-js .mrn-esg-soc-card {
    width: auto;
  }

  .mrn-esg-soc.is-js .mrn-esg-soc-card[aria-hidden="true"] {
    display: none;
  }

  .mrn-esg-gov-item {
    transition: none;
  }

  .mrn-esg-report-card,
  .mrn-esg-pilar-card {
    transition: none;
  }

  .mrn-esg-report-card:hover,
  .mrn-esg-pilar-card:hover {
    transform: none;
  }
}
