/* ============================================================
   E-ITM (International Textile Market) Stylesheet
   Universal font family: "Open Sans", serif
   ============================================================ */

/* CSS RESET & BOX SIZING */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: "Open Sans", serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
input,
button,
select,
textarea,
div,
li,
ul {
    font-family: "Open Sans", serif;
}

/* Reset font-family inheritance so FontAwesome icons render */
.fa,
.fas,
.far,
.fal,
.fad,
.fab,
.fa-solid,
.fa-regular,
.fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}

.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease-in-out;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* CONTAINER */
.site-container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ============================================================
   1. TOP BAR (Dark strip)
   ============================================================ */
.top-bar {
    background-color: #212121;
    color: #d1d5db;
    font-size: 11.5px;
    border-bottom: 1px solid #2d2d2d;
    padding: 6px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
}

.top-date {
    color: #e5e7eb;
    font-weight: 500;
}

.top-latest-label {
    color: #9ca3af;
    font-weight: 600;
}

.ticker-wrap {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 580px;
}

.top-news-link {
    color: #38bdf8;
    font-size: 11.5px;
}

.top-news-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.social-icon {
    color: #9ca3af;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.social-icon:hover {
    color: #ffffff;
}

.social-icon:hover .fa-facebook-f {
    color: #3b82f6;
}

.social-icon:hover .fa-x-twitter {
    color: #ffffff;
}

.social-icon:hover .fa-instagram {
    color: #f43f5e;
}

.social-icon:hover .fa-pinterest-p {
    color: #ef4444;
}

.social-icon:hover .fa-youtube {
    color: #ef4444;
}

/* ============================================================
   2. MAIN RED HEADER & BRAND LOGO
   ============================================================ */
.main-header {
    background-color: #920c0c;
    padding: 12px 0 14px 0;
    /* Compact professional strip height */
    color: #ffffff;
}

.header-inner {
    display: flex;
    align-items: center;
}

.brand-logo-link {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.brand-logo-link:hover {
    opacity: 0.92;
}

.brand-block {
    color: #ffffff;
    user-select: none;
    line-height: 1.15;
}

.brand-title {
    font-size: 26px;
    /* Refined professional size */
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 13px;
    /* Clean, proportional subtitle */
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.2px;
    color: #ffffff;
    margin-bottom: 1px;
}

.brand-tagline {
    font-size: 10.5px;
    /* Subtle crisp tagline */
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.82);
}

/* ============================================================
   3. BLUE ACCENT SEPARATOR STRIP
   ============================================================ */
.blue-separator {
    height: 3px;
    background-color: #0284c7;
    width: 100%;
}

/* ============================================================
   4. NAVIGATION BAR (Dark charcoal / black)
   ============================================================ */
.main-navbar {
    background-color: #212121;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
    z-index: 50;
    min-height: 54px;
    /* Increased nav bar height */
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 20px;
    padding-right: 20px;
    min-height: 54px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    padding: 12px 0;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    /* Set exact 10px gap between category items on desktop */
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 50px;
    flex-wrap: nowrap;
    /* Keep cleanly on one line on desktop without squishing */
    overflow-x: auto;
    /* Allows smooth scrolling if viewport is narrow */
    scrollbar-width: none;
    /* Hide scrollbar in Firefox */
}

.nav-menu::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar in Chrome/Safari */
}

.nav-item {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Nav Link Styling & Hover Effects */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 16px 7px;
    /* Reduced horizontal padding to tighten spacing between category items */
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #e2e8f0;
    white-space: nowrap;
    text-transform: uppercase;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
    line-height: 1;
    overflow: hidden;
    border-radius: 4px;
}

/* Background subtle glow pill effect on hover */
.nav-link::before {
    content: '';
    position: absolute;
    inset: 6px 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(14, 165, 233, 0.05));
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Animated sliding underline indicator on bottom */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9, #60a5fa);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.nav-link:hover::before,
.nav-item.active .nav-link::before {
    opacity: 1;
    transform: scale(1);
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 80%;
    left: 10%;
}

