/*
 * Design Tabs - Core Styles
 * สไตล์หลักสำหรับ Design Tabs (Layout, Navigation, Animations)
 * Version: 2.2.0
 * Last Updated: 2025-12-16
 * 
 * TABLE OF CONTENTS:
 * 1. Base Container
 * 2. Layouts (Top, Bottom, Left, Right)
 * 3. Navigation & Tabs
 * 4. Content Area
 * 5. Animation Presets
 * 6. Responsive Breakpoints
 * 7. Phase 4 Styling (Card, Accordion)
 * 8. Additional Styles (Pill, Underline)
 * 9. Post Display Customization (v2.2.0) - Grid, Card, Hover Effects
 */

/* =========================================
   1. Base Container - กล่องหลักของ Tabs
   ========================================= */
.dt-tabs-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: var(--dt-radius, 8px);
    overflow: hidden;
    background: var(--dt-bg, #fff);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 2em;
    --dt-gap: 10px;
}

/* Full Width Modifier */
.dt-tabs-wrapper.dt-full-width {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

/* =========================================
   2. Layouts (Top, Bottom, Left, Right)
   ========================================= */

/* Top (Default) */
.dt-tabs-top {
    display: flex;
    flex-direction: column;
}

/* Bottom */
.dt-tabs-bottom {
    display: flex;
    flex-direction: column-reverse;
}

.dt-tabs-bottom .dt-tabs-nav {
    border-top: 1px solid #ddd;
    border-bottom: none;
    margin-top: 20px;
    margin-bottom: 0;
}

/* Vertical Left */
.dt-tabs-left {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.dt-tabs-left .dt-tabs-nav {
    flex: 0 0 25%;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #ddd;
    margin-bottom: 0;
}

.dt-tabs-left .dt-tabs-content {
    flex: 1;
}

/* Vertical Right */
.dt-tabs-right {
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
}

.dt-tabs-right .dt-tabs-nav {
    flex: 0 0 25%;
    flex-direction: column;
    border-bottom: none;
    border-left: 1px solid #ddd;
    margin-bottom: 0;
}

.dt-tabs-right .dt-tabs-content {
    flex: 1;
}

/* Alignment Classes (Horizontal) */
.dt-tabs-top.dt-align-start .dt-tabs-nav,
.dt-tabs-bottom.dt-align-start .dt-tabs-nav {
    justify-content: flex-start;
}

.dt-tabs-top.dt-align-center .dt-tabs-nav,
.dt-tabs-bottom.dt-align-center .dt-tabs-nav {
    justify-content: center;
}

.dt-tabs-top.dt-align-end .dt-tabs-nav,
.dt-tabs-bottom.dt-align-end .dt-tabs-nav {
    justify-content: flex-end;
}

.dt-tabs-top.dt-align-stretch .dt-tabs-nav,
.dt-tabs-bottom.dt-align-stretch .dt-tabs-nav {
    justify-content: space-between;
}

.dt-tabs-top.dt-align-stretch .dt-tab-item,
.dt-tabs-bottom.dt-align-stretch .dt-tab-item {
    flex: 1;
    text-align: center;
}

/* Alignment Classes (Vertical) */
.dt-tabs-left.dt-align-start .dt-tabs-nav,
.dt-tabs-right.dt-align-start .dt-tabs-nav {
    justify-content: flex-start;
}

.dt-tabs-left.dt-align-center .dt-tabs-nav,
.dt-tabs-right.dt-align-center .dt-tabs-nav {
    justify-content: center;
}

.dt-tabs-left.dt-align-end .dt-tabs-nav,
.dt-tabs-right.dt-align-end .dt-tabs-nav {
    justify-content: flex-end;
}

/* Nav Styling override for Vertical */
.dt-tabs-left .dt-tab-item,
.dt-tabs-right .dt-tab-item {
    width: 100%;
}

/* =========================================
   3. Navigation & Tabs
   ========================================= */
.dt-tabs-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    gap: 5px;
    border-bottom: 2px solid transparent;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-width: thin;
    /* Firefox: แสดง scrollbar บางๆ */
    scrollbar-color: #cbd5e1 transparent;
    scroll-snap-type: x mandatory;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    /* เพิ่มที่ว่างสำหรับ scrollbar */
}

/* Scrollbar สำหรับ Webkit browsers (Chrome, Safari) */
.dt-tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.dt-tabs-nav::-webkit-scrollbar-track {
    background: transparent;
}

.dt-tabs-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.dt-tabs-nav::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dt-tab-item {
    flex-shrink: 0;
    scroll-snap-align: start;
    flex: 0 0 auto;
    max-width: 200px;
    /* จำกัดความกว้างสูงสุดของแต่ละ tab */
}

/* Tab Buttons */
.dt-tab-item button {
    appearance: none;
    background: transparent;
    border: none;
    padding: 16px 24px;
    cursor: pointer;
    font-size: var(--dt-tab-size, 15px);
    font-weight: 600;
    color: var(--dt-inactive-text, #6b7280);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    line-height: 1.4;
    width: auto;
    min-width: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dt-tab-item button:hover {
    color: #111827;
    background-color: rgba(0, 0, 0, 0.02);
}

.dt-tab-item.active button {
    color: var(--dt-active-text, #2563eb);
    border-bottom-color: var(--dt-primary, #2563eb);
}

/* Tab Icon */
.dt-tab-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    line-height: 18px;
}

/* Tab Badge */
.dt-tab-badge {
    display: inline-block;
    background: var(--dt-badge-bg, #ef4444);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.4;
    margin-left: 4px;
}

/* =========================================
   4. Content Area
   ========================================= */
.dt-tabs-content {
    padding: 24px;
    background: var(--dt-content-bg, #fff);
    font-size: var(--dt-content-size, 16px);
    overflow: hidden;
}

.dt-tab-panel {
    display: none;
}

.dt-tab-panel.active {
    display: block;
}

/* =========================================
   5. Animation Presets
   ========================================= */

/* Fade Animation (Default) */
.dt-anim-fade .dt-tab-panel.active {
    animation: dtFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dtFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Horizontal Animation */
.dt-anim-slide-h .dt-tab-panel.active {
    animation: dtSlideH 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dtSlideH {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Vertical Animation */
.dt-anim-slide-v .dt-tab-panel.active {
    animation: dtSlideV 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dtSlideV {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zoom Animation */
.dt-anim-zoom .dt-tab-panel.active {
    animation: dtZoom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dtZoom {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* No Animation */
.dt-anim-none .dt-tab-panel.active {
    animation: none;
}

/* =========================================
   6. Responsive Breakpoints
   ========================================= */

/* Default styles for Mobile Toggle (Hidden by default) */
.dt-mobile-accordion-toggle {
    display: none;
}

/* Tablets - Vertical Stack */
@media screen and (max-width: 768px) {
    .dt-tabs-wrapper {
        border-radius: 6px;
    }

    .dt-tabs-wrapper .dt-tabs-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        border-bottom: none;
        border-right: 1px solid #e5e7eb;
    }

    .dt-tabs-wrapper .dt-tab-item {
        width: 100%;
        flex: none;
    }

    .dt-tabs-wrapper .dt-tab-item button {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
        text-align: left;
        border-bottom: 1px solid #e5e7eb;
        border-left: 3px solid transparent;
    }

    .dt-tabs-wrapper .dt-tab-item.active button {
        border-left-color: var(--dt-primary, #2563eb);
        border-bottom-color: #e5e7eb;
        background-color: rgba(37, 99, 235, 0.05);
    }

    .dt-tabs-wrapper .dt-tab-item button:hover {
        background-color: rgba(0, 0, 0, 0.03);
    }

    .dt-tabs-wrapper .dt-tabs-content {
        padding: 18px;
    }
}

/* Mobile Devices */
@media screen and (max-width: 640px) {
    .dt-tabs-wrapper {
        border-radius: 4px;
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }

    .dt-tabs-wrapper .dt-tabs-nav {
        display: none;
    }

    /* Accordion Toggle */
    .dt-mobile-accordion-toggle {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 14px 20px;
        background: #f9fafb;
        border: none;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        font-size: 15px;
        outline: none;
    }

    .dt-mobile-accordion-toggle.active {
        background: #fff;
        color: var(--dt-primary, #2563eb);
        border-bottom-color: transparent;
    }

    .dt-mobile-accordion-toggle:hover {
        background: #f3f4f6;
    }

    .dt-tab-panel {
        border-bottom: 1px solid #e5e7eb;
    }

    .dt-tab-panel:last-child {
        border-bottom: none;
    }

    .dt-tabs-wrapper .dt-tab-item button {
        padding: 12px 16px;
        font-size: 13px;
    }

    .dt-tabs-wrapper .dt-tabs-content {
        padding: 14px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .dt-tabs-wrapper {
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }

    .dt-tabs-wrapper .dt-tab-item button {
        padding: 10px 14px;
        font-size: 12px;
    }

    .dt-tabs-wrapper .dt-tabs-content {
        padding: 12px;
    }
}

/* Extra Small Mobile */
@media screen and (max-width: 375px) {
    .dt-tabs-wrapper .dt-tab-item button {
        padding: 10px 12px;
        font-size: 11px;
    }
}

/* =========================================
   7. Phase 4: Advanced Styling (Card, Accordion)
   ========================================= */

/* Card Style */
.dt-tabs-wrapper.dt-style-card {
    border: none;
    box-shadow: none;
    background: transparent !important;
}

.dt-tabs-wrapper.dt-style-card .dt-tabs-nav {
    margin-bottom: 0;
    gap: 4px;
    border-bottom: none;
    padding-left: 4px;
}

.dt-tabs-wrapper.dt-style-card .dt-tab-item button {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 0;
    color: #4b5563;
    transition: all 0.2s;
}

.dt-tabs-wrapper.dt-style-card .dt-tab-item button:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.dt-tabs-wrapper.dt-style-card .dt-tab-item.active button {
    background: #fff !important;
    color: var(--dt-primary, #2563eb);
    border-color: #e5e7eb;
    font-weight: 600;
    position: relative;
    top: 1px;
    z-index: 2;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.02);
}

.dt-tabs-wrapper.dt-style-card .dt-tabs-content {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

/* Card Style - Vertical Tweaks */
.dt-tabs-wrapper.dt-style-card.dt-tabs-left .dt-tab-item button,
.dt-tabs-wrapper.dt-style-card.dt-tabs-right .dt-tab-item button {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 5px;
    top: 0;
}

.dt-tabs-wrapper.dt-style-card.dt-tabs-left .dt-tab-item.active button,
.dt-tabs-wrapper.dt-style-card.dt-tabs-right .dt-tab-item.active button {
    border-color: var(--dt-primary, #2563eb);
    background: #eff6ff !important;
    color: var(--dt-primary, #2563eb);
}

/* Force Accordion (Desktop) */
@media screen and (min-width: 641px) {
    .dt-tabs-wrapper.dt-accordion-desktop .dt-tabs-nav {
        display: none !important;
    }

    .dt-tabs-wrapper.dt-accordion-desktop .dt-mobile-accordion-toggle {
        display: flex !important;
    }

    .dt-tabs-wrapper.dt-accordion-desktop {
        border-radius: 6px;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .dt-tabs-wrapper.dt-accordion-desktop .dt-tab-panel {
        border-bottom: 1px solid #e5e7eb;
    }


    .dt-tabs-wrapper.dt-accordion-desktop .dt-tab-panel:last-child {
        border-bottom: none;
    }
}

/* =========================================
   8. Phase 4: Additional Styles (Pill, Underline)
   ========================================= */

/* 💊 Pill Style */
.dt-tabs-wrapper.dt-style-pill {
    border: none;
    box-shadow: none;
    background: transparent !important;
}

.dt-tabs-wrapper.dt-style-pill .dt-tabs-nav {
    border-bottom: none;
    gap: 8px;
    /* Space between pills */
    padding: 0;
    margin-bottom: 15px;
}

.dt-tabs-wrapper.dt-style-pill .dt-tab-item button {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid transparent;
    border-radius: 50px;
    /* Pill shape */
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.dt-tabs-wrapper.dt-style-pill .dt-tab-item button:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.dt-tabs-wrapper.dt-style-pill .dt-tab-item.active button {
    background: var(--dt-primary, #2563eb) !important;
    color: #fff !important;
    border-color: var(--dt-primary, #2563eb);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dt-tabs-wrapper.dt-style-pill .dt-tabs-content {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 20px;
}

/* Vertical Pill Adjustments */
.dt-tabs-wrapper.dt-style-pill.dt-tabs-left .dt-tabs-nav,
.dt-tabs-wrapper.dt-style-pill.dt-tabs-right .dt-tabs-nav {
    gap: 8px;
}

.dt-tabs-wrapper.dt-style-pill.dt-tabs-left .dt-tab-item button,
.dt-tabs-wrapper.dt-style-pill.dt-tabs-right .dt-tab-item button {
    margin-bottom: 0;
    border-radius: 8px;
    /* Slightly less round on vertical for better look */
    text-align: left;
}


/* ➖ Underline Style (Material Minimal) */
.dt-tabs-wrapper.dt-style-underline {
    border: none;
    box-shadow: none;
    background: transparent !important;
}

.dt-tabs-wrapper.dt-style-underline .dt-tabs-nav {
    border-bottom: 2px solid #e5e7eb;
    gap: 20px;
    padding: 0;
    margin-bottom: 0;
    /* Content connects directly */
    background: transparent !important;
}

.dt-tabs-wrapper.dt-style-underline .dt-tab-item button {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 12px 4px;
    margin: 0;
    margin-bottom: -2px;
    /* Overlap border */
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s;
}

.dt-tabs-wrapper.dt-style-underline .dt-tab-item button:hover {
    color: var(--dt-primary, #2563eb);
    background: transparent;
}

.dt-tabs-wrapper.dt-style-underline .dt-tab-item.active button {
    background: transparent !important;
    color: var(--dt-primary, #2563eb) !important;
    border-bottom-color: var(--dt-primary, #2563eb);
    font-weight: 600;
}

.dt-tabs-wrapper.dt-style-underline .dt-tabs-content {
    border: none;
    background: transparent;
    /* Clean look */
    padding: 20px 0;
    /* Padding only vertical */
}

/* Vertical Underline Adjustments */
.dt-tabs-wrapper.dt-style-underline.dt-tabs-left .dt-tabs-nav {
    border-bottom: none;
    border-right: 2px solid #e5e7eb;
    flex-direction: column;
}

.dt-tabs-wrapper.dt-style-underline.dt-tabs-right .dt-tabs-nav {
    border-bottom: none;
    border-left: 2px solid #e5e7eb;
}

.dt-tabs-wrapper.dt-style-underline.dt-tabs-left .dt-tab-item button {
    border-bottom: none;
    border-right: 2px solid transparent;
    margin-right: -2px;
    text-align: right;
    padding-right: 15px;
}

.dt-tabs-wrapper.dt-style-underline.dt-tabs-right .dt-tab-item button {
    border-bottom: none;
    border-left: 2px solid transparent;
    margin-left: -2px;
    text-align: left;
    padding-left: 15px;
}

.dt-tabs-wrapper.dt-style-underline.dt-tabs-left .dt-tab-item.active button {
    border-right-color: var(--dt-primary, #2563eb);
}

.dt-tabs-wrapper.dt-style-underline.dt-tabs-right .dt-tab-item.active button {
    border-left-color: var(--dt-primary, #2563eb);
}

/* =========================================
   9. Post Display Customization (v2.2.0)
   ========================================= */

/* Grid Columns */
.dt-posts-container.dt-post-grid {
    display: grid;
    gap: 20px;
}

.dt-posts-container.dt-post-grid.dt-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.dt-posts-container.dt-post-grid.dt-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dt-posts-container.dt-post-grid.dt-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.dt-posts-container.dt-post-grid.dt-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Responsive Grid */
@media screen and (max-width: 1024px) {
    .dt-posts-container.dt-post-grid.dt-cols-5 {
        grid-template-columns: repeat(4, 1fr);
    }

    .dt-posts-container.dt-post-grid.dt-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {

    .dt-posts-container.dt-post-grid.dt-cols-5,
    .dt-posts-container.dt-post-grid.dt-cols-4,
    .dt-posts-container.dt-post-grid.dt-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .dt-posts-container.dt-post-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Base Post Card */
.dt-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Card Styles */
.dt-post-card.dt-card-default {
    background: #fff;
}

.dt-post-card.dt-card-shadow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dt-post-card.dt-card-border {
    border: 1px solid #e5e7eb;
}

.dt-post-card.dt-card-minimal {
    background: transparent;
    box-shadow: none;
}

/* Hover Effects */
.dt-post-card.dt-hover-zoom .dt-post-grid-thumbnail img,
.dt-post-card.dt-hover-zoom .dt-post-list-thumbnail img {
    transition: transform 0.4s ease;
}

.dt-post-card.dt-hover-zoom:hover .dt-post-grid-thumbnail img,
.dt-post-card.dt-hover-zoom:hover .dt-post-list-thumbnail img {
    transform: scale(1.08);
}

.dt-post-card.dt-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.dt-post-card.dt-hover-glow:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    border-color: rgba(37, 99, 235, 0.3);
}

/* Image Position */
.dt-post-grid-item.dt-img-top {
    display: flex;
    flex-direction: column;
}

.dt-post-grid-item.dt-img-left,
.dt-post-list-item.dt-img-left {
    display: flex;
    flex-direction: row;
}

.dt-post-grid-item.dt-img-left .dt-post-grid-thumbnail,
.dt-post-list-item.dt-img-left .dt-post-list-thumbnail {
    flex: 0 0 40%;
    max-width: 40%;
}

.dt-post-grid-item.dt-img-right,
.dt-post-list-item.dt-img-right {
    display: flex;
    flex-direction: row-reverse;
}

.dt-post-grid-item.dt-img-right .dt-post-grid-thumbnail,
.dt-post-list-item.dt-img-right .dt-post-list-thumbnail {
    flex: 0 0 40%;
    max-width: 40%;
}

/* Thumbnail Styling */
.dt-post-grid-thumbnail,
.dt-post-list-thumbnail {
    overflow: hidden;
}

.dt-post-grid-thumbnail img,
.dt-post-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Area */
.dt-post-grid-content,
.dt-post-list-content {
    padding: 15px;
}

.dt-post-grid-content h3,
.dt-post-list-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.dt-post-grid-content h3 a,
.dt-post-list-content h3 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.dt-post-grid-content h3 a:hover,
.dt-post-list-content h3 a:hover {
    color: var(--dt-primary, #2563eb);
}

/* Post Meta */
.dt-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.dt-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Excerpt */
.dt-post-excerpt {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Badge */
.dt-category-badge {
    display: inline-block;
    background: var(--dt-primary, #2563eb);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* List Layout */
.dt-posts-container.dt-post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dt-post-list-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
}

.dt-post-list-thumbnail {
    flex: 0 0 120px;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    border-radius: 6px;
    overflow: hidden;
}

.dt-post-list-content {
    flex: 1 1 auto;
    min-width: 0;
    /* ป้องกัน flex overflow */
    padding: 0;
}

.dt-post-list-content h3 {
    font-size: 15px;
    margin: 0 0 6px 0;
    word-wrap: break-word;
}

/* List Image Size Variations - ขนาดรูปภาพสำหรับ List Layout */
/* Small: 80px - รูปขนาดเล็ก */
.dt-post-list-item.dt-list-img-small .dt-post-list-thumbnail {
    flex: 0 0 80px;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

/* Medium: 120px - รูปขนาดกลาง (ค่าเริ่มต้น) */
.dt-post-list-item.dt-list-img-medium .dt-post-list-thumbnail {
    flex: 0 0 120px;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* Large: 180px - รูปขนาดใหญ่ */
.dt-post-list-item.dt-list-img-large .dt-post-list-thumbnail {
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
}

/* X-Large: 250px - รูปขนาดใหญ่พิเศษ */
.dt-post-list-item.dt-list-img-xlarge .dt-post-list-thumbnail {
    flex: 0 0 250px;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
}

/* Read More Button */
.dt-read-more {
    display: inline-block;
    padding: 10px 24px;
    background: var(--dt-primary, #2563eb);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.dt-read-more:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* =========================================
   10. Post Display Responsive (v2.2.0)
   ========================================= */

/* Tablet - List Layout */
@media screen and (max-width: 768px) {
    .dt-post-list-thumbnail {
        flex: 0 0 100px;
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    .dt-post-list-content h3 {
        font-size: 14px;
    }

    .dt-post-meta {
        font-size: 12px;
    }

    .dt-post-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    /* Image Position - Stack on tablet */
    .dt-post-grid-item.dt-img-left,
    .dt-post-grid-item.dt-img-right {
        flex-direction: column;
    }

    .dt-post-grid-item.dt-img-left .dt-post-grid-thumbnail,
    .dt-post-grid-item.dt-img-right .dt-post-grid-thumbnail {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
}

/* Mobile - List Layout */
@media screen and (max-width: 480px) {
    .dt-post-list-item {
        flex-direction: column;
        gap: 10px;
    }

    .dt-post-list-thumbnail {
        flex: none;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .dt-post-list-content h3 {
        font-size: 14px;
    }

    .dt-post-meta {
        flex-direction: column;
        gap: 4px;
    }

    .dt-post-excerpt {
        -webkit-line-clamp: 2;
    }

    .dt-category-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .dt-read-more {
        display: block;
        text-align: center;
        padding: 12px 20px;
    }

    /* Post Grid Content */
    .dt-post-grid-content,
    .dt-post-list-content {
        padding: 10px;
    }
}

/* =========================================
   11. Section Headers สำหรับ Nested Tabs
   ========================================= */

/* Section Title - หัวข้อส่วนหลัก */
.dt-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 15px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--dt-primary, #2563eb);
    border-radius: 0 8px 8px 0;
}

/* Section Title แบบ Gradient */
.dt-section-title.dt-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-left: none;
    border-radius: 8px;
    padding: 14px 20px;
}

/* Section Title แบบ Minimal */
.dt-section-title.dt-minimal {
    background: transparent;
    border-left: 3px solid #e5e7eb;
    color: #6b7280;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Title แบบ Badge */
.dt-section-title.dt-badge {
    display: inline-block;
    background: var(--dt-primary, #2563eb);
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Section Title แบบ Underline */
.dt-section-title.dt-underline {
    background: transparent;
    border-left: none;
    border-bottom: 2px solid var(--dt-primary, #2563eb);
    padding: 0 0 10px 0;
    margin-bottom: 20px;
}

/* Section Title Icons */
.dt-section-title .dt-icon {
    margin-right: 8px;
}

/* Nested Tabs Container - ระยะห่างสำหรับ Tab ซ้อน */
.dt-nested-section {
    margin-bottom: 25px;
}

.dt-nested-section:last-child {
    margin-bottom: 0;
}

/* =========================================
   12. Utility Classes - คลาสช่วยเหลือ
   ========================================= */

/* Text Alignment - จัดตำแหน่งข้อความ */
.dt-text-left {
    text-align: left !important;
}

.dt-text-center {
    text-align: center !important;
}

.dt-text-right {
    text-align: right !important;
}

/* Font Weight - น้ำหนักตัวอักษร */
.dt-font-normal {
    font-weight: 400 !important;
}

.dt-font-medium {
    font-weight: 500 !important;
}

.dt-font-semibold {
    font-weight: 600 !important;
}

.dt-font-bold {
    font-weight: 700 !important;
}

/* Font Size - ขนาดตัวอักษร */
.dt-text-sm {
    font-size: 14px !important;
}

.dt-text-base {
    font-size: 16px !important;
}

.dt-text-lg {
    font-size: 18px !important;
}

.dt-text-xl {
    font-size: 20px !important;
}

.dt-text-2xl {
    font-size: 24px !important;
}

/* Margin/Padding - ระยะห่าง */
.dt-mt-0 {
    margin-top: 0 !important;
}

.dt-mt-1 {
    margin-top: 8px !important;
}

.dt-mt-2 {
    margin-top: 16px !important;
}

.dt-mt-3 {
    margin-top: 24px !important;
}

.dt-mb-0 {
    margin-bottom: 0 !important;
}

.dt-mb-1 {
    margin-bottom: 8px !important;
}

.dt-mb-2 {
    margin-bottom: 16px !important;
}

.dt-mb-3 {
    margin-bottom: 24px !important;
}

/* Text Colors - สีข้อความ */
.dt-text-primary {
    color: var(--dt-primary, #2563eb) !important;
}

.dt-text-gray {
    color: #6b7280 !important;
}

.dt-text-dark {
    color: #1f2937 !important;
}

.dt-text-white {
    color: #ffffff !important;
}