/* =============================================================
   Perper Projekte v4 — Depth cards: full-bleed image, text overlay
   Tuned for site bg #000022
   ============================================================= */

/* ── Grid ──────────────────────────────────────────────────── */
.pp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

/* ── Card: full-bleed background image, content overlaid ─────── */
.pp-card {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #05051a;
    transition: border-color 0.2s ease;
}

.pp-card:hover,
.pp-card:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

.pp-card__bg {
    position: absolute;
    inset: -14px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.pp-card:hover .pp-card__bg,
.pp-card:focus-within .pp-card__bg {
    transform: scale(1.04);
}

.pp-card__bg--empty {
    background-color: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-card__bg--empty .pp-icon {
    width: 34px;
    height: 34px;
    color: rgba(255, 255, 255, 0.14);
}

.pp-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 20, 0.95) 0%,
        rgba(0, 0, 20, 0.74) 34%,
        rgba(0, 0, 20, 0.12) 62%,
        rgba(0, 0, 20, 0) 82%
    );
    pointer-events: none;
}

.pp-card__overlay {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 18px 18px;
}

/* ── Tags: status + category — always visible, above the title ─ */
.pp-card__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.pp-badge,
.pp-typ {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 0;
    border: none;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
    background: rgba(0, 0, 20, 0.5);
}

.pp-card__tags .pp-icon {
    width: 10px;
    height: 10px;
}

.pp-badge__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pp-badge--fertiggestellt { color: #86efac; }
.pp-badge--in_planung     { color: #fde047; }
.pp-badge--im_bau         { color: #fdba74; }

.pp-badge--fertiggestellt .pp-badge__dot { background: #4ade80; }
.pp-badge--in_planung     .pp-badge__dot { background: #facc15; }
.pp-badge--im_bau         .pp-badge__dot { background: #fb923c; }

.pp-typ--pv  { color: #93c5fd; }
.pp-typ--bat { color: #c4b5fd; }

/* ── Title (always visible) ───────────────────────────────────── */
.pp-card .pp-card__title,
.pp-grid .pp-card__title {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* ── Reveal panel: excerpt, specs, CTA — shown on hover/focus ─── */
.pp-card__reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.pp-card:hover .pp-card__reveal,
.pp-card:focus-within .pp-card__reveal {
    max-height: 320px;
    opacity: 1;
}

.pp-card__excerpt {
    font-size: 0.83rem;
    color: #d3d6ea;
    line-height: 1.55;
    margin: 10px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Info block (specs, on image — light values for legibility) ─ */
.pp-info {
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pp-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-info-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
}

.pp-icon {
    width: 13px;
    height: 13px;
    display: block;
}

.pp-info-label {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.pp-info-value {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
}

/* ── Mehr erfahren link — sits above the stretched card link ─── */
.pp-card__footer {
    margin-top: 12px;
}

.pp-mehr-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.pp-mehr-btn:hover {
    opacity: 0.8;
    text-decoration: none;
}

.pp-mehr-btn:focus-visible {
    outline: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pp-mehr-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.pp-mehr-btn:hover .pp-mehr-arrow {
    transform: translateX(3px);
}

/* ── Whole-card link to the project page ──────────────────────── */
.pp-card__stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pp-card__stretched-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: -2px;
}

/* ── Scroll-in animation ────────────────────────────────────── */
.pp-card {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        border-color 0.2s ease;
}

.pp-card.pp-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Empty state ────────────────────────────────────────────── */
.pp-empty {
    color: #5b6488;
    text-align: center;
    padding: 48px 0;
    font-size: 0.9rem;
}

/* ── Full-bleed page background for plugin-rendered templates ── */
.pp-page-bg {
    background: #000022;
    color: #ffffff;
    width: 100%;
}

/* Tags read fine on a photo (translucent dark chip); on a plain dark
   body background they need a lighter chip to stay visible. */
.pp-single__meta .pp-badge,
.pp-single__meta .pp-typ {
    background: rgba(255, 255, 255, 0.08);
}

/* ── Archive page (projekte/) ──────────────────────────────── */
.pp-archive-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px 60px;
}

.pp-archive__title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.pp-archive__intro {
    font-size: 1rem;
    color: #a0a8c4;
    margin: 0 0 8px;
    max-width: 640px;
}

/* ── Single projekt page ────────────────────────────────────── */
.pp-single-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px;
}

.pp-single {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    overflow: hidden;
}

.pp-single__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.pp-single__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pp-single__body {
    padding: 32px 36px 36px;
}

.pp-single__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pp-single__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #eef0f8;
    line-height: 1.25;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

.pp-single__content {
    color: #a0a8c4;
    font-size: 0.97rem;
    line-height: 1.75;
    margin-bottom: 28px;
}

.pp-single__content p { margin-bottom: 14px; }

.pp-single .pp-info {
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
    gap: 6px;
}

.pp-single .pp-info-label { color: #5b6488; }
.pp-single .pp-info-value { color: #c5cae0; }
.pp-single .pp-info-icon  { color: #5b6488; }

.pp-back {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pp-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5b6488;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.pp-back a:hover {
    color: #eef0f8;
}

.pp-back a:focus-visible {
    outline: none;
    color: #eef0f8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Motion preferences ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pp-card,
    .pp-card__bg,
    .pp-card__reveal,
    .pp-mehr-arrow {
        transition: none !important;
        animation: none !important;
    }
    .pp-card { opacity: 1; transform: none; }
    .pp-card:hover .pp-card__bg { transform: none; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pp-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .pp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .pp-card { aspect-ratio: 3 / 4; }
    .pp-card__overlay { padding: 12px; }
    .pp-single__body { padding: 20px; }
    .pp-single__title { font-size: 1.25rem; }
    .pp-archive-wrap { padding: 32px 16px 40px; }
    .pp-archive__title { font-size: 1.5rem; }
}

@media (max-width: 420px) {
    .pp-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Map marker → card highlight pulse ──────────────────────── */
@keyframes pp-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(148, 163, 184, 0.35); border-color: rgba(148, 163, 184, 0.5); }
    50%  { box-shadow: 0 0 0 8px rgba(148, 163, 184, 0.10); border-color: rgba(148, 163, 184, 0.4); }
    100% { box-shadow: 0 0 0 0   rgba(148, 163, 184, 0);    border-color: rgba(255, 255, 255, 0.14); }
}

.pp-card.pp-highlight {
    animation: pp-pulse 1.8s ease forwards;
}
