/* Pferde Profil Styles - Signature Edition */

.ps-native-wrap {
    --ps-forest-900: #16221f;
    --ps-forest-800: #22312d;
    --ps-forest-700: #2f433d;
    --ps-sand-100: #f6f4ee;
    --ps-sand-200: #ece8dd;
    --ps-ink-900: #19231f;
    --ps-ink-600: #4d5e58;
    --ps-line: #dfe4dc;
    --ps-accent: #b78b57;
    --ps-section-gap: 34px;

    max-width: 1260px;
    margin: 56px auto;
    padding: 0 32px;
    box-sizing: border-box;
    color: var(--ps-ink-900);
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    position: relative;
}

.ps-native-wrap::before {
    content: none;
}

.ps-profile-grid-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.28fr 1fr;
    column-gap: var(--ps-section-gap);
    row-gap: var(--ps-section-gap);
    margin-bottom: var(--ps-section-gap);
    align-items: stretch;
}

.ps-profile-gallery-wrapper {
    grid-column: 1;
    grid-row: 1;
    border-radius: 24px;
    overflow: hidden;
    min-height: 0;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(16, 38, 31, 0.08);
    box-shadow: none;
    background: #f3f1ea;
    position: relative;
}

/* Keep both top columns visually equal in height on desktop. */
.ps-profile-grid-layout > .ps-profile-gallery-wrapper,
.ps-profile-grid-layout > .ps-profile-meta-wrapper-outer {
    height: 100%;
}

.ps-profile-grid-layout > .ps-profile-gallery-wrapper {
    aspect-ratio: auto;
}

.ps-gallery-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
}

.ps-gallery-slider::-webkit-scrollbar {
    display: none;
}

.ps-gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    height: 100%;
}

.ps-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}

.ps-gallery-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(16, 38, 31, 0.38);
    backdrop-filter: blur(6px);
    z-index: 3;
}

.ps-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.52);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.ps-gallery-dot:hover {
    background: rgba(255, 255, 255, 0.82);
}

.ps-gallery-dot.is-active {
    background: #ffffff;
    transform: scale(1.15);
}

.ps-gallery-dot:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.ps-no-image {
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f0eee7, #e5e1d5);
    color: #6f7e76;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 12px;
}

.ps-profile-meta-wrapper-outer {
    grid-column: 2;
    grid-row: 1;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    background: #fbfbf9;
    border: 1px solid var(--ps-sand-200);
}

.ps-profile-meta-wrapper-outer::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 0;
    pointer-events: none;
}

.ps-profile-meta-wrapper::after {
    content: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 190px;
    height: 190px;
    background: radial-gradient(circle at 70% 30%, rgba(25, 35, 31, 0.05), rgba(25, 35, 31, 0) 74%);
    pointer-events: none;
    z-index: 1;
}

.ps-profile-meta-wrapper {
    color: var(--ps-ink-900);
    padding: 42px 32px 34px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

.ps-profile-title {
    margin: 0 0 24px;
    padding: 0 0 18px;
    border-bottom: 1px solid rgba(185, 147, 99, 0.5);
    color: var(--ps-ink-900);
    font-family: inherit;
    font-size: clamp(30px, 3.7vw, 44px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.5px;
    max-width: 88%;
}

.ps-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ps-meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fbfbf9;
    border: 1px solid rgba(25, 35, 31, 0.12);
}

.ps-meta-label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(25, 35, 31, 0.52);
    font-weight: 600;
}

.ps-meta-value {
    font-size: 16px;
    line-height: 1.3;
    color: rgba(25, 35, 31, 0.93);
    font-weight: 500;
}

.ps-stammbaum-wrapper {
    grid-column: 1 / -1;
    grid-row: 2;
    background: #fbfbf9;
    border: 1px solid var(--ps-sand-200);
    border-radius: 20px;
    padding: 24px;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 36px rgba(25, 35, 31, 0.08);
}

.ps-profile-description-wrapper {
    grid-column: 1 / -1;
    grid-row: 3;
    background: #fbfbf9;
    border: 1px solid #e7ebe5;
    border-radius: 20px;
    padding: 28px 24px 22px;
    box-shadow: none;
}

.ps-description-title {
    font-family: inherit;
    font-size: 30px;
    font-weight: 500;
    margin: 0 0 14px;
    color: var(--ps-ink-900);
    letter-spacing: -0.3px;
}

.ps-description-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--ps-ink-600);
}

.ps-video-logo-wrapper {
    grid-column: 1 / -1;
    grid-row: 4;
    display: grid;
    grid-template-columns: 1.28fr 1fr;
    gap: var(--ps-section-gap);
    align-items: stretch;
}

.ps-video-col,
.ps-logo-col {
    background: #fbfbf9;
    border: 1px solid #e7ebe5;
    border-radius: 20px;
    padding: 22px;
    box-shadow: none;
}

.ps-video-logo-wrapper.ps-no-video {
    display: block;
}

.ps-video-logo-wrapper.ps-no-video .ps-logo-col {
    max-width: none;
    width: 100%;
}

