/**
 * FAQ Article Styles - RenoCanvas Help Center
 * 
 * Styles for individual FAQ article pages (spoke pages).
 * Extends the base hlp- prefix styles from hlp-styles.css.
 * 
 * Layout: Article content + Sidebar (2-column on desktop)
 * CSS Prefix: hlp- (consistent with help center)
 */

/* ==========================================================================
   CSS Custom Properties (extends hlp-styles.css)
   ========================================================================== */

:root {
    /* Using existing hlp- variables, adding article-specific ones */
    --hlp-article-max-width: 1200px;
    --hlp-sidebar-width: 320px;
    
    /* Fallback variables (if not defined in hlp-styles.css) */
    --hlp-bg-off-white: #FCFAF7;
    --hlp-bg-beige: #F5EDE0;
    --hlp-border: #E5E5E5;
}

/* ==========================================================================
   Article Page Container
   ========================================================================== */

.hlp-article-page {
    background-color: var(--hlp-bg-off-white);
}

.hlp-article-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: var(--hlp-article-max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 1024px) {
    .hlp-article-container {
        grid-template-columns: 1fr var(--hlp-sidebar-width);
        gap: 3rem;
        padding: 3rem 2rem;
    }
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.hlp-breadcrumbs {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--hlp-border);
    font-size: 0.875rem;
    color: var(--hlp-text-muted);
    flex-wrap: wrap;
}

.hlp-breadcrumbs a {
    color: var(--hlp-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.hlp-breadcrumbs a:hover {
    color: var(--hlp-primary-hover);
    text-decoration: underline;
}

.hlp-breadcrumbs svg {
    color: var(--hlp-text-muted);
    opacity: 0.5;
    flex-shrink: 0;
}

.hlp-breadcrumbs span {
    color: var(--hlp-text-dark);
}

/* ==========================================================================
   Main Article
   ========================================================================== */

.hlp-article {
    background-color: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .hlp-article {
        padding: 3rem;
    }
}

/* Article Header */
.hlp-article__header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--hlp-border);
}

/* Article Meta Row */
.hlp-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hlp-article__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hlp-primary);
    background-color: rgba(76, 117, 210, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

/* Difficulty Badge */
.hlp-article__difficulty {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.hlp-article__difficulty--beginner {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.hlp-article__difficulty--intermediate {
    background-color: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.hlp-article__difficulty--advanced {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

/* Reading Time & Views */
.hlp-article__reading-time,
.hlp-article__views {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--hlp-text-muted);
}

.hlp-article__reading-time svg,
.hlp-article__views svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.hlp-article__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hlp-text-dark);
    line-height: 1.3;
    margin: 0;
}

@media (min-width: 768px) {
    .hlp-article__title {
        font-size: 2.25rem;
    }
}

/* Article Excerpt */
.hlp-article__excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--hlp-text-muted);
    margin: 1rem 0 0 0;
}

/* Article Content */
.hlp-article__content {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--hlp-text-muted);
}

/* H2 Headings in Content */
.hlp-article__content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--hlp-text-dark);
    margin: 2rem 0 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--hlp-border);
    line-height: 1.3;
}

.hlp-article__content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

@media (min-width: 768px) {
    .hlp-article__content h2 {
        font-size: 1.5rem;
    }
}

.hlp-article__content p {
    margin-bottom: 1.25rem;
}

.hlp-article__content p:last-child {
    margin-bottom: 0;
}

.hlp-article__content strong {
    color: var(--hlp-text-dark);
    font-weight: 600;
}

