/*
Theme Name: Portal Tucupi
Theme URI: https://portaltucupi.com
Author: Portal Tucupi
Description: Tema editorial próprio do Portal Tucupi, construído inteiramente em código (sem page builders), otimizado para leveza e estabilidade.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: portal-tucupi
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --ink: #17170f;
  --ink-soft: #4a4a3f;
  --paper: #fbfaf5;
  --paper-dim: #f1efe3;
  --green-deep: #143526;
  --green-mid: #24503a;
  --gold: #d6a02c;
  --gold-soft: #f0d8a0;
  --clay: #8a5a37;
  --line: #dedac9;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --gutter: 24px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ============================================
   MASTHEAD
   ============================================ */
/* ============================================
   MASTHEAD
   ============================================ */

.masthead-top {
  background: var(--green-deep);
  color: var(--paper);
  padding: 10px 0;
  font-size: 13px;
}

.masthead-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.masthead-top__date {
  color: var(--gold-soft);
}

/* Área do logo */
.masthead {
  background: var(--paper);
  padding: 18px 0 16px;
}

.masthead .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.01em;
  color: var(--green-deep);
  text-align: center;
}

.site-logo span {
  color: var(--gold);
  font-style: normal;
}

.custom-logo-link {
  display: block;
  margin: 0;
}

.custom-logo-link img {
  width: 260px;
  max-width: 100%;
  height: auto;
}

/* Slogan */
.masthead-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 0 25px;
}

/* ============================================
   PRIMARY NAV
   ============================================ */

.primary-nav {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.primary-nav .container {
  display: flex;
  justify-content: center;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.primary-nav a {
  display: block;
  padding: 14px 18px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  border-bottom-color: var(--green-mid);
  color: var(--green-mid);
}

.nav-toggle {
  display: none;
}

/* ============================================
   HERO / DESTAQUE (front page)
   ============================================ */
.hero {
  padding: 36px 0 8px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
}
.hero-feature {
  position: relative;
  min-width: 0;
}
}
.hero-feature__media {
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: var(--paper-dim);
}
.hero-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.hero-feature__tag {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  margin-top: 18px;
}
.hero-feature__title {
  font-size: 38px;
  margin-top: 12px;
}
.hero-feature__title a { color: var(--ink); }
.hero-feature__title a:hover { color: var(--green-mid); }
.hero-feature__excerpt {
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 10px;
  max-width: 60ch;
}
.hero-feature__meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ============================================
   CARROSSEL DE DESTAQUES
   ============================================ */
.carousel {
  position: relative;
  overflow: hidden;
}
.carousel__track {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
}
.carousel__media {
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: var(--paper-dim);
}
.carousel__media img { width: 100%; height: 100%; object-fit: cover; }
.carousel__btn {
  position: absolute;
  top: calc(50% - 40px);
  transform: translateY(-50%);
  width: 40px; height: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 20px;
  color: var(--green-deep);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.carousel__btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }
.carousel__dots {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 14px;
}
.carousel__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
  border: 0; cursor: pointer; padding: 0;
}
.carousel__dot.is-active { background: var(--gold); }
.carousel__empty {
  padding: 40px; text-align: center; color: var(--ink-soft);
  background: var(--paper-dim);
}