.ps-video-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-family: inherit;
    font-weight: 500;
    color: var(--ps-ink-900);
}

.ps-youtube-video {
    width: 100%;
    max-width: 820px;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 0 auto;
    border-radius: 14px;
    border: 1px solid #e4e6e1;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.07);
}

.ps-video-embed {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.ps-video-embed iframe,
.ps-video-embed video {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.ps-video-embed-borlabs,
.ps-video-embed-borlabs > * {
    width: 100%;
    height: 100%;
}

.ps-video-embed-borlabs [class*="borlabs"],
.ps-video-embed-borlabs [class*="brlbs"] {
    max-width: 100%;
}

.ps-fallback-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
}

.ps-fallback-img {
    max-width: 220px;
    width: 100%;
    height: auto;
    margin-bottom: 18px;
}

.ps-fallback-text-desc {
    font-family: inherit !important;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ps-ink-600);
    max-width: 760px;
}

.ps-fallback-text-desc * {
    font-family: inherit !important;
}

.ps-fallback-text-desc strong,
.ps-fallback-text-desc b {
    font-weight: 500 !important;
}

.ps-fallback-text-desc span {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
}

.ps-contact-button-wrapper {
    margin-top: 18px;
}

.ps-fallback-content .ps-contact-button-wrapper {
    margin-top: 18px !important;
}

.ps-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--ps-accent), #c9a06f);
    color: #20180e;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: none !important;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.ps-contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(183, 139, 87, 0.28);
    filter: brightness(1.03);
    text-decoration: none;
}

.ps-contact-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 38, 31, 0.16), 0 0 0 6px rgba(183, 139, 87, 0.32);
}

.ps-contact-btn:active {
    transform: translateY(0) scale(0.99);
}

/* Stammbaum */
.ps-modern-tree {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.4;
    color: #4f5f59;
}

.ps-tree-gen {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
}

.ps-tree-group {
    display: flex;
    flex-direction: row;
    position: relative;
    flex: 1;
}

.ps-tree-node {
    display: flex;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    padding: 12px 16px;
    min-height: 52px;
}

.ps-gen-1>.ps-tree-group>.ps-tree-node,
.ps-gen-2>.ps-tree-group>.ps-tree-node {
    flex: 0 0 31%;
    justify-content: flex-end;
    text-align: right;
    padding-right: 34px;
    border-right: 1px solid #d8ddd6;
}

.ps-gen-3 .ps-tree-node {
    flex-grow: 1;
    justify-content: flex-start;
    text-align: left;
    padding-left: 34px;
}

.ps-gen-1>.ps-tree-group>.ps-tree-node::after,
.ps-gen-2>.ps-tree-group>.ps-tree-node::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 26px;
    height: 1px;
    background-color: #c9d1c9;
}

.ps-gen-2,
.ps-gen-3 {
    position: relative;
}

.ps-gen-2::before,
.ps-gen-3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 26%;
    bottom: 26%;
    width: 1px;
    background-color: #c9d1c9;
}

.ps-tree-label {
    display: block;
    width: 100%;
    letter-spacing: 0.2px;
    font-size: 15px;
}

.ps-is-bold .ps-tree-label {
    color: #1d352c;
    font-weight: 700;
}

@keyframes ps-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

.ps-profile-gallery-wrapper,
.ps-profile-meta-wrapper-outer,
.ps-stammbaum-wrapper,
.ps-profile-description-wrapper,
.ps-video-col,
.ps-logo-col {
    animation: ps-fade-up 0.45s ease both;
}

.ps-profile-meta-wrapper-outer {
    animation-delay: 0.06s;
}

.ps-stammbaum-wrapper {
    animation-delay: 0.1s;
}

.ps-profile-description-wrapper {
    animation-delay: 0.16s;
}

