:root {
    color-scheme: light;
    --blue: #056bbd;
    --blue-dark: #034981;
    --navy: #022a4b;
    --ink: #1c2d3a;
    --muted: #435767;
    --line: #c8d9e5;
    --tint: #edf5fa;
    --white: #fff;
    --gutter: clamp(1rem, 4vw, 3rem);
    --section-space: clamp(2.5rem, 6vw, 5rem);
    --container: 73rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

main {
    flex: 1;
    min-width: 0;
}

[id] {
    scroll-margin-top: 1rem;
}

[hidden] {
    display: none !important;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--blue-dark);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--blue);
}

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}

address {
    font-style: normal;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.65em;
    color: var(--navy);
    line-height: 1.18;
    overflow-wrap: break-word;
}

h1 {
    font-size: clamp(2rem, 4.6vw, 3.5rem);
}

h2 {
    font-size: clamp(1.4rem, 2.7vw, 2.2rem);
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1rem;
}

p {
    margin: 0 0 1em;
}

p:last-child {
    margin-bottom: 0;
}

ul,
ol {
    padding-inline-start: 1.3em;
}

.container {
    width: min(100% - var(--gutter) * 2, var(--container));
    margin-inline: auto;
}

.section {
    padding-block: var(--section-space);
}

.section-tinted {
    background: var(--tint);
}

.section-heading {
    margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
    text-align: center;
}

.section-heading p {
    color: var(--muted);
}

.section-actions {
    margin: 2rem 0 0;
    text-align: center;
}

.button,
.menu-toggle {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--blue);
    background: var(--blue);
    color: var(--white);
    font: inherit;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.button:hover,
.menu-toggle:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
    color: var(--white);
}

.small-text {
    color: var(--muted);
    font-size: 0.9375rem;
}

/* Kopfbereich und Navigation */
.skip-link {
    position: absolute;
    z-index: 2;
    inset: 0.5rem auto auto 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--white);
    transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus {
    transform: none;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 6rem;
}

.brand {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.4rem;
    color: var(--blue);
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    letter-spacing: 0.06em;
    text-decoration: none;
}

.brand img {
    width: auto;
    height: 4.3rem;
}

.site-nav ul,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 0.55rem 0.8rem;
    border-bottom: 2px solid transparent;
    color: var(--navy);
    font-weight: 650;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav .current-section {
    border-color: var(--blue);
    background: var(--tint);
    color: var(--blue-dark);
}

.menu-toggle {
    cursor: pointer;
}

/* Startseite */
.home-hero {
    background: #dce5eb url("../images/startseite.jpg") center 54% / cover no-repeat;
}

.hero-inner {
    display: grid;
    align-items: end;
    justify-items: end;
    min-height: clamp(31rem, 72vh, 50rem);
    padding-block: clamp(2rem, 7vw, 5rem);
}

.hero-panel {
    max-width: 42rem;
    padding: clamp(1.4rem, 3.7vw, 2.9rem);
    border-top: 4px solid var(--blue);
    background: rgba(255, 255, 255, 0.95);
}

.hero-panel h1 {
    margin-bottom: 0.45em;
    color: var(--blue);
    font-weight: 400;
    letter-spacing: -0.026em;
}

.hero-panel strong {
    display: block;
}

.hero-panel p {
    margin-bottom: 1.25rem;
    color: var(--navy);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.team-grid,
.services-grid,
.info-grid {
    display: grid;
    gap: clamp(1rem, 3vw, 2rem);
}

.team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    max-width: 59rem;
    margin-inline: auto;
}

.team-card {
    border: 1px solid var(--line);
    background: var(--white);
}

.team-card img {
    width: 100%;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    object-position: center 26%;
}

.team-card-body {
    padding: clamp(1rem, 2.5vw, 1.5rem);
}

.team-card-body > p {
    color: var(--muted);
}

.team-card details {
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
}

.team-card summary {
    color: var(--blue-dark);
    font-weight: 650;
    cursor: pointer;
}

.team-card details p,
.team-card details ul {
    margin: 0.6rem 0 0;
}

.services-grid,
.info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card,
.info-panel {
    padding: clamp(1.15rem, 3.3vw, 2rem);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    background: var(--white);
}

.service-heading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.service-heading h3 {
    margin: 0;
    color: var(--blue-dark);
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}

.therapy-list {
    margin: 0 0 1.15rem;
}

.therapy-list:last-child {
    margin-bottom: 0;
}

.therapy-list li + li {
    margin-top: 0.22rem;
}

.treatment-teaser {
    display: grid;
    grid-template-columns: minmax(0, 24rem) 1fr;
    border: 1px solid var(--line);
    background: var(--tint);
    text-decoration: none;
}

.treatment-teaser img {
    width: 100%;
    align-self: center;
}

.treatment-teaser span {
    align-self: center;
    padding: clamp(1rem, 4vw, 2.5rem);
}

.treatment-teaser strong {
    display: block;
    color: var(--navy);
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.treatment-teaser:hover span {
    text-decoration: underline;
}

/* Unterseiten */
.page-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: clamp(14rem, 26vw, 21rem);
    isolation: isolate;
    background: var(--navy);
    color: var(--white);
}