.hero-list {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.hero-list__heading {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--green-mid);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-deep);
  margin-bottom: 14px;
}
.hero-list li + li { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hero-list__item { display: flex; gap: 12px; }
.hero-list__thumb {
  width: 76px; height: 76px; flex-shrink: 0;
  background: var(--paper-dim); overflow: hidden;
}
.hero-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-list__title { font-size: 15px; line-height: 1.3; }
.hero-list__title a:hover { color: var(--green-mid); }
.hero-list__meta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* ============================================
   SEÇÃO DE CATEGORIA (rio / afluente)
   ============================================ */
.section-channel { padding: 34px 0; border-top: 1px solid var(--line); }
.section-channel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
  margin-bottom: 22px;
}
.section-channel__title {
  font-size: 22px;
  color: var(--green-deep);
}
.section-channel__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--clay);
}
.section-channel__more:hover { color: var(--green-mid); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card__media { aspect-ratio: 4/2.7; overflow: hidden; background: var(--paper-dim); margin-bottom: 12px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__title { font-size: 19px; line-height: 1.25; }
.card__title a:hover { color: var(--green-mid); }
.card__excerpt { font-size: 14.5px; color: var(--ink-soft); margin-top: 8px; }
.card__meta { font-size: 12.5px; color: var(--clay); margin-top: 8px; font-weight: 600; }

/* ============================================
   LISTAGEM (archive / category / search)
   ============================================ */
.page-header {
  padding: 30px 0 18px;
  border-bottom: 3px solid var(--green-deep);
  margin-bottom: 30px;
}
.page-header__title {
  font-size: 30px;
  color: var(--green-deep);
}
.page-header__desc { color: var(--ink-soft); margin-top: 6px; }

.post-list { display: flex; flex-direction: column; gap: 26px; }
.post-list__item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.post-list__media { aspect-ratio: 4/3; overflow: hidden; background: var(--paper-dim); }
.post-list__media img { width: 100%; height: 100%; object-fit: cover; }
.post-list__title { font-size: 22px; }
.post-list__title a:hover { color: var(--green-mid); }
.post-list__excerpt { font-size: 15px; color: var(--ink-soft); margin-top: 8px; }
.post-list__meta { font-size: 12.5px; color: var(--clay); margin-top: 10px; font-weight: 600; }

/* ============================================
   ARTIGO (single.php)
   ============================================ */
.article {
  padding: 34px 0 60px;
}
.article-head { max-width: 760px; margin: 0 auto 26px; text-align: left; }
.article-head__tag {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
}
.article-head__title {
  font-size: 40px;
  margin-top: 16px;
}
.article-head__standfirst {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin-top: 14px;
}
.article-head__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.article-head__meta strong { color: var(--ink); }

.article-media { max-width: 920px; margin: 0 auto 30px; }
.article-media img { width: 100%; }
.article-media figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 8px 0 0;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  margin-top: 8px;
}

.article-body {
  max-width: 700px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
}
.article-body p { margin: 0 0 1.3em; }
.article-body h2 { font-size: 26px; margin: 1.4em 0 0.6em; color: var(--green-deep); }
.article-body h3 { font-size: 21px; margin: 1.2em 0 0.5em; }
.article-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--green-deep);
  border-left: 4px solid var(--gold);
  padding-left: 22px;
  margin: 1.6em 0;
}
.article-body a { color: var(--green-mid); text-decoration: underline; text-decoration-color: var(--gold); }
.article-body img { margin: 1.4em 0; }

