/* ===================================================
   GUIDE DETAIL PAGE - CreatorFlow
   ===================================================
   Brand Guidelines:
   - NO box-shadows (except box-shadow: none to remove inherited)
   - ONLY #000000 for dark backgrounds
   - Lime green #d1fe17 for accents/badges
   - neusanstrial font for headings
   =================================================== */

/* ===== CSS VARIABLES ===== */
:root {
    --guide-lime: #d1fe17;
    --guide-black: #000000;
    --guide-white: #ffffff;
    --guide-gray-50: #f9fafb;
    --guide-gray-100: #f3f4f6;
    --guide-gray-200: #e5e7eb;
    --guide-gray-600: #4b5563;
    --guide-gray-700: #374151;
}

/* ===== HERO SECTION ===== */
.guide-detail-hero {
    padding: 9rem 0 2.5rem;
    background: var(--guide-white);
    text-align: center;
}

.guide-detail-hero__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Breadcrumb */
.guide-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
}

.breadcrumb-link {
    color: var(--guide-gray-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--guide-black);
}

.breadcrumb-separator {
    color: var(--guide-gray-200);
}

.breadcrumb-current {
    color: var(--guide-black);
    font-weight: 500;
}

.guide-detail-hero__badge {
    display: inline-block;
    background: var(--guide-black);
    color: var(--guide-lime);
    padding: 0.375rem 0.875rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.guide-detail-hero__title {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    color: var(--guide-black) !important;
    margin: 0 0 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.guide-detail-hero__subtitle {
    font-size: clamp(0.9375rem, 2.5vw, 1.125rem);
    color: var(--guide-gray-600);
    margin: 0 0 1.5rem;
    line-height: 1.6;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Author byline */
.guide-detail-hero__author {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--guide-gray-600);
    margin-bottom: 1.5rem;
}

.author-link {
    color: var(--guide-black);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.author-link:hover {
    color: var(--guide-gray-600);
}

.author-separator {
    color: var(--guide-gray-200);
}

.author-credential,
.author-date {
    color: var(--guide-gray-600);
}

.guide-detail-hero__cta {
    margin-top: 1rem;
}

/* ===== MAIN LAYOUT ===== */
.guide-detail-layout {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    gap: 2.5rem;
    align-items: flex-start;
}

/* ===== TOC SIDEBAR ===== */
.guide-detail-toc {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-top: 0.25rem;
}

.toc-header {
    margin-bottom: 1rem;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--guide-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: block;
    font-size: 0.8125rem;
    color: var(--guide-gray-600);
    text-decoration: none;
    padding: 0.375rem 0;
    padding-left: 0.75rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.toc-link:hover {
    color: var(--guide-black);
    border-left-color: var(--guide-gray-200);
}

.toc-link.active {
    color: var(--guide-black);
    font-weight: 500;
    border-left-color: var(--guide-lime);
}

/* ===== MAIN CONTENT ===== */
.guide-detail-main {
    flex: 1;
    min-width: 0;
    max-width: 750px;
    padding-top: 0;
}

/* TL;DR Box */
.guide-tldr {
    display: flex;
    gap: 1rem;
    background: var(--guide-gray-50);
    border: 1px solid var(--guide-gray-200);
    border-left: 3px solid var(--guide-lime);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.tldr-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tldr-label {
    color: var(--guide-black);
    font-weight: 600;
}

.tldr-text {
    color: var(--guide-gray-700);
    line-height: 1.6;
}

/* Guide Sections */
.guide-section {
    margin-bottom: 2.25rem;
}

.guide-section:first-of-type {
    margin-top: 0;
}

.guide-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--guide-black);
    margin: 0 0 1rem;
    line-height: 1.25;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.guide-section__intro,
.guide-section__text {
    font-size: 1rem;
    color: var(--guide-gray-700);
    line-height: 1.7;
    margin: 0 0 1rem;
}

.guide-section__text:last-child {
    margin-bottom: 0;
}

.guide-section__text strong {
    color: var(--guide-black);
    font-weight: 600;
}

/* Stats Grid */
.guide-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.guide-stat {
    background: var(--guide-white);
    border: 1px solid var(--guide-gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--guide-black);
    margin-bottom: 0.25rem;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--guide-gray-600);
    line-height: 1.35;
}

.stat-source {
    display: inline-block;
    font-size: 0.6875rem;
    color: var(--guide-gray-600);
    text-decoration: underline;
    margin-top: 0.25rem;
}

/* Items Grid */
.guide-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.guide-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--guide-gray-50);
    border: 1px solid var(--guide-gray-200);
    border-radius: 0.5rem;
}

.item-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--guide-black);
    margin: 0 0 0.25rem;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.item-text {
    font-size: 0.8125rem;
    color: var(--guide-gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Steps */
.guide-steps {
    margin-top: 1.25rem;
}

.guide-step {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--guide-gray-200);
}

.guide-step:first-child {
    padding-top: 0;
}

.guide-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--guide-black);
    color: var(--guide-lime);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.step-content {
    padding-top: 0.25rem;
}