.home-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px 10px 0;
    line-height: 1;
    overflow: visible;
}

.home-icon-link::before,
.home-icon-link::after {
    display: none;
    /* No underline on icon */
}

.home-exact-svg {
    width: 27px;
    height: 27px;
    display: block;
    fill: #ffffff !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.home-icon-link:hover .home-exact-svg,
.nav-item.active .home-icon-link .home-exact-svg {
    transform: scale(1.12) translateY(-1px);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

/* ============================================================
   5. HOMEPAGE AD GRID LAYOUT (Exact 2-column distribution)
   ============================================================ */
.portal-main-content {
    background-color: #f8fafc;
    padding: 24px 0 36px 0;
}

.ad-portal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.ad-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Ad card styles */
.ad-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ad-card img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-pair-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 12px;
}

.ad-pair-grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================================
   5. CATEGORY ARCHIVE GRID (3 Cards Per Row, 5 Rows = 15/Page)
   ============================================================ */
.category-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.category-article-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Card Thumbnail with 160:89 Aspect Ratio & Max Render Width 400px */
.card-thumbnail-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 160 / 89;
    background-color: #f1f5f9;
    overflow: hidden;
    margin: 0 auto;
}

.card-thumbnail-box img {
    width: 100%;
    max-width: 400px;
    height: 100%;
    aspect-ratio: 160 / 89;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-article-card:hover .card-thumbnail-box img {
    transform: scale(1.04);
}

.card-thumbnail-fallback {
    width: 100%;
    max-width: 400px;
    height: 100%;
    aspect-ratio: 160 / 89;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #94a3b8;
    font-size: 28px;
}

/* Category Badge (Overlay at bottom-left of thumbnail) */
.card-cat-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: #0284c7;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 3px;
    z-index: 2;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.card-cat-badge:hover {
    background-color: #0369a1;
    color: #ffffff;
}

/* Card Body */
.card-body-content {
    padding: 16px 18px 20px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Card Meta (Date & Author) */
.card-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.card-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-meta-row i {
    color: #94a3b8;
    font-size: 11px;
}

/* Card Title */
.card-title-head {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 16px 0;
    flex: 1;
}

.card-title-head a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title-head a:hover {
    color: #0284c7;
}

/* Card Read More Button */
.card-readmore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    background-color: #0284c7;
    color: #ffffff !important;
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.card-readmore-btn:hover {
    background-color: #0369a1;
    transform: translateY(-1px);
}

/* Custom Grid Numeric Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pagination-wrapper a:hover {
    background-color: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.pagination-wrapper .current-page {
    background-color: #920c0c;
    border-color: #920c0c;
    color: #ffffff;
}

.pagination-wrapper .dots {
    border: none;
    background: transparent;
    color: #94a3b8;
}

@media (max-width: 991px) {
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .category-grid-container {
        grid-template-columns: 1fr;
    }
}

/* Archive Title Banner */
.header-post-title-container {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
    margin-bottom: 24px;
}

.page-header {
    border: none;
    padding: 0;
    margin: 0;
}

.page-title {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.page-title span {
    color: #920c0c;
    font-weight: 700;
}

/* Main Site Content Grid */
#content.site-content {
    background-color: #ffffff;
    padding-bottom: 40px;
}

.category-main-wrap {
    width: 100%;
}

/* Primary Article Feed */
#primary.content-area {
    width: 100%;
}

.article-container {
    display: flex;
    flex-direction: column;
}

/* Post Article Container */
article.post.hentry {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

article.post.hentry:last-child {
    border-bottom: none;
    margin-bottom: 12px;
}

/* Post Featured Thumbnail */
.post-featured-image {
    width: 260px;
    min-width: 260px;
    height: 175px;
    overflow: hidden;
    margin: 0;
    border-radius: 2px;
    background-color: #f3f4f6;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.post-featured-image a:hover img {
    opacity: 0.9;
    transform: scale(1.03);
}

/* Article Content Body */
.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.entry-header {
    margin-bottom: 6px;
}

.entry-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px 0;
}

.entry-title a {
    color: #1f2937;
    transition: color 0.15s ease;
}

.entry-title a:hover {
    color: #920c0c;
}

/* Entry Meta Bar (Date, Author, Comments) */
.entry-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 11.5px;
    color: #6b7280;
    margin-bottom: 10px;
}

