/* Sala de Imprensa — estilos dos componentes renderizados via JS
   (cards, featured, badges, chips, modal). O shell (nav/hero/footer/toolbar)
   fica inline no imprensa/index.php, seguindo o mockup Imprensa.dc.html. */

.im-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.im-badge--portal  { color: #1f6f57; background: #e7f2ec; }
.im-badge--tv      { color: #9a6320; background: #f5ecdd; }
.im-badge--jornal  { color: #3d5f8a; background: #e9eef6; }
.im-badge--radio   { color: #74497e; background: #f1e9f3; }
.im-badge--revista { color: #2b7676; background: #e2f0f0; }

/* Chips de filtro */
.im-chip {
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
  background: #ffffff;
  color: #4a5d55;
  border: 1px solid #dbe4db;
}
.im-chip.is-active {
  background: #0f4a3e;
  color: #f7faf6;
  border: 1px solid #0f4a3e;
}

/* Featured */
.im-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid #e0e8df;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  margin-bottom: 42px;
  box-shadow: 0 16px 40px -26px rgba(15, 74, 62, .4);
  transition: box-shadow .2s ease;
}
.im-featured:hover { box-shadow: 0 22px 50px -24px rgba(15, 74, 62, .5); }
.im-featured__media {
  position: relative;
  min-height: 300px;
  background: repeating-linear-gradient(135deg, #eef4ef, #eef4ef 12px, #e6efe8 12px, #e6efe8 24px);
  display: flex;
  align-items: flex-end;
  padding: 22px;
  background-size: cover;
  background-position: center;
}
.im-featured__media--img { background: #eef4ef; }
.im-featured__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.im-featured__flag {
  position: relative;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0f4a3e;
  background: #ffffff;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid #d3e2d8;
}
.im-featured__ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo', monospace; font-size: 12px; letter-spacing: .5px; color: #9db0a7;
}
.im-featured__body { padding: 36px 36px 32px; display: flex; flex-direction: column; }
.im-featured__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.im-featured__veiculo { font-weight: 600; font-size: 14px; color: #0f4a3e; }
.im-featured__date { font-family: 'Archivo', sans-serif; font-size: 12.5px; font-weight: 500; color: #8a9c93; letter-spacing: .3px; }
.im-featured__headline {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(24px, 2.6vw, 31px); line-height: 1.14; letter-spacing: -.6px;
  margin: 0 0 15px; color: #12332b; text-wrap: balance;
}
.im-featured__excerpt { font-size: 15.5px; line-height: 1.6; color: #5f7269; margin: 0 0 26px; }
.im-featured__cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: #0f4a3e; }

/* Grid */
.im-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.im-card {
  display: flex; flex-direction: column; padding: 22px 22px 20px;
  border: 1px solid #e4ebe4; border-radius: 18px; background: #ffffff; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.im-card:hover { transform: translateY(-4px); border-color: #bcd3c4; box-shadow: 0 18px 36px -24px rgba(15, 74, 62, .45); }
.im-card__top { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.im-card__logo {
  width: 38px; height: 38px; flex: none; border-radius: 11px; background: #eef4ef; border: 1px solid #dbe7de;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13.5px; color: #0f4a3e;
  overflow: hidden; background-size: cover; background-position: center;
}
.im-card__veiculo { font-weight: 600; font-size: 14px; color: #12332b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-card__date { font-family: 'Archivo', sans-serif; font-size: 11.5px; font-weight: 500; color: #8a9c93; letter-spacing: .3px; }
.im-card__headline {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 19px; line-height: 1.24;
  letter-spacing: -.3px; margin: 0 0 10px; color: #12332b; text-wrap: pretty;
}
.im-card__excerpt {
  font-size: 13.5px; line-height: 1.55; color: #61726c; margin: 0 0 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.im-card__cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: #0f4a3e; }

/* Modal */
.im-modal-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(18, 51, 43, .42);
  backdrop-filter: blur(5px); display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.im-modal {
  width: 100%; max-width: 760px; background: #ffffff; border: 1px solid #e2e9e1; border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(18, 51, 43, .5); overflow: hidden; margin: auto;
}
.im-modal__head { position: relative; padding: 26px 30px 22px; border-bottom: 1px solid #eef2ec; }
.im-modal__close {
  position: absolute; top: 20px; right: 22px; width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid #e0e8df; background: #f6f9f5; color: #0f4a3e; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.im-modal__ident { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-right: 44px; }
.im-modal__logo {
  width: 42px; height: 42px; flex: none; border-radius: 12px; background: #eef4ef; border: 1px solid #dbe7de;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; color: #0f4a3e;
  overflow: hidden; background-size: cover; background-position: center;
}
.im-modal__veiculo { font-weight: 700; font-size: 16px; color: #12332b; }
.im-modal__sub { font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 500; color: #8a9c93; }
.im-modal__scroll { padding: 30px 34px 12px; max-height: calc(100vh - 300px); overflow-y: auto; }
.im-modal__headline {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(25px, 3.3vw, 33px);
  line-height: 1.12; letter-spacing: -.8px; margin: 0 0 22px; color: #12332b; text-wrap: balance;
}
.im-modal__cover {
  position: relative; height: 230px; border-radius: 16px; margin-bottom: 26px;
  background: repeating-linear-gradient(135deg, #eef4ef, #eef4ef 12px, #e6efe8 12px, #e6efe8 24px);
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center 25%;
}
.im-modal__cover .im-featured__ph { position: static; }
.im-modal__body p { font-size: 16.5px; line-height: 1.7; color: #3f4f49; margin: 0 0 18px; }
.im-modal__foot { display: flex; flex-wrap: wrap; gap: 12px; padding: 20px 34px 26px; border-top: 1px solid #eef2ec; align-items: center; }
.im-btn-primary {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: #0f4a3e; color: #f7faf6; font-weight: 600; font-size: 14px; border: none; cursor: pointer;
}
.im-btn-ghost {
  padding: 12px 22px; border-radius: 999px; border: 1px solid #d6e0d6; background: #ffffff;
  color: #0f4a3e; font-weight: 600; font-size: 14px; cursor: pointer;
}

/* Compartilhar */
.im-share { position: relative; margin-left: auto; }
.im-share__menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); background: #ffffff; border: 1px solid #e2e9e1;
  border-radius: 14px; box-shadow: 0 18px 44px -18px rgba(18, 51, 43, .4); padding: 8px; min-width: 190px;
  display: flex; flex-direction: column; gap: 2px; z-index: 5;
}
.im-share__menu[hidden] { display: none; }
.im-share__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: none;
  background: transparent; color: #12332b; font-family: 'Archivo', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: left; text-decoration: none;
}
.im-share__item:hover { background: #f1f6f2; color: #0f4a3e; }
.im-share__item svg { flex: none; }

@media (max-width: 720px) {
  .im-featured { grid-template-columns: 1fr; }
  .im-featured__media { min-height: 200px; }
}

/* =========================================================
   Enhancements — animações de entrada, hovers e microinterações
   ========================================================= */

@keyframes imFadeUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes imPop      { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes imOverlayIn{ from { opacity: 0; } to { opacity: 1; } }
@keyframes imModalIn  { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes imMenuIn   { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes imSweep    { 0% { left: -70%; opacity: 0; } 18% { opacity: .85; } 100% { left: 130%; opacity: 0; } }
@keyframes imFloatY   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---- Cards: entrada escalonada + hover rico ---- */
.im-card {
  position: relative;
  will-change: transform;
  animation: imFadeUp .52s cubic-bezier(.16, 1, .3, 1) both;
}
.im-card:nth-child(1)  { animation-delay: .02s; }
.im-card:nth-child(2)  { animation-delay: .07s; }
.im-card:nth-child(3)  { animation-delay: .12s; }
.im-card:nth-child(4)  { animation-delay: .17s; }
.im-card:nth-child(5)  { animation-delay: .22s; }
.im-card:nth-child(6)  { animation-delay: .27s; }
.im-card:nth-child(7)  { animation-delay: .32s; }
.im-card:nth-child(8)  { animation-delay: .37s; }
.im-card:nth-child(9)  { animation-delay: .42s; }
.im-card:nth-child(n+10) { animation-delay: .46s; }
.im-card:hover {
  transform: translateY(-6px);
  border-color: #bcd3c4;
  box-shadow: 0 28px 48px -24px rgba(15, 74, 62, .5);
}
.im-card__headline { transition: color .22s ease; }
.im-card:hover .im-card__headline { color: #0f4a3e; }
.im-card__logo { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.im-card:hover .im-card__logo { transform: scale(1.07) rotate(-3deg); }
.im-card__cta { transition: gap .2s ease, color .2s ease; }
.im-card__cta span { display: inline-block; transition: transform .22s cubic-bezier(.16, 1, .3, 1); }
.im-card:hover .im-card__cta { color: #12332b; }
.im-card:hover .im-card__cta span { transform: translateX(5px); }

/* ---- Featured: entrada + zoom da capa + brilho + seta ---- */
.im-featured {
  position: relative;
  animation: imPop .62s cubic-bezier(.16, 1, .3, 1) both;
  transition: transform .3s ease, box-shadow .3s ease;
}
.im-featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 32px 64px -26px rgba(15, 74, 62, .55);
}
.im-featured__media img { transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.im-featured:hover .im-featured__media img { transform: scale(1.06); }
.im-featured::before {
  content: "";
  position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-18deg);
  opacity: 0; pointer-events: none; z-index: 3;
}
.im-featured:hover::before { animation: imSweep .95s ease; }
.im-featured__flag { transition: transform .3s ease, box-shadow .3s ease; }
.im-featured:hover .im-featured__flag {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(15, 74, 62, .45);
}
.im-featured__cta span { display: inline-block; transition: transform .22s cubic-bezier(.16, 1, .3, 1); }
.im-featured:hover .im-featured__cta span { transform: translateX(6px); }

/* ---- Badges: leve brilho ---- */
.im-badge { transition: transform .2s ease, filter .2s ease; }
.im-card:hover .im-badge,
.im-featured:hover .im-badge { transform: translateY(-1px); filter: saturate(1.15); }

/* ---- Chips: hover elevado ---- */
.im-chip { transition: transform .18s cubic-bezier(.16, 1, .3, 1), border-color .18s ease, color .18s ease, box-shadow .18s ease, background .18s ease; }
.im-chip:hover {
  transform: translateY(-2px);
  border-color: #0f4a3e;
  color: #0f4a3e;
  box-shadow: 0 8px 16px -8px rgba(15, 74, 62, .4);
}
.im-chip.is-active:hover { color: #f7faf6; background: #0d3f35; }
.im-chip:active { transform: translateY(0) scale(.96); }

/* ---- Busca: glow no foco ---- */
#im-search { transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
#im-search:focus {
  border-color: #2f7a63 !important;
  box-shadow: 0 0 0 4px rgba(47, 122, 99, .13) !important;
}

/* ---- Modal: entrada do overlay e do card ---- */
.im-modal-overlay { animation: imOverlayIn .25s ease both; }
.im-modal { animation: imModalIn .38s cubic-bezier(.16, 1, .3, 1) both; }
.im-modal__close { transition: transform .25s cubic-bezier(.16, 1, .3, 1), background .2s ease, color .2s ease; }
.im-modal__close:hover { transform: rotate(90deg); background: #eef4ef; color: #0d3f35; }

/* ---- Compartilhar: menu e itens ---- */
.im-share__menu:not([hidden]) { animation: imMenuIn .2s cubic-bezier(.16, 1, .3, 1) both; transform-origin: bottom right; }
.im-share__item { transition: background .16s ease, color .16s ease, transform .16s ease, padding-left .16s ease; }
.im-share__item:hover { transform: translateX(3px); padding-left: 15px; }

/* ---- Botões do modal: botão parado, só a seta desliza ---- */
.im-btn-primary { position: relative; }
/* mantém a fonte clara em todos os estados: o CSS global tem `a:hover{color:#2f7a63}`
   e o "Abrir no site do veículo" é um <a>, então o hover global deixaria o texto verde. */
.im-btn-primary,
.im-btn-primary:hover,
.im-btn-primary:focus,
.im-btn-primary:active { color: #f7faf6; }
.im-btn-ghost { transition: background-color .2s ease, border-color .2s ease; }
.im-btn-ghost:hover { background-color: #f1f6f2; border-color: #cbdccf; }
/* a seta (↗) é o último <span> do botão; desliza pra cima-direita no hover */
.im-btn-primary span { display: inline-block; transition: transform .24s cubic-bezier(.16, 1, .3, 1); }
.im-btn-primary:hover span { transform: translate(4px, -4px); }

/* ---- Estado vazio: leve flutuação ---- */
#im-empty:not([hidden]) { animation: imFadeUp .5s ease both; }

/* ---- Acessibilidade: reduzir movimento ---- */
@media (prefers-reduced-motion: reduce) {
  .im-card, .im-featured, .im-modal, .im-modal-overlay,
  .im-share__menu:not([hidden]), #im-empty:not([hidden]) { animation: none !important; }
  .im-featured:hover::before { animation: none !important; }
  .im-card, .im-featured, .im-chip, .im-badge, .im-card__logo,
  .im-card__cta span, .im-featured__cta span, .im-btn-primary, .im-btn-ghost,
  .im-share__item, .im-modal__close, .im-featured__media img {
    transition: none !important;
  }
}

/* =========================================================
   Header (menu) + Footer (ícones) — hovers e microinterações
   Seletores estruturais: o CSS só é carregado na página Imprensa.
   `!important` onde há estilo inline (cor/borda/fundo) a sobrepor.
   ========================================================= */

/* ---- Logo do header ---- */
header img { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
header a:hover img { transform: scale(1.06); }

/* ---- Links do menu: sublinhado animado + leve subida ---- */
header nav a {
  position: relative;
  transition: color .2s ease, transform .2s ease;
}
header nav a:not(:last-child)::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px; background: #0f4a3e;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
header nav a:not(:last-child):hover::after { transform: scaleX(1); }
header nav a:not(:last-child):hover {
  color: #0f4a3e !important;
  transform: translateY(-1px);
}

/* ---- Botão "Fale com a gente" ---- */
header nav a:last-child {
  transition: transform .22s cubic-bezier(.16, 1, .3, 1), box-shadow .22s ease, background-color .22s ease, letter-spacing .22s ease;
}
header nav a:last-child:hover {
  transform: translateY(-2px);
  background-color: #0d3f35 !important;
  box-shadow: 0 14px 26px -10px rgba(15, 74, 62, .6);
  letter-spacing: .2px;
}
header nav a:last-child:active { transform: translateY(0) scale(.98); }

/* ---- Ícones sociais do footer: sobem, escalam e viram dourado ---- */
footer a[aria-label] {
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), color .2s ease, filter .2s ease;
  will-change: transform;
}
footer a[aria-label]:hover {
  transform: translateY(-4px) scale(1.22);
  color: #e7d3a0 !important;
  filter: drop-shadow(0 6px 12px rgba(226, 207, 159, .45));
}
footer a[aria-label]:active { transform: translateY(-1px) scale(1.08); }
/* micro-giro só no Instagram e YouTube para dar personalidade */
footer a[aria-label="Instagram"]:hover { transform: translateY(-4px) scale(1.22) rotate(-6deg); }
footer a[aria-label="YouTube"]:hover { transform: translateY(-4px) scale(1.24); }

/* ---- Pílula "Política de Privacidade" ---- */
footer a[href="/politicas"] {
  transition: transform .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease;
}
footer a[href="/politicas"]:hover {
  transform: translateY(-2px);
  background-color: rgba(184, 160, 110, .14) !important;
  border-color: rgba(184, 160, 110, .85) !important;
  color: #e7d3a0 !important;
}

/* ---- Links de texto do footer (DPO / Canal do Titular) ---- */
footer a[href^="mailto:"], footer a[href="/canal-do-titular/"] {
  transition: color .2s ease, text-shadow .2s ease;
}
footer a[href^="mailto:"]:hover, footer a[href="/canal-do-titular/"]:hover {
  color: #e7d3a0 !important;
  text-shadow: 0 0 12px rgba(226, 207, 159, .35);
}

/* ---- Logo do footer (link para a home) ---- */
.im-footer-logo { transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .2s ease; }
.im-footer-logo:hover { transform: translateY(-2px) scale(1.05); opacity: .88; }
.im-footer-logo:active { transform: translateY(0) scale(1.01); }

@media (prefers-reduced-motion: reduce) {
  header img, header nav a, header nav a::after, header nav a:last-child,
  footer a[aria-label], footer a[href="/politicas"], .im-footer-logo {
    transition: none !important;
  }
  header nav a:not(:last-child):hover::after { transform: scaleX(1); }
  footer a[aria-label]:hover { transform: none; }
  .im-footer-logo:hover { transform: none; }
}
