.posts-tabs {
    padding: 48px 0 96px;
    background: var(--wp--preset--color--white);
}

/* ── Header ────────────────────────────────────────────────────── */

.pt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.pt-header-left {
    flex: 1;
    min-width: 0;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-title {
    font-size: 48px;
    line-height: 1;
    font-weight: 400;
    color: var(--wp--preset--color--black);
}

.pt-desc {
    font-size: 20px;
    line-height: 28px;
    font-weight: 300;
    color: var(--wp--preset--color--dark);
    margin: 0;
}


/* ── Desktop tabs nav ──────────────────────────────────────────── */

.pt-tabs-nav {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.pt-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--neutral-200);
    margin-left: -1px;
    font-size: 14px;
    line-height: 20px;
    color: var(--wp--preset--color--dark);
    cursor: pointer;
    position: relative;
    transition: background .15s, color .15s, border-color .15s;
}

.pt-tab:first-child {
    border-radius: 4px 0 0 4px;
    margin-left: 0;
}

.pt-tab:last-child {
    border-radius: 0 4px 4px 0;
}

.pt-tab.is-active {
    background: var(--wp--preset--color--dark);
    border-color: var(--wp--preset--color--dark);
    color: var(--wp--preset--color--white);
    z-index: 1;
}

.pt-tab-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.pt-tab-icon svg {
    width: 20px;
    height: 20px;
}

/* ── Tab panels ────────────────────────────────────────────────── */

.pt-panel {
    display: none;
}

.pt-panel.is-active {
    display: block;
}

/* ── Cards grid ────────────────────────────────────────────────── */

.pt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.pt-card {
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--white);
    border-radius: 4px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, .15);
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .2s;
}

.pt-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.pt-card-img {
    position: relative;
    height: 224px;
    overflow: hidden;
    flex-shrink: 0;
}

.pt-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pt-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
}

.pt-card-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 1;
    padding: 8px 12px;
    background: rgba(26, 26, 37, .5);
    border: 1px solid var(--wp--preset--color--neutral-300);
    border-radius: 4px;
    backdrop-filter: blur(2px);
    font-size: 14px;
    line-height: 20px;
    color: var(--wp--preset--color--white);
    white-space: nowrap;
}

.pt-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 32px;
    flex: 1;
}

.pt-card-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pt-card-title {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 400;
    color: var(--wp--preset--color--black);
    margin: 0;
}

.pt-card-excerpt {
    font-size: 16px;
    line-height: 24px;
    font-weight: 300;
    color: var(--wp--preset--color--dark);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.pt-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-300);
}

.pt-card-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 11px 16px;
    margin-top: auto;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--wp--preset--color--dark);
}

.pt-empty {
    color: var(--wp--preset--color--neutral-300);
    font-size: 16px;
    padding: 32px 0;
}

/* ── Mobile ────────────────────────────────────────────────────── */

.pt-mobile {
    display: none;
}

.pt-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.pt-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, var(--wp--preset--color--white) 0%, #f1edfc 100%);
    border: 1px solid #f3f4f6;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
    aspect-ratio: 1;
    text-decoration: none;
    transition: box-shadow .2s;
}

.pt-tile:hover {
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, .12);
}

.pt-tile-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(139, 92, 246, .1);
    border-radius: 4px;
    color: var(--wp--preset--color--purple-500);
    flex-shrink: 0;
}

.pt-tile-icon-wrap svg {
    width: 28px;
    height: 28px;
}

.pt-tile-label {
    font-size: 18px;
    line-height: 24px;
    font-weight: 400;
    color: var(--wp--preset--color--black);
    text-align: center;
}

.pt-mobile-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .pt-grid {
        gap: 20px;
    }
    .pt-card-body {
        padding: 20px 24px;
    }
    .pt-card-title {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .posts-tabs {
        padding: 80px 0;
    }
    .pt-header {
        flex-direction: column;
        margin-bottom: 24px;
    }
    .pt-header-right {
        display: none;
    }
    .pt-title {
        font-size: 40px;
    }
    .pt-desc {
        font-size: 18px;
        line-height: 24px;
    }
    .pt-desktop {
        display: none;
    }
    .pt-mobile {
        display: block;
    }
}

/* ── Dark mode ─────────────────────────────────────────────────── */

html[data-theme="dark"] .posts-tabs {
    background: var(--wp--preset--color--black, #1A1A25);
}

html[data-theme="dark"] .posts-tabs .sec-headline-icon,
html[data-theme="dark"] .posts-tabs .sec-headline {
    color: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .pt-title {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .pt-desc {
    color: rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .posts-tabs .btn-primary {
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .posts-tabs .btn-primary:hover,
html[data-theme="dark"] .posts-tabs .btn-primary:active {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--dark, #2E2E39);
}

html[data-theme="dark"] .pt-tab {
    background: transparent;
    border-color: rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .pt-tab.is-active {
    background: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--dark, #2E2E39);
}

html[data-theme="dark"] .pt-card {
    background: var(--wp--preset--color--dark, #2E2E39);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .pt-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .pt-card-title {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .pt-card-excerpt {
    color: rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .pt-card-meta {
    color: rgba(255, 255, 255, .5);
}

html[data-theme="dark"] .pt-card-cta {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .pt-empty {
    color: rgba(255, 255, 255, .5);
}

html[data-theme="dark"] .pt-tile {
    background: linear-gradient(135deg, var(--wp--preset--color--dark, #2E2E39) 0%, #26262f 100%);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .pt-tile:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .pt-tile-icon-wrap {
    background: rgba(255, 229, 0, 0.16);
    color: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .pt-tile-label {
    color: var(--wp--preset--color--white);
}
