/**
 * Devders Post CPT - Style 1 preset
 * Namespace Prefix: dpc-s1-
 *
 * Font and accent colors arrive as CSS custom properties set on the
 * wrapper by PHP (--dpc-s1-font, --dpc-s1-primary*). The :root values
 * below are only fallbacks for previews without a wrapper.
 */

:root {
    --dpc-s1-bg: #ffffff;
    --dpc-s1-card: #ffffff;
    --dpc-s1-primary: #1a73e8;
    --dpc-s1-primary-dark: #1557b0;
    --dpc-s1-primary-soft: #e8f0fe;
    --dpc-s1-primary-glow: rgba(26, 115, 232, 0.18);
    --dpc-s1-text: #1f2937;
    --dpc-s1-text-soft: #6b7280;
    --dpc-s1-text-muted: #9ca3af;
    --dpc-s1-border: #e5e7eb;
    --dpc-s1-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --dpc-s1-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    --dpc-s1-shadow-lg: 0 16px 40px rgba(26, 115, 232, 0.14);
    --dpc-s1-radius: 14px;
    --dpc-s1-skel-bg-1: #f1f5f9;
    --dpc-s1-skel-bg-2: #e2e8f0;
    --dpc-s1-font: inherit;
}


/* Base resets within wrapper */
.dpc-s1-wrapper {
    font-family: var(--dpc-s1-font, inherit);
    color: var(--dpc-s1-text);
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: normal;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    box-sizing: border-box;
}

.dpc-s1-wrapper *,
.dpc-s1-wrapper *::before,
.dpc-s1-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Theme isolation: block themes cascade body typography (font-weight 300,
   tight letter-spacing) into untouched properties, and some themes style
   bare form elements directly. Pin the fundamentals inside the wrapper. */
.dpc-s1-wrapper button,
.dpc-s1-wrapper input[type="text"] {
    appearance: none;
    -webkit-appearance: none;
    background-image: none;
    text-transform: none;
    font-weight: 500;
}

.dpc-s1-wrapper input[type="text"] {
    font-weight: 400;
}

.dpc-s1-container {
    margin: 0 auto;
}

/* ---------- Unified Header Bar (Pills Left & Tools Right) ---------- */
.dpc-s1-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.dpc-s1-pills-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Arrow Wrappers with Gradient Fade Backdrop */
.dpc-s1-pills-arrow-wrap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 52px;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dpc-s1-arrow-prev-wrap {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(to right, var(--dpc-s1-bg) 45%, rgba(255, 255, 255, 0) 100%);
}

.dpc-s1-arrow-next-wrap {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(to left, var(--dpc-s1-bg) 45%, rgba(255, 255, 255, 0) 100%);
}

.dpc-s1-pills-arrow-wrap.dpc-s1-visible {
    opacity: 1;
    visibility: visible;
}

/* Arrow Round Button */
.dpc-s1-pills-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--dpc-s1-border);
    color: var(--dpc-s1-text-soft);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.dpc-s1-pills-arrow:hover {
    background: #ffffff;
    color: var(--dpc-s1-primary);
    border-color: var(--dpc-s1-primary);
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.2);
}

.dpc-s1-pills-arrow:active {
    transform: scale(0.95);
}

.dpc-s1-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 2px 6px;
    flex-wrap: nowrap;
    cursor: grab;
}

.dpc-s1-pills.dpc-s1-is-dragging {
    cursor: grabbing;
    user-select: none;
}

.dpc-s1-pills::-webkit-scrollbar {
    display: none;
}

.dpc-s1-pill {
    padding: 8px 16px;
    border: 1.5px solid var(--dpc-s1-border);
    background: var(--dpc-s1-card);
    color: var(--dpc-s1-text-soft);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: var(--dpc-s1-shadow-sm);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
}

.dpc-s1-pill:hover {
    border-color: var(--dpc-s1-primary);
    color: var(--dpc-s1-primary);
    transform: translateY(-1px);
}

.dpc-s1-pill:active {
    transform: scale(0.95);
}

.dpc-s1-pill:focus-visible {
    outline: 2px solid var(--dpc-s1-primary);
    outline-offset: 2px;
}

.dpc-s1-pill.dpc-s1-active {
    background: var(--dpc-s1-primary);
    border-color: var(--dpc-s1-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--dpc-s1-primary-glow);
}

.dpc-s1-pill .dpc-s1-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
}

.dpc-s1-pill.dpc-s1-active .dpc-s1-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Tools Controls (Search, View Toggle, Sort) */
.dpc-s1-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dpc-s1-tools:empty {
    display: none;
}

