/* PGS LARA Hundeprofile – bewusst neutral und transparent, damit Divi die Farbwelt bestimmt. */
.pgs-lara-public,
.pgs-dog-detail {
    --pgs-border: color-mix(in srgb, currentColor 18%, transparent);
    --pgs-soft: color-mix(in srgb, currentColor 5%, transparent);
    --pgs-soft-hover: color-mix(in srgb, currentColor 8%, transparent);
    --pgs-muted: color-mix(in srgb, currentColor 62%, transparent);
    color: inherit;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.pgs-profile-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
    gap: 12px;
    align-items: center;
    margin: 0 0 24px;
}

.pgs-profile-search,
.pgs-profile-filter {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid var(--pgs-border);
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0 15px;
    outline: 0;
}

.pgs-profile-search::placeholder { color: var(--pgs-muted); }
.pgs-profile-search:focus,
.pgs-profile-filter:focus { outline: 2px solid color-mix(in srgb, currentColor 18%, transparent); outline-offset: 1px; }

.pgs-view-switch {
    display: flex;
    gap: 4px;
    height: 48px;
    padding: 4px;
    border: 1px solid var(--pgs-border);
    border-radius: 12px;
    background: transparent;
}

.pgs-view-btn {
    width: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: .58;
}
.pgs-view-btn:hover,
.pgs-view-btn.is-active { background: var(--pgs-soft-hover); opacity: 1; }
.pgs-view-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pgs-view-btn svg rect { fill: none; }

.pgs-profile-list[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 24px;
}

.pgs-profile-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--pgs-border);
    border-radius: 18px;
    background: var(--pgs-soft);
    color: inherit;
    transition: transform .22s ease, background .22s ease, border-color .22s ease;
}
.pgs-profile-card:hover { transform: translateY(-3px); background: var(--pgs-soft-hover); }
.pgs-profile-card[hidden] { display: none !important; }

.pgs-card-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    color: inherit;
    background: var(--pgs-soft);
}
.pgs-card-image { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pgs-profile-card:hover .pgs-card-image { transform: scale(1.018); }
.pgs-dog-placeholder { width: 100%; height: 100%; min-height: 180px; display: grid; place-items: center; background: var(--pgs-soft); }
.pgs-dog-placeholder svg { width: 74px; height: 74px; fill: currentColor; opacity: .2; }

.pgs-card-status {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(20,20,20,.76);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
}

.pgs-card-body { padding: 20px; }
.pgs-card-body h3 { margin: 0 0 10px; color: inherit; font: inherit; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.05; font-weight: 700; }
.pgs-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.pgs-card-meta span,
.pgs-detail-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pgs-border);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1;
}
.pgs-card-body p { margin: 0 0 16px; color: inherit; opacity: .72; line-height: 1.55; }
.pgs-profile-button,
.pgs-apply-button,
.pgs-detail-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: inherit;
    border: 1px solid currentColor;
    background: transparent;
    border-radius: 11px;
    padding: 10px 14px;
    line-height: 1.1;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.pgs-profile-button:hover,
.pgs-apply-button:hover,
.pgs-detail-back:hover { opacity: .72; transform: translateY(-1px); }

/* Listenansicht */
.pgs-profile-list[data-view="list"] { display: grid; gap: 15px; }
.pgs-profile-list[data-view="list"] .pgs-profile-card { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0,1fr); }
.pgs-profile-list[data-view="list"] .pgs-card-media { aspect-ratio: auto; min-height: 230px; }
.pgs-profile-list[data-view="list"] .pgs-card-body { display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.pgs-profile-list[data-view="list"] .pgs-profile-button { align-self: flex-start; }

.pgs-profile-empty,
.pgs-profile-message,
.pgs-profile-no-results {
    padding: 26px 28px;
    border: 1px solid var(--pgs-border);
    border-radius: 16px;
    background: var(--pgs-soft);
    color: inherit;
}
.pgs-profile-empty strong { display: block; font-size: 20px; margin-bottom: 7px; }
.pgs-profile-empty span { opacity: .72; }
.pgs-profile-no-results { margin-top: 18px; }

/* Detail */
.pgs-dog-detail { max-width: 1220px; margin: 0 auto; }
.pgs-detail-topline { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.pgs-detail-status { display: inline-flex; padding: 9px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.pgs-detail-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: clamp(28px, 5vw, 68px); align-items: start; }
.pgs-detail-main-media { aspect-ratio: 4/3; overflow: hidden; border-radius: 20px; background: var(--pgs-soft); border: 1px solid var(--pgs-border); }
.pgs-detail-main-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.pgs-detail-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.pgs-thumb { appearance: none; padding: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: 12px; border: 1px solid var(--pgs-border); background: transparent; cursor: pointer; opacity: .62; }
.pgs-thumb.is-active, .pgs-thumb:hover { opacity: 1; border-color: currentColor; }
.pgs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgs-detail-content h1 { color: inherit; margin: 0 0 14px; font: inherit; font-size: clamp(42px, 6vw, 82px); font-weight: 700; line-height: .96; }
.pgs-detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.pgs-detail-description { font-size: 1.05em; line-height: 1.7; margin-bottom: 26px; }
.pgs-detail-description p { margin-top: 0; }
.pgs-detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 26px; }
.pgs-detail-facts > div { border: 1px solid var(--pgs-border); border-radius: 14px; background: var(--pgs-soft); padding: 14px 15px; }
.pgs-detail-facts .is-wide { grid-column: 1/-1; }
.pgs-detail-facts span, .pgs-detail-facts strong { display: block; }
.pgs-detail-facts span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .58; margin-bottom: 5px; }
.pgs-detail-facts strong { font-size: 15px; }
.pgs-apply-button { width: 100%; box-sizing: border-box; min-height: 52px; font-weight: 700; }