.entry-meta-bar span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.entry-meta-bar i {
    color: #9ca3af;
    font-size: 11px;
}

.entry-meta-bar a {
    color: #6b7280;
}

.entry-meta-bar a:hover {
    color: #920c0c;
}

/* Post Summary & Read More */
.entry-summary {
    font-size: 13px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 14px;
}

.entry-summary p {
    margin: 0;
}

.entry-readmore {
    margin-top: auto;
}

.more-link {
    display: inline-block;
    background-color: #920c0c;
    color: #ffffff !important;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.more-link:hover {
    background-color: #0284c7;
}

/* Authentic ColorMag / WordPress Archive Pagination */
ul.default-wp-page {
    list-style: none;
    margin: 15px 0 0 0;
    padding: 16px 0 0 0;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

ul.default-wp-page li.previous a,
ul.default-wp-page li.next a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #212121;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

ul.default-wp-page li.previous a:hover,
ul.default-wp-page li.next a:hover {
    background-color: #920c0c;
}

/* Secondary Widget Sidebar */
#secondary.widget-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: #ffffff;
    margin-bottom: 0;
}

/* Widget Titles */
.widget-title {
    position: relative;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.widget-title span {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    margin-bottom: -10px;
    border-bottom: 2px solid #920c0c;
}

/* Sidebar Ads */
.widget_ad .widget-ad-wrap {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget_ad .widget-ad-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.widget_ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* Categories Widget */
.widget_categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget_categories li {
    border-bottom: 1px dotted #e5e7eb;
    padding: 7px 0;
}

.widget_categories li:last-child {
    border-bottom: none;
}

.widget_categories li a {
    color: #374151;
    font-size: 13px;
    transition: color 0.15s ease, padding-left 0.15s ease;
    display: block;
}

.widget_categories li a:hover,
.widget_categories li.current-cat a {
    color: #920c0c;
    font-weight: 700;
    padding-left: 4px;
}

@media (max-width: 900px) {
    .category-main-wrap {
        grid-template-columns: 1fr;
    }

    article.post.hentry {
        flex-direction: column;
    }

    .post-featured-image {
        width: 100%;
        min-width: 100%;
        height: 220px;
    }
}

/* ============================================================
   6. UNIVERSAL FOOTER
   ============================================================ */
.main-footer {
    background-color: #27262b;
    color: #9ca3af;
    padding: 14px 0;
    font-size: 11px;
    border-top: 1px solid #374151;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.copyright-text {
    margin: 0;
    color: #9ca3af;
    letter-spacing: 0.2px;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.f-social-icon {
    color: #6b7280;
    font-size: 12px;
    transition: color 0.2s;
}

.f-social-icon:hover {
    color: #ffffff;
}

/* ============================================================
   SINGLE ARTICLE DETAILS PAGE (70% Main + 30% Related Sidebar)
   ============================================================ */
.article-breadcrumb-bar {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
    font-size: 13px;
}

.article-breadcrumbs {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    color: #64748b;
}

.article-breadcrumbs li a {
    color: #0284c7;
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumbs li a:hover {
    color: #0369a1;
    text-decoration: underline;
}

.article-breadcrumbs li.active {
    color: #1e293b;
    font-weight: 600;
    max-width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-detail-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 32px;
    align-items: start;
    padding: 30px 0 60px 0;
}

/* 70% Left Main Content */
.article-detail-main {
    min-width: 0;
    /* Prevents flex/grid overflow */
}

.single-article-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.single-featured-image-wrap {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
}

.single-featured-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.single-article-body {
    padding: 24px 28px;
}

.single-article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    margin-bottom: 16px;
    word-break: break-word;
}

.single-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

.single-cat-badge {
    background-color: #0284c7;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.single-article-meta i {
    margin-right: 4px;
    color: #94a3b8;
}

/* Embedded PDF Section */
.single-pdf-embed-section {
    margin-top: 10px;
}

.pdf-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 12px 18px;
}

.pdf-action-header .pdf-label {
    font-size: 13.5px;
    color: #334155;
}

.pdf-popout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #0284c7;
    color: #ffffff;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.pdf-popout-btn:hover {
    background-color: #0369a1;
    color: #ffffff;
}

.pdf-viewer-frame-box {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 6px 6px;
    background: #525659;
    position: relative;
    overflow: hidden;
}

.pdf-embed-frame {
    width: 100%;
    height: 900px;
    border: none;
    display: block;
    background: #525659;
}

/* ============================================================
   PREVIOUS & NEXT ARTICLE NAVIGATION (Post-PDF)
   ============================================================ */
.article-pagination-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}