/* Search Toggle Button */
.dpc-s1-search-toggle {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--dpc-s1-border);
    background: var(--dpc-s1-card);
    color: var(--dpc-s1-text-soft);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--dpc-s1-shadow-sm);
    flex-shrink: 0;
}

.dpc-s1-search-toggle:hover {
    border-color: var(--dpc-s1-primary);
    color: var(--dpc-s1-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.dpc-s1-search-toggle.dpc-s1-active {
    background: var(--dpc-s1-primary);
    border-color: var(--dpc-s1-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--dpc-s1-primary-glow);
}

/* View Toggle Control */
.dpc-s1-view-toggle {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--dpc-s1-border);
    gap: 2px;
}

.dpc-s1-view-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--dpc-s1-text-muted);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpc-s1-view-btn:hover {
    color: var(--dpc-s1-text);
}

.dpc-s1-view-btn.dpc-s1-active {
    background: #ffffff;
    color: var(--dpc-s1-primary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Sort By Dropdown */
.dpc-s1-sort-dropdown {
    position: relative;
    display: inline-block;
}

.dpc-s1-sort-btn {
    height: 36px;
    padding: 0 11px;
    border: 1.5px solid var(--dpc-s1-border);
    background: var(--dpc-s1-card);
    color: var(--dpc-s1-text-soft);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--dpc-s1-shadow-sm);
    white-space: nowrap;
}

.dpc-s1-sort-btn:hover {
    border-color: var(--dpc-s1-primary);
    color: var(--dpc-s1-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.dpc-s1-sort-dropdown.dpc-s1-open .dpc-s1-sort-btn {
    border-color: var(--dpc-s1-primary);
    color: var(--dpc-s1-primary);
    box-shadow: 0 0 0 3px var(--dpc-s1-primary-soft);
}

.dpc-s1-sort-icon {
    color: var(--dpc-s1-text-muted);
}

.dpc-s1-sort-arrow {
    color: var(--dpc-s1-text-muted);
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.dpc-s1-sort-dropdown.dpc-s1-open .dpc-s1-sort-arrow {
    transform: rotate(180deg);
}

.dpc-s1-sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 175px;
    background: #ffffff;
    border: 1px solid var(--dpc-s1-border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    padding: 6px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
}

.dpc-s1-sort-dropdown.dpc-s1-open .dpc-s1-sort-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dpc-s1-sort-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--dpc-s1-text-soft);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.dpc-s1-sort-item:hover {
    background: var(--dpc-s1-primary-soft);
    color: var(--dpc-s1-primary);
}

.dpc-s1-sort-item.dpc-s1-active {
    background: var(--dpc-s1-primary-soft);
    color: var(--dpc-s1-primary);
    font-weight: 600;
}

.dpc-s1-sort-item .dpc-s1-check-icon {
    display: none;
    color: var(--dpc-s1-primary);
}

.dpc-s1-sort-item.dpc-s1-active .dpc-s1-check-icon {
    display: block;
}

/* Expandable Search Wrap */
.dpc-s1-search-wrap {
    position: relative;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.3s ease;
    pointer-events: none;
    margin-bottom: 0;
}

.dpc-s1-search-wrap.dpc-s1-open {
    max-height: 70px;
    opacity: 1;
    overflow: visible;
    transform: translateY(0);
    pointer-events: auto;
    margin-bottom: 18px;
}

.dpc-s1-search-input {
    width: 100%;
    height: 48px;
    padding: 0 84px 0 46px;
    border: 1.5px solid var(--dpc-s1-border);
    border-radius: 24px;
    background: var(--dpc-s1-card);
    font-family: inherit;
    font-size: 14px;
    color: var(--dpc-s1-text);
    transition: all 0.2s ease;
    box-shadow: var(--dpc-s1-shadow);
    letter-spacing: -0.01em;
}

.dpc-s1-search-input::placeholder {
    color: var(--dpc-s1-text-muted);
}

.dpc-s1-search-input:focus {
    outline: none;
    border-color: var(--dpc-s1-primary);
    box-shadow: 0 0 0 4px var(--dpc-s1-primary-glow);
}

.dpc-s1-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dpc-s1-text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.dpc-s1-search-input:focus~.dpc-s1-search-icon {
    color: var(--dpc-s1-primary);
}

.dpc-s1-search-clear {
    position: absolute;
    right: 46px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: var(--dpc-s1-border);
    color: var(--dpc-s1-text-soft);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dpc-s1-search-clear:hover {
    background: var(--dpc-s1-primary);
    color: #ffffff;
}

.dpc-s1-search-clear.dpc-s1-visible {
    display: flex;
}

.dpc-s1-search-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--dpc-s1-text-muted);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dpc-s1-search-close:hover {
    background: var(--dpc-s1-border);
    color: var(--dpc-s1-text);
}

.dpc-s1-search-hint {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--dpc-s1-text-muted);
    background: var(--dpc-s1-bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--dpc-s1-border);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dpc-s1-search-input:focus~.dpc-s1-search-hint,
.dpc-s1-search-clear.dpc-s1-visible~.dpc-s1-search-hint {
    opacity: 0;
}

/* ---------- Status Sub-bar (Showing results & Active Filter Chips) ---------- */
.dpc-s1-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    min-height: 26px;
    flex-wrap: wrap;
}

.dpc-s1-results-info {
    font-size: 13px;
    color: var(--dpc-s1-text-muted);
    letter-spacing: 0.01em;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.dpc-s1-results-info strong {
    color: var(--dpc-s1-text-soft);
    font-weight: 600;
}

/* Active Filter Chips inside Status Bar */
.dpc-s1-active-filters {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    animation: dpc-s1-fadeIn 0.25s ease;
}

.dpc-s1-active-filters-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dpc-s1-text-muted);
    display: inline-flex;
    align-items: center;
}

.dpc-s1-chips-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.dpc-s1-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 10px;
    background: #f1f5f9;
    border: 1px solid var(--dpc-s1-border);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--dpc-s1-text);
}

