/* --- CONTAINER --- */
.dtb-container {
    display: grid;
    width: 100%;
    box-sizing: border-box;
}

/* --- GRID MODE --- */
.dtb-mode-grid {
    grid-template-columns: repeat(var(--dtb-cols-d), 1fr);
    gap: var(--dtb-gap);
}

@media (max-width: 980px) {
    .dtb-mode-grid { grid-template-columns: repeat(var(--dtb-cols-t), 1fr); }
}

@media (max-width: 767px) {
    .dtb-mode-grid { grid-template-columns: repeat(var(--dtb-cols-m), 1fr); }
}

/* Card Style */
.dtb-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dtb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Card Content */
.dtb-card .dtb-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Footer (Button Area) */
/* CHANGED: Removed margin-top: auto; to prevent huge gaps on short content */
.dtb-card .dtb-footer {
    margin-top: 20px; 
    padding-top: 0;
}

/* --- LIST MODE --- */
.dtb-mode-list {
    display: flex;
    flex-direction: column;
    gap: var(--dtb-gap);
}

.dtb-list-item {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    min-height: 150px;
}

.dtb-col-img { flex: 0 0 25%; }
.dtb-col-content { flex: 1; padding: 25px; display: flex; flex-direction: column; justify-content: center; }
.dtb-col-meta { 
    flex: 0 0 20%; 
    padding: 20px; 
    border-left: 1px solid #f6f6f6; 
    background: #fafafa;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center;
    gap: 15px;
}

/* --- SHARED --- */
.dtb-img-wrap {
    display: block;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.dtb-no-img {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}
.dtb-no-img .dashicons { font-size: 40px; width: 40px; height: 40px; }

.dtb-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4em;
}
.dtb-title a { text-decoration: none; color: inherit; }

.dtb-meta {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    line-height: 1.5em;
}

.dtb-meta a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.dtb-meta a:hover {
    color: #000;
    text-decoration: underline;
}

.dtb-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6em;
}

/* Responsive List */
@media (max-width: 767px) {
    .dtb-list-item { flex-direction: column; }
    .dtb-col-img { width: 100%; }
    .dtb-col-meta { border-left: none; border-top: 1px solid #eee; flex-direction: row; justify-content: space-between; }
}

/* --- PAGINATION --- */
.dtb-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.dtb-pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    list-style-type: none!important;
}

.dtb-pagination li {
    margin: 0;
    padding: 0;
}

/* Page Numbers */
.dtb-pagination a, 
.dtb-pagination span.current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px; /* Slightly rounded */
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    background: #fff;
}

/* Active Page */
.dtb-pagination span.current {
    background: #333; /* Dark color for active */
    color: #fff;
    border-color: #333;
}

/* Hover State */
.dtb-pagination a:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

/* Arrows */
.dtb-pagination a .dashicons {
    font-size: 18px;
    line-height: 1;
    width: auto;
    height: auto;
}