/* Projektspezifische Anpassungen an Quark 2. */

:root {
    --apo-green: #058550;
    --apo-green-light: #d8efe4;
    --apo-radius-image: 1rem;
    --apo-text: #242424;
    --apo-text-muted: #58645f;
    --apo-border: rgba(5, 133, 80, 0.2);
    --apo-border-card: rgba(5, 133, 80, 0.14);
    --apo-gap: 1rem;
    --apo-section-space: 1.25rem;
}

/* Quarks dekorative Kurzlinie vor Unterüberschriften wird nicht verwendet. */
h2::before {
    display: none;
}

/* Einheitliche Formensprache: Inhalte eckig, Fotografien abgerundet. */
body:not(.home-page) #body-wrapper .content-item,
.notdienst__entry {
    border-radius: 0;
}

#header .navbar-brand img {
    height: 3.5rem;
    max-width: min(12rem, 55vw);
    transition: height 0.2s ease;
}

.header-animated.scrolled #header .navbar-brand img {
    height: 2.75rem;
}

.mobile-logo .navbar-brand img {
    width: min(14rem, 70vw);
    height: auto;
}

.legal-navigation .social-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legal-navigation .social-link {
    justify-content: center;
    padding-inline: 0.5rem;
}

.legal-navigation .social-link img {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}

.overlay .overlay-menu .social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.overlay .overlay-menu .social-link {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.overlay .overlay-menu .social-link img {
    width: 1.5rem;
    height: 1.5rem;
}

.home-hero {
    position: relative;
    display: flex;
    min-height: clamp(26rem, 38vw, 29rem);
    overflow: hidden;
    background: #fff;
    isolation: isolate;
}

.home-hero__media,
.home-hero__fade {
    position: absolute;
    inset: 0;
}

.home-hero__media {
    z-index: -2;
}

.home-hero__media img {
    display: block;
    width: auto;
    max-width: none;
    height: 100%;
    margin-left: auto;
}

.ai-image {
    position: relative;
    display: inline-flex;
}

.ai-image__label {
    position: absolute;
    right: 0.5rem;
    bottom: 0.4rem;
    padding: 0.15rem 0.3rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    font-size: 0.65rem;
    line-height: 1.2;
}

.home-hero__fade {
    z-index: -1;
    background: linear-gradient(
        90deg,
        #fff 0%,
        rgba(255, 255, 255, 0.98) 25%,
        rgba(255, 255, 255, 0.88) 43%,
        rgba(255, 255, 255, 0.3) 67%,
        rgba(255, 255, 255, 0) 82%
    );
}

.home-hero__inner {
    display: flex;
    align-items: center;
    width: 100%;
    padding-block: clamp(1.5rem, 2.5vw, 2rem);
}

.home-hero__content {
    width: min(46rem, 66%);
}

.home-hero h1 {
    margin: 0;
    max-width: 17ch;
    color: #111;
    font-size: clamp(2.25rem, 4.3vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.home-hero h1 span {
    display: block;
}

.home-hero h1 span + span {
    margin-top: 0.25em;
    font-size: 0.73em;
    line-height: 1.08;
}

.home-hero__text {
    margin: 1.25rem 0 0;
    color: var(--apo-text);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.home-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--apo-gap);
    max-width: 43rem;
    margin-top: 1.75rem;
}

.home-hero__action {
    display: flex;
    align-items: center;
    min-height: 7rem;
    padding: 1.1rem 1.25rem;
    gap: var(--apo-gap);
    color: #fff;
    background: var(--apo-green);
    border-left: 0.25rem solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0.5rem 1.25rem rgba(5, 133, 80, 0.2);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.home-hero__action:hover {
    color: #fff;
    box-shadow: 0 0.65rem 1.4rem rgba(5, 133, 80, 0.28);
    text-decoration: none;
    transform: translateY(-2px);
}

.home-hero__action:focus-visible {
    outline: 3px solid rgba(5, 133, 80, 0.35);
    outline-offset: 3px;
}

.home-hero__action img {
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
}

.home-quicklinks {
    margin: 0;
    padding: var(--apo-section-space) 0;
    background: #fff;
}

.home-quicklinks__text {
    max-width: 58rem;
    margin: 0 auto var(--apo-section-space);
    text-align: center;
    hyphens: none;
}

.home-appointment {
    max-width: 32rem;
    margin: var(--apo-section-space) auto 0;
}

.home-appointment .home-hero__action {
    justify-content: center;
    min-height: 4.75rem;
}

.home-quicklinks__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--apo-gap);
}

.home-quicklink {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 12.5rem;
    padding: 1.4rem 1.1rem;
    color: var(--apo-text);
    background: var(--apo-green-light);
    border: 1px solid rgba(5, 133, 80, 0.1);
    border-top: 0.25rem solid var(--apo-green);
    box-shadow: 0 0.35rem 1rem rgba(5, 133, 80, 0.08);
    text-align: center;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.home-quicklink:hover {
    color: var(--apo-text);
    border-color: rgba(5, 133, 80, 0.28);
    border-top-color: var(--apo-green);
    box-shadow: 0 0.65rem 1.4rem rgba(5, 133, 80, 0.13);
    text-decoration: none;
    transform: translateY(-3px);
}

.home-quicklink:focus-visible {
    outline: 3px solid rgba(5, 133, 80, 0.3);
    outline-offset: 3px;
}

.home-quicklink__icon {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 50%;
}

.home-quicklink__icon img {
    width: 3.75rem;
    height: 3.75rem;
}

.home-quicklink strong {
    max-width: 19ch;
    font-size: 1rem;
    line-height: 1.3;
}

.home-benefits {
    margin-top: 1.5rem;
    border-block: 1px solid var(--apo-border);
}

.home-benefits ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-benefits li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3.25rem;
    margin: 0;
    padding: 0.65rem 1rem;
    font-weight: 700;
    text-align: center;
}

.home-benefits li:nth-child(n + 4) {
    border-top: 1px solid var(--apo-border);
}

.home-benefits img {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
}

.home-team-preview {
    display: flex;
    align-items: center;
    margin: 0;
    padding-block: var(--apo-section-space);
    background: var(--apo-green-light);
}

body.home-page #page-wrapper {
    display: flex;
    flex-direction: column;
}