.page-hero img,
.page-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.page-hero img {
    object-fit: cover;
}

.page-hero::after {
    background: linear-gradient(
        90deg,
        rgba(2, 42, 75, 0.96),
        rgba(2, 42, 75, 0.74) 46%,
        rgba(2, 42, 75, 0.08)
    );
    content: "";
}

.page-hero-inner {
    padding-block: clamp(1.5rem, 5vw, 3.5rem);
}

.page-hero h1 {
    margin-bottom: 0.3em;
    color: inherit;
}

.page-hero p {
    max-width: 26rem;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.tabs-section {
    padding-block: clamp(1.5rem, 4vw, 3rem) var(--section-space);
}

.tab-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    background: var(--line);
}

.tab-list--treatments {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tab-list a {
    display: grid;
    place-items: center;
    min-height: 3.65rem;
    padding: 0.6rem 0.45rem;
    border-bottom: 3px solid transparent;
    background: var(--tint);
    color: var(--navy);
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-align: center;
    text-decoration: none;
}

.tab-list a:hover {
    border-bottom-color: var(--blue);
    background: var(--white);
}

.tab-list a[aria-selected="true"] {
    border-bottom-color: var(--blue-dark);
    background: var(--blue);
    color: var(--white);
}

.tab-list a:focus-visible {
    outline-offset: -5px;
}

.tab-list a[aria-selected="true"]:focus-visible {
    outline-color: var(--white);
}

.tab-list[role="tablist"] {
    margin-bottom: 0;
}

.tab-panel {
    display: grid;
    gap: clamp(1rem, 4vw, 3rem);
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid var(--line);
    background: var(--white);
}

.tab-panel[role="tabpanel"] {
    border-top: 0;
}

.tab-panel:not([role="tabpanel"]) + .tab-panel {
    margin-top: 1rem;
}

.tab-panel h2 {
    color: var(--blue-dark);
}

.treatment-with-photo {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    align-items: start;
}

.tab-panel img {
    width: 100%;
    max-height: 27rem;
    padding: 0.45rem;
    background: var(--tint);
    object-fit: contain;
}

.team-profile {
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    align-items: start;
}

.team-profile-role {
    color: var(--muted);
    font-weight: 650;
}

.team-profile-qualifications {
    margin-block: 0;
}

.prose {
    max-width: 74ch;
}

.prose li + li {
    margin-top: 0.25rem;
}

.contact-list,
.credit-list {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-list dt,
.credit-list dt {
    margin-top: 0.65rem;
    font-weight: 650;
}

.contact-list dd,
.credit-list dd {
    margin: 0;
}

.info-panel address + .contact-list {
    margin-top: 1rem;
}

.directions-panel {
    margin-top: clamp(1rem, 3vw, 2rem);
    padding: clamp(1.15rem, 3.3vw, 2rem);
    background: var(--tint);
}

.directions-panel .button + p {
    margin-top: 0.6rem;
}

.legal-sections > section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.legal-sections h3:not(:first-child),
.legal-sections h4:not(:first-child) {
    margin-top: 1.5rem;
}

/* Fußbereich */
.site-footer {
    background: var(--navy);
    color: var(--white);
}

.site-footer a,
.site-footer a:hover {
    color: var(--white);
}

.site-footer :focus-visible {
    outline-color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr auto;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding-block: clamp(2rem, 5vw, 3.5rem);
}

.footer-title {
    margin-bottom: 0.7rem;
    color: var(--white);
    font-size: 1.2rem;
}

.hours {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.1rem 1rem;
    margin: 0 0 0.75rem;
}

.hours dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.footer-note,
.footer-bottom {
    color: #d7e7f3;
    font-size: 0.9375rem;
}

.footer-links {
    flex-direction: column;
}

.footer-bottom {
    padding-block: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: #011b30;
}

@media (max-width: 66rem) {
    .tab-list--treatments {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tab-list--treatments a:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 48rem) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        min-height: 0;
        padding-block: 0.6rem;
    }

    .brand img {
        height: 3.3rem;
    }

    .site-nav {
        width: 100%;
    }

    .site-nav ul {
        flex-direction: column;
    }

    .site-nav a {
        padding-inline: 0.55rem;
    }

    .hero-inner {
        min-height: 0;
        padding-block: clamp(13rem, 53vw, 20rem) 1rem;
    }

    .hero-panel {
        width: 100%;
    }

    .treatment-with-photo,
    .team-profile {
        grid-template-columns: 1fr;
    }

    .page-hero::after {
        background: linear-gradient(0deg, rgba(2, 42, 75, 0.97), rgba(2, 42, 75, 0.28));
    }

    .tab-panel img {
        max-height: 20rem;
    }

    .team-profile img {
        width: min(100%, 14.5rem);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid nav {
        grid-column: 1 / -1;
    }

    .footer-links {
        flex-direction: row;
        gap: 0.4rem 1.2rem;
    }
}

@media (max-width: 36rem) {
    .team-grid,
    .services-grid,
    .info-grid,
    .treatment-teaser,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        max-width: 23rem;
    }

    .tab-list--treatments {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tab-list a {
        min-height: 2.85rem;
    }
}
