/* DDO News Portal - Custom Styles */

/* General */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== NAVBAR ===== */
.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.01em;
}

.nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.nav-link:hover {
    opacity: 0.75;
}

.navbar .form-control {
    font-size: 0.85rem;
    border-radius: 0;
    border: none;
    min-width: 200px;
}

.navbar .btn-light {
    border-radius: 0;
    font-size: 0.85rem;
}

/* ===== NAVBAR ===== */
.site-navbar {
    background: #0d0d0d !important;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0d0d0d;
    color: #aaa;
}

.footer-inner {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Top bar: logo left, social right */
.footer-top {
    border-bottom: 1px solid #222;
    padding: 1.5rem 0;
}

.footer-top .footer-inner {
    justify-content: space-between;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.footer-social {
    display: flex;
    gap: 1.2rem;
}

.footer-social a {
    color: #666;
    font-size: 1.1rem;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-social a:hover {
    color: #fff;
}

/* Category strip */
.footer-cats {
    border-bottom: 1px solid #1a1a1a;
    padding: 0.9rem 0;
    background: #111;
}

.footer-cats .footer-inner {
    gap: 0;
    flex-wrap: wrap;
}

.footer-cats-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555;
    margin-right: 1rem;
}

.footer-cat-link {
    font-size: 0.78rem;
    color: #888;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.9rem;
    border-right: 1px solid #222;
    transition: color 0.2s;
    white-space: nowrap;
}

.footer-cat-link:last-child {
    border-right: none;
}

.footer-cat-link:hover {
    color: #fff;
}

/* Bottom copyright bar */
.footer-bottom {
    padding: 1rem 0;
}

.footer-bottom .footer-inner {
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.75rem;
    color: #444;
}

.footer-built {
    font-size: 0.72rem;
    color: #333;
}

/* Featured Card (legacy) */
.featured-card {
    min-height: 400px;
    overflow: hidden;
}

.featured-image {
    height: 100%;
    min-height: 400px;
    object-fit: cover;
}

.featured-placeholder {
    height: 100%;
    min-height: 400px;
}

/* ===== HERO SECTION - Full Width, No Gaps ===== */
.hero-section {
    width: 100%;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 55% 45%;
    width: 100%;
    height: 750px;
}

.hero-main {
    height: 100%;
}

.hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    height: 100%;
}

.hero-side-item {
    height: 100%;
}

.hero-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
}

.hero-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-card:hover .hero-bg-img {
    transform: scale(1.04);
}

.hero-bg-placeholder {
    position: absolute;
    inset: 0;
    background: #444;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.hero-overlay-side {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 70%, transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: #fff;
    z-index: 2;
}

.hero-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.hero-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.2em 0.55em;
    text-transform: uppercase;
    border-radius: 2px;
}

.hero-badge-live {
    background: #e63946;
    color: #fff;
}

.hero-badge-cat {
    background: #0d6efd;
    color: #fff;
}

.hero-title-main {
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0.4rem 0 0.5rem;
    color: #fff;
}

.hero-title-side {
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0.3rem 0 0.4rem;
    color: #fff;
}

.hero-meta {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.hero-meta-small {
    font-size: 0.65rem;
}

.hero-dot {
    margin: 0 0.4em;
}

.hero-read-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 1px;
}