body.home-page #start {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

.home-team-preview__layout {
    display: grid;
    grid-template-columns: calc((100% - 3rem) / 4) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.apo-image {
    margin: 0;
    overflow: hidden;
    border-radius: var(--apo-radius-image);
    box-shadow: 0 0.75rem 2rem rgba(5, 133, 80, 0.15);
}

.apo-image img {
    display: block;
    width: 100%;
}

.home-team-preview__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.home-team-preview h2 {
    margin: 0;
    color: var(--apo-green);
    font-size: clamp(1.65rem, 2.7vw, 2.75rem);
    letter-spacing: -0.03em;
}

.home-team-preview__content p {
    max-width: 38rem;
    margin: 0.5rem 0 0;
    color: var(--apo-text);
}

.home-team-preview nav .home-team-preview__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.home-team-preview__links li {
    margin: 0;
    padding: 0;
}

.home-team-preview__links a {
    color: var(--apo-green);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

.home-team-preview__links a::after {
    content: " →";
}

body.team-page .content-item > ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 2.5rem 0;
    padding: 0;
    list-style: none;
}

body.team-page .content-item > ul > li {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--apo-border-card);
    border-radius: var(--apo-radius-image);
    background: var(--apo-green-light);
}

body.team-page .content-item > ul > li > p {
    margin: 0;
}

body.team-page .content-item > ul > li > p:first-child img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
}

body.team-page .content-item > ul > li > p:last-child {
    padding: 1rem;
    line-height: 1.35;
}

body.team-page .content-item > ul > li strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--apo-green);
    font-size: 1.05rem;
}

body.archive-page .content-item img,
body.service-page .content-item img {
    display: block;
    max-width: min(100%, 52rem);
    margin: 1.5rem auto 0.5rem;
    border-radius: var(--apo-radius-image);
}

