/*
 * Cultura Pop em Casa — Single Post Layout v7
 * Carregado via <link> direto no single.php — sem depender de functions.php
 */

/* ============================================================
   FIX CRÍTICO: main.css antigo limita body a 800px
   ============================================================ */
body.single {
  max-width: none !important;
}

/* ============================================================
   FUNDO DA PÁGINA DA MATÉRIA
   ============================================================ */
.single-page-bg {
  background: #0E0E22;
  padding: 1.5rem 0 4rem;
}

/* ============================================================
   GRID: ARTIGO + SIDEBAR
   ============================================================ */
.single-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}

/* ============================================================
   CARD BRANCO DO ARTIGO
   ============================================================ */
.single-article {
  background: #FFFFFF !important;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
  min-width: 0;
}

/* Seções paddinadas dentro do card */
.single-article__pad {
  padding: 2rem 2.25rem 0;
}
.single-article__body {
  padding-bottom: 3rem;
}

/* Imagem edge-to-edge */
.single-article__hero {
  display: block;
  margin: 1.5rem 0 0;
}
.single-article__hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.single-article__caption {
  font-size: 11px;
  color: #999;
  text-align: center;
  padding: 0.4rem 1.5rem 0;
  font-style: italic;
}

/* ============================================================
   CABEÇALHO DO POST — texto escuro no fundo branco
   ============================================================ */
.single-article .single-header__cats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.single-article .single-header__title {
  font-family: 'Bebas Neue', 'Barlow', sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #0B0B1E;
  margin-bottom: 1rem;
}

.single-article .single-header__subtitle {
  font-size: 1.05rem;
  color: #44445A;
  line-height: 1.6;
  border-left: 3px solid #FF2D6B;
  padding-left: 1rem;
  margin-bottom: 1.25rem;
  font-style: italic;
}

/* ============================================================
   BYLINE — no fundo branco
   ============================================================ */
.single-article .single-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #E5E5EF;
  border-bottom: 1px solid #E5E5EF;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.single-article .single-byline__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.single-article .single-byline__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E5E5EF;
  background: #F0F0F7;
}