/* Hero ticker bar */
.hero-ticker {
    background: #1a1a2e;
    color: #ccc;
    padding: 0.55rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.78rem;
    overflow: hidden;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ticker-thumb-wrap {
    width: 36px;
    height: 28px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 2px;
    background: #333;
}

.ticker-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ticker-text {
    color: #ddd;
}

.ticker-sep {
    color: #555;
    margin: 0 0.5rem;
}

/* Latest section main article (legacy) */
.latest-main-image {
    height: 360px;
    object-fit: cover;
    width: 100%;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    border-left: 4px solid #0d6efd;
    padding-left: 0.75rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.section-divider {
    border-color: #dee2e6;
    opacity: 1;
}

/* ===== THE LATEST SECTION ===== */
.latest-main {
    display: flex;
    flex-direction: column;
}

.latest-main-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

.latest-main-body {
    padding-top: 1rem;
}

.latest-badge {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2em 0.6em;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.latest-badge-sm {
    font-size: 0.57rem;
    padding: 0.15em 0.45em;
}

.latest-main-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.6rem;
    color: #111;
}

.latest-main-title:hover,
.latest-main:hover .latest-main-title {
    color: #0d6efd;
}

.latest-main-summary {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.latest-meta {
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.latest-meta-xs {
    font-size: 0.63rem;
}

.latest-meta-author {
    font-weight: 700;
    color: #555;
}

.latest-meta-dot {
    margin: 0 0.3em;
    color: #bbb;
}

/* Small card (2x2 grid right side) */
.latest-main-img-wrap,
.latest-small-img-wrap {
    position: relative;
    display: block;
}

.latest-badge-overlay {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    margin-bottom: 0;
    z-index: 2;
}

.latest-small-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: opacity 0.2s;
}

.latest-small-card:hover {
    opacity: 0.85;
}

.latest-small-img-wrap {
    display: block;
}

.latest-small-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

.latest-small-body {
    padding-top: 0.6rem;
    flex: 1;
}

.latest-small-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0.3rem 0 0.3rem;
    color: #111;
}

/* ===== MOST POPULAR SECTION ===== */
.popular-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: opacity 0.2s;
}

.popular-card:hover {
    opacity: 0.85;
}

.popular-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.popular-body {
    padding-top: 0.6rem;
    flex: 1;
}

.popular-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0.3rem 0 0.3rem;
    color: #111;
}

/* ===== TOP STORIES SECTION ===== */
.top-stories {
    display: flex;
    flex-direction: column;
}

.top-story-row {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: opacity 0.2s;
}

.top-story-row:first-child {
    padding-top: 0;
}

.top-story-row:hover {
    opacity: 0.8;
}

.top-story-text {
    flex: 1;
    min-width: 0;
}

.top-story-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    color: #111;
}

.top-story-summary {
    font-size: 0.78rem;
    color: #777;
    line-height: 1.5;
    margin: 0;
}

.top-story-thumb {
    flex-shrink: 0;
    width: 80px;
}

.top-story-thumb img {
    width: 80px;
    height: 65px;
    object-fit: cover;
    display: block;
}

/* Responsive: hero */
@media (max-width: 991.98px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 499px 1fr;
        height: auto;
    }

    .hero-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 312px;
        height: 312px;
    }

    .hero-side-item {
        height: 100%;
    }
}

/* xxl screens (≥1400px): larger images to maintain aspect ratio */
@media (min-width: 1400px) {
    .latest-main-img {
        height: auto;
    }

    .latest-small-img {
        height: auto;
    }
}

@media (max-width: 575.98px) {
    .hero-grid {
        grid-template-rows: 406px auto;
    }

    .hero-side {
        grid-template-rows: 250px;
        height: 250px;
    }

    .hero-ticker {
        display: none;
    }

    .latest-main-image {
        height: 220px;
    }

    .latest-main-img {
        height: 220px;
    }

    .latest-small-img,
    .popular-img {
        height: 100px;
    }

    .top-story-thumb {
        width: 60px;
    }

    .top-story-thumb img {
        width: 60px;
        height: 50px;
    }
}

/* Article Cards */
.article-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.article-image {
    height: 200px;
    object-fit: cover;
}

.article-image-placeholder {
    height: 200px;
}

/* Category Cards */
.category-card {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    background-color: #e9ecef !important;
}

