/* ==========================================================================
   Media Hacks — Portal Nav (navbar fixa + mega menu + footer grande)
   ========================================================================== */

:root {
  --mh-nav-h: 56px;
  --mh-ticker-h: 40px;
  --mh-header-total: var(--mh-nav-h);
  --mh-mega-bg: #0f172a;
  --mh-mega-panel: #ffffff;
  --mh-hairline: rgba(0, 0, 0, 0.08);
}

body.mh-portal-has-ticker {
  --mh-header-total: calc(var(--mh-nav-h) + var(--mh-ticker-h));
}

.mh-portal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.mh-portal-nav {
  position: relative;
  height: var(--mh-nav-h);
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mh-portal-nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .mh-portal-nav__inner { padding: 0 2rem; }
}

.mh-portal-nav__logo img {
  height: 1.75rem;
  width: auto;
}

.mh-portal-nav__menu {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .mh-portal-nav__menu { display: flex; gap: 0.1rem; }
}

.mh-portal-nav__link--cat {
  font-size: 0.6875rem;
  padding: 0.45rem 0.6rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .mh-portal-nav__link--cat {
    font-size: 0.75rem;
    padding: 0.45rem 0.75rem;
  }
}

.mh-portal-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #d1d5db;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
  border: none;
  background: none;
  cursor: pointer;
}

.mh-portal-nav__link:hover,
.mh-portal-nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.mh-portal-nav__link svg {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.7;
}

.mh-portal-nav__actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .mh-portal-nav__actions { display: flex; }
}

.mh-portal-nav__cc {
  font-family: 'Sora', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.mh-portal-nav__cc:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mh-portal-nav__toggle {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  color: #d1d5db;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mh-portal-nav__toggle { display: none; }
}

/* Mega dropdown */
.mh-portal-dropdown {
  position: static;
}

@media (min-width: 1024px) {
  .mh-portal-dropdown:hover .mh-portal-mega,
  .mh-portal-dropdown.is-open .mh-portal-mega,
  .mh-portal-dropdown:focus-within .mh-portal-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mh-portal-dropdown:hover > .mh-portal-nav__link,
  .mh-portal-dropdown:focus-within > .mh-portal-nav__link {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }
}

.mh-portal-dropdown.is-open .mh-portal-mega,
.mh-portal-dropdown:focus-within .mh-portal-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mh-portal-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 110;
}

.mh-portal-mega__panel {
  background: var(--mh-mega-panel);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  border-top: 1px solid var(--mh-hairline);
}

.mh-portal-mega__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 1.25rem;
}

@media (min-width: 1024px) {
  .mh-portal-mega__inner { padding: 1.75rem 2rem 1.5rem; }
}

.mh-portal-mega__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .mh-portal-mega__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .mh-portal-mega__grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}

.mh-portal-mega__grid--4 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .mh-portal-mega__grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.mh-portal-mega__kicker {
  font-family: 'Sora', sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin: 0 0 1rem;
}