.single-article .single-byline__author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.single-article .single-byline__name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0B0B1E;
  text-decoration: none;
}
.single-article .single-byline__name:hover { color: #FF2D6B; }

.single-article .single-byline__role {
  font-size: 0.7rem;
  color: #888899;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Barlow', sans-serif;
}

.single-article .single-byline__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.single-article .single-byline__meta span {
  font-size: 0.75rem;
  color: #666677;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.single-article .single-byline__share {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
  align-items: center;
}

/* ============================================================
   SHARE BUTTONS — fundo branco
   ============================================================ */
.single-article .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #D8D8E8;
  color: #555566;
  background: #F0F0F7;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}
.single-article .share-btn:hover { transform: translateY(-2px); }
.single-article .share-btn--twitter:hover  { background: #000;    border-color: #000;    color: #fff; }
.single-article .share-btn--facebook:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
.single-article .share-btn--whatsapp:hover { background: #25D366; border-color: #25D366; color: #fff; }
.single-article .share-btn--copy:hover     { background: #FF2D6B; border-color: #FF2D6B; color: #fff; }

.single-article .share-btn--lg {
  width: auto;
  height: 36px;
  padding: 0 1rem;
  gap: 0.4rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  color: #fff;
}
.single-article .share-btn--twitter.share-btn--lg  { background: #000;    border-color: #000; }
.single-article .share-btn--facebook.share-btn--lg { background: #1877F2; border-color: #1877F2; }
.single-article .share-btn--whatsapp.share-btn--lg { background: #25D366; border-color: #25D366; }

/* ============================================================
   CONTEÚDO DO POST — tipografia legível
   ============================================================ */
.single-article .post-content {
  color: #2D2D4A;
  font-size: 1.05rem;
  line-height: 1.82;
  font-family: 'Inter', sans-serif;
}

.single-article .post-content h2 {
  color: #0B0B1E;
  font-family: 'Barlow', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #EEEEF8;
  line-height: 1.25;
}
.single-article .post-content h3 {
  color: #0B0B1E;
  font-family: 'Barlow', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}
.single-article .post-content h4 {
  color: #1A1A30;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}
.single-article .post-content p {
  color: #2D2D4A;
  margin-bottom: 1.15em;
}
.single-article .post-content a {
  color: #FF2D6B;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.single-article .post-content a:hover { color: #CC1A54; }

.single-article .post-content blockquote {
  background: #F5F5FC;
  border-left: 4px solid #FF2D6B;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 0 10px 10px 0;
  color: #44445A;
  font-style: italic;
}
.single-article .post-content blockquote p { color: inherit; margin-bottom: 0; }

.single-article .post-content ul,
.single-article .post-content ol {
  padding-left: 1.75rem;
  margin: 0.75rem 0 1.25rem;
}
.single-article .post-content li {
  color: #2D2D4A;
  margin-bottom: 0.45rem;
  line-height: 1.65;
}
.single-article .post-content li::marker { color: #FF2D6B; }

.single-article .post-content strong { color: #0B0B1E; }
.single-article .post-content em     { color: #44445A; }

.single-article .post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.single-article .post-content code {
  background: #F0F0F7;
  color: #CC1A54;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.875em;
}
.single-article .post-content pre {
  background: #1C1C38;
  color: #E0E0F0;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.75rem 0;
}
.single-article .post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.single-article .post-content th {
  background: #EEEEF8;
  color: #0B0B1E;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 700;
  border: 1px solid #DDD;
}
.single-article .post-content td {
  color: #2D2D4A;
  padding: 0.5rem 1rem;
  border: 1px solid #E5E5EF;
}

/* ============================================================
   TAGS
   ============================================================ */
.single-article .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #EEEEF8;
}
.single-article .post-tags__label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.single-article .post-tag {
  background: #F0F0F7;
  color: #44445A;
  border: 1px solid #DDDDE8;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  transition: all 150ms;
}
.single-article .post-tag:hover { background: #FF2D6B; color: #fff; border-color: #FF2D6B; }

/* ============================================================
   SHARE BAR FINAL
   ============================================================ */
.single-article .single-share-final {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: #F5F5FB;
  border: 1px solid #E0E0EE;
  border-radius: 12px;
}
.single-article .single-share-final__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888899;
  font-family: 'Barlow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.single-article .author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: #F5F5FB;
  border: 1px solid #E0E0EE;
  border-left: 4px solid #FF2D6B;
  border-radius: 12px;
  margin-top: 2rem;
}
.single-article .author-box__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #E0E0EE;
  background: #F0F0F7;
}
.single-article .author-box__info { flex: 1; }
.single-article .author-box__label {
  font-size: 11px;
  color: #FF2D6B;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.single-article .author-box__name {
  display: block;
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0B0B1E;
  text-decoration: none;
  margin-bottom: 0.5rem;
}
.single-article .author-box__name:hover { color: #FF2D6B; }
.single-article .author-box__bio {
  font-size: 0.875rem;
  color: #555568;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.single-article .author-box__link {
  font-size: 0.75rem;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FF2D6B;
  text-decoration: none;
}
.single-article .author-box__link:hover { text-decoration: underline; }

/* ============================================================
   NAVEGAÇÃO PREV/NEXT
   ============================================================ */
.single-article .post-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #EEEEF8;
}
.single-article .post-nav__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #F5F5FB;
  border: 1px solid #E0E0EE;
  border-radius: 10px;
  text-decoration: none;
  transition: all 200ms ease;
}
.single-article .post-nav__item:hover {
  border-color: #FF2D6B;
  background: #FFF5F8;
  transform: translateY(-2px);
}
.single-article .post-nav__item--next { justify-content: flex-end; text-align: right; }
.single-article .post-nav__img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.single-article .post-nav__text { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.single-article .post-nav__dir {
  font-size: 0.7rem;
  color: #FF2D6B;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.single-article .post-nav__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0B0B1E;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ad slot dentro do card branco */
.single-article .ad-slot {
  background: #F5F5FB;
  border: 1px dashed #D8D8E8;
  border-radius: 8px;
  margin: 1rem 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-single {
  position: sticky;
  top: calc(80px + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-widget {
  background: #131328;
  border: 1px solid #1E1E3A;
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #1E1E3A;
}

.sidebar-widget__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #F0F0FF;
  margin: 0;
}
.sidebar-widget__icon { font-size: 1rem; line-height: 1; }

.sidebar-widget__more {
  font-size: 0.7rem;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FF2D6B;
  text-decoration: none;
}
.sidebar-widget__more:hover { text-decoration: underline; }

/* Popular list */
.popular-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.popular-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #1E1E3A;
  transition: background 150ms;
}
.popular-list__item:last-child { border-bottom: none; }
.popular-list__item:hover { background: #1C1C38; }

.popular-list__num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  width: 26px;
  flex-shrink: 0;
  text-align: center;
  color: #2A2A4A;
}
.popular-list__num--1 { color: #FF2D6B; }
.popular-list__num--2 { color: #7B2FFF; }
.popular-list__num--3 { color: #FF6D1A; }

.popular-list__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}
.popular-list__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #1C1C38;
}
.popular-list__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.popular-list__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #E0E0F8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 150ms;
}
.popular-list__link:hover .popular-list__title { color: #FF2D6B; }
.popular-list__date {
  font-size: 0.7rem;
  color: #666680;
  font-family: 'Barlow', sans-serif;
}

/* Mini list (categoria) */
.mini-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mini-list__item {
  border-bottom: 1px solid #1E1E3A;
  transition: background 150ms;
}
.mini-list__item:last-child { border-bottom: none; }
.mini-list__item:hover { background: #1C1C38; }
.mini-list__link {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  align-items: center;
}
.mini-list__thumb {
  width: 72px;
  height: 50px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  background: #1C1C38;
}
.mini-list__thumb--placeholder {
  background: linear-gradient(135deg, #FF2D6B, #7B2FFF);
}
.mini-list__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-list__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #E0E0F8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 150ms;
}
.mini-list__link:hover .mini-list__title { color: #FF2D6B; }
.mini-list__date {
  font-size: 0.7rem;
  color: #666680;
  font-family: 'Barlow', sans-serif;
}

/* Newsletter CTA */
.sidebar-widget--newsletter {
  background: linear-gradient(160deg, #0D0B2A, #1A0533);
  border-color: rgba(123, 47, 255, 0.3);
}
.newsletter-cta {
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.newsletter-cta__icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.newsletter-cta__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #F0F0FF;
  margin-bottom: 0.4rem;
}
.newsletter-cta__desc {
  font-size: 0.8rem;
  color: #888898;
  line-height: 1.55;
  margin-bottom: 1rem;
}
.newsletter-cta__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.newsletter-cta__input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  color: #F0F0FF;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color 150ms;
}
.newsletter-cta__input::placeholder { color: #555568; }
.newsletter-cta__input:focus { border-color: #7B2FFF; }
.newsletter-cta__btn {
  width: 100%;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #FF2D6B, #7B2FFF);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 150ms ease;
}
.newsletter-cta__btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Quick list (últimas notícias) */
.quick-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}
.quick-list__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid #1E1E3A;
  transition: background 150ms;
}
.quick-list__item:last-child { border-bottom: none; }
.quick-list__item:hover { background: #1C1C38; }
.quick-list__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #E0E0F8;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 150ms;
}
.quick-list__title:hover { color: #FF2D6B; }
.quick-list__date {
  font-size: 0.68rem;
  color: #555568;
  font-family: 'Barlow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Ad slot na sidebar */
.sidebar-single .ad-slot {
  border-radius: 12px;
  overflow: hidden;
}

/* ============================================================
   POSTS RELACIONADOS E COMENTÁRIOS
   ============================================================ */
.single-page-bg .related-section,
.single-page-bg .comments-wrap {
  margin-top: 2.5rem;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.single-breadcrumb-wrap {
  border-bottom: 1px solid #1E1E3A;
}
.single-breadcrumb-wrap .breadcrumb {
  border-bottom: none;
  padding: 0.75rem 0;
  margin-bottom: 0;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1080px) {
  .single-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 900px) {
  .single-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .sidebar-single {
    position: static !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
  }
  .sidebar-single .sidebar-widget--newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .single-article__pad { padding: 1.5rem 1.25rem 0; }
  .single-article .single-header__title { font-size: 1.7rem; }
  .single-article .post-content { font-size: 1rem; line-height: 1.75; }
  .single-article .single-share-final { flex-direction: column; align-items: stretch; }
  .single-article .share-btn--lg { width: 100%; justify-content: center; }
  .single-article .author-box { flex-direction: column; align-items: center; text-align: center; }
  .single-article .post-nav { grid-template-columns: minmax(0, 1fr); }
  .sidebar-single { grid-template-columns: minmax(0, 1fr) !important; }
}
