/* =============================================================
   SDASH Posts Block – Frontend CSS
   ============================================================= */

.sdash-pb-wrap {
    width: 100%;
    margin: 0 0 30px;
}

/* Grid */
.sdash-pb-grid {
    display: grid;
    grid-template-columns: repeat( var(--pb-cols, 2), 1fr );
    gap: 24px;
}

/* Card */
.sdash-pb-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
    cursor: pointer;
}
.sdash-pb-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
    color: inherit;
    text-decoration: none;
}

/* ----------------------------------------------------------
   Oberer Bereich – Bild füllt gesamten Header
---------------------------------------------------------- */
.sdash-pb-card-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 200px;
    overflow: hidden;
    padding: 0;
}

/* Bild nimmt gesamte Fläche ein */
.sdash-pb-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    border: none;
}

/* Gradient-Overlay damit Titel lesbar bleibt */
.sdash-pb-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.7) 0%,
        rgba(0,0,0,.2) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Titel über dem Bild */
.sdash-pb-header-title {
    position: relative;
    z-index: 2;
    font-size: .95em;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    padding: 0 16px 16px;
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
    width: 100%;
}

/* Kein Bild – Icon zentriert über farbigem Hintergrund */
.sdash-pb-icon {
    width: 60px;
    height: 60px;
    stroke: rgba(255,255,255,.85);
    position: relative;
    z-index: 2;
    margin: auto 0 12px;
}

/* ----------------------------------------------------------
   Unterer weißer Bereich
---------------------------------------------------------- */
.sdash-pb-card-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
}
.sdash-pb-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}
.sdash-pb-excerpt {
    font-size: .88em;
    color: #666;
    line-height: 1.65;
    margin: 0;
    flex: 1;
}
.sdash-pb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}
.sdash-pb-meta-item {
    font-size: .78em;
    color: #888;
}

/* Leertext */
.sdash-pb-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
}

/* ----------------------------------------------------------
   Pagination
---------------------------------------------------------- */
.sdash-pb-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}
.sdash-pb-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.sdash-pb-pagination ul li a,
.sdash-pb-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9em;
    font-weight: 500;
    color: #333;
    background: #fff;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.sdash-pb-pagination ul li a:hover {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}
.sdash-pb-pagination ul li span.current {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}
.sdash-pb-pagination ul li span.dots {
    border: none;
    background: none;
}

/* ----------------------------------------------------------
   Responsive – Tablet
---------------------------------------------------------- */
@media (max-width: 1024px) {
    .sdash-pb-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ----------------------------------------------------------
   Responsive – Mobil
---------------------------------------------------------- */
@media (max-width: 640px) {
    .sdash-pb-grid {
        grid-template-columns: 1fr !important;
    }
    .sdash-pb-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0,0,0,.08);
    }
    .sdash-pb-card:active {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,.12);
    }
}
