/**
 * THE CONNECTED HAVEN - GUIDE STYLES
 *
 * Styles for guide/tutorial pages and single posts
 *
 * @package Blocksy_Child_TCH
 * @version 1.0.0
 */

/* ==========================================================================
   GUIDE HEADER
   ========================================================================== */

.tch-guide-header {
  padding: var(--space-2xl) 0;
  background: linear-gradient(135deg, var(--tch-primary) 0%, var(--tch-primary-light) 100%);
  color: var(--tch-white);
}

.tch-guide-header__breadcrumb {
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  opacity: 0.9;
}

.tch-guide-header__breadcrumb a {
  color: var(--tch-white);
  text-decoration: none;
}

.tch-guide-header__breadcrumb a:hover {
  text-decoration: underline;
}

.tch-guide-header__breadcrumb span {
  opacity: 0.7;
  margin: 0 var(--space-sm);
}

.tch-guide-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--tch-white);
}

.tch-guide-header__excerpt {
  font-size: 1.25rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 700px;
}

.tch-guide-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tch-guide-header__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
}

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

.tch-guide-header__author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.tch-guide-header__author-name {
  font-weight: 600;
}

.tch-guide-header__author-title {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

.tch-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
}

.tch-toc__title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tch-muted);
  margin-bottom: var(--space-md);
}

.tch-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tch-toc__item {
  margin-bottom: var(--space-xs);
}

.tch-toc__link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--tch-text);
  text-decoration: none;
  font-size: 0.9375rem;
  border-left: 2px solid transparent;
  margin-left: calc(var(--space-md) * -1);
  transition: all var(--transition-base);
}

.tch-toc__link:hover {
  color: var(--tch-primary);
  background: rgba(37, 99, 235, 0.05);
}

.tch-toc__link.active {
  color: var(--tch-primary);
  border-left-color: var(--tch-primary);
  background: rgba(37, 99, 235, 0.05);
}

.tch-toc__link--h3 {
  padding-left: var(--space-xl);
  font-size: 0.875rem;
}

/* ==========================================================================
   GUIDE CONTENT
   ========================================================================== */

.tch-guide-content {
  padding: var(--space-2xl) 0;
}

.tch-guide-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .tch-guide-layout {
    grid-template-columns: 250px 1fr;
  }
}

@media (min-width: 1280px) {
  .tch-guide-layout {
    grid-template-columns: 280px 1fr 280px;
  }
}

.tch-guide-main {
  max-width: 750px;
}

/* Content Typography */
.tch-guide-main 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-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--tch-light);
}

.tch-guide-main h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.tch-guide-main 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-guide-main p {
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

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

.tch-guide-main li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

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

.tch-guide-main blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border-left: 4px solid var(--tch-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.tch-guide-main blockquote p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   QUICK ANSWER BOX (Featured Snippet Target)
   ========================================================================== */

.tch-quick-answer {
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--tch-lighter) 0%, var(--tch-white) 100%);
  border: 2px solid var(--tch-primary);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-2xl);
}

.tch-quick-answer__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  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.05em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.tch-quick-answer__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-md);
}

.tch-quick-answer__content {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.tch-quick-answer__content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   KEY TAKEAWAYS BOX
   ========================================================================== */

.tch-takeaways {
  padding: var(--space-xl);
  background: var(--tch-lighter);
  border-radius: var(--radius-xl);
  margin: var(--space-2xl) 0;
}

.tch-takeaways__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-md);
}

.tch-takeaways__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tch-takeaways__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--tch-light);
}

.tch-takeaways__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tch-takeaways__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tch-accent);
  color: var(--tch-white);
  border-radius: 50%;
}

/* ==========================================================================
   PRODUCT RECOMMENDATION BOX
   ========================================================================== */

.tch-product-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--tch-white);
  border: 1px solid var(--tch-light);
  border-radius: var(--radius-xl);
  margin: var(--space-xl) 0;
}

@media (min-width: 640px) {
  .tch-product-box {
    grid-template-columns: 200px 1fr;
  }
}

.tch-product-box__image {
  aspect-ratio: 1;
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tch-product-box__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
}

.tch-product-box__badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: var(--tch-accent);
  color: var(--tch-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.tch-product-box__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-sm);
}

.tch-product-box__rating {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--tch-secondary);
}

.tch-product-box__description {
  font-size: 0.9375rem;
  color: var(--tch-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.tch-product-box__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tch-dark);
  margin-bottom: var(--space-md);
}

.tch-product-box__cta {
  display: flex;
  gap: var(--space-md);
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.tch-faq {
  margin: var(--space-2xl) 0;
}

.tch-faq__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-lg);
}

.tch-faq__item {
  border: 1px solid var(--tch-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.tch-faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--tch-dark);
  transition: background var(--transition-base);
}

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

.tch-faq__question[aria-expanded="true"] {
  background: var(--tch-primary);
  color: var(--tch-white);
}

.tch-faq__icon {
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.tch-faq__question[aria-expanded="true"] .tch-faq__icon {
  transform: rotate(180deg);
}

.tch-faq__answer {
  padding: var(--space-lg);
  display: none;
}

.tch-faq__question[aria-expanded="true"] + .tch-faq__answer {
  display: block;
}

/* ==========================================================================
   AUTHOR BIO
   ========================================================================== */

.tch-author-bio {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--tch-lighter);
  border-radius: var(--radius-xl);
  margin: var(--space-2xl) 0;
}

.tch-author-bio__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tch-author-bio__content {
  flex: 1;
  min-width: 200px;
}

.tch-author-bio__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tch-muted);
  margin-bottom: var(--space-xs);
}

.tch-author-bio__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-sm);
}

.tch-author-bio__description {
  font-size: 0.9375rem;
  color: var(--tch-muted);
  line-height: 1.6;
}

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

.tch-related-posts {
  margin: var(--space-2xl) 0;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--tch-light);
}

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