/* ============================== ARTICLES: VIEW & COMMENTS ============================== */

/* Hero bottom: long stepped blend into the page instead of a hard cut.
   Top is kept transparent so the background cover shows cleanly under
   the sticky navbar and doesn't form a gray strip when scrolling. */
.article-hero-overlay {
    background: linear-gradient(180deg,
        rgba(10, 10, 12, 0) 0%,
        rgba(10, 10, 12, 0.15) 35%,
        rgba(10, 10, 12, 0.35) 58%,
        rgba(10, 10, 12, 0.62) 76%,
        rgba(10, 10, 12, 0.88) 90%,
        var(--al-bg) 100%) !important;
}

.article-hero-content h1 {
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.85);
}

.article-hero-meta {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.article-hero-meta .author-avatar {
    border: 2px solid rgba(224, 68, 68, 0.45);
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.6);
}

/* Comments section */
.article-comments {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
}

.article-comments > h4 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-comments > h4::before {
    content: '';
    width: 14px;
    height: 2px;
    background: var(--al-accent);
    border-radius: 2px;
}

.article-comments > h4 .text-muted {
    color: var(--al-text-dim) !important;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.article-comment {
    display: flex;
    gap: 0.9rem;
    background: var(--al-surface);
    border: 1px solid var(--al-border);
    border-radius: var(--al-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.article-comment:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    transform: translateY(-2px);
}

.article-comment:target {
    border-color: rgba(224, 68, 68, 0.45);
    background: rgba(184, 40, 46, 0.06);
    box-shadow: 0 0 0 2px rgba(224, 68, 68, 0.12);
}

.article-comment-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--al-border);
}

.article-comment:hover .article-comment-avatar img {
    border-color: rgba(224, 68, 68, 0.45);
}

.article-comment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.article-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.15rem;
}

.article-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-width: 0;
}

.article-comment-author {
    font-weight: 700;
    color: var(--al-accent-light) !important;
}

.article-comment-author:hover {
    color: #fff !important;
    text-decoration: none;
}

.article-comment-date {
    font-size: 0.78rem;
    color: var(--al-text-dim);
}

.article-comment-delete {
    display: inline-flex;
    line-height: 1;
}

