/* ==========================================================================
   TallComic — Articles & Reviews Supplementary Styles
   Extends styles.css — uses same CSS variables and BEM m- prefix
   Fonts: Playfair Display (headings) + Montserrat (body)
   Palette: Dark #1a1a2e, Gold #d4af37, Deep Navy #16213e
   ========================================================================== */

/* ==========================================================================
   1. BREADCRUMBS (extends .m-breadcrumb from styles.css)
   ========================================================================== */

.m-breadcrumb {
    padding: var(--space-sm) 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.m-breadcrumb::-webkit-scrollbar {
    display: none;
}

.m-breadcrumb__link {
    position: relative;
    padding-bottom: 2px;
}

.m-breadcrumb__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width var(--transition);
}

.m-breadcrumb__link:hover::after {
    width: 100%;
}

.m-breadcrumb__current {
    font-weight: 500;
}

/* ==========================================================================
   2. ARTICLE HEADER
   ========================================================================== */

.m-page-title {
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.m-content-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xl);
}

/* ==========================================================================
   3. ARTICLE BODY — Typography Enhancements
   ========================================================================== */

/* Headings within articles */
.m-content-card h2 {
    position: relative;
    padding-left: var(--space-md);
}

.m-content-card h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.m-content-card h2:first-child::before {
    display: block;
}

.m-content-card h3 {
    position: relative;
    padding-left: var(--space-sm);
}

.m-content-card h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--primary-light);
    border-radius: 1px;
    opacity: 0.6;
}

/* Paragraphs */
.m-content-card p {
    text-align: left;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.m-content-card p + p {
    margin-top: var(--space-sm);
}

/* Links within articles */
.m-content-card a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all var(--transition);
}

.m-content-card a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

/* Unordered and ordered lists */
.m-content-card ul {
    list-style: none;
    padding-left: 0;
}

.m-content-card ul li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.m-content-card ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-size: 0.6rem;
    line-height: 1.7;
    opacity: 0.8;
}

.m-content-card ol {
    padding-left: var(--space-lg);
    counter-reset: article-counter;
    list-style: none;
}

.m-content-card ol li {
    position: relative;
    padding-left: var(--space-md);
    counter-increment: article-counter;
    margin-bottom: var(--space-sm);
}

.m-content-card ol li::before {
    content: counter(article-counter) '.';
    position: absolute;
    left: calc(-1 * var(--space-md));
    top: 0;
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

/* Nested lists */
.m-content-card ul ul,
.m-content-card ol ul {
    margin-top: var(--space-sm);
    margin-bottom: 0;
}

.m-content-card ul ul li::before {
    content: '–';
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Strong and emphasis within articles */
.m-content-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.m-content-card em {
    color: var(--primary-light);
    font-style: italic;
}

/* ==========================================================================
   4. TABLES — Article Data Tables
   ========================================================================== */

.m-content-card table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 0.9rem;
}

.m-content-card thead tr {
    background: rgba(212, 175, 55, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.m-content-card th {
    padding: var(--space-md);
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.m-content-card td {
    padding: var(--space-md);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.m-content-card tbody tr:last-child td {
    border-bottom: none;
}

.m-content-card tbody tr {
    transition: background var(--transition);
}

.m-content-card tbody tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

.m-content-card td strong {
    color: var(--primary-light);
}

/* Responsive table wrapper */
.m-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--space-lg) 0;
}

.m-table-wrap table {
    margin: 0;
    min-width: 500px;
}

/* ==========================================================================
   5. TABLE OF CONTENTS (TOC)
   ========================================================================== */

.m-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.m-toc__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.m-toc__title::before {
    content: '≡';
    font-size: 1.2rem;
    color: var(--primary);
}

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

.m-toc__list li {
    padding: 0;
    margin: 0;
    counter-increment: toc-counter;
}

.m-toc__list li::before {
    display: none;
}

.m-toc__link {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    border-bottom: none;
    transition: color var(--transition), padding-left var(--transition);
}

.m-toc__link::before {
    content: counter(toc-counter) '.';
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    min-width: 20px;
}

.m-toc__link:hover {
    color: var(--primary);
    padding-left: var(--space-sm);
}

/* Nested TOC */
.m-toc__list--nested {
    padding-left: var(--space-xl);
    counter-reset: toc-sub-counter;
}

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

.m-toc__list--nested .m-toc__link::before {
    content: counter(toc-counter) '.' counter(toc-sub-counter);
    font-size: 0.8rem;
    min-width: 28px;
}

/* ==========================================================================
   6. SIDEBAR
   ========================================================================== */

.m-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.m-sidebar__widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: border-color var(--transition);
}

.m-sidebar__widget:hover {
    border-color: var(--border-gold);
}

.m-sidebar__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.m-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.m-sidebar__link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    border-left: 2px solid transparent;
}

.m-sidebar__link:hover,
.m-sidebar__link.is-active {
    color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
    border-left-color: var(--primary);
}

/* Sidebar CTA */
.m-sidebar__cta {
    text-align: center;
    padding-top: var(--space-md);
}

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

/* Related articles in sidebar */
.m-sidebar__article {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: all var(--transition);
}

.m-sidebar__article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.m-sidebar__article:first-child {
    padding-top: 0;
}

.m-sidebar__article-category {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
}

.m-sidebar__article-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color var(--transition);
}