/* Article Content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #1a1a1a;
    text-align: justify;
    hyphens: auto;
}

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

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1.3;
    text-align: left;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    display: block;
}

.article-content blockquote {
    border-left: 4px solid #0d6efd;
    padding: 0.75rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    border-radius: 0 0.25rem 0.25rem 0;
    text-align: left;
}

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

.article-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.article-content code {
    background: #f1f3f5;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.article-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    text-align: left;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.9rem;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    text-align: left;
}

.article-content th,
.article-content td {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.article-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.article-content a {
    color: #0d6efd;
}

.article-content hr {
    margin: 2rem 0;
    border-color: #dee2e6;
}

/* Links */
.hover-link {
    transition: color 0.2s ease;
}

.hover-link:hover {
    color: var(--bs-primary) !important;
}

/* Footer */
footer a:hover {
    color: var(--bs-primary) !important;
}

/* Admin Styles */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child,
.btn-group form:last-child .btn {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .featured-card .row {
        flex-direction: column-reverse;
    }
    
    .featured-image,
    .featured-placeholder {
        min-height: 250px;
    }
}

@media (max-width: 767.98px) {
    .article-image,
    .article-image-placeholder {
        height: 180px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .breadcrumb {
        display: none !important;
    }
    
    .article-content {
        font-size: 12pt;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeIn 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Form focus states */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* ===== CATEGORY & SEARCH LISTING PAGES ===== */

/* Slim hero banner */
.listing-hero {
    background: #111;
    border-bottom: 3px solid #0d6efd;
    padding: 2.5rem 2rem 2rem;
}

.listing-hero-inner {
    max-width: 100%;
}

.listing-hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin: 0.2rem 0 0.4rem;
    line-height: 1.15;
}

.listing-hero-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* Search form inside hero */
.listing-search-form {
    display: flex;
    max-width: 560px;
}

.listing-search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    transition: border-color 0.2s;
}

.listing-search-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.listing-search-input:focus {
    border-bottom-color: #0d6efd;
    background: rgba(255,255,255,0.15);
}

.listing-search-btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.listing-search-btn:hover {
    background: #0b5ed7;
}

/* Result count */
.listing-count {
    font-size: 0.85rem;
    color: #888;
}

.listing-count-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
}

/* Article list rows (top story style) */
.listing-list {
    display: flex;
    flex-direction: column;
}

.listing-row {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: opacity 0.2s;
}

.listing-row:first-child {
    padding-top: 0;
}

.listing-row:hover {
    opacity: 0.82;
}

.listing-row-clickable {
    cursor: pointer;
}

.listing-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    overflow: hidden;
}

.listing-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.listing-row:hover .listing-thumb img {
    transform: scale(1.04);
}

.listing-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #ddd;
}

.listing-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.listing-meta-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.listing-date {
    font-size: 0.65rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    color: #111;
}

.listing-row:hover .listing-title {
    color: #0d6efd;
}

.listing-summary {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    flex: 1;
}

/* Search two-column layout */
.search-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.search-results {
    flex: 1;
    min-width: 0;
}

.search-sidebar {
    flex-shrink: 0;
    width: 240px;
}

.search-sidebar-inner {
    position: sticky;
    top: 80px;
}

.search-cat-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

.search-cat-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s, color 0.15s;
}

.search-cat-item:last-child {
    border-bottom: none;
}

.search-cat-item:hover {
    background: #f5f8ff;
    color: #0d6efd;
}

/* Responsive */
@media (max-width: 767.98px) {
    .listing-hero {
        padding: 1.5rem 1rem 1.25rem;
    }

    .listing-thumb {
        width: 110px;
        height: 80px;
    }

    .listing-title {
        font-size: 0.95rem;
    }

    .listing-summary {
        display: none;
    }

    .search-layout {
        flex-direction: column;
    }

    .search-sidebar {
        display: none !important;
    }
}

/* ===== ARTICLE PAGE ===== */

/* Hero */
.art-hero {
    position: relative;
    width: 100%;
    height: 750px;
    overflow: hidden;
}

.art-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-hero-placeholder {
    background: #222;
}

.art-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.15) 100%);
}

.art-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 2rem 2rem;
    max-width: 860px;
    color: #fff;
    z-index: 2;
}