.article-comment-delete .btn-link-danger {
    background: transparent;
    border: none;
    color: rgba(255, 100, 100, 0.55);
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.35rem;
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.article-comment-delete .btn-link-danger:hover {
    color: rgba(255, 100, 100, 1);
    background: rgba(184, 40, 46, 0.12);
}

.article-comment-content {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

/* Comment form card */
.article-comment-form {
    border: 1px solid var(--al-border);
}

/* Hytale-inspired article reader styles */

html {
    scroll-padding-top: 80px;
}

.article-view {
    color: #e0e0e0;
}

/* Hide navbar extras on article view: header bg, logo, IP, discord, user box */
.article-sticky-header .logo-ds-flex,
.article-sticky-header .color-overlay,
.article-sticky-header #header-pjs,
.article-sticky-header .status-icon,
.article-sticky-header .discord-icon,
.article-sticky-header .user-box,
.article-sticky-header .language-dropdown {
    display: none !important;
}

/* The article header is position:fixed, so anything below the navbar inside it
   (guest welcome card, announcements, chatbox) would stick over the article
   text while scrolling. Hide those blocks on article pages. */
.article-sticky-header .welcome-card,
.article-sticky-header .announcement-alert,
.article-sticky-header #ie-message,
.article-sticky-header .chatbox {
    display: none !important;
}

.article-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* On article pages the navbar should look like on every other page:
   fixed, glassy (semi-transparent with blur), not fully transparent.
   Let the main .navbar.navbar-theme rules from alegacy-dark.css take over. */
.article-sticky-header .navbar {
    position: relative !important;
    width: 100%;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.article-hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 3rem;
    padding-top: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end !important;
    align-items: flex-start;
    min-height: 100%;
}

.article-hero h1 {
    font-size: clamp(2.8rem, 6.2vw, 4.5rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1rem;
    max-width: 1200px;
    color: #fff;
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.85);
}

.article-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.article-hero-top-controls {
    width: 100%;
    margin-bottom: 0.5rem;
}

.article-meta-author {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.article-meta-details {
    display: contents;
}

.article-hero-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.article-hero {
    position: relative;
    min-height: 45.6vh;
    max-height: 494px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    background-color: transparent;
    margin-bottom: 0;
}

.article-hero.no-image {
    min-height: auto;
    background: #1a1a1f;
}

.article-hero.no-image .article-hero-content {
    padding-top: 5rem;
    padding-bottom: 1.5rem;
}

.article-hero.no-image .article-hero-overlay {
    display: none;
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.98) 0%,
        rgba(10, 10, 10, 0.75) 50%,
        rgba(10, 10, 10, 0.35) 100%
    );
}

.article-category {
    display: inline-block;
    background: var(--p-color, #ff0018);
    color: #fff !important;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-decoration: none;
    font-weight: 600;
}

.article-category:hover {
    filter: brightness(1.15);
}

.article-hero-meta .author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.article-hero-meta a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.article-hero-meta a:hover {
    text-decoration: underline;
}

.article-hero-meta .meta-sep {
    color: rgba(255, 255, 255, 0.3);
}

.article-language-switcher {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.article-language-switcher a {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s;
}

.article-language-switcher a.active,
.article-language-switcher a:hover {
    background: var(--p-color, #ff0018);
    color: #fff;
    border-color: var(--p-color, #ff0018);
}

.article-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 0 4rem;
}

@media (min-width: 1200px) {
    .article-hero-content {
        max-width: 1100px;
        padding-left: 0;
        padding-right: 0;
    }
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #d8d8d8;
    overflow-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #fff;
    margin-top: 2.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.25;
    font-weight: 700;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.6rem;
}

.article-content h4 {
    font-size: 1.35rem;
}

.article-content p {
    margin-bottom: 1.6rem;
}

.article-content a {
    color: var(--p-color, #ff4d5a);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: color 0.2s;
}

.article-content a:hover {
    color: #fff;
}

.article-content strong,
.article-content b {
    color: #fff;
    font-weight: 700;
}

.article-content blockquote {
    border-left: 4px solid var(--p-color, #ff0018);
    padding: 1.25rem 1.75rem;
    margin: 2.5rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05em;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content img,
.article-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2.5rem auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.article-content figure {
    margin: 2.5rem 0;
}

.article-content figcaption {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: -1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.75rem;
}

.article-content li {
    margin-bottom: 0.6rem;
}

.article-content pre {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.article-content code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: #fff;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}

.article-content hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 3rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    overflow-x: auto;
}

.article-content .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-content .table-wrapper table {
    width: auto;
    min-width: 100%;
    margin: 0;
    border: none;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.article-content th {
    color: #fff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
}

.article-footer-meta {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-comments {
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding-bottom: 4rem;
}

.article-comments h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.article-comments h4 .text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 500;
    font-size: 1rem;
}

.article-comment-form {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
}

.article-comment-guest-prompt {
    margin-top: 2.5rem;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.article-comment-guest-prompt > i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
}

.article-comment-guest-prompt > span {
    flex: 1;
    min-width: 200px;
}

.article-guest-login-btn,
.article-guest-register-btn {
    padding: 0.5rem 1.4rem;
    border-radius: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.article-guest-login-btn {
    background: #b8282e;
    border: 1px solid #b8282e;
    color: #fff;
}

.article-guest-login-btn:hover {
    background: #c8303a;
    border-color: #c8303a;
    color: #fff;
    text-decoration: none;
}

.article-guest-register-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.article-guest-register-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    text-decoration: none;
}

.article-comment-errors {
    margin-bottom: 1rem;
    padding: 0.9rem 1.1rem 0.9rem 3.7rem;
    background: rgba(184, 40, 46, 0.08);
    border: 1px solid rgba(224, 68, 68, 0.35);
    border-radius: 0.5rem;
    color: #ff7a7a;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.article-comment-success {
    margin-bottom: 1rem;
    padding: 0.9rem 1.1rem 0.9rem 3.7rem;
    background: rgba(23, 198, 102, 0.08);
    border: 1px solid rgba(28, 200, 138, 0.35);
    border-radius: 0.5rem;
    color: #5cdb95;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.article-comment-composer {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.article-comment-composer-avatar {
    flex-shrink: 0;
}

.article-comment-composer-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.article-comment-composer-body {
    flex: 1;
    min-width: 0;
}

.article-comment-composer-body .tox {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.4rem !important;
    overflow: hidden;
}

.article-comment-composer-body .tox-tinymce {
    border: none !important;
    border-radius: 0.4rem !important;
}

.article-comment-composer-body .tox .tox-toolbar__primary {
    background: rgba(20, 20, 22, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 0.3rem 0.5rem !important;
}

.article-comment-composer-body .tox .tox-toolbar-overlord {
    background: rgba(20, 20, 22, 0.8) !important;
}

.article-comment-composer-body .tox .tox-tbtn {
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 1px !important;
}

.article-comment-composer-body .tox .tox-tbtn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.article-comment-composer-body .tox .tox-tbtn--enabled,
.article-comment-composer-body .tox .tox-tbtn--enabled:hover {
    color: #e04444 !important;
    background: rgba(184, 40, 46, 0.15) !important;
}

.article-comment-composer-body .tox .tox-tbtn svg {
    fill: currentColor;
}

.article-comment-composer-body .tox .tox-edit-area {
    background: rgba(10, 10, 12, 0.5) !important;
}

.article-comment-composer-body .tox .tox-edit-area iframe {
    background: transparent !important;
}

/* Override TinyMCE blue accent (#006ce7) with site red */
.article-comment-composer-body .tox .tox-tbtn--select,
.article-comment-composer-body .tox .tox-tbtn--select:hover {
    color: rgba(255, 255, 255, 0.7) !important;
}

.article-comment-composer-body .tox .tox-listbox .tox-listbox__select-chevron svg {
    fill: rgba(255, 255, 255, 0.5);
}

/* Focus outline on editor */
.article-comment-composer-body .tox-tinymce:focus,
.article-comment-composer-body .tox.tox-tinymce:focus-within {
    border-color: rgba(224, 68, 68, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(184, 40, 46, 0.12) !important;
}

/* Modal/dialog accents (link dialog etc) */
.article-comment-composer-body .tox .tox-dialog-wrap__backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
}

.article-comment-composer-body .tox .tox-dialog {
    background: #161618 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

.article-comment-composer-body .tox .tox-dialog__header {
    background: rgba(20, 20, 22, 0.9) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.article-comment-composer-body .tox .tox-dialog__title {
    color: #fff !important;
}

.article-comment-composer-body .tox .tox-dialog__body-content {
    background: #161618 !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.article-comment-composer-body .tox .tox-dialog__footer {
    background: rgba(20, 20, 22, 0.9) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.article-comment-composer-body .tox .tox-label,
.article-comment-composer-body .tox .tox-form__label {
    color: rgba(255, 255, 255, 0.5) !important;
}

.article-comment-composer-body .tox .tox-textfield,
.article-comment-composer-body .tox .tox-textarea,
.article-comment-composer-body .tox .tox-select {
    background: rgba(10, 10, 12, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 0.3rem !important;
}

.article-comment-composer-body .tox .tox-textfield:focus,
.article-comment-composer-body .tox .tox-textarea:focus,
.article-comment-composer-body .tox .tox-select:focus {
    border-color: rgba(224, 68, 68, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(184, 40, 46, 0.12) !important;
}

/* Primary button in dialogs → site red */
.article-comment-composer-body .tox .tox-button--primary {
    background: #b8282e !important;
    border-color: #b8282e !important;
    border-radius: 0.3rem !important;
    color: #fff !important;
}

.article-comment-composer-body .tox .tox-button--primary:hover {
    background: #c8303a !important;
    border-color: #c8303a !important;
}

.article-comment-composer-body .tox .tox-button {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 0.3rem !important;
}

.article-comment-composer-body .tox .tox-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* Emoticons panel */
.article-comment-composer-body .tox .tox-menu {
    background: #161618 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.4rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.article-comment-composer-body .tox .tox-menu__item {
    color: rgba(255, 255, 255, 0.7) !important;
}

.article-comment-composer-body .tox .tox-menu__item:hover {
    background: rgba(184, 40, 46, 0.15) !important;
    color: #fff !important;
}

.article-comment-composer-body .tox .tox-collection__item--active {
    background: rgba(184, 40, 46, 0.15) !important;
}

.article-comment-composer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.6rem;
}

.article-comment-composer-submit {
    background: #b8282e;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1.4rem;
    border-radius: 0.35rem;
    cursor: pointer;
}

.article-comment-composer-submit:hover {
    background: #c8303a;
}

.article-comment-composer-submit:active {
    transform: scale(0.97);
}

.article-comment-form {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0.75rem;
}

.article-embed {
    margin: 1.5rem 0;
}

.article-embed-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.article-embed-video iframe,
.article-embed-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-content img {
    border-radius: 0.5rem;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.article-content img:hover {
    transform: scale(1.01);
}

.article-carousel {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.article-carousel-track {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.article-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    max-height: 600px;
}

.article-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.article-carousel-prev,
.article-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.article-carousel-prev:hover,
.article-carousel-next:hover {
    background: rgba(0, 0, 0, 0.75);
}

.article-carousel-prev:disabled,
.article-carousel-next:disabled {
    opacity: 0.3;
    cursor: default;
}

.article-carousel-prev { left: 0.75rem; }
.article-carousel-next { right: 0.75rem; }

.article-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 5, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.article-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.article-lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.article-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.article-lightbox-close:hover {
    opacity: 1;
}

/* Articles index / listing */
.articles-index {
    color: #e0e0e0;
}

.articles-index-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.articles-index-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.articles-category-filter {
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.articles-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    white-space: nowrap;
}

.articles-category-pill:hover,
.articles-category-pill:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.articles-category-pill.active {
    background: rgba(255, 0, 24, 0.12);
    border-color: rgba(255, 0, 24, 0.45);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 0, 24, 0.18);
}

.articles-category-pill i {
    font-size: 0.85rem;
    color: var(--p-color, #ff0018);
}

.articles-list-wrapper {
    min-height: 300px;
}

.articles-grid {
    margin-bottom: 1.5rem;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
}

.article-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.article-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s, border-color 0.35s, background 0.35s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.article-card:hover {
    transform: translateY(-6px);
    background: rgba(28, 28, 28, 0.75);
    border-color: rgba(255, 0, 24, 0.35);
    box-shadow: 0 12px 40px rgba(255, 0, 24, 0.12), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    position: relative;
}

.article-card-hero .article-card-image {
    height: 280px;
}

.article-card-hero .article-card-title {
    font-size: 1.55rem;
}

.article-card-hero .article-card-excerpt {
    -webkit-line-clamp: 4;
}

.article-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.article-card-image.no-image {
    background-color: #1a1a1f;
    background-image: none;
}

.article-card-image.no-image::after {
    display: none;
}

.article-card:hover .article-card-image {
    transform: scale(1.05);
}

.article-card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.article-card-excerpt {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.article-card-meta .avatar-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.article-card-meta .author-name {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.article-card-meta .meta-sep {
    opacity: 0.4;
}

.article-card-meta .article-views i {
    color: var(--p-color, #ff0018);
    margin-right: 0.2rem;
    font-size: 0.75rem;
}

.article-card-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--p-color, #ff0018);
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.article-card-read-more i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.article-card:hover .article-card-read-more {
    color: #fff;
}

.article-card:hover .article-card-read-more i {
    transform: translateX(3px);
}

.articles-index .pagination {
    justify-content: center;
    margin-top: 1rem;
}

.articles-index .pagination .page-link,
.articles-index .pagination .page-item span {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}

.articles-index .pagination .page-item.active .page-link,
.articles-index .pagination .page-link:hover {
    background: rgba(255, 0, 24, 0.15);
    border-color: rgba(255, 0, 24, 0.45);
    color: #fff;
}

.articles-index .pagination .page-item:first-child .page-link,
.articles-index .pagination .page-item:last-child .page-link {
    font-size: 0.9rem;
    padding: 0.45rem 0.75rem;
}

@media (max-width: 768px) {
    .article-hero {
        min-height: 220px;
        max-height: none;
        background-color: transparent;
    }

    .article-hero.no-image {
        background: transparent;
    }

    .article-hero-overlay {
        background: linear-gradient(180deg,
            rgba(10, 10, 12, 0.15) 0%,
            rgba(10, 10, 12, 0.35) 40%,
            rgba(10, 10, 12, 0.75) 75%,
            var(--al-bg, #0a0a0c) 100%) !important;
    }

    .article-hero-content {
        padding-top: 3.75rem;
        padding-bottom: 1.25rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-hero.no-image .article-hero-content {
        padding-top: 5.5rem;
    }

    .article-hero h1 {
        font-size: clamp(1.5rem, 6.5vw, 2.25rem);
        font-weight: 800;
        line-height: 1.2;
        margin-top: 0;
        margin-bottom: 0.65rem;
        width: 100%;
        color: #fff;
        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
    }

    .article-hero-meta {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
        gap: 0.35rem 0.6rem;
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.65);
        margin-bottom: 0.65rem;
    }

    .article-meta-author {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }

    .article-meta-author a {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .article-hero-meta .author-avatar {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    .article-meta-details {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.35rem 0.55rem;
        color: rgba(255, 255, 255, 0.55);
        font-size: 0.8rem;
        padding-left: 0;
    }

    .article-meta-details > .meta-sep:first-child {
        display: inline;
    }

    .article-hero-top-controls {
        margin-bottom: 0;
        margin-top: 0.25rem;
        width: 100%;
    }

    .article-hero-actions {
        gap: 0.5rem;
    }

    .article-hero-actions .btn {
        min-width: 34px;
        min-height: 34px;
        padding: 0.3rem 0.6rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
    }

    .article-view .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-body {
        padding: 1rem 0 2.5rem;
    }

    .article-content {
        font-size: 1.05rem;
    }

    .article-content h2 {
        font-size: 1.6rem;
    }

    .article-content h3 {
        font-size: 1.35rem;
    }

    .articles-index-title {
        font-size: 1.6rem;
    }

    .articles-category-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }

    .article-card-image {
        height: 140px;
    }

    .article-card-hero .article-card-image {
        height: 200px;
    }

    .article-card-title,
    .article-card-hero .article-card-title {
        font-size: 1.05rem;
    }

    .article-card {
        background: #141416;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Mobile sticky header: transparent over hero/page content */
    .article-sticky-header {
        position: fixed;
        display: block;
        background: transparent !important;
        border-bottom-color: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }
    .article-sticky-header.scrolled {
        position: fixed;
        display: block;
        background: transparent !important;
        border-bottom-color: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }

    .article-sticky-header .navbar {
        position: relative !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .article-sticky-header .navbar .navbar-toggler,
    .article-sticky-header .navbar .navbar-toggler:hover,
    .article-sticky-header .navbar .navbar-toggler:focus,
    .article-sticky-header .navbar .navbar-toggler:active {
        background: transparent !important;
        border-color: transparent !important;
        color: #fff !important;
    }

    .article-comment-composer {
        gap: 0;
    }

    .article-comment-composer-avatar {
        display: none;
    }
}
