/* ================================================================
   P-B-Dienstleistungen – Startseite: Hero, Einleitung, Leistungen
   Ergaenzt theme.css (Foundry). Primaerfarbe des Themes: #47b475
   ================================================================ */

:root {
    --pb-primary: #f4ab0c;
    --pb-primary-dark: #9a6600;
    --pb-text: #666;
    --pb-heading: #292929;
    --pb-line: #e3e3e3;
    --pb-icon: #8a8a8a;
}

/* ---------- Hero / Titelbild ---------- */
section.pb-hero {
    padding: 0;
    overflow: hidden;
    background: #b78b3c;
}
.pb-hero picture,
.pb-hero img {
    display: block;
    width: 100%;
}
.pb-hero img {
    height: clamp(320px, 52vw, 760px);
    object-fit: cover;
    object-position: center;
}
@media (max-width: 767px) {
    .pb-hero img {
        height: clamp(240px, 72vw, 420px);
    }
}

/* ---------- Einleitung ---------- */
section.pb-intro {
    padding: 72px 0 48px;
}
.pb-intro h1 {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: 4px;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.pb-intro .pb-claim {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 20px;
    line-height: 30px;
    font-weight: 500;
    color: var(--pb-heading);
    margin-bottom: 4px;
}
.pb-intro .pb-subclaim {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 26px;
    font-weight: 600;
    color: var(--pb-primary-dark);
    margin-bottom: 24px;
}
.pb-intro p {
    font-size: 15px;
    line-height: 26px;
}
.pb-intro-contact {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--pb-line);
    display: flex;
    gap: 40px;
    align-items: center;
}
.pb-intro-contact .pb-portrait {
    flex: 0 0 300px;
    max-width: 300px;
}
.pb-intro-contact .pb-portrait img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}
.pb-intro-contact h2 {
    font-size: 26px;
    line-height: 34px;
    margin-bottom: 16px;
}
.pb-intro-contact .btn {
    margin-top: 8px;
}
@media (max-width: 767px) {
    section.pb-intro {
        padding: 48px 0 32px;
    }
    .pb-intro h1 {
        font-size: 26px;
        line-height: 34px;
        letter-spacing: 2px;
    }
    .pb-intro .pb-claim {
        font-size: 18px;
        line-height: 27px;
    }
    .pb-intro-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        margin-top: 32px;
        padding-top: 32px;
    }
    .pb-intro-contact .pb-portrait {
        flex-basis: auto;
        max-width: 240px;
    }
}

/* ---------- Leistungen: Piktogramm-Tabs ---------- */
section.pb-services {
    padding: 48px 0 96px;
    scroll-margin-top: 16px;
}
.pb-services h2 {
    margin-bottom: 40px;
}
@media (max-width: 767px) {
    .pb-services h2.uppercase {
        font-size: 28px;
        line-height: 36px;
        letter-spacing: 4px;
        margin-right: 0;
    }
}
.pb-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}
.pb-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100%;
    padding: 16px 6px 14px;
    margin: 0;
    background: #f8f8f8;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    text-align: center;
    color: var(--pb-text);
    font: inherit;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
    -webkit-tap-highlight-color: transparent;
}
.pb-tab:hover {
    background: #f0f0f0;
    color: var(--pb-heading);
}
.pb-tab:focus {
    outline: none;
}
.pb-tab:focus-visible {
    outline: 2px solid var(--pb-primary);
    outline-offset: 2px;
}
.pb-tab-title {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    /* Umbruch nur an Leerzeichen ("Grundlagen der | Absturzsicherung"),
       keine Silbentrennung; Notbremse nur falls ein Wort gar nicht passt */
    hyphens: manual;
    -webkit-hyphens: manual;
    overflow-wrap: anywhere;
    margin-bottom: 14px;
    min-height: 36px;
    display: flex;
    align-items: center;
}
.pb-tab-icon {
    width: 84px;
    height: 72px;
    display: block;
    margin-top: auto;
    transition: transform .25s ease, background-color .25s ease;
}
.pb-tab-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: .7;
    transition: opacity .25s ease;
}
.pb-tab:hover .pb-tab-icon {
    transform: translateY(-2px);
}
/* Einfaerbung der Piktogramme ueber die Alpha-Maske, sofern unterstuetzt */
@supports ((mask-repeat: no-repeat) or (-webkit-mask-repeat: no-repeat)) {
    .pb-tab-icon {
        background-color: var(--pb-icon);
        -webkit-mask-image: var(--icon);
        mask-image: var(--icon);
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
    }
    .pb-tab-icon img {
        visibility: hidden;
    }
}
.pb-tab.is-active {
    background: #fff;
    border-bottom-color: var(--pb-primary);
    color: var(--pb-primary-dark);
    box-shadow: 0 -2px 0 var(--pb-line) inset, 0 6px 16px -10px rgba(0, 0, 0, .35);
}
.pb-tab.is-active .pb-tab-icon {
    background-color: var(--pb-primary);
}
.pb-tab.is-active .pb-tab-icon img {
    opacity: 1;
}

@media (max-width: 1199px) {
    .pb-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .pb-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .pb-tab {
        padding: 12px 6px 12px;
    }
    .pb-tab-title {
        font-size: 11px;
        line-height: 16px;
        letter-spacing: 0;
        min-height: 32px;
    }
    .pb-tab-icon {
        width: 64px;
        height: 56px;
    }
}

/* ---------- Leistungen: Inhalte ---------- */
.pb-panels {
    border-top: 1px solid var(--pb-line);
    padding-top: 40px;
    scroll-margin-top: 70px;
}
.pb-panel {
    display: none;
}
.pb-panel.is-active {
    display: block;
    animation: pbPanelIn .4s ease both;
}
@keyframes pbPanelIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .pb-panel.is-active {
        animation: none;
    }
    .pb-tab, .pb-tab-icon, .pb-tab-icon img {
        transition: none;
    }
}
.pb-panel-claim {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
    color: var(--pb-heading);
    margin-bottom: 24px;
}
.pb-panel-text {
    max-width: 820px;
}
.pb-panel-text p {
    font-size: 15px;
    line-height: 26px;
    margin-bottom: 18px;
}
.pb-panel-text p strong {
    color: var(--pb-heading);
    font-weight: 600;
}
.pb-panel-text p.pb-emphasis {
    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--pb-heading);
}
.pb-panel-text .pb-emphasis span {
    display: block;
}
.pb-panel .btn {
    margin-top: 8px;
}

/* ---------- Bildergalerie ---------- */
.pb-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
}
.pb-gallery li {
    margin: 0;
}
/* Fotos sind reine Ansicht: nicht klickbar, keine Vergroesserung */
.pb-gallery picture {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
}
.pb-gallery li.pb-wide {
    grid-column: span 2;
}
.pb-gallery li.pb-wide picture {
    aspect-ratio: 8 / 5;
}
.pb-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 560px) {
    .pb-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}
