/* CSS für FlexiGrid */
/* Version: 1.5.1 */

/* ==========================================================================
   GRID
   ========================================================================== */

.rpg-grid {
    display: grid;
    gap: 18px;
}

/* ==========================================================================
   CARD – GRUNDSTRUKTUR
   ========================================================================== */

.rpg-card {
    position: relative;
    display: flex;
    flex-direction: column;

    background: #fff;
    border: 2px solid #e6e6e6;
    border-radius: 8px;

    /* --------------------------------------------------
       HÖHE / SEITENVERHÄLTNIS DER KARTE
       110% = hochformatig
       100% = quadratisch
       -------------------------------------------------- */
    height: 0;
    padding-bottom: 110%;

    /* --------------------------------------------------
       HOVER-KONFIGURATION (ZENTRAL!)
       -------------------------------------------------- */
    --card-lift: 8px;        /* ↑ Höhe beim Hover (z.B. 4px – 12px) */
    --img-scale: 1.1;          /* Bild-Zoom Normalzustand */

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Ganze Karte anheben */
.rpg-card:hover {
    transform: translateY(calc(-1 * var(--card-lift)));
    box-shadow:
        0 calc(var(--card-lift) * 2)
        calc(var(--card-lift) * 4)
        rgba(0,0,0,0.82);
}


/* ==========================================================================
   ABSOLUTE INHALTSFLÄCHE
   ========================================================================== */

.rpg-card > * {
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.rpg-card a {
    pointer-events: auto;
}

.rpg-card > .rpg-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}


/* ==========================================================================
   BILD
   ========================================================================== */

.rpg-card-image {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;

    /* --------------------------------------------------
       MAXIMALE BILDHÖHE
       Abstand nach oben steuert Textplatz
       -------------------------------------------------- */
    max-height: calc(100% - 40px);
    z-index: 1;

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.rpg-card-image img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;

    transform: scale(var(--img-scale));
    transition: transform 0.3s ease;
}

.rpg-default-image {
    display: block;
    width: 60%;        /* feste Breite */
    height: 60%;       /* feste Höhe */
}

.rpg-default-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* wichtig! */
    display: block;
}

.rpg-default-image::before {
    content: "Leider noch kein Bild vorhanden…";
    display: block;

    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    text-align: center;
    line-height: 1.4;
}


/* ==========================================================================
   TITEL
   ========================================================================== */

.rpg-card-title {
    font-size: 16px;
    margin: 0;
    line-height: 19px;
}

.rpg-card-title a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 3;
    background-color: rgba(235,235,235,0.90);
    padding: 4px 10px;
    border-radius: 6px 6px 0 0;

    text-decoration: none;
}

.rpg-card-title a:hover,
.rpg-card-title a:focus {
     text-decoration: none;    /* optional */
   color: #333;
}


/* ==========================================================================
   META / TEXT
   ========================================================================== */

.rpg-card-meta {
    font-size: 13px;
    color: #666;
    margin: 6px 10px;
}

.rpg-card-excerpt {
    flex: 1;
    margin: 6px 10px 10px;

    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.rpg-read-more {
    margin: 0 10px 10px;
    font-weight: 600;
    text-decoration: none;
    color: #1e73be;
}

/* ==========================================================================
   PAGINATION (unverändert, nur aufgeräumt)
   ========================================================================== */

.rpg-pagination {
    margin: 30px 0;
    text-align: center;
}

.rpg-pagination .page-numbers {
    display: inline-block;
    margin: 0 6px;
    padding: 10px 16px;

    border-radius: 10px;
    background: #ffffff;
    color: #444;
    text-decoration: none;
    font-weight: 400;
    border: none;

    box-shadow:
        6px 6px 14px rgba(0,0,0,0.32),
       -6px -6px 14px rgba(255,255,255,0.95);

    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
}

/* Hover: leicht angehoben */
.rpg-pagination .page-numbers:hover {
    transform: translateY(-5px);
}

/* Aktive Seite */
.rpg-pagination .page-numbers.current {
    color: #c63e30;
    font-size: 18px;

    box-shadow:
        inset 4px 4px 8px rgba(0,0,0,0.08),
        inset -4px -4px 8px rgba(255,255,255,0.9);
}

/* Klick */
.rpg-pagination .page-numbers:active {
    box-shadow:
        inset 6px 6px 10px rgba(0,0,0,0.22),
        inset -6px -6px 10px rgba(255,255,255,0.85);
}

.rpg-pagination .first,
.rpg-pagination .last,
.rpg-pagination .prev,
.rpg-pagination .next {
    font-weight: 700;
}

.rpg-pagination a.page-numbers {
    color: #c63e30;
    font-size: 16px;
}

.rpg-pagination a.page-numbers:hover {
    color: #777;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .rpg-card,
    .rpg-card-image img,
    .rpg-pagination .page-numbers {
        transition: none;
    }
}