.dpc-s1-chip strong {
    color: var(--dpc-s1-primary);
    font-weight: 600;
}

.dpc-s1-chip-remove {
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: var(--dpc-s1-text-muted);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.dpc-s1-chip-remove:hover {
    background: #ef4444;
    color: #ffffff;
}

.dpc-s1-clear-all-btn {
    border: none;
    background: transparent;
    color: #ef4444;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dpc-s1-clear-all-btn:hover {
    background: #fee2e2;
    text-decoration: none;
}

@keyframes dpc-s1-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Grid Container (Grid vs List View) ---------- */
.dpc-s1-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 44px;
    min-height: 400px;
    transition: all 0.3s ease;
}

/* ---------- List View Mode ---------- */
.dpc-s1-grid.dpc-s1-view-list {
    grid-template-columns: 1fr;
    gap: 20px;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 200px;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-image {
    width: 290px;
    max-width: 32%;
    aspect-ratio: auto;
    height: auto;
    min-height: 100%;
    flex-shrink: 0;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-title {
    font-size: 18.5px;
    line-height: 1.4;
    min-height: auto;
    margin-bottom: 10px;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-excerpt {
    font-size: 13.5px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    margin-bottom: 0;
}

/* List View Skeleton */
.dpc-s1-grid.dpc-s1-view-list .dpc-s1-skeleton {
    flex-direction: row;
    min-height: 200px;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-skel-image {
    width: 290px;
    max-width: 32%;
    aspect-ratio: auto;
    height: auto;
    flex-shrink: 0;
}

.dpc-s1-grid.dpc-s1-view-list .dpc-s1-skel-body {
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ---------- Card ---------- */
.dpc-s1-card {
    background: var(--dpc-s1-card);
    border-radius: var(--dpc-s1-radius);
    overflow: hidden;
    border: 1px solid var(--dpc-s1-border);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--dpc-s1-shadow-sm);
    animation: dpc-s1-cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    text-decoration: none;
    color: inherit;
}

@keyframes dpc-s1-cardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dpc-s1-card:hover,
.dpc-s1-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: var(--dpc-s1-shadow-lg);
    border-color: rgba(26, 115, 232, 0.35);
    outline: none;
}

.dpc-s1-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.dpc-s1-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dpc-s1-card:hover .dpc-s1-card-image img,
.dpc-s1-card:focus-visible .dpc-s1-card-image img {
    transform: scale(1.07);
}

/* Placeholder when a post has no featured image */
.dpc-s1-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dpc-s1-text-muted);
    background: linear-gradient(135deg, #f8fafc 0%, var(--dpc-s1-primary-soft) 100%);
}

.dpc-s1-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--dpc-s1-primary);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.dpc-s1-card-badge:hover {
    background: var(--dpc-s1-primary);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--dpc-s1-primary-glow);
}

.dpc-s1-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dpc-s1-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--dpc-s1-text-muted);
    margin-bottom: 10px;
}