.m-sidebar__article:hover .m-sidebar__article-title {
    color: var(--primary);
}

/* ==========================================================================
   7. ARTICLE LAYOUT — Two-Column with Sidebar
   ========================================================================== */

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

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

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

/* ==========================================================================
   8. BLOCKQUOTE — Article Callouts
   ========================================================================== */

.m-content-card blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    background: rgba(212, 175, 55, 0.04);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.m-content-card blockquote p {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0;
}

.m-content-card blockquote p:not(:last-child) {
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   9. CODE BLOCKS — Article Inline & Block Code
   ========================================================================== */

.m-content-card code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(212, 175, 55, 0.08);
    color: var(--primary-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

.m-content-card pre {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.m-content-card pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ==========================================================================
   10. REVIEW HERO — Extended Styles
   ========================================================================== */

.m-review-hero {
    position: relative;
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.m-review-hero__rating {
    letter-spacing: 3px;
}

.m-review-hero__meta span {
    position: relative;
}

.m-review-hero__meta span:not(:last-child)::after {
    content: '|';
    margin-left: var(--space-xl);
    color: var(--border-gold);
    font-weight: 300;
}

/* ==========================================================================
   11. GAMES LIST — Within Reviews
   ========================================================================== */

.m-games-list__item {
    position: relative;
    transition: all var(--transition);
}

.m-games-list__item:hover {
    transform: translateY(-2px);
}

.m-games-list__thumb {
    transition: all var(--transition);
}

.m-games-list__item:hover .m-games-list__thumb {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
}

.m-games-list__name {
    transition: color var(--transition);
}

.m-games-list__item:hover .m-games-list__name {
    color: var(--primary);
}

/* ==========================================================================
   12. CTA SECTION — Article Bottom
   ========================================================================== */

.m-content-card__cta {
    position: relative;
}

.m-content-card__cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* ==========================================================================
   13. ARTICLE NAVIGATION — Prev/Next
   ========================================================================== */

.m-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: 1px solid var(--border-color);
}

.m-article-nav__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition);
}

.m-article-nav__item:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

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

.m-article-nav__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
}

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

.m-article-nav__item:hover .m-article-nav__title {
    color: var(--primary);
}

/* ==========================================================================
   14. ARTICLE TAGS
   ========================================================================== */

.m-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.m-article-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition);
}

.m-article-tag:hover {
    color: var(--primary);
    border-color: var(--border-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* ==========================================================================
   15. HIGHLIGHT BOX — Pro Tips / Info Boxes
   ========================================================================== */

.m-highlight-box {
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    position: relative;
}

.m-highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-dark));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.m-highlight-box__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.m-highlight-box__title::before {
    content: '💡';
    font-size: 1.1rem;
}

.m-highlight-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.m-highlight-box p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   16. IMAGES IN ARTICLES
   ========================================================================== */

.m-content-card figure {
    margin: var(--space-xl) 0;
}

.m-content-card figure img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.m-content-card figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: var(--space-sm);
    padding: 0 var(--space-lg);
}

/* ==========================================================================
   17. NOTIFICATION STYLES (for auth.js)
   ========================================================================== */

