/**
 * THE CONNECTED HAVEN - SINGLE POST STYLES
 *
 * Styles for single blog post pages
 *
 * @package Blocksy_Child_TCH
 * @version 1.0.0
 */

/* ==========================================================================
   SINGLE POST PAGE
   ========================================================================== */

.tch-single-post {
  background: var(--tch-white);
}

/* Narrow Container */
.tch-container--narrow {
  max-width: 750px;
}

/* ==========================================================================
   ARTICLE HEADER
   ========================================================================== */

.tch-article-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}

.tch-article-category {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--tch-primary);
  color: var(--tch-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: background var(--transition-base);
}

.tch-article-category:hover {
  background: var(--tch-primary-dark);
  color: var(--tch-white);
}

.tch-article-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--tch-dark);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.tch-article-excerpt {
  font-size: 1.25rem;
  color: var(--tch-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.tch-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.tch-article-meta__author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tch-article-meta__author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.tch-article-meta__author-info {
  text-align: left;
}

.tch-article-meta__author-name {
  display: block;
  font-weight: 600;
  color: var(--tch-dark);
  font-size: 0.9375rem;
}

.tch-article-meta__author-role {
  display: block;
  font-size: 0.8125rem;
  color: var(--tch-muted);
}

.tch-article-meta__details {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tch-article-meta__date,
.tch-article-meta__reading-time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: var(--tch-muted);
}

/* ==========================================================================
   FEATURED IMAGE
   ========================================================================== */

.tch-article-featured-image {
  margin-bottom: var(--space-2xl);
}

.tch-article-featured-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  display: block;
}

/* ==========================================================================
   ARTICLE LAYOUT
   ========================================================================== */

.tch-article-layout {
  padding-bottom: var(--space-3xl);
}

.tch-article-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-3xl);
  align-items: start;
}

@media (max-width: 1024px) {
  .tch-article-grid {
    grid-template-columns: 1fr;
  }

  .tch-article-sidebar {
    display: none;
  }
}

/* ==========================================================================
   ARTICLE CONTENT
   ========================================================================== */

.tch-article-content {
  max-width: 750px;
}

.tch-article-content__inner {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--tch-text);
}

.tch-article-content__inner h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
}

.tch-article-content__inner h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--tch-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.tch-article-content__inner h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--tch-dark);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
}

.tch-article-content__inner p {
  margin-bottom: var(--space-lg);
}

.tch-article-content__inner ul,
.tch-article-content__inner ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.tch-article-content__inner li {
  margin-bottom: var(--space-sm);
}

.tch-article-content__inner a {
  color: var(--tch-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tch-article-content__inner a:hover {
  color: var(--tch-primary-dark);
}

.tch-article-content__inner img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}

.tch-article-content__inner blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: var(--tch-lighter);
  border-left: 4px solid var(--tch-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
}

.tch-article-content__inner blockquote p:last-child {
  margin-bottom: 0;
}

.tch-article-content__inner pre,
.tch-article-content__inner code {
  font-family: var(--font-mono);
}

.tch-article-content__inner code {
  padding: 0.125em 0.375em;
  background: var(--tch-lighter);
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

.tch-article-content__inner pre {
  padding: var(--space-lg);
  background: var(--tch-dark);
  color: var(--tch-lighter);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

.tch-article-content__inner pre code {
  background: transparent;
  padding: 0;
  font-size: 0.9rem;
}

/* ==========================================================================
   ARTICLE TAGS
   ========================================================================== */

.tch-article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--tch-light);
}

.tch-article-tags__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tch-muted);
}

.tch-article-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tch-article-tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: var(--tch-lighter);
  color: var(--tch-text);
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
}

.tch-article-tag:hover {
  background: var(--tch-primary);
  color: var(--tch-white);
}

/* ==========================================================================
   POST NAVIGATION
   ========================================================================== */

.tch-post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--tch-light);
}

@media (max-width: 640px) {
  .tch-post-navigation {
    grid-template-columns: 1fr;
  }
}

.tch-post-nav {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
}

.tch-post-nav:hover {
  background: var(--tch-light);
}

.tch-post-nav--prev {
  text-align: left;
}

.tch-post-nav--next {
  text-align: right;
}

.tch-post-nav__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tch-muted);
  margin-bottom: var(--space-sm);
}

.tch-post-nav--next .tch-post-nav__label {
  justify-content: flex-end;
}

.tch-post-nav__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--tch-dark);
  line-height: 1.4;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.tch-article-sidebar {
  position: relative;
}

.tch-sidebar-sticky {
  position: sticky;
  top: 100px;
}

.tch-sidebar-widget {
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.tch-sidebar-widget__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-sm);
}

.tch-sidebar-widget__description {
  font-size: 0.875rem;
  color: var(--tch-muted);
  margin-bottom: var(--space-md);
}

/* Sidebar Newsletter */
.tch-sidebar-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tch-sidebar-newsletter__form input[type="email"] {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--tch-light);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
}

.tch-sidebar-newsletter__form input[type="email"]:focus {
  border-color: var(--tch-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Sidebar Resources */
.tch-sidebar-resources__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tch-sidebar-resources__list li {
  margin-bottom: var(--space-sm);
}

.tch-sidebar-resources__list a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--tch-text);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--transition-base);
}

.tch-sidebar-resources__list a:hover {
  color: var(--tch-primary);
}

.tch-sidebar-resources__list svg {
  color: var(--tch-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   RELATED POSTS
   ========================================================================== */

.tch-related-posts {
  padding: var(--space-3xl) 0;
  background: var(--tch-lighter);
}

.tch-related-posts__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--tch-dark);
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */

.tch-comments-section {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--tch-light);
}

.tch-comments-section .comments-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-xl);
}

.tch-comments-section .comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tch-comments-section .comment {
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
}

.tch-comments-section .comment-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.tch-comments-section .comment-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.tch-comments-section .fn {
  font-weight: 600;
  color: var(--tch-dark);
}

.tch-comments-section .comment-metadata {
  font-size: 0.8125rem;
  color: var(--tch-muted);
}

.tch-comments-section .comment-content {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.tch-comments-section .reply a {
  font-size: 0.875rem;
  color: var(--tch-primary);
  text-decoration: none;
}

.tch-comments-section .comment-respond {
  margin-top: var(--space-xl);
}

.tch-comments-section .comment-reply-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-lg);
}

.tch-comments-section .comment-form input[type="text"],
.tch-comments-section .comment-form input[type="email"],
.tch-comments-section .comment-form input[type="url"],
.tch-comments-section .comment-form textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--tch-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.tch-comments-section .comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.tch-comments-section .comment-form input:focus,
.tch-comments-section .comment-form textarea:focus {
  border-color: var(--tch-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tch-comments-section .form-submit input[type="submit"] {
  background: var(--tch-primary);
  color: var(--tch-white);
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-base);
}

.tch-comments-section .form-submit input[type="submit"]:hover {
  background: var(--tch-primary-dark);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
  .tch-article-header {
    padding: var(--space-xl) 0;
  }

  .tch-article-title {
    font-size: 1.75rem;
  }

  .tch-article-excerpt {
    font-size: 1.125rem;
  }

  .tch-article-meta {
    flex-direction: column;
    gap: var(--space-md);
  }

  .tch-article-content__inner {
    font-size: 1rem;
  }

  .tch-article-content__inner h2 {
    font-size: 1.5rem;
  }

  .tch-article-content__inner h3 {
    font-size: 1.25rem;
  }
}