.dpc-s1-card-title {
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.38;
    color: var(--dpc-s1-text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 46px;
    transition: color 0.2s ease;
}

.dpc-s1-card:hover .dpc-s1-card-title {
    color: var(--dpc-s1-primary);
}

.dpc-s1-card-excerpt {
    font-size: 13px;
    color: var(--dpc-s1-text-soft);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}

/* Card Footer (Date & Read Action) */
.dpc-s1-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--dpc-s1-border);
    gap: 10px;
}

.dpc-s1-card-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--dpc-s1-text-muted);
    font-weight: 500;
}

.dpc-s1-date-icon {
    color: var(--dpc-s1-text-muted);
    flex-shrink: 0;
}

.dpc-s1-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dpc-s1-primary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.dpc-s1-arrow-icon {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dpc-s1-card:hover .dpc-s1-arrow-icon {
    transform: translateX(3px);
}

/* ---------- Skeleton ---------- */
.dpc-s1-skeleton {
    background: var(--dpc-s1-card);
    border-radius: var(--dpc-s1-radius);
    overflow: hidden;
    border: 1px solid var(--dpc-s1-border);
    box-shadow: var(--dpc-s1-shadow-sm);
    display: flex;
    flex-direction: column;
}

.dpc-s1-skel {
    background: linear-gradient(90deg, var(--dpc-s1-skel-bg-1) 25%, var(--dpc-s1-skel-bg-2) 37%, var(--dpc-s1-skel-bg-1) 63%);
    background-size: 400% 100%;
    animation: dpc-s1-shimmer 1.4s ease infinite;
}

@keyframes dpc-s1-shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

.dpc-s1-skel-image {
    aspect-ratio: 16 / 10;
}

.dpc-s1-skel-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dpc-s1-skel-line {
    height: 11px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.dpc-s1-skel-line:last-of-type {
    margin-bottom: 0;
}

.dpc-s1-skel-h15 {
    height: 15px;
}

.dpc-s1-skel-short {
    width: 35%;
}

.dpc-s1-skel-medium {
    width: 70%;
}

.dpc-s1-skel-long {
    width: 100%;
}

.dpc-s1-skel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--dpc-s1-border);
}

.dpc-s1-skel-chip {
    width: 75px;
    height: 11px;
    border-radius: 4px;
}

.dpc-s1-skel-chip-sm {
    width: 38px;
    height: 11px;
    border-radius: 4px;
}

/* ---------- Empty State ---------- */
.dpc-s1-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px 70px;
    color: var(--dpc-s1-text-muted);
}

.dpc-s1-empty-icon {
    margin-bottom: 18px;
    color: #cbd5e1;
    display: inline-block;
}

.dpc-s1-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dpc-s1-text);
    margin-bottom: 6px;
}

.dpc-s1-empty-desc {
    font-size: 14px;
    color: var(--dpc-s1-text-soft);
    margin-bottom: 20px;
}

.dpc-s1-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--dpc-s1-primary);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--dpc-s1-primary-glow);
}

.dpc-s1-empty-btn:hover {
    background: var(--dpc-s1-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--dpc-s1-primary-glow);
}

/* ---------- Pagination ---------- */
.dpc-s1-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dpc-s1-pagination:empty {
    display: none;
    margin: 0;
}

.dpc-s1-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--dpc-s1-border);
    background: var(--dpc-s1-card);
    color: var(--dpc-s1-text-soft);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--dpc-s1-shadow-sm);
}

.dpc-s1-page-btn:hover:not(:disabled):not(.dpc-s1-active) {
    border-color: var(--dpc-s1-primary);
    color: var(--dpc-s1-primary);
    transform: translateY(-1px);
}

.dpc-s1-page-btn.dpc-s1-active {
    background: var(--dpc-s1-primary);
    border-color: var(--dpc-s1-primary);
    color: #ffffff;
    box-shadow: 0 6px 14px var(--dpc-s1-primary-glow);
}

.dpc-s1-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dpc-s1-page-dots {
    color: var(--dpc-s1-text-muted);
    padding: 0 4px;
    user-select: none;
    font-weight: 500;
}