.m-notification {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-md);
    z-index: 3000;
    max-width: 380px;
    width: calc(100% - var(--space-xl));
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;
}

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

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

.m-notification__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

/* Notification types */
.m-notification--success {
    border-color: rgba(76, 175, 80, 0.4);
}

.m-notification--success .m-notification__icon {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.m-notification--error {
    border-color: rgba(244, 67, 54, 0.4);
}

.m-notification--error .m-notification__icon {
    background: rgba(244, 67, 54, 0.15);
    color: #F44336;
}

.m-notification--info {
    border-color: rgba(33, 150, 243, 0.4);
}

.m-notification--info .m-notification__icon {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
}

.m-notification--warning {
    border-color: rgba(255, 152, 0, 0.4);
}

.m-notification--warning .m-notification__icon {
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
}

.m-notification--xp {
    border-color: rgba(212, 175, 55, 0.4);
}

.m-notification--xp .m-notification__icon {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
}

.m-notification--level {
    border-color: rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--bg-card), rgba(212, 175, 55, 0.08));
}

.m-notification--level .m-notification__icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-dark);
}

/* ==========================================================================
   18. ARTICLE CARD ENHANCEMENTS — Blog Page
   ========================================================================== */

.m-article-card__content {
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.m-article-card__excerpt {
    flex: 1;
}

.m-article-card__stars {
    margin-top: auto;
}

.m-article-card__meta {
    margin-top: auto;
}

/* ==========================================================================
   19. REVIEW CARD ENHANCEMENTS — Reviews Page
   ========================================================================== */

.m-review-card {
    display: flex;
    flex-direction: column;
}

.m-review-card .m-btn {
    margin-top: auto;
    align-self: flex-start;
}

/* ==========================================================================
   20. PRINT STYLES FOR ARTICLES
   ========================================================================== */

@media print {
    .m-header,
    .m-footer,
    .m-sidebar,
    .m-cookie-consent,
    .m-modal,
    .m-content-card__cta,
    .m-article-nav {
        display: none !important;
    }

    body {
        background: #fff;
        color: #1a1a2e;
    }

    .m-main {
        padding-top: 0;
    }

    .m-content-card {
        background: #fff;
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .m-content-card h2,
    .m-content-card h3 {
        color: #1a1a2e;
    }

    .m-content-card p,
    .m-content-card li,
    .m-content-card td {
        color: #333;
    }

    .m-content-card a {
        color: #1a1a2e;
        text-decoration: underline;
    }

    .m-page-title {
        color: #1a1a2e;
    }

    .m-gold {
        color: #b8960c;
    }
}

/* ==========================================================================
   RESPONSIVE — Articles
   ========================================================================== */

@media (max-width: 992px) {
    .m-article-layout {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .m-article-layout__sidebar {
        position: static;
    }

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

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

@media (max-width: 768px) {
    .m-content-card h2 {
        font-size: 1.3rem;
        padding-left: var(--space-md);
    }

    .m-content-card h3 {
        font-size: 1.05rem;
    }

    .m-content-card table {
        font-size: 0.8rem;
    }

    .m-content-card th,
    .m-content-card td {
        padding: var(--space-sm) var(--space-md);
    }

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

    .m-toc__link {
        font-size: 0.85rem;
    }

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

    .m-highlight-box {
        padding: var(--space-lg);
    }

    .m-content-card blockquote {
        padding: var(--space-md) var(--space-lg);
        margin: var(--space-lg) 0;
    }

    .m-review-hero__meta span:not(:last-child)::after {
        content: '·';
        margin-left: var(--space-sm);
    }

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

    .m-article-tags {
        gap: var(--space-xs);
    }

    .m-article-tag {
        font-size: 0.65rem;
        padding: 3px var(--space-sm);
    }
}

@media (max-width: 480px) {
    .m-content-card h2 {
        font-size: 1.15rem;
    }

    .m-content-card h3 {
        font-size: 1rem;
    }

    .m-content-card p,
    .m-content-card li {
        font-size: 0.88rem;
    }

    .m-content-card table {
        font-size: 0.75rem;
    }

    .m-content-card th,
    .m-content-card td {
        padding: var(--space-xs) var(--space-sm);
    }

    .m-games-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .m-toc__list--nested {
        padding-left: var(--space-lg);
    }
}