body.app-page .content-item > .app-intro {
    margin: 1.5rem 0 2.5rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 0;
    border-left: 0.35rem solid var(--apo-green);
    background: var(--apo-green-light);
    color: var(--apo-text);
    font-family: Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
    hyphens: none;
}

body.app-page .app-intro > .app-intro__eyebrow {
    margin: 0 0 0.5rem;
    color: var(--apo-green);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

body.app-page .app-intro h2 {
    max-width: 24ch;
    margin: 0 0 1rem;
    color: var(--apo-green);
    font-size: clamp(1.8rem, 3.2vw, 2.75rem);
    line-height: 1.08;
}

body.app-page .app-qr {
    display: block;
    width: 11rem;
}

body.app-page .app-intro > .app-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 0;
}

body.app-page .app-downloads a {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    color: #fff;
    background: var(--apo-green);
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.16s ease, transform 0.16s ease;
}

body.app-page .app-downloads a:hover {
    color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(5, 133, 80, 0.2);
    transform: translateY(-2px);
}

body.app-page .content-item > .app-shop-heading {
    margin-top: 0;
    font-size: 1.35rem;
}

/* Angebote und Newsletter: zwei ruhige Bereiche ohne zusätzliche Kartenoptik. */
.offers-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 2rem;
}

.offers-section {
    padding: 0 2.5rem;
}

.offers-section:first-child {
    padding-left: 0;
}

.offers-section + .offers-section {
    border-left: 1px solid rgba(5, 133, 80, 0.25);
}

.offers-section__icon {
    width: 4.5rem;
    height: 4.5rem;
}

.offers-section h2 {
    margin: 1rem 0;
    color: var(--apo-green);
}

.apo-button,
.service-booking {
    display: inline-block;
    color: #fff;
    background: var(--apo-green);
    font-weight: 700;
    text-decoration: none;
}

.apo-button {
    padding: 0.7rem 1rem;
}

.service-booking {
    margin-top: 0.4rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    line-height: 1.3;
}

.apo-button:hover,
.service-booking:hover {
    color: #fff;
    text-decoration: underline;
}

.offers-section__privacy {
    color: var(--apo-text-muted);
    font-size: 0.8rem;
}

/* Hervorgehobene Leistungsbereiche mit nativen Aufklappern. */
.service-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--apo-gap);
    margin: 2rem 0;
}

.service-controls .service-booking {
    width: auto;
    margin: 0 1.5rem;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.service-category {
    margin: 0 0 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--apo-border-card);
    border-top: 0.25rem solid var(--apo-green);
    background: var(--apo-green-light);
}

.service-category h2 {
    margin: 0 0 0.5rem;
    color: var(--apo-green);
    font-size: 1.35rem;
}

.service-details {
    margin: 0;
    border-bottom: 1px solid rgba(5, 133, 80, 0.22);
}

.service-details details {
    margin: 0;
    scroll-margin-top: 6rem;
    border-top: 1px solid rgba(5, 133, 80, 0.22);
}

.service-details summary {
    padding: 1rem 0.25rem;
    color: var(--apo-green);
    font-weight: 700;
    cursor: pointer;
}

.service-details details[open] {
    background: rgba(255, 255, 255, 0.55);
}

.service-details details > div {
    padding: 0 1rem 1rem 1.5rem;
}

.service-details details > div > :last-child {
    margin-bottom: 0;
}

#footer.apo-footer {
    padding: 0;
    border: 0;
    color: #fff;
    background: var(--apo-green);
    text-align: left;
}

.apo-footer__main {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto auto;
    align-items: center;
    gap: var(--apo-gap);
    padding-block: var(--apo-section-space);
}

.apo-footer__brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

#footer .apo-footer__brand {
    display: flex;
    flex-direction: column;
    width: fit-content;
    color: #fff;
    line-height: 1.05;
    text-decoration: none;
}

.apo-footer__brand strong {
    font-family: var(--pico-font-family-sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
}

.apo-footer__brand span {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.apo-footer__brand-block small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
}

.apo-footer__contact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.75rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

#footer a.apo-footer__contact {
    color: #fff;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease;
}