/* ---------- Responsive & Mobile UX Optimization ---------- */
@media (max-width: 1100px) {
    .dpc-s1-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 800px) {
    .dpc-s1-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {

    /* Header Bar on Mobile (Pills row on top, Tools row below) */
    .dpc-s1-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 12px;
    }

    .dpc-s1-pills-wrap {
        width: calc(100% + 32px);
        margin: 0 -16px;
        overflow: hidden;
    }

    .dpc-s1-pills {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 4px 16px 6px;
        cursor: grab;
    }

    .dpc-s1-pills.dpc-s1-is-dragging {
        cursor: grabbing;
        user-select: none;
    }

    .dpc-s1-pills::-webkit-scrollbar {
        display: none;
    }

    .dpc-s1-pill {
        padding: 8px 15px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .dpc-s1-tools {
        justify-content: center;
        width: 100%;
        gap: 8px;
    }

    .dpc-s1-status-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;
        gap: 8px;
        margin-bottom: 16px;
    }

    .dpc-s1-results-info {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .dpc-s1-active-filters {
        justify-content: center;
        width: 100%;
    }

    .dpc-s1-search-hint {
        display: none;
    }

    /* Mobile Search Bar - 16px font prevents iOS auto-zoom */
    .dpc-s1-search-input {
        font-size: 16px;
        height: 48px;
        padding: 0 76px 0 44px;
        border-radius: 24px;
    }

    .dpc-s1-search-icon {
        left: 15px;
    }

    .dpc-s1-search-clear {
        right: 42px;
    }

    .dpc-s1-search-close {
        right: 8px;
    }

    /* List View adjustments on tablets */
    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-image {
        width: 220px;
        max-width: 35%;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-body {
        padding: 18px 20px;
    }
}

@media (max-width: 600px) {

    /* Compact, native newsfeed feel for List View on mobile */
    .dpc-s1-grid.dpc-s1-view-list {
        gap: 12px;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card {
        flex-direction: row;
        min-height: 108px;
        align-items: center;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-image {
        width: 108px;
        max-width: 32%;
        min-height: 108px;
        height: 100%;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-body {
        padding: 12px 14px;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-meta {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-title {
        font-size: 13.5px;
        line-height: 1.35;
        margin-bottom: 0;
        -webkit-line-clamp: 2;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-excerpt {
        display: none;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-card-badge {
        display: none;
    }

    /* Skeleton List View on Mobile */
    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-skeleton {
        min-height: 108px;
    }

    .dpc-s1-grid.dpc-s1-view-list .dpc-s1-skel-image {
        width: 108px;
        max-width: 32%;
        min-height: 108px;
    }
}

@media (max-width: 520px) {
    /* Match 14px gutters precisely at 520px */
    .dpc-s1-pills-wrap {
        width: calc(100% + 28px);
        margin: 0 -14px;
    }

    .dpc-s1-pills {
        padding: 4px 14px 6px;
    }

    .dpc-s1-search-toggle {
        width: 34px;
        height: 34px;
    }

    .dpc-s1-sort-btn {
        height: 34px;
        padding: 0 9px;
        font-size: 12px;
        gap: 4px;
    }

    .dpc-s1-sort-menu {
        min-width: 155px;
    }

    .dpc-s1-sort-item {
        font-size: 12px;
        padding: 7px 10px;
    }

    .dpc-s1-results-info {
        font-size: 12px;
    }

    .dpc-s1-view-btn {
        width: 30px;
        height: 30px;
    }

    .dpc-s1-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
        min-height: auto;
    }

    .dpc-s1-card {
        /* Smooth touch feedback on mobile tap */
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .dpc-s1-card:active {
        transform: scale(0.985);
    }

    .dpc-s1-card-body {
        padding: 16px 16px 18px;
    }

    .dpc-s1-card-title {
        font-size: 15.5px;
        min-height: auto;
        margin-bottom: 6px;
        line-height: 1.35;
    }

    .dpc-s1-card-excerpt {
        font-size: 12.5px;
        line-height: 1.5;
    }

    .dpc-s1-card-badge {
        top: 10px;
        left: 10px;
        padding: 4px 9px;
        font-size: 10.5px;
    }

    /* Mobile Pagination Scaling */
    .dpc-s1-pagination {
        gap: 4px;
    }

    .dpc-s1-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 6px;
        font-size: 13px;
        border-radius: 8px;
    }

    .dpc-s1-page-dots {
        padding: 0 2px;
        font-size: 12px;
    }
}

/* Base resets & Touch Enhancements */
.dpc-s1-wrapper button,
.dpc-s1-wrapper a,
.dpc-s1-wrapper input {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Scrollbar Customization */
.dpc-s1-wrapper ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dpc-s1-wrapper ::-webkit-scrollbar-track {
    background: transparent;
}

.dpc-s1-wrapper ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dpc-s1-wrapper ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .dpc-s1-wrapper *,
    .dpc-s1-wrapper *::before,
    .dpc-s1-wrapper *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