@media (max-width: 1100px) {
    .pgs-profile-list[data-view="grid"] { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .pgs-detail-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 820px) {
    .pgs-profile-tools { grid-template-columns: 1fr auto; }
    .pgs-profile-filter { grid-column: 1; grid-row: 2; }
    .pgs-view-switch { grid-column: 2; grid-row: 2; }
    .pgs-detail-grid { grid-template-columns: 1fr; }
    .pgs-detail-content h1 { font-size: clamp(40px, 11vw, 70px); }
}

@media (max-width: 680px) {
    .pgs-profile-tools { grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
    .pgs-profile-search-wrap { grid-column: 1/-1; }
    .pgs-profile-filter { min-width: 0; }
    .pgs-profile-list[data-view="grid"] { grid-template-columns: 1fr; gap: 18px; }
    .pgs-card-media { aspect-ratio: 5/4; }

    /* Mobile Liste bleibt bewusst verfügbar und kompakt. */
    .pgs-profile-list[data-view="list"] .pgs-profile-card {
        display: grid;
        grid-template-columns: 118px minmax(0,1fr);
        align-items: stretch;
        border-radius: 15px;
    }
    .pgs-profile-list[data-view="list"] .pgs-card-media { min-height: 0; height: 100%; aspect-ratio: auto; }
    .pgs-profile-list[data-view="list"] .pgs-card-status { left: 7px; bottom: 7px; padding: 5px 6px; font-size: 8px; max-width: calc(100% - 14px); text-align: center; }
    .pgs-profile-list[data-view="list"] .pgs-card-body { padding: 13px 14px; }
    .pgs-profile-list[data-view="list"] .pgs-card-body h3 { font-size: 23px; margin-bottom: 8px; }
    .pgs-profile-list[data-view="list"] .pgs-card-body p { display: none; }
    .pgs-profile-list[data-view="list"] .pgs-card-meta span { font-size: 10px; padding: 4px 6px; }
    .pgs-profile-list[data-view="list"] .pgs-profile-button { padding: 7px 9px; font-size: 11px; }

    .pgs-detail-topline { align-items: flex-start; flex-direction: column; }
    .pgs-detail-main-media { border-radius: 15px; }
    .pgs-detail-facts { grid-template-columns: 1fr; }
    .pgs-detail-facts .is-wide { grid-column: auto; }
}

@media (max-width: 390px) {
    .pgs-profile-list[data-view="list"] .pgs-profile-card { grid-template-columns: 104px minmax(0,1fr); }
    .pgs-profile-list[data-view="list"] .pgs-card-body { padding: 11px 12px; }
}


/* Detailseite im Divi-Theme immer als saubere Vollbreiten-Seite darstellen. */
.pgs-lara-hundeprofil-page #main-content .container:before {
    display: none !important;
}
.pgs-lara-hundeprofil-page #left-area {
    float: none !important;
    width: 100% !important;
    padding-right: 0 !important;
}
.pgs-lara-hundeprofil-page #sidebar {
    display: none !important;
}
.pgs-lara-hundeprofil-page .entry-title {
    display: none !important;
}
.pgs-lara-hundeprofil-page #main-content .container {
    width: min(90%, 1280px) !important;
    max-width: 1280px !important;
}
.pgs-lara-hundeprofil-page .et_post_meta_wrapper {
    display: none !important;
}
@media (max-width: 980px) {
    .pgs-lara-hundeprofil-page #main-content .container {
        width: min(92%, 1180px) !important;
    }
}
@media (max-width: 767px) {
    .pgs-lara-hundeprofil-page #main-content .container {
        width: calc(100% - 30px) !important;
    }
}