#footer a.apo-footer__contact:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
}

.apo-footer__contact img {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
}

.apo-footer__contact span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.apo-footer__contact small {
    margin-bottom: 0.2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.apo-footer__contact strong {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.notdienst {
    margin-top: 3rem;
}

.notdienst__header {
    margin-bottom: 1.5rem;
}

.notdienst__header h2 {
    margin-bottom: 0.35rem;
}

.notdienst__header p {
    margin: 0;
    color: var(--apo-text-muted);
}

.notdienst__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--apo-gap);
}

.notdienst__entry {
    margin: 0;
    padding: 1.35rem;
    border: 1px solid rgba(5, 133, 80, 0.16);
    background: var(--apo-green-light);
}

.notdienst__entry h3 {
    margin: 0 0 0.65rem;
    color: var(--apo-green);
    font-size: 1.2rem;
}

.notdienst__entry address {
    margin-bottom: 1rem;
    font-style: normal;
}

.notdienst__entry dl {
    margin: 0;
}

.notdienst__entry dl div {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 0.5rem;
}

.notdienst__entry dt {
    color: var(--apo-text-muted);
    font-weight: 400;
}

.notdienst__entry dd {
    margin: 0;
}

.notdienst__notice {
    padding: 1rem 1.15rem;
    border-left: 0.25rem solid var(--apo-green);
    background: var(--apo-green-light);
}

.notdienst__notice--error {
    border-left-color: #a13d36;
    background: #fff3f2;
}

.notdienst-contacts {
    margin-top: 3rem;
}

.notdienst-contacts dl {
    margin: 1rem 0 0;
    border-top: 2px solid var(--apo-green);
}

.notdienst-contacts dl > div {
    display: grid;
    grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--apo-border);
}

.notdienst-contacts dt {
    color: var(--apo-green);
    font-weight: 700;
}

.notdienst-contacts dd {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0;
}

.notdienst-contacts dd strong {
    font-weight: 600;
}

.notdienst-contacts a {
    text-underline-offset: 0.16em;
}

@media (max-width: 1160px) {
    .home-team-preview__layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--apo-gap);
    }
}

@media (max-width: 860px) {
    .offers-layout,
    .service-controls {
        grid-template-columns: 1fr;
    }

    .offers-section,
    .offers-section:first-child {
        padding: 0;
    }

    .offers-section + .offers-section {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(5, 133, 80, 0.25);
        border-left: 0;
    }

    #header .navbar-brand img {
        height: 3rem;
    }

    .home-hero {
        display: grid;
        min-height: 0;
    }

    .home-hero__media {
        position: relative;
        z-index: 0;
        aspect-ratio: 4812 / 2350;
    }

    .home-hero__media img {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        object-fit: cover;
        object-position: right center;
    }

    .home-hero__fade {
        display: none;
    }

    .home-hero__inner {
        padding-block: 2rem 2.5rem;
    }

    .home-hero__content {
        width: 100%;
    }

    .home-hero h1 {
        max-width: 20ch;
        font-size: clamp(2rem, 8vw, 3.2rem);
    }

    .home-quicklinks__grid,
    body.team-page .content-item > ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apo-footer__main {
        grid-template-columns: 1fr 1fr;
    }

    .apo-footer__brand-block {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .home-benefits ul {
        grid-template-columns: 1fr;
    }

    .home-benefits li:nth-child(n + 5) {
        border-top: 0;
    }

    body.app-page .app-downloads a {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .home-hero__actions {
        grid-template-columns: 1fr;
    }

    .home-hero__action {
        min-height: 5.75rem;
    }

    .home-quicklink {
        min-height: 10.5rem;
    }

    .home-team-preview__layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .apo-footer__main {
        grid-template-columns: 1fr;
    }

    .apo-footer__brand-block {
        grid-column: auto;
    }

    .notdienst-contacts dl > div {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
}

@media (max-width: 390px) {
    .home-quicklinks__grid,
    body.team-page .content-item > ul {
        grid-template-columns: 1fr;
    }
}