.article-tags {
  max-width: 700px; margin: 34px auto 0;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.article-tags a {
  font-size: 12.5px; padding: 5px 12px;
  background: var(--paper-dim); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.article-tags a:hover { border-color: var(--gold); color: var(--ink); }

/* ============================================
   SIDEBAR
   ============================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}
.widget { margin-bottom: 34px; }
.widget-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--green-deep);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 14px;
}
.widget ul li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.widget a:hover { color: var(--green-mid); }

/* ============================================
   PAGINAÇÃO
   ============================================ */
.pagination {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 34px 0; justify-content: center;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  font-size: 14px;
}
.pagination .current { background: var(--green-deep); color: var(--paper); border-color: var(--green-deep); }
.pagination a:hover { border-color: var(--gold); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--green-deep); color: var(--paper); margin-top: 50px; padding: 46px 0 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(251,250,245,0.15);
}
.footer-logo { font-family: var(--serif); font-style: italic; font-size: 26px; }
.footer-logo span { color: var(--gold); font-style: normal; }
.footer-about { font-size: 14px; color: var(--gold-soft); margin-top: 10px; max-width: 40ch; }
.footer-heading { font-size: 13px; font-weight: 600; color: var(--gold-soft); margin-bottom: 12px; }
.footer-widget a { font-size: 14px; opacity: 0.85; }
.footer-widget li + li { margin-top: 8px; }
.footer-widget a:hover { opacity: 1; color: var(--gold-soft); }
.site-footer__bottom {
  padding-top: 20px;
  font-size: 12.5px;
  opacity: 0.7;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-list { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-list__item { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-logo { font-size: 22px; }
  .primary-nav ul { justify-content: flex-start; overflow-x: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .article-head__title { font-size: 28px; }
  .article-body { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* =====================================================
   AJUSTE FINAL DO CABEÇALHO
   ===================================================== */

/* Área do logo */
header.masthead {
  background: var(--paper);
  padding: 18px 0 18px !important;
  border-bottom: 1px solid var(--line);
}

header.masthead > .container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  gap: 8px !important;
}

/* Logo WordPress */
header.masthead .custom-logo-link {
  display: block !important;
  width: 260px !important;
  max-width: 260px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

header.masthead .custom-logo-link img {
  display: block !important;
  width: 260px !important;
  max-width: 260px !important;
  height: auto !important;
  margin: 0 auto !important;
}

/* Se não houver logo personalizado */
header.masthead .site-logo {
  display: block;
  font-size: 30px;
  text-align: center;
}

/* Esconde o slogan para deixar o cabeçalho mais parecido
   com o Citeí Manaus */
header.masthead .masthead-tagline {
  display: none !important;
}


/* =====================================================
   MENU PRINCIPAL
   ===================================================== */

nav.primary-nav {
  background: var(--paper) !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

nav.primary-nav > .container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

nav.primary-nav ul {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  width: 100%;
}

nav.primary-nav li {
  margin: 0 !important;
  padding: 0 !important;
}

nav.primary-nav a {
  display: block !important;
  padding: 15px 18px !important;
  color: var(--ink) !important;
  font-family: var(--sans);
  font-size: 14px !important;
  font-weight: 600 !important;
  border-bottom: 3px solid transparent !important;
  transition: all 0.15s ease;
}

nav.primary-nav a:hover,
nav.primary-nav a:focus-visible {
  color: var(--green-mid) !important;
  border-bottom-color: var(--green-mid) !important;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 640px) {

  header.masthead .custom-logo-link,
  header.masthead .custom-logo-link img {
    width: 190px !important;
    max-width: 190px !important;
  }

  nav.primary-nav ul {
    justify-content: flex-start !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
  }

  nav.primary-nav a {
    white-space: nowrap;
    padding: 13px 15px !important;
  }
}/* Ajuste de tamanho do logotipo */
/* Ajuste de tamanho do logotipo */
.custom-logo-link img {
  max-width: 90px !important;
  width: 100% !important;
  height: auto !important;
}

/* Grafismo sutil de fundo no cabeçalho, inspirado no padrão do logotipo */
.masthead {
  background-color: var(--paper);
  background-image:
    linear-gradient(135deg, rgba(20,53,38,0.05) 25%, transparent 25%),
    linear-gradient(225deg, rgba(20,53,38,0.05) 25%, transparent 25%),
    linear-gradient(45deg, rgba(20,53,38,0.05) 25%, transparent 25%),
    linear-gradient(315deg, rgba(20,53,38,0.05) 25%, transparent 25%);
  background-position: 20px 0, 20px 0, 0 0, 0 0;
  background-size: 40px 40px;
  background-repeat: repeat;
}
/* ======================================================
   AJUSTES DO CARROSSEL E COLUNA DE ÚLTIMAS NOTÍCIAS
   ====================================================== */

/* Layout principal dividindo a tela em 2 colunas perfeitamente alinhadas */
.hero-section-custom {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2/3 para o carrossel, 1/3 para a coluna lateral */
  gap: 24px;
  align-items: stretch;
  margin-bottom: 40px;
}

/* --- CARROSSEL --- */
.carousel-container-custom {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000;
}

.carousel-slide-custom {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide-custom img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Mantém a proporção da foto sem distorcer */
  display: block;
}

/* Escurecimento (Degradê) na parte inferior da foto para leitura da legenda */
.carousel-caption-custom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 50px 24px 24px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  color: #ffffff;
  z-index: 2;
}

.carousel-caption-custom h2 {
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 8px 0 !important;
  color: #ffffff !important;
}

.carousel-caption-custom .meta-date {
  font-size: 0.85rem;
  color: #ddd;
}

/* Botões de navegação (< e >) */
.carousel-btn-custom {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  font-weight: bold;
}
.carousel-btn-custom.prev { left: 16px; }
.carousel-btn-custom.next { right: 16px; }

/* --- COLUNA LATERAL (Últimas notícias) --- */
.sidebar-news-custom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.sidebar-title-custom {
  font-size: 1.1rem;
  font-weight: bold;
  border-bottom: 2px solid #333;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.news-item-custom {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
}

/* Miniaturas maiores */
.news-item-custom img {
  width: 110px !important;  /* Tamanho aumentado */
  height: 75px !important;   /* Tamanho aumentado */
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.news-item-custom .news-content h3 {
  font-size: 0.95rem !important; /* Texto levemente maior */
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 0 4px 0 !important;
  color: #222;
}

.news-item-custom .news-content span {
  font-size: 0.75rem;
  color: #777;
}

/* Ajuste para celulares */
@media (max-width: 768px) {
  .hero-section-custom {
    grid-template-columns: 1fr;
  }
  .carousel-container-custom {
    height: 320px;
    min-height: auto;
  }
}