/* Breadcrumb inside hero */
.art-breadcrumb {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.art-breadcrumb a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.art-breadcrumb a:hover {
    color: #fff;
}

.art-bc-sep {
    margin: 0 0.4em;
}

/* Hero title & deck */
.art-hero-title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 0.75rem;
}

.art-hero-deck {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 700px;
}

/* Hero meta (author + date) */
.art-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.art-hero-avatar {
    font-size: 1.5rem;
    color: #fff;
    line-height: 1;
}

.art-hero-author {
    font-weight: 700;
    color: #fff;
}

.art-hero-dot {
    color: rgba(255,255,255,0.4);
    margin: 0 0.2em;
}

/* ===== ARTICLE BODY LAYOUT ===== */
.art-body-wrap {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 3rem 2rem 3rem;
    max-width: 100%;
}

.art-main {
    flex: 1;
    min-width: 0;
}


/* Tags */
.art-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.art-tags-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
    margin-right: 0.25rem;
}

.art-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: #555;
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 0.2em 0.7em;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s;
}

.art-tag:hover {
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
}

a.art-tag {
    text-decoration: none;
}

.art-tag-xs {
    font-size: 0.62rem;
    padding: 0.15em 0.5em;
}

/* Prev / Next */
.art-prevnext {
    display: flex;
    gap: 1rem;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 0;
}

.art-prev,
.art-next {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.art-next {
    align-items: flex-end;
    text-align: right;
}

.art-pn-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
}

.art-pn-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #111;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.art-pn-link:hover {
    color: #0d6efd;
}

.art-pn-link-right {
    justify-content: flex-end;
}

.art-pn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #0d6efd;
    color: #fff;
    border-radius: 2px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* Related articles */
.art-related-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.art-rel-card {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.art-rel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.art-rel-img-placeholder {
    background: #333;
}

.art-rel-card:hover .art-rel-img {
    transform: scale(1.04);
}

.art-rel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.2) 70%, transparent 100%);
}

.art-rel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.9rem;
    z-index: 2;
    color: #fff;
}

.art-rel-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin: 0.25rem 0 0.3rem;
}

.art-rel-meta {
    font-size: 0.63rem;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== SIDEBAR ===== */
.art-sidebar {
    flex-shrink: 0;
    width: 320px;
}

.art-sidebar-inner {
    position: sticky;
    top: 80px;
}

.art-banner {
    border: 1px solid #e9ecef;
    background: #f8f9fa;
}

.art-banner-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 600px;
    padding: 1rem;
}

/* Horizontal ad banner (below article, shown when sidebar is hidden) */
.art-banner-horizontal {
    border: 1px solid #e9ecef;
    background: #f8f9fa;
}

.art-banner-horizontal-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    padding: 1rem;
}

.art-banner-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bbb;
    margin-bottom: 1rem;
}

.art-banner-content {
    text-align: center;
}

/* Responsive */
@media (max-width: 1199.98px) {
    .art-sidebar {
        display: none !important;
    }

    .art-body-wrap {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .art-hero {
        height: 500px;
    }

    .art-hero-content {
        padding: 1.5rem 1rem 1.25rem;
    }

    .art-hero-deck {
        display: none;
    }

    .art-body-wrap {
        padding: 1.5rem 1rem;
    }

    .art-prevnext {
        flex-direction: column;
    }

    .art-next {
        align-items: flex-start;
        text-align: left;
    }

    .art-pn-link-right {
        justify-content: flex-start;
    }
}

@media print {
    .art-hero-overlay,
    .art-sidebar,
    .art-tags,
    .art-prevnext {
        display: none !important;
    }
}

/* ===== Markdown Editor (Admin) ===== */
.md-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
    padding: 0.4rem 0.5rem;
}

.md-editor-wrap textarea {
    border-radius: 0 0 0.375rem 0.375rem;
    min-height: 420px;
    resize: vertical;
}

.md-editor-wrap .md-preview {
    min-height: 420px;
    overflow-y: auto;
}