.step-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--guide-black);
    margin: 0 0 0.25rem;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.step-description {
    font-size: 0.875rem;
    color: var(--guide-gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Callout Box */
.guide-callout {
    display: flex;
    gap: 0.75rem;
    background: var(--guide-lime);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

.callout-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.callout-title {
    color: var(--guide-black);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.callout-text {
    font-size: 0.9375rem;
    color: var(--guide-black);
    line-height: 1.5;
    margin: 0;
}

/* Mid-Page CTA */
.guide-mid-cta {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--guide-gray-50);
    border: 1px solid var(--guide-gray-200);
    border-radius: 0.75rem;
    margin: 2rem 0;
}

.mid-cta-headline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--guide-black);
    margin: 0 0 1rem;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.mid-cta-microcopy {
    font-size: 0.8125rem;
    color: var(--guide-gray-600);
    margin: 0.75rem 0 0;
}

/* ===== NAVIGATION ===== */
.guide-navigation {
    background: var(--guide-gray-50);
    padding: 1.5rem 0;
}

.guide-navigation__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: var(--guide-white);
    border: 1px solid var(--guide-gray-200);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: border-color 0.2s ease;
    flex: 1;
    max-width: 45%;
}

.nav-prev:hover,
.nav-next:hover {
    border-color: var(--guide-lime);
}

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

.nav-label {
    font-size: 0.75rem;
    color: var(--guide-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nav-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--guide-black);
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nav-placeholder {
    flex: 1;
    max-width: 45%;
}

/* ===== RELATED GUIDES ===== */
.guide-related {
    padding: 2rem 0;
    background: var(--guide-white);
}

.guide-related__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--guide-black);
    margin: 0 0 1.5rem;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--guide-gray-50);
    border: 1px solid var(--guide-gray-200);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-card:hover {
    border-color: var(--guide-lime);
    background: var(--guide-white);
}

.related-card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--guide-black);
}

.related-card-arrow::after {
    content: '\2192';
    color: var(--guide-gray-600);
    transition: transform 0.2s ease;
}

.related-card:hover .related-card-arrow::after {
    transform: translateX(3px);
}

/* ===== FAQ SECTION ===== */
.guide-faq-section {
    padding: 2.5rem 0;
    background: var(--guide-gray-50);
}

.guide-faq__container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

