/* ============================================
   YouTellBrisk - Articles & Reviews Styles
   Extends styles.css — Soft UI Style
   Fonts: Lexend (body) + Red Hat Display (heading)
   ============================================ */

/* ============================================
   1. BREADCRUMBS (extends .m-breadcrumb)
   ============================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft-sm);
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.breadcrumbs span.sep {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.breadcrumbs span.current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   2. ARTICLE HEADER
   ============================================ */
.article-header {
    margin-bottom: var(--space-2xl);
    text-align: center;
}

.article-header__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: var(--bg-darker);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-soft-sm);
}

.article-header__title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

.article-header__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.article-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.article-header__meta-icon {
    font-size: 1rem;
}

.article-header__reading-time {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   3. ARTICLE BODY
   ============================================ */
.article-body {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-soft);
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-secondary);
}

.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(163, 177, 198, 0.25);
    position: relative;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.article-body h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.article-body p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.article-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: var(--space-lg);
}

.article-body ul li {
    position: relative;
    padding-left: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    box-shadow: var(--shadow-soft-sm);
}

.article-body ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-lg);
    counter-reset: article-counter;
}

.article-body ol li {
    counter-increment: article-counter;
    position: relative;
    padding-left: var(--space-sm);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

.article-body ol li::marker {
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-heading);
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
    text-underline-offset: 3px;
    transition: var(--transition);
}

.article-body a:hover {
    color: var(--primary-dark);
    text-decoration-color: var(--primary-dark);
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body em {
    font-style: italic;
    color: var(--text-secondary);
}

.article-body blockquote {
    background: var(--bg-darker);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-soft-sm);
    font-style: italic;
    color: var(--text-secondary);
}

.article-body blockquote p {
    margin-bottom: 0;
}

.article-body blockquote p:not(:last-child) {
    margin-bottom: var(--space-sm);
}

/* ============================================
   4. ARTICLE BODY TABLES
   ============================================ */
.article-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--space-xl) 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.article-body table thead {
    background: var(--bg-darker);
}

.article-body table th {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    white-space: nowrap;
}

.article-body table td {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
}

.article-body table tbody tr:last-child td {
    border-bottom: none;
}

.article-body table tbody tr:hover {
    background: var(--bg-darker);
    transition: var(--transition);
}

/* Extends existing .m-table for article context */
.article-body .m-table {
    box-shadow: var(--shadow-soft);
}

.article-body .m-table th {
    background: var(--bg-darker);
    box-shadow: none;
}

/* ============================================
   5. TABLE OF CONTENTS (TOC)
   ============================================ */
.toc {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-soft);
    position: relative;
}

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

.toc__title::before {
    content: '📑';
    font-size: 1.25rem;
}

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

.toc__list li {
    counter-increment: toc-counter;
    margin-bottom: var(--space-xs);
}

.toc__list li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toc__list li a::before {
    content: counter(toc-counter) '.';
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-light);
    min-width: 22px;
}

.toc__list li a:hover {
    background: var(--bg-darker);
    color: var(--primary);
    box-shadow: var(--shadow-soft-sm);
}

.toc__list li a.is-active {
    background: var(--bg-darker);
    color: var(--primary);
    box-shadow: var(--shadow-soft-inset);
}

/* Nested TOC items */
.toc__list .toc__sublist {
    list-style: none;
    padding-left: var(--space-xl);
    margin: 0;
    counter-reset: toc-sub-counter;
}

.toc__list .toc__sublist li {
    counter-increment: toc-sub-counter;
}

.toc__list .toc__sublist li a::before {
    content: counter(toc-counter) '.' counter(toc-sub-counter);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toc__list .toc__sublist li a {
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-md);
}

/* Toggle TOC on mobile */
.toc__toggle {
    display: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

/* ============================================
   6. SIDEBAR
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.sidebar__widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-soft);
}

.sidebar__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(163, 177, 198, 0.25);
}

/* Related Articles Widget */
.sidebar__related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sidebar__related-item {
    margin: 0;
}

.sidebar__related-link {
    display: block;
    padding: var(--space-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
    box-shadow: var(--shadow-soft-sm);
    transition: var(--transition);
    line-height: 1.5;
}

.sidebar__related-link:hover {
    color: var(--primary);
    box-shadow: var(--shadow-soft-inset);
    transform: translateY(-1px);
}

.sidebar__related-link .sidebar__related-category {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-light);
    margin-bottom: 2px;
}

/* Provider Info Widget */
.sidebar__provider-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.sidebar__provider-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
}

.sidebar__provider-stat:last-child {
    border-bottom: none;
}

.sidebar__provider-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar__provider-value {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* CTA Widget */
.sidebar__cta {
    text-align: center;
    background: var(--bg-darker);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-soft);
}

.sidebar__cta-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-left: auto;
    margin-right: auto;
    background: var(--bg-card);
    border-radius: 50%;
    box-shadow: var(--shadow-soft-inset);
}

.sidebar__cta-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.sidebar__cta-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

/* Tags Widget */
.sidebar__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.sidebar__tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft-sm);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar__tag:hover {
    color: var(--primary);
    box-shadow: var(--shadow-soft-inset);
}

/* ============================================
   7. ARTICLE LAYOUT (with sidebar)
   ============================================ */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-2xl);
    align-items: start;
}

.article-layout__main {
    min-width: 0;
}

.article-layout__sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
}

/* ============================================
   8. ARTICLE IMAGE / FIGURE
   ============================================ */
