/* Base Typography & Spacing
* dir assets\css\tndc-single-post.css
*/
.tndc-editorial-content {
    color: #4b5563; 
    font-size: 1.125rem; 
    line-height: 2; 
    font-weight: 300; 
}
.tndc-editorial-content p {
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
}

/* Auto-Drop Cap */
.tndc-editorial-content > p:first-of-type::first-letter {
    float: left;
    font-size: 5.5rem;
    line-height: 0.8;
    padding-right: 0.75rem;
    padding-top: 0.25rem;
    color: #D10000; 
    font-family: ui-serif, Georgia, serif;
    font-weight: bold;
}

/* Headings Style */
.tndc-editorial-content h2, 
.tndc-editorial-content h3, 
.tndc-editorial-content h4 {
    font-family: ui-serif, Georgia, serif;
    color: #111111;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    clear: both;
    scroll-margin-top: 110px;
}
.tndc-editorial-content h2 { font-size: 2.25rem; }
.tndc-editorial-content h3 { font-size: 1.75rem; }

/* Image Base Styles */
.tndc-editorial-content img {
    border-radius: 4px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    height: auto;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Auto-Caption Style */
.tndc-editorial-content figcaption,
.tndc-editorial-content .wp-caption-text {
    font-size: 0.85rem;
    font-style: italic;
    color: #9ca3af;
    border-left: 2px solid #D10000;
    padding-left: 1rem;
    margin-bottom: 3rem;
    text-align: left;
}

/* Quote Style */
.tndc-editorial-content blockquote {
    font-family: ui-serif, Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #111;
    text-align: center;
    border: none;
    padding: 3rem 0;
    position: relative;
}
.tndc-editorial-content blockquote::before {
    content: "“";
    display: block;
    font-size: 4rem;
    color: #f3f4f6;
    line-height: 0;
    margin-bottom: 2rem;
}

/* Utility Classes (Smart Images) */
.smart-breakout {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
.smart-portrait {
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.smart-grid-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.smart-grid-row img { margin: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }

/* TOC Active State (PC ฝั่งซ้าย) */
#smart-toc-list a {
    transition: all 0.3s ease;
}
#smart-toc-list a.active {
    color: #D10000;
    font-weight: 700;
    transform: translateX(8px);
}
#smart-toc-list a.active::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 2px;
    background-color: #D10000;
}


/* ==========================================
   📱 THE SMART FLOATING DOCK STYLES (Mobile Only)
========================================== */

/* 🚀 บังคับซ่อนแคปซูลลอยเมื่อเปิดบนจอ PC (ขนาด 768px ขึ้นไป) */
@media (min-width: 768px) {
    #smart-floating-bar {
        display: none !important;
    }
}

/* คลาสสำหรับมุดซ่อนแถบแคปซูลลงใต้จอตอนไถนิ้ว */
.floating-bar-hide {
    transform: translate(-50%, 150%) !important;
}

/* สไตล์ลิงก์สารบัญ และ Active State ในป๊อปอัปมือถือ */
#smart-toc-list-mobile a {
    transition: all 0.2s ease;
}
#smart-toc-list-mobile a.active {
    background-color: #fef2f2; /* พื้นหลังสีแดงอ่อน (red-50) */
    color: #D10000; /* ตัวอักษรสีแดง tndc */
    font-weight: 700;
}


/* ==========================================
   🛡️ Admin-Proof: Styles for Lists & Links
========================================== */

/* สไตล์ลิงก์ (a) ในเนื้อหาบทความ */
.tndc-editorial-content p a,
.tndc-editorial-content li a {
    color: #D10000;
    text-decoration: underline;
    text-decoration-color: #fca5a5;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.tndc-editorial-content p a:hover,
.tndc-editorial-content li a:hover {
    color: #111111;
    text-decoration-color: #111111;
}

/* สไตล์ List (ul, ol) ในเนื้อหาบทความ */
.tndc-editorial-content ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 2rem;
}
.tndc-editorial-content ol {
    list-style-type: decimal;
    padding-left: 2rem;
    margin-bottom: 2rem;
}
.tndc-editorial-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}
/* เปลี่ยนสีกระสุน (Bullet) ให้เป็นสีแดง */
.tndc-editorial-content ul li::marker {
    color: #D10000;
}

/* ==========================================
   ✨ UI Polish: Custom Scrollbar (สำหรับ Mobile Sheet)
========================================== */
.custom-scrollbar {
    scrollbar-width: thin; 
    scrollbar-color: #d1d5db transparent; 
}
.custom-scrollbar::-webkit-scrollbar {
    width: 4px; 
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent; 
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e5e7eb; 
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af; 
}