.guide-faq__title {
    font-size: clamp(1.375rem, 4vw, 1.75rem);
    font-weight: 700;
    color: var(--guide-black);
    text-align: center;
    margin: 0 0 2rem;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.guide-faq-section .faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.guide-faq-section .faq-item {
    background: var(--guide-white);
    border: 1px solid var(--guide-gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.guide-faq-section .faq-item:hover,
.guide-faq-section .faq-item[open] {
    border-color: var(--guide-lime);
}

.guide-faq-section .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--guide-black);
    cursor: pointer;
    list-style: none;
    font-family: 'neusanstrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.guide-faq-section .faq-question::-webkit-details-marker {
    display: none;
}

.guide-faq-section .faq-question .faq-icon {
    font-size: 1.25rem;
    color: var(--guide-gray-600);
    transition: transform 0.2s ease;
}

.guide-faq-section .faq-item[open] .faq-question .faq-icon {
    transform: rotate(45deg);
    color: var(--guide-lime);
}

.guide-faq-section .faq-answer {
    padding: 0 1.25rem 1.25rem;
}

.guide-faq-section .faq-answer p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--guide-gray-600);
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .guide-detail-toc {
        display: none;
    }

    .guide-detail-layout {
        padding: 1.5rem;
    }

    .guide-detail-main {
        max-width: 100%;
    }

    .guide-items-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .guide-detail-hero {
        padding: 7rem 0 1.5rem;
    }

    .guide-detail-hero__container {
        padding: 0 2rem;
    }

    .guide-detail-hero__badge {
        font-size: 0.6875rem;
        padding: 0.3rem 0.625rem;
    }

    .guide-detail-hero__title {
        font-size: 1.375rem;
    }

    .guide-detail-hero__subtitle {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .guide-detail-hero__author {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .guide-breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .guide-detail-layout {
        padding: 1.25rem 1rem;
    }

    .guide-section {
        margin-bottom: 1.75rem;
    }

    .guide-section__title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .guide-section__intro,
    .guide-section__text {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .guide-tldr {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
        margin-bottom: 1.5rem;
    }

    .tldr-icon {
        font-size: 1.25rem;
    }

    .tldr-label,
    .tldr-text {
        font-size: 0.875rem;
    }

    .guide-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .guide-stat {
        padding: 0.75rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.625rem;
    }

    .guide-item {
        padding: 0.75rem;
    }

    .item-icon {
        font-size: 1rem;
    }

    .item-title {
        font-size: 0.8125rem;
    }

    .item-text {
        font-size: 0.75rem;
    }

    .guide-step {
        padding: 0.75rem 0;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.6875rem;
    }

    .step-title {
        font-size: 0.875rem;
    }

    .step-description {
        font-size: 0.8125rem;
    }

    .guide-callout {
        padding: 0.875rem 1rem;
    }

    .callout-icon {
        font-size: 1rem;
    }

    .callout-title {
        font-size: 0.875rem;
    }

    .callout-text {
        font-size: 0.8125rem;
    }

    .guide-mid-cta {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }

    .mid-cta-headline {
        font-size: 1rem;
    }

    .mid-cta-microcopy {
        font-size: 0.75rem;
    }

    .guide-navigation {
        padding: 1.25rem 0;
    }

    .guide-navigation__container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .nav-prev,
    .nav-next {
        max-width: 100%;
        padding: 0.875rem 1rem;
    }

    .nav-next {
        text-align: left;
    }

    .nav-label {
        font-size: 0.6875rem;
    }

    .nav-title {
        font-size: 0.875rem;
    }

    .guide-related {
        padding: 1.5rem 0;
    }

    .guide-related__container {
        padding: 0 1rem;
    }

    .related-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .related-card {
        padding: 0.875rem 1rem;
    }

    .related-card-title {
        font-size: 0.875rem;
    }

    .guide-faq-section {
        padding: 1.5rem 0;
    }

    .guide-faq__container {
        padding: 0 1rem;
    }

    .guide-faq__title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .guide-faq-section .faq-question {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .guide-faq-section .faq-answer {
        padding: 0 1rem 1rem;
    }

    .guide-faq-section .faq-answer p {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .guide-detail-hero {
        padding: 6.5rem 0 1.25rem;
    }

    .guide-detail-hero__container {
        padding: 0 1.5rem;
    }

    .guide-detail-hero__badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }

    .guide-detail-hero__title {
        font-size: 1.25rem;
    }

    .guide-detail-hero__subtitle {
        font-size: 0.8125rem;
    }

    .guide-detail-layout {
        padding: 1rem 0.875rem;
    }

    .guide-section {
        margin-bottom: 1.5rem;
    }

    .guide-section__title {
        font-size: 1rem;
    }

    .guide-section__intro,
    .guide-section__text {
        font-size: 0.8125rem;
    }

    .guide-tldr {
        padding: 0.75rem 0.875rem;
    }

    .guide-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }

    .guide-stat {
        padding: 0.625rem;
    }

    .stat-value {
        font-size: 0.9375rem;
    }

    .stat-label {
        font-size: 0.5625rem;
    }

    .guide-item {
        padding: 0.625rem 0.75rem;
    }

    .guide-step {
        gap: 0.625rem;
    }

    .step-number {
        width: 26px;
        height: 26px;
        font-size: 0.625rem;
    }

    .step-content {
        padding-top: 0;
    }

    .step-title {
        font-size: 0.8125rem;
    }

    .step-description {
        font-size: 0.75rem;
    }

    .guide-callout {
        padding: 0.75rem 0.875rem;
    }

    .guide-mid-cta {
        padding: 1.25rem 1rem;
        margin: 1.25rem 0;
    }

    .mid-cta-headline {
        font-size: 0.9375rem;
    }

    .guide-navigation__container {
        gap: 0.375rem;
    }

    .nav-prev,
    .nav-next {
        padding: 0.75rem 0.875rem;
    }

    .guide-faq__title {
        font-size: 1rem;
    }

    .guide-faq-section .faq-list {
        gap: 0.5rem;
    }

    .guide-faq-section .faq-question {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
    }

    .guide-faq-section .faq-answer {
        padding: 0 0.875rem 0.875rem;
    }

    .guide-faq-section .faq-answer p {
        font-size: 0.75rem;
    }
}

/* ===== EXTRA SMALL MOBILE: 360px ===== */
@media (max-width: 360px) {
    .guide-detail-hero__container {
        padding: 0 1.25rem;
    }
}

/* ===== RELATED PAGES SECTION (Internal Linking for SEO) ===== */
.related-pages-section {
  padding: 4rem 0;
  background: #f9fafb;
}

.related-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.related-page-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.related-page-card:hover {
  border-color: #000000;
  background: #fafafa;
}

.related-page-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #000000;
}

.related-page-arrow {
  font-size: 1.25rem;
  color: #6b7280;
  transition: transform 0.2s ease, color 0.2s ease;
}

.related-page-card:hover .related-page-arrow {
  transform: translateX(4px);
  color: #000000;
}

@media (max-width: 640px) {
  .related-pages-section {
    padding: 3rem 0;
  }

  .related-pages-grid {
    grid-template-columns: 1fr;
  }
}