.article-body figure {
    margin: var(--space-xl) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.article-body figure img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body figcaption {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--bg-darker);
    font-style: italic;
}

/* ============================================
   9. ARTICLE CODE BLOCKS
   ============================================ */
.article-body code {
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    background: var(--bg-darker);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft-sm);
}

.article-body pre {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    overflow-x: auto;
    box-shadow: var(--shadow-soft-inset);
}

.article-body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ============================================
   10. ARTICLE INFO BOXES / CALLOUTS
   ============================================ */
.article-body .info-box {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-soft-sm);
    border-left: 4px solid var(--primary);
}

.article-body .info-box--tip {
    border-left-color: var(--secondary);
}

.article-body .info-box--warning {
    border-left-color: var(--accent);
}

.article-body .info-box p {
    margin-bottom: 0;
}

.article-body .info-box p:not(:last-child) {
    margin-bottom: var(--space-sm);
}

/* ============================================
   11. ARTICLE NAVIGATION (Prev/Next)
   ============================================ */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 2px solid rgba(163, 177, 198, 0.25);
}

.article-nav__item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.article-nav__item:hover {
    box-shadow: var(--shadow-soft-lg);
    transform: translateY(-2px);
}

.article-nav__item--next {
    text-align: right;
}

.article-nav__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.article-nav__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
}

/* ============================================
   12. ARTICLE SHARE
   ============================================ */
.article-share {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 2px solid rgba(163, 177, 198, 0.25);
}

.article-share__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.article-share__buttons {
    display: flex;
    gap: var(--space-sm);
}

.article-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    border-radius: 50%;
    box-shadow: var(--shadow-soft-sm);
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text-secondary);
}

.article-share__btn:hover {
    box-shadow: var(--shadow-soft-inset);
    color: var(--primary);
}

/* ============================================
   13. REVIEW-SPECIFIC STYLES (extends review-hero)
   ============================================ */
.article-body .review-rating-box {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-soft-sm);
}

.article-body .review-rating-box__score {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.article-body .review-rating-box__details {
    flex: 1;
}

.article-body .review-rating-box__stars {
    color: #ffc107;
    font-size: 1.25rem;
    letter-spacing: 2px;
    margin-bottom: var(--space-xs);
}

.article-body .review-rating-box__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Pros & Cons boxes */
.article-body .pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.article-body .pros-box,
.article-body .cons-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
}

.article-body .pros-box {
    border-top: 4px solid var(--secondary);
}

.article-body .cons-box {
    border-top: 4px solid var(--accent);
}

.article-body .pros-box__title,
.article-body .cons-box__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.article-body .pros-box__title {
    color: var(--secondary);
}

.article-body .cons-box__title {
    color: var(--accent);
}

.article-body .pros-box ul,
.article-body .cons-box ul {
    margin-bottom: 0;
}

.article-body .pros-box ul li::before {
    background: var(--secondary);
}

.article-body .cons-box ul li::before {
    background: var(--accent);
}

/* ============================================
   14. NOTIFICATION STYLES (for auth.js)
   ============================================ */
.m-notification {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-md);
    z-index: 3000;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-soft-lg);
    transform: translateX(120%);
    transition: transform 0.4s ease;
    max-width: 360px;
}

.m-notification.show {
    transform: translateX(0);
}

.m-notification__content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.m-notification__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-darker);
    box-shadow: var(--shadow-soft-inset);
    font-size: 1rem;
    flex-shrink: 0;
}

.m-notification__message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.m-notification--success {
    border-left: 4px solid var(--secondary);
}

.m-notification--error {
    border-left: 4px solid var(--accent);
}

.m-notification--info {
    border-left: 4px solid var(--primary);
}

.m-notification--warning {
    border-left: 4px solid #fdcb6e;
}

.m-notification--xp {
    border-left: 4px solid #ffc107;
}

.m-notification--level {
    border-left: 4px solid var(--primary);
    background: var(--bg-darker);
}

/* ============================================
   15. RESPONSIVE — ARTICLES
   ============================================ */
@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-layout__sidebar {
        position: static;
        order: -1;
    }

    .article-header__title {
        font-size: 1.875rem;
    }

    .article-body .pros-cons {
        grid-template-columns: 1fr;
    }

    .article-body .review-rating-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .article-body {
        padding: var(--space-lg);
    }

    .article-header__title {
        font-size: 1.5rem;
    }

    .article-body h2 {
        font-size: 1.3rem;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    .article-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .article-nav {
        grid-template-columns: 1fr;
    }

    .article-nav__item--next {
        text-align: left;
    }

    .toc {
        padding: var(--space-md);
    }

    .toc__title {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .toc__toggle {
        display: inline-block;
    }

    .toc__list {
        display: none;
    }

    .toc.is-active .toc__list {
        display: block;
        margin-top: var(--space-md);
    }

    .breadcrumbs {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
    }

    .sidebar__widget {
        padding: var(--space-lg);
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .m-notification {
        right: var(--space-sm);
        left: var(--space-sm);
        max-width: none;
    }
}

@media (max-width: 480px) {
    .article-body {
        padding: var(--space-md);
    }

    .article-header__title {
        font-size: 1.375rem;
    }

    .article-body h2 {
        font-size: 1.2rem;
    }

    .article-body h3 {
        font-size: 1rem;
    }

    .article-body ul li {
        padding-left: var(--space-lg);
    }

    .article-body ul li::before {
        left: 4px;
        top: 10px;
        width: 6px;
        height: 6px;
    }

    .toc__list li a {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.85rem;
    }
}