/* ── WP Page Tabs — Frontend Bar ── */

.wpt-bar {
    --wpt-accent:  #2563eb;
    --wpt-border:  #e2e8f0;
    --wpt-bg:      #fff;
    --wpt-text:    #64748b;
    --wpt-radius:  8px;
    background: var(--wpt-bg);
    border-bottom: 1px solid var(--wpt-border);
    position: relative;
    z-index: 100;
    width: 100%;
}

.wpt-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Base Tab Link ── */
.wpt-bar__tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wpt-text);
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s, background .18s;
    position: relative;
    border: none;
    background: transparent;
}
.wpt-bar__tab:hover { color: var(--wpt-accent); }

.wpt-tab-icon { font-size: 12px; opacity: .8; }

/* ════ UNDERLINE style ════ */
.wpt-style-underline .wpt-bar__tab::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--wpt-accent);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform .2s cubic-bezier(.4,0,.2,1);
}
.wpt-style-underline .wpt-bar__tab--active { color: var(--wpt-accent); }
.wpt-style-underline .wpt-bar__tab--active::after,
.wpt-style-underline .wpt-bar__tab:hover::after { transform: scaleX(1); }

/* ════ PILL style ════ */
.wpt-style-pill .wpt-bar__inner { padding: 8px 16px; gap: 6px; }
.wpt-style-pill .wpt-bar__tab  { border-radius: 50px; padding: 7px 16px; font-size: 13px; }
.wpt-style-pill .wpt-bar__tab--active { background: var(--wpt-accent); color: #fff; }
.wpt-style-pill .wpt-bar__tab:not(.wpt-bar__tab--active):hover {
    background: #eff6ff; color: var(--wpt-accent);
}

/* ════ BOXED style ════ */
.wpt-style-boxed .wpt-bar { border-bottom: none; }
.wpt-style-boxed .wpt-bar__inner { gap: 4px; align-items: flex-end; }
.wpt-style-boxed .wpt-bar__tab {
    border: 1px solid var(--wpt-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
    padding: 10px 20px;
    margin-bottom: -1px;
}
.wpt-style-boxed .wpt-bar__tab--active {
    background: #fff;
    color: var(--wpt-accent);
    border-color: var(--wpt-border);
    border-bottom-color: #fff;
    z-index: 1;
}

/* ── Loader bar ── */
.wpt-bar__loader {
    display: none;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: #dbeafe;
    overflow: hidden;
}
.wpt-bar__loader.wpt-loading { display: block; }
.wpt-spinner {
    display: block;
    height: 100%;
    width: 40%;
    background: var(--wpt-accent);
    border-radius: 2px;
    animation: wptSlide 1s ease-in-out infinite;
}
@keyframes wptSlide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ── AJAX content area ── */
#wpt-content-area { min-height: 0; transition: opacity .2s; }
#wpt-content-area.wpt-fading { opacity: 0; }

/* ══════════════════════════════════════
   CATEGORY POSTS GRID
══════════════════════════════════════ */
.wpt-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.wpt-post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.wpt-post-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.wpt-post-card__thumb {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.wpt-post-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.wpt-post-card:hover .wpt-post-card__thumb img { transform: scale(1.04); }

.wpt-post-card__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.wpt-post-card__date {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
    display: block;
}
.wpt-post-card__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}
.wpt-post-card__title a {
    color: #1e293b;
    text-decoration: none;
}
.wpt-post-card__title a:hover { color: #2563eb; }

.wpt-post-card__excerpt {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
    flex: 1;
    line-height: 1.6;
}
.wpt-post-card__more {
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    align-self: flex-start;
}
.wpt-post-card__more:hover { text-decoration: underline; }

.wpt-no-posts {
    padding: 32px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ── Pagination ── */
.wpt-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 20px 0 8px;
    flex-wrap: wrap;
}
.wpt-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.wpt-page-btn:hover           { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.wpt-page-btn--active         { background: #2563eb; border-color: #2563eb; color: #fff; }
.wpt-page-btn--active:hover   { background: #1d4ed8; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .wpt-bar__tab  { padding: 10px 12px; font-size: 13px; }
    .wpt-bar__inner { padding: 0 8px; }
    .wpt-posts-grid { grid-template-columns: 1fr; gap: 16px; }
}