.mh-portal-nav__link--mega svg {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

.mh-mega-card--leitura .mh-mega-card__title:hover,
.mh-mega-card--leitura:hover .mh-mega-card__title {
  color: #9333ea;
}

.mh-mega-card__count--leitura {
  background: rgba(147, 51, 234, 0.85);
}

/* Mega visual — só imagem + nome sobre overlay */
.mh-mega-card--visual {
  display: block;
}

.mh-mega-card--visual .mh-mega-card__media {
  margin-bottom: 0;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.mh-mega-card--visual:hover .mh-mega-card__media img {
  transform: scale(1.05);
}

.mh-mega-card__overlay--strong {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}

.mh-mega-card__label {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  right: 0.65rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  z-index: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.mh-mega-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.mh-mega-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: #f3f4f6;
  margin-bottom: 0.65rem;
}

.mh-mega-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.mh-mega-card:hover .mh-mega-card__media img {
  transform: scale(1.04);
}

.mh-mega-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
  pointer-events: none;
}

.mh-mega-card__count {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.mh-mega-card__title {
  font-family: 'Sora', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin: 0 0 0.2rem;
  transition: color 0.15s;
}

.mh-mega-card:hover .mh-mega-card__title {
  color: #059669;
}

.mh-mega-card__cta {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mh-portal-mega__footer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #059669;
  text-decoration: none;
}

.mh-portal-mega__footer:hover { color: #047857; }

/* Ticker */
.mh-portal-ticker {
  height: var(--mh-ticker-h);
  background: #059669;
  color: #fff;
  overflow: hidden;
}

.mh-portal-ticker__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mh-portal-ticker__label {
  flex-shrink: 0;
  background: #fff;
  color: #059669;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.mh-portal-ticker__track {
  flex: 1;
  overflow: hidden;
}

.mh-portal-ticker__scroll {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: mh-ticker 45s linear infinite;
  width: max-content;
}

.mh-portal-ticker__scroll:hover {
  animation-play-state: paused;
}

@keyframes mh-ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.mh-portal-ticker__link {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.mh-portal-ticker__link:hover { text-decoration: underline; }

/* Main offset */
.mh-portal-main {
  padding-top: var(--mh-header-total);
  min-height: 100vh;
  background: #fff;
}

@media (max-width: 640px) {
  :root {
    --mh-nav-h: 54px;
    --mh-ticker-h: 32px;
  }

  body.mh-portal-has-ticker {
    --mh-header-total: var(--mh-nav-h);
  }

  .mh-portal-ticker {
    display: none;
  }

  .mh-portal-nav__inner {
    padding: 0 0.875rem;
  }

  .mh-portal-nav__logo img {
    height: 1.55rem;
  }

  .mh-portal-nav__toggle {
    padding: 0.375rem;
  }
}

/* Mobile menu */
.mh-portal-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
}

.mh-portal-mobile.is-open { display: block; }

.mh-portal-mobile__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 360px);
  height: 100%;
  background: #111827;
  padding: 0;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  -webkit-overflow-scrolling: touch;
}

.mh-portal-mobile.is-open .mh-portal-mobile__panel {
  transform: translateX(0);
}

.mh-portal-mobile__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.85rem;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mh-portal-mobile__title {
  font-family: 'Sora', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.mh-portal-mobile__close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.125rem;
}

.mh-portal-mobile__nav {
  padding: 0.75rem 1rem 1.5rem;
}

.mh-portal-mobile__section {
  margin-bottom: 1.5rem;
}

.mh-portal-mobile__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.mh-portal-mobile__kicker {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
}

.mh-portal-mobile__section-link {
  flex-shrink: 0;
  font-family: 'Sora', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #059669;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mh-portal-mobile__section-link:hover { color: #6ee7b7; }

.mh-portal-mobile__cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mh-portal-mobile__cat-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.mh-portal-mobile__cat-card:hover,
.mh-portal-mobile__cat-card.is-active {
  border-color: rgba(5, 150, 105, 0.45);
  background: rgba(5, 150, 105, 0.08);
}

.mh-portal-mobile__cat-card--leitura:hover,
.mh-portal-mobile__cat-card--leitura.is-active {
  border-color: rgba(147, 51, 234, 0.45);
  background: rgba(147, 51, 234, 0.08);
}

.mh-portal-mobile__cat-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1f2937;
}

.mh-portal-mobile__cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.mh-portal-mobile__cat-card:hover .mh-portal-mobile__cat-media img {
  transform: scale(1.04);
}

.mh-portal-mobile__cat-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem 0.65rem;
}

.mh-portal-mobile__cat-name {
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: #f3f4f6;
}

.mh-portal-mobile__cat-count {
  font-size: 0.625rem;
  font-weight: 600;
  color: #9ca3af;
}

.mh-portal-mobile__section--leituras .mh-portal-mobile__cat-count {
  color: #c4b5fd;
}

.mh-portal-mobile__section--quick {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mh-portal-mobile__link {
  display: block;
  padding: 0.75rem 0.5rem;
  color: #e5e7eb;
  font-family: 'Sora', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.mh-portal-mobile__link:hover,
.mh-portal-mobile__link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Footer grande */
.mh-portal-footer {
  background: #111827;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
}

.mh-portal-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 1024px) {
  .mh-portal-footer__inner { padding: 0 2rem; }
}

.mh-portal-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .mh-portal-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.mh-portal-footer__brand img {
  height: 2rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.mh-portal-footer__desc {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #9ca3af;
  max-width: 280px;
  margin-bottom: 1.25rem;
}

.mh-portal-footer__social {
  display: flex;
  gap: 0.75rem;
}

.mh-portal-footer__social a {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  transition: color 0.15s, background 0.15s;
}

.mh-portal-footer__social a:hover {
  color: #fff;
  background: rgba(5, 150, 105, 0.2);
}

.mh-portal-footer__social svg { width: 1.125rem; height: 1.125rem; }

.mh-portal-footer__heading {
  font-family: 'Sora', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin: 0 0 1rem;
}

.mh-portal-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mh-portal-footer__list li { margin-bottom: 0.5rem; }

.mh-portal-footer__list a {
  color: #9ca3af;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.15s;
}

.mh-portal-footer__list a:hover { color: #fff; }

.mh-portal-footer__list .count {
  color: #6b7280;
  font-size: 0.6875rem;
  margin-left: 0.25rem;
}

.mh-portal-footer__central {
  margin-top: 0.25rem;
}

.mh-portal-footer__central .central-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.mh-portal-footer__central .central-logo__mark-img {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
}

.mh-portal-footer__central .central-logo__wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.mh-portal-footer__central .central-logo__central {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: lowercase;
  color: #fff;
  line-height: 1;
}

.mh-portal-footer__central .central-logo__comm {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-transform: lowercase;
  color: #059669;
  line-height: 0.95;
  margin-top: -1px;
}

.mh-portal-footer__central .central-logo__tag {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9ca3af;
  margin-top: 2px;
  line-height: 1;
}

.mh-portal-footer__central .central-logo:hover .central-logo__mark-img {
  opacity: 0.9;
}

.mh-portal-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: #6b7280;
}

@media (prefers-reduced-motion: reduce) {
  .mh-portal-ticker__scroll { animation: none; }
  .mh-portal-mega { transition: none; }
}