@media (max-width: 980px) {
    .ps-native-wrap {
        --ps-section-gap: 14px;
        margin: 36px auto;
        padding: 0 18px;
    }

    .ps-profile-grid-layout,
    .ps-video-logo-wrapper {
        display: flex;
        flex-direction: column;
        gap: var(--ps-section-gap);
    }

    .ps-profile-gallery-wrapper {
        min-height: 0;
        aspect-ratio: 4 / 3;
        height: auto !important;
        max-height: none !important;
        order: 1;
    }

    .ps-profile-gallery-wrapper .ps-gallery-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .ps-profile-meta-wrapper-outer {
        order: 2;
    }

    .ps-stammbaum-wrapper {
        order: 3;
        padding: 18px;
    }

    .ps-profile-description-wrapper {
        order: 4;
    }

    .ps-video-logo-wrapper {
        order: 5;
    }

    .ps-profile-title {
        max-width: 100%;
        font-size: clamp(26px, 6.8vw, 36px);
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .ps-profile-meta-wrapper {
        padding: 32px 22px 22px;
    }

    .ps-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ps-video-col,
    .ps-logo-col {
        padding: 14px;
    }
}

@media (max-width: 680px) {
    .ps-gallery-dots {
        gap: 6px;
        padding: 4px 8px;
        bottom: 10px;
    }

    .ps-gallery-dot {
        width: 7px;
        height: 7px;
    }

    .ps-stammbaum-wrapper {
        padding: 14px;
        border-radius: 16px;
    }

    .ps-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ps-profile-meta-wrapper {
        padding: 24px 16px 16px;
    }

    .ps-video-col {
        padding: 10px;
    }

    .ps-video-embed,
    .ps-youtube-video {
        max-width: none;
    }


    .ps-meta-item {
        padding: 9px 10px;
    }

    .ps-meta-label {
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    .ps-meta-value {
        font-size: 14px;
        font-weight: 500;
    }

    .ps-description-title {
        font-size: 27px;
        margin-bottom: 10px;
    }

    .ps-description-content {
        font-size: 15px;
        line-height: 1.65;
    }

    .ps-modern-tree {
        min-width: 0;
        font-size: 10.5px;
        line-height: 1.2;
    }

    .ps-tree-node {
        padding: 6px 6px;
        min-height: 32px;
    }

    .ps-gen-1>.ps-tree-group>.ps-tree-node,
    .ps-gen-2>.ps-tree-group>.ps-tree-node {
        flex-basis: 30%;
        padding-right: 10px;
    }

    .ps-gen-3 .ps-tree-node {
        padding-left: 10px;
    }

    .ps-gen-1>.ps-tree-group>.ps-tree-node::after,
    .ps-gen-2>.ps-tree-group>.ps-tree-node::after {
        width: 8px;
    }

    .ps-tree-label {
        font-size: 10.5px;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .ps-gen-2::before,
    .ps-gen-3::before {
        top: 24%;
        bottom: 24%;
    }
}

/* Legacy shortcode compatibility: [pferd_profil] */
.ps-profile-container:not(.ps-native-wrap) .ps-profile-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.ps-profile-container:not(.ps-native-wrap) .ps-profile-image-wrapper {
    border-radius: 18px;
    overflow: hidden;
    min-height: 320px;
    background: #efece4;
    border: 1px solid #e3e6df;
}

.ps-profile-container:not(.ps-native-wrap) .ps-profile-image {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
}

.ps-profile-container:not(.ps-native-wrap) .ps-meta-table {
    width: 100%;
    border-collapse: collapse;
}

.ps-profile-container:not(.ps-native-wrap) .ps-meta-table th,
.ps-profile-container:not(.ps-native-wrap) .ps-meta-table td {
    padding: 8px 0;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ps-profile-container:not(.ps-native-wrap) .ps-profile-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.ps-profile-container:not(.ps-native-wrap) .ps-stammbaum-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ps-profile-container:not(.ps-native-wrap) .ps-cell {
    background: #fff;
    border: 1px solid #e7ebe5;
    border-radius: 10px;
    padding: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
}

@media (max-width: 980px) {
    .ps-profile-container:not(.ps-native-wrap) .ps-profile-top,
    .ps-profile-container:not(.ps-native-wrap) .ps-profile-bottom {
        grid-template-columns: 1fr;
    }
}

/* Optional variant preview: add ?ps_theme=charcoal to URL */
.ps-native-wrap.ps-theme-charcoal {
    --ps-forest-900: #1f2529;
    --ps-forest-800: #2a3238;
    --ps-forest-700: #384248;
    --ps-sand-100: #f1eee8;
    --ps-sand-200: #e5e0d7;
    --ps-ink-900: #1e2527;
    --ps-ink-600: #4e595d;
    --ps-accent: #b99363;
}

.ps-native-wrap.ps-theme-charcoal .ps-profile-meta-wrapper-outer {
    background: #fbfbf9;
    border: 1px solid var(--ps-sand-200);
}

.ps-native-wrap.ps-theme-charcoal .ps-profile-meta-wrapper::after {
    content: none;
}

.ps-native-wrap.ps-theme-charcoal .ps-meta-item {
    background: #fbfbf9;
    border: 1px solid rgba(25, 35, 31, 0.12);
}

.ps-native-wrap.ps-theme-charcoal .ps-meta-label {
    color: rgba(25, 35, 31, 0.52);
}

.ps-native-wrap.ps-theme-charcoal .ps-meta-value {
    color: rgba(25, 35, 31, 0.93);
}

.ps-native-wrap.ps-theme-charcoal .ps-stammbaum-wrapper {
    background: #fbfbf9;
    border-color: #e4ddd1;
}

.ps-native-wrap.ps-theme-charcoal .ps-profile-description-wrapper,
.ps-native-wrap.ps-theme-charcoal .ps-video-col,
.ps-native-wrap.ps-theme-charcoal .ps-logo-col {
    background: #fbfbf9;
    border-color: #e6e1d8;
}

.ps-native-wrap.ps-theme-charcoal .ps-contact-btn {
    background: linear-gradient(135deg, #b38956, #c8a574);
    color: #221911;
}

.ps-native-wrap.ps-theme-charcoal .ps-contact-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(39, 48, 54, 0.18), 0 0 0 6px rgba(185, 147, 99, 0.34);
}
