/* News detail - public/news_detail.php */
/* Article Detail Page Styles */
.article-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 120px 0 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    opacity: 0.15;
    z-index: 0;
}

.article-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.article-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.82rem;
}

.article-breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
    color: white;
}

.article-breadcrumb span {
    margin: 0 0.5rem;
    color: rgba(255,255,255,0.6);
}

.article-category-badge {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.article-title {
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.25;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.article-hero-excerpt {
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 0.75rem;
    max-width: 72ch;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-item i {
    color: #ff6b35;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 0 2.5rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: block;
}

.article-content-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
    background: #f8f9fa;
    min-height: 50vh;
}

/* Improve readability with better spacing */
.article-content > p + p {
    margin-top: 1rem;
}

.article-content > h1 + p,
.article-content > h2 + p,
.article-content > h3 + p {
    margin-top: 0.5rem;
}

.article-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.article-content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(300px, 28%);
    gap: clamp(1.25rem, 2.5vw, 2rem);
    margin-top: 1rem;
    align-items: start;
}

.article-main {
    background: white;
    border-radius: 12px;
    padding: clamp(1.25rem, 2.5vw, 2rem);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: relative;
    min-width: 0;
}

/* Remove any floating elements and ensure proper layout */
.article-main * {
    position: static;
}

/* Hide any unwanted floating buttons or elements */
.article-main button[style*="position: fixed"],
.article-main button[style*="position: absolute"],
.article-main .floating-button,
.article-main .mce-tinymce {
    display: none !important;
}

.article-content {
    line-height: 1.72;
    color: #333;
    font-size: 0.98rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Ensure content doesn't overflow */
.article-content * {
    max-width: 100%;
}

/* Better spacing for nested content */
.article-content > div {
    margin-bottom: 1.5rem;
}

/* Reset first element margins */
.article-content > *:first-child {
    margin-top: 0;
}

.article-content h1,
.article-content h2,
.article-content h2.article-content__section-title {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
    color: #2c3e50;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 0.4rem;
    line-height: 1.35;
}

.article-content h2 {
    border-left: 3px solid #ff6b35;
    padding-left: 0.75rem;
}

.article-content h3 {
    font-size: clamp(0.98rem, 1.5vw, 1.08rem);
    font-weight: 600;
    margin-top: 1.35rem;
    margin-bottom: 0.55rem;
    color: #555;
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.1rem;
    margin-bottom: 0.45rem;
    color: #666;
    line-height: 1.4;
}

.article-content h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    color: #777;
    line-height: 1.4;
}

.article-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.85rem;
    margin-bottom: 0.35rem;
    color: #888;
    line-height: 1.4;
}

.article-content p {
    margin-bottom: 1rem;
    text-align: left;
    line-height: 1.72;
}

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

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.article-content ul li::marker {
    color: #ff6b35;
    font-weight: bold;
}

.article-content ol li::marker {
    color: #ff6b35;
    font-weight: bold;
}

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.article-content strong {
    font-weight: 700;
    color: #2c3e50;
}

.article-content em {
    font-style: italic;
    color: #555;
}

.article-content a {
    color: #ff6b35;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: #e55a2b;
    border-bottom-color: #e55a2b;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    pointer-events: none;
    user-select: none;
}

/* Style for images within paragraphs */
.article-content p img {
    margin: 1.5rem auto;
}

.article-content blockquote {
    border-left: 4px solid #ff6b35;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    border-radius: 4px;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #ff6b35;
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.article-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    line-height: 1.6;
}

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


.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content table th,
.article-content table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.article-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.article-content table tr:hover {
    background: #f8f9fa;
}

/* Style for iframes (videos) */
.article-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Style for embedded content */
.article-content embed,
.article-content object,
.article-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
}

/* Remove any unwanted spacing from empty elements */
.article-content p:empty,
.article-content div:empty {
    display: none;
}

/* Better styling for numbered lists with text */
.article-content ol li {
    padding-left: 0.5rem;
}

.article-content ul li {
    padding-left: 0.5rem;
}

/* Style for superscript and subscript */
.article-content sup,
.article-content sub {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

/* Style for horizontal rules */
.article-content hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 1.75rem 0;
    clear: both;
}

/* Lead grid — featured image + deck */
.article-lead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: start;
    margin-bottom: 1.25rem;
}

.article-lead-media {
    margin: 0;
}

.article-lead-media .article-featured-image {
    margin: 0;
    max-height: 340px;
    border-radius: 10px;
}

.article-lead-copy {
    display: flex;
    align-items: center;
}

.article-deck {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid #ff6b35;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

/* Embedded visual blocks (supplier AI blogs) */
.article-visual {
    margin: 1.25rem 0 1.5rem;
    clear: both;
}

.article-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.article-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
    background: linear-gradient(145deg, #fff8f5, #ffffff);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 10px;
    min-height: 88px;
}

.article-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 107, 53, 0.12);
    color: #ff6b35;
    font-size: 0.9rem;
}

.article-stat__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888;
}

.article-stat__value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

.article-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
}

.article-spec-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #444;
}

.article-spec-card__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #ff6b35;
}

.article-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
}

.article-icon-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 999px;
    font-size: 0.84rem;
    color: #444;
}

.article-icon-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.article-figure {
    margin: 1rem 0 1.25rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8eaed;
    background: #f8f9fa;
}

.article-figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.article-figure figcaption {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    color: #666;
    border-top: 1px solid #e8eaed;
}

.article-cta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    border-radius: 10px;
}

.article-cta-panel p {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 0.92rem;
}

.article-cta-panel__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    background: #ff6b35;
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: none !important;
    white-space: nowrap;
}

.article-cta-panel__btn:hover {
    background: #e55a2b;
    color: #fff !important;
}

.article-share {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
    clear: both;
}

.article-share-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.article-share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.share-btn-facebook {
    background: #3b5998;
}

.share-btn-twitter {
    background: #1da1f2;
}

.share-btn-linkedin {
    background: #0077b5;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

@media (max-width: 968px) {
    .sidebar-widget {
        position: static;
    }
}

.sidebar-widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #ff6b35;
}

.related-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.related-post-content {
    flex-grow: 1;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #ff6b35;
}

.related-post-date {
    font-size: 0.85rem;
    color: #888;
}

.article-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    clear: both;
}

.article-nav-item {
    flex: 1;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
    display: block;
}

.article-nav-item:hover {
    background: #ff6b35;
    color: white !important;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.article-nav-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.article-nav-title {
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.article-nav-item:hover .article-nav-title {
    color: white !important;
}

.article-nav-item:hover .article-nav-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

@media (max-width: 968px) {
    .article-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        order: -1;
    }
    
    .article-lead-grid {
        grid-template-columns: 1fr;
    }
    
    .article-main {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 100px 0 40px;
    }
    
    .article-content {
        font-size: 0.94rem;
    }
    
    .article-stat-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-navigation {
        flex-direction: column;
    }
    
    .article-main {
        padding: 1.15rem;
    }
}