.article-nav-card {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    min-height: 90px;
    justify-content: center;
}

.article-nav-card:hover {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
    transform: translateY(-2px);
}

.article-nav-card.nav-empty {
    border: none;
    background: transparent;
    pointer-events: none;
    box-shadow: none;
}

.nav-card-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #0284c7;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-nav-card.nav-next .nav-card-label {
    justify-content: flex-end;
}

.nav-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-nav-card.nav-next .nav-card-body {
    justify-content: flex-end;
    text-align: right;
}

.nav-card-thumb {
    width: 60px;
    min-width: 60px;
    aspect-ratio: 160 / 89;
    border-radius: 4px;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}

.nav-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.article-nav-card:hover .nav-card-title {
    color: #0284c7;
}

@media (max-width: 600px) {
    .article-pagination-nav {
        grid-template-columns: 1fr;
    }

    .article-nav-card.nav-next .nav-card-label,
    .article-nav-card.nav-next .nav-card-body {
        justify-content: flex-start;
        text-align: left;
    }
}

/* 30% Right Sidebar: Related Articles */
.article-detail-sidebar {
    min-width: 0;
}

.related-articles-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sidebar-block-header {
    border-bottom: 2px solid #0284c7;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.sidebar-block-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
}

.related-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-article-card {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.related-article-card:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.related-card-thumb {
    width: 110px;
    min-width: 110px;
    aspect-ratio: 160 / 89;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.related-card-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.related-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.related-card-thumb a:hover img {
    transform: scale(1.04);
}

.related-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.related-card-title {
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    word-break: break-word;
}

.related-card-title a {
    color: #1e293b;
}

.related-card-title a:hover {
    color: #0284c7;
}

@media (max-width: 900px) {
    .article-detail-layout {
        grid-template-columns: 1fr;
    }

    .pdf-embed-frame {
        height: 600px;
    }
}

/* ============================================================
   RESPONSIVE DESIGN & MOBILE FLYOUT CATEGORY MENU
   ============================================================ */
/* Desktop defaults for flyout elements */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.15s ease;
}

.mobile-nav-toggle:active {
    transform: scale(0.95);
}

.flyout-header {
    display: none;
}

.mobile-flyout-overlay {
    display: none;
}

.mobile-home-text {
    display: none;
}

.nav-flyout-drawer {
    display: flex;
    align-items: center;
    width: 100%;
}

@media (max-width: 991px) {

    /* Main Red Header: Place Logo & Hamburger side by side */
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }

    .mobile-nav-toggle:hover {
        background: rgba(0, 0, 0, 0.35);
    }

    /* Hide desktop horizontal nav bar in mobile/tablet */
    .main-navbar {
        min-height: 0;
        background: transparent;
        border-bottom: none;
    }

    .nav-container {
        padding: 0;
        min-height: 0;
    }

    /* Flyout Backdrop Overlay */
    .mobile-flyout-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 9998;
    }

    .mobile-flyout-overlay.overlay-active {
        opacity: 1;
        visibility: visible;
    }

    /* Flyout Drawer Sliding from Left in Clean White Theme */
    .nav-flyout-drawer {
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        width: 320px;
        max-width: 86vw;
        height: 100vh;
        background-color: #ffffff;
        /* Clean White Theme */
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        transform: translateX(-100%);
        /* Opens from Left */
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .nav-flyout-drawer.flyout-active {
        transform: translateX(0);
    }

    /* Drawer Header */
    .flyout-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        background-color: #920c0c;
        border-bottom: 3px solid #0284c7;
        color: #ffffff;
    }

    .flyout-brand strong {
        display: block;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: 0.5px;
        color: #ffffff;
    }

    .flyout-brand span {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
    }

    .flyout-close-btn {
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #ffffff;
        width: 32px;
        height: 32px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 16px;
        transition: all 0.2s;
    }

    .flyout-close-btn:hover {
        background: rgba(0, 0, 0, 0.5);
    }

    /* Drawer Menu Item List in White Theme */
    .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 6px 0 30px 0;
        overflow-y: auto;
        gap: 0;
        background-color: #ffffff;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        background-color: #ffffff;
    }

    .nav-link {
        display: flex;
        align-items: center;
        padding: 13px 20px;
        font-size: 13.5px;
        font-weight: 600;
        color: #1e293b;
        /* Dark charcoal text on clean white */
        gap: 12px;
        transition: background 0.2s, color 0.2s, padding-left 0.2s;
        border-radius: 0;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        transform: none !important;
        text-shadow: none !important;
    }

    /* Turn off desktop hover pseudo-elements in mobile flyout */
    .nav-link::before,
    .nav-link::after,
    .nav-item.active .nav-link::before,
    .nav-item.active .nav-link::after {
        display: none !important;
    }

    .nav-link:hover {
        background-color: #f8fafc;
        color: #0284c7;
        padding-left: 24px;
        transform: none !important;
        text-shadow: none !important;
    }

    /* Elegant, premium mobile active menu item styling */
    .nav-item.active {
        background: #fdf2f2;
        border-left: 4px solid #920c0c;
    }

    .nav-item.active .nav-link {
        border-left: none;
        background: transparent !important;
        color: #920c0c !important;
        font-weight: 700;
        text-shadow: none !important;
        transform: none !important;
        padding-left: 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-item.active .nav-link::after {
        content: '\f054' !important;
        display: inline-block !important;
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 11px;
        color: #920c0c;
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        opacity: 0.8;
    }

    .mobile-home-text {
        display: inline-block;
        font-size: 13.5px;
        font-weight: 700;
    }

    .nav-link.home-icon-link {
        color: #920c0c;
    }

    .home-exact-svg {
        display: none;
    }

    /* Portal & Dynamic Grid on Tablets/Mobile */
    .ad-portal-layout {
        grid-template-columns: 1fr;
    }

    .dynamic-row {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Prevent background scroll when flyout is open */
    body.flyout-open-noscroll {
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    .brand-title {
        font-size: 22px;
    }

    .brand-subtitle {
        font-size: 9.5px;
    }

    .brand-tagline {
        font-size: 9px;
    }

    .ad-pair-grid {
        grid-template-columns: 1fr;
    }

    .ad-pair-grid-equal {
        grid-template-columns: 1fr;
    }

    .dynamic-nested-row {
        grid-template-columns: 1fr !important;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
}