/* Article Lists */
.hlp-article__list {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.hlp-article__list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.hlp-article__list li:last-child {
    margin-bottom: 0;
}

/* Ordered Lists */
ol.hlp-article__list {
    counter-reset: article-list;
    list-style: none;
    padding-left: 0;
}

ol.hlp-article__list li {
    counter-increment: article-list;
    padding-left: 2rem;
    position: relative;
}

ol.hlp-article__list li::before {
    content: counter(article-list);
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--hlp-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Unordered Lists */
ul.hlp-article__list {
    list-style: none;
    padding-left: 0;
}

ul.hlp-article__list li {
    padding-left: 1.5rem;
    position: relative;
}

ul.hlp-article__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: var(--hlp-primary);
    border-radius: 50%;
}

/* Back Link */
.hlp-article__back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--hlp-primary);
    font-weight: 500;
    text-decoration: none;
    margin-top: 1rem;
}

.hlp-article__back-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Article Navigation (Prev/Next)
   ========================================================================== */

.hlp-article__nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--hlp-border);
}

@media (min-width: 640px) {
    .hlp-article__nav {
        grid-template-columns: 1fr 1fr;
    }
}

.hlp-article__nav-link {
    display: block;
    padding: 1rem;
    background-color: var(--hlp-bg-off-white);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.hlp-article__nav-link:hover {
    background-color: var(--hlp-bg-beige);
    transform: translateY(-2px);
}

.hlp-article__nav-link--prev {
    text-align: left;
}

.hlp-article__nav-link--next {
    text-align: right;
}

@media (min-width: 640px) {
    .hlp-article__nav-link--next {
        grid-column: 2;
    }
}

.hlp-article__nav-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hlp-text-muted);
    margin-bottom: 0.25rem;
}

.hlp-article__nav-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--hlp-primary);
    line-height: 1.4;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.hlp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .hlp-sidebar {
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

/* Sidebar Sections */
.hlp-sidebar__section {
    background-color: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hlp-sidebar__section--alt {
    background-color: var(--hlp-bg-beige);
}

.hlp-sidebar__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hlp-text-dark);
    margin: 0 0 1rem 0;
}

.hlp-sidebar__text {
    font-size: 0.9375rem;
    color: var(--hlp-text-muted);
    margin: 0 0 1rem 0;
}

.hlp-sidebar__link {
    display: inline-block;
    color: var(--hlp-primary);
    font-weight: 500;
    text-decoration: none;
}

.hlp-sidebar__link:hover {
    text-decoration: underline;
}

/* Related Questions List */
.hlp-sidebar__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hlp-sidebar__list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--hlp-border);
}

.hlp-sidebar__list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hlp-sidebar__list a {
    display: block;
    color: var(--hlp-text-dark);
    font-size: 0.9375rem;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s;
}

.hlp-sidebar__list a:hover {
    color: var(--hlp-primary);
}

/* Table of Contents */
.hlp-sidebar-toc {
    border-left: 3px solid var(--hlp-primary);
}

#table-of-contents {
    margin: 0;
}

#table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#table-of-contents li {
    margin-bottom: 0.5rem;
}

#table-of-contents li:last-child {
    margin-bottom: 0;
}

#table-of-contents a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--hlp-text-muted);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    line-height: 1.4;
}

#table-of-contents a:hover {
    color: var(--hlp-primary);
    background-color: rgba(76, 117, 210, 0.08);
}

#table-of-contents a.active {
    color: var(--hlp-primary);
    background-color: rgba(76, 117, 210, 0.1);
    font-weight: 500;
}

/* Sidebar CTA */
.hlp-sidebar__cta {
    background: linear-gradient(135deg, var(--hlp-primary) 0%, #3a5cb0 100%);
    color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.hlp-sidebar__cta h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.hlp-sidebar__cta p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

.hlp-sidebar__cta-button {
    display: inline-block;
    background-color: white;
    color: var(--hlp-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.hlp-sidebar__cta-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ==========================================================================
   Mobile Adjustments
   ========================================================================== */

@media (max-width: 767px) {
    .hlp-article-container {
        padding: 1rem;
    }
    
    .hlp-article {
        padding: 1.5rem;
    }
    
    .hlp-article__title {
        font-size: 1.5rem;
    }
    
    .hlp-article__content {
        font-size: 1rem;
    }
    
    .hlp-breadcrumbs {
        font-size: 0.8125rem;
    }
}
