/* ====================================================
   TANTU BLOG LIST & SHOWCASE PLUGIN — STYLESHEET
   v1.2.0 — Explicit Locked Filter Pill Colors
   ==================================================== */

.tantu-blog-wrapper {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 24px auto 60px;
    padding: 0 16px;
    box-sizing: border-box;
    color: #1e293b;
}

/* ====================================================
   CONTROLS BAR (Filter Pills + Search Bar)
   ==================================================== */
.tantu-blog-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.tantu-blog-filter-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Inactive Filter Buttons ---- */
.tantu-blog-wrapper .tantu-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 18px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 30px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-family: inherit !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    line-height: 1.4 !important;
    text-transform: none !important;
}

.tantu-blog-wrapper .tantu-filter-btn:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
}

.tantu-blog-wrapper .tantu-filter-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tantu-blog-wrapper .tantu-cat-count {
    display: inline-block !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    margin-left: 2px !important;
    line-height: 1 !important;
}

/* ---- Active Selected Filter Button ---- */
.tantu-blog-wrapper .tantu-filter-btn.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}

.tantu-blog-wrapper .tantu-filter-btn.active .tantu-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* Search Bar */
.tantu-blog-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
}

.tantu-search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
}

.tantu-blog-search-input {
    width: 100%;
    padding: 9px 36px 9px 38px;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 24px !important;
    font-size: 13.5px;
    color: #0f172a !important;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.tantu-blog-search-input::placeholder {
    color: #94a3b8;
}

.tantu-blog-search-input:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12) !important;
}

.tantu-search-clear {
    position: absolute;
    right: 12px;
    background: none !important;
    border: none !important;
    font-size: 18px;
    color: #94a3b8 !important;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tantu-search-clear:hover {
    color: #1e293b !important;
}

/* ====================================================
   LOADING OVERLAY & SPINNER
   ==================================================== */
.tantu-blog-loading {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.tantu-spinner {
    width: 38px;
    height: 38px;
    border: 3.5px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: tantuSpin 0.65s linear infinite;
}

@keyframes tantuSpin {
    to { transform: rotate(360deg); }
}

/* ====================================================
   GRID LAYOUT
   ==================================================== */
.tantu-blog-grid {
    display: grid;
    gap: 28px;
    width: 100%;
}

.tantu-cols-1 { grid-template-columns: 1fr; }
.tantu-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tantu-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tantu-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .tantu-cols-3, .tantu-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .tantu-cols-2, .tantu-cols-3, .tantu-cols-4 { grid-template-columns: 1fr; }
    .tantu-blog-controls { flex-direction: column; align-items: stretch; }
    .tantu-blog-search-wrap { width: 100%; }
}

/* ====================================================
   PREMIUM CARD DESIGN
   ==================================================== */
.tantu-blog-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

.tantu-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
}

/* Image Wrap */
.tantu-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8fafc;
}

.tantu-card-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.tantu-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.tantu-blog-card:hover .tantu-card-img {
    transform: scale(1.05);
}

/* Light Modern Placeholder */
.tantu-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #3b82f6;
}

.tantu-placeholder-icon {
    width: 38px;
    height: 38px;
    color: #2563eb;
}

.tantu-card-img-placeholder span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #1d4ed8;
}

/* Badge Overlay */
.tantu-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
}

.tantu-card-badge span {
    display: inline-block;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Content Wrap */
.tantu-card-content {
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tantu-card-meta-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.tantu-meta-date, .tantu-meta-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tantu-meta-date svg, .tantu-meta-time svg {
    width: 13px;
    height: 13px;
    color: #94a3b8;
}

.tantu-meta-dot {
    color: #cbd5e1;
}

/* Title */
.tantu-card-title {
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px 0;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tantu-card-title a {
    color: #0f172a !important;
    text-decoration: none;
    transition: color 0.15s;
}

.tantu-card-title a:hover {
    color: #2563eb !important;
}

/* Excerpt */
.tantu-card-excerpt {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 20px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.tantu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.tantu-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tantu-author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.tantu-author-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.tantu-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #2563eb !important;
    text-decoration: none;
    transition: gap 0.2s;
}

.tantu-arrow-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.tantu-read-more:hover {
    color: #1d4ed8 !important;
}

.tantu-read-more:hover .tantu-arrow-icon {
    transform: translateX(3px);
}

/* Empty State */
.tantu-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
}

.tantu-empty-icon {
    width: 44px;
    height: 44px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.tantu-no-posts h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.tantu-no-posts p {
    font-size: 14px;
    margin: 0;
    max-width: 420px;
    margin: 0 auto;
}

/* ====================================================
   PAGINATION
   ==================================================== */
.tantu-blog-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.tantu-pagination-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tantu-page-btn, .tantu-page-num {
    padding: 8px 14px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 13px;
    font-weight: 600;
    color: #475569 !important;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}

.tantu-page-num {
    padding: 8px 12px;
    min-width: 36px;
    text-align: center;
}

.tantu-page-btn:hover, .tantu-page-num:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.tantu-page-num.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}
