/* ==========================================================================
   Vida Celular - Single Post Styles
   ==========================================================================
   Styles specific to single article / post pages.
   Uses CSS custom properties (--vc-*) from style.css.
   ========================================================================== */


/* ==========================================================================
   1. Article Header
   ========================================================================== */

.single-article {
  padding-top: 1rem;
}

.single-article__header {
  padding: 2rem 0;
}

.single-article__title {
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-3xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--vc-foreground);
  margin-bottom: 1rem;
}

.single-article__subtitle {
  font-size: var(--vc-text-lg);
  color: var(--vc-muted-foreground);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .single-article__title {
    font-size: var(--vc-text-4xl);
  }
}


/* ==========================================================================
   2. Post Meta
   ========================================================================== */

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--vc-text-sm);
  color: var(--vc-muted-foreground);
  flex-wrap: wrap;
}

.post-meta__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-meta__author {
  font-weight: 600;
  color: var(--vc-foreground);
}

.post-meta__author a {
  color: var(--vc-foreground);
  text-decoration: none;
}

.post-meta__author a:hover {
  color: var(--vc-primary);
}

.post-meta__separator {
  color: var(--vc-border);
}

.post-meta__date,
.post-meta__reading-time {
  color: var(--vc-muted-foreground);
}

.post-meta__category {
  display: inline-flex;
  align-items: center;
}


/* ==========================================================================
   3. Featured Image
   ========================================================================== */

.single-article__featured-image {
  margin-bottom: 2rem;
  border-radius: var(--vc-radius-lg);
  overflow: hidden;
}

.single-article__featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.single-article__featured-image figcaption {
  font-size: var(--vc-text-sm);
  color: var(--vc-muted-foreground);
  padding: 0.75rem 0;
  text-align: center;
}


/* ==========================================================================
   4. Post Content - Enhanced Readability
   ========================================================================== */

.post-content {
  font-size: var(--vc-text-base);
  line-height: 1.8;
  color: var(--vc-foreground);
  max-width: 720px;
}

.post-content > * + * {
  margin-top: 1.25rem;
}

/* Headings */
.post-content h2 {
  font-size: var(--vc-text-2xl);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-content h3 {
  font-size: var(--vc-text-xl);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.post-content h4 {
  font-size: var(--vc-text-lg);
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

/* Paragraphs */
.post-content p {
  margin-bottom: 1.25rem;
}

/* Links */
.post-content a {
  color: var(--vc-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--vc-transition);
}

.post-content a:hover {
  color: var(--vc-primary-dark);
}

/* Lists */
.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.post-content li::marker {
  color: var(--vc-primary);
}

/* Blockquotes */
.post-content blockquote {
  border-left: 4px solid var(--vc-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--vc-surface);
  border-radius: 0 var(--vc-radius) var(--vc-radius) 0;
  font-style: italic;
  color: var(--vc-muted-foreground);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Images */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--vc-radius);
  margin: 1.5rem 0;
}

.post-content figure {
  margin: 1.5rem 0;
}

.post-content figcaption {
  font-size: var(--vc-text-sm);
  color: var(--vc-muted-foreground);
  text-align: center;
  margin-top: 0.5rem;
}

/* Code */
.post-content code {
  font-family: var(--vc-font-mono);
  font-size: 0.875em;
  background: var(--vc-muted);
  padding: 0.15em 0.4em;
  border-radius: var(--vc-radius-sm);
}

.post-content pre {
  background: var(--vc-muted);
  padding: 1.25rem;
  border-radius: var(--vc-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--vc-text-sm);
}

.post-content thead {
  background: var(--vc-surface);
}

.post-content th,
.post-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--vc-border);
}

.post-content th {
  font-weight: 600;
  color: var(--vc-foreground);
}

/* Horizontal Rule */
.post-content hr {
  border: none;
  border-top: 1px solid var(--vc-border);
  margin: 2rem 0;
}

/* WordPress specific blocks */
.post-content .wp-block-image {
  margin: 1.5rem 0;
}

.post-content .wp-block-image img {
  margin: 0;
}

.post-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.post-content .aligncenter {
  text-align: center;
}

.post-content .alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.post-content .alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}


/* ==========================================================================
   5. Video Wrapper (Responsive)
   ========================================================================== */

.video-wrapper,
.post-content .wp-block-embed,
.post-content iframe {
  max-width: 100%;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--vc-radius-lg);
  margin: 1.5rem 0;
}

.video-wrapper iframe,
.video-wrapper video,
.video-wrapper object,
.video-wrapper embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* ==========================================================================
   6. Share / Social Bar
   ========================================================================== */

.single-article__share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--vc-border);
  border-bottom: 1px solid var(--vc-border);
  margin: 2rem 0;
}

.single-article__share-label {
  font-size: var(--vc-text-sm);
  font-weight: 600;
  color: var(--vc-muted-foreground);
}

.single-article__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vc-surface);
  color: var(--vc-foreground);
  border: none;
  cursor: pointer;
  transition: var(--vc-transition);
}

.single-article__share-btn:hover {
  background: var(--vc-primary);
  color: #fff;
}

.single-article__share-btn svg {
  width: 18px;
  height: 18px;
}


/* ==========================================================================
   7. Author Box
   ========================================================================== */

.author-box {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--vc-surface);
  border-radius: var(--vc-radius-lg);
  margin: 2rem 0;
}

.author-box__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-box__name {
  font-family: var(--vc-font-display);
  font-weight: 700;
  font-size: var(--vc-text-lg);
  margin-bottom: 0.25rem;
}

.author-box__bio {
  font-size: var(--vc-text-sm);
  color: var(--vc-muted-foreground);
  line-height: 1.6;
}


/* ==========================================================================
   8. Related Posts Grid
   ========================================================================== */

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--vc-border);
}

.related-posts__title {
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-2xl);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.related-posts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .related-posts__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-posts__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ==========================================================================
   9. Comments Section
   ========================================================================== */

.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--vc-border);
}

.comments-area__title {
  font-family: var(--vc-font-display);
  font-size: var(--vc-text-2xl);
  font-weight: 700;
  margin-bottom: 1.5rem;
}


/* ==========================================================================
   10. Table of Contents (optional sidebar widget)
   ========================================================================== */

.toc {
  background: var(--vc-surface);
  border-radius: var(--vc-radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.toc__title {
  font-family: var(--vc-font-display);
  font-weight: 700;
  font-size: var(--vc-text-base);
  margin-bottom: 0.75rem;
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc__list li {
  margin-bottom: 0.25rem;
}

.toc__list a {
  font-size: var(--vc-text-sm);
  color: var(--vc-muted-foreground);
  text-decoration: none;
  transition: color var(--vc-transition);
  display: block;
  padding: 0.25rem 0;
}

.toc__list a:hover {
  color: var(--vc-primary);
}

.toc__list .toc__sub {
  padding-left: 1rem;
}
