:root {
    --page-max-width: 960px;
    --page-padding-inline: 1.5rem;

    --header-height: 120px;
    --header-height-shrunk: 84px;
    --header-logo-height: 76px;
    --header-logo-height-shrunk: 53px;
    --header-bg: #ffffff;
    --header-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);

    --color-bg-page: #ffffff;
    --color-bg-body: #f1f2f3;
    --color-text: #2c2c2c;
    --color-text-muted: #666666;
    --color-footer-bg: #e4e5e6;

    --shrink-transition: 0.25s ease;
}

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

html {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 100%;
    color: var(--color-text);
    background: var(--color-bg-body);
    touch-action: pan-x pan-y;
}

body {
    max-width: var(--page-max-width);
    margin: 0 auto;
    background: var(--color-bg-page);
    min-height: 100dvh;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--header-shadow);
    transition: height var(--shrink-transition), background-color 0.4s ease;
}

.site-header.shrunk {
    height: var(--header-height-shrunk);
}

.site-header.no-transition {
    transition: none;
}

.site-header.translucent {
    background: rgba(255, 255, 255, 0.9);
}

/* Desktop navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-family: inherit;
}

.nav-link:hover {
    background: #f0f0f0;
}

.nav-link.nav-active {
    background: #f08019;
    color: #000;
}

.nav-link.nav-active:hover {
    background: #e0750f;
}

/* Dropdown arrow */
.nav-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.35rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--color-text);
    transition: transform 0.2s;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 200;
    padding: 0.25rem 0;
}

.nav-dropdown-menu.open {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s;
}

.nav-dropdown-menu a:hover {
    background: #f0f0f0;
}

.nav-dropdown-menu a.dropdown-active {
    color: #f08019;
}

/* Burger button — mobile only */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}

.burger.active .burger-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

.burger.active .burger-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Mobile navigation overlay */
.nav-mobile {
    display: none;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: var(--header-height);
    z-index: 99;
    transition: top var(--shrink-transition);
}

.nav-mobile.open {
    display: flex;
}

.nav-mobile a {
    padding: 1rem var(--page-padding-inline);
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.nav-mobile a:last-child {
    border-bottom: none;
}

.nav-mobile a.nav-active {
    background: #f08019;
    color: #000;
}

.nav-mobile a:hover {
    background: #f5f5f5;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 var(--page-padding-inline);
}

.header-inner > a {
    min-width: 0;
    flex-shrink: 1;
}

.header-logo {
    height: auto;
    max-height: var(--header-logo-height);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: max-height var(--shrink-transition);
}

.site-header.shrunk .header-logo {
    max-height: var(--header-logo-height-shrunk);
}

/* Hero */
.hero-video-wrapper {
    width: 100%;
    aspect-ratio: 960 / 416;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.hero-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-video-desktop,
#hero-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* Page hero image */
.page-hero-image {
    width: calc(100% + 2 * var(--page-padding-inline));
    margin-left: calc(-1 * var(--page-padding-inline));
    margin-top: calc(-2rem);
    display: block;
    margin-bottom: 2rem;
}

/* Links in content and footer */
.page-content a, .page-content a:link, .page-content a:visited, .page-content a:hover, .page-content a:active,
.site-footer a, .site-footer a:link, .site-footer a:visited, .site-footer a:hover, .site-footer a:active {
    color: #f08019;
}

/* Content */
.page-content {
    padding: 2rem var(--page-padding-inline);
}

h1, h2, h3 {
    font-weight: bold;
    color: #444444;
}

.content-section h1 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1rem;
}

.content-section h2 {
    font-size: 1rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 70ch;
}

.content-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 70ch;
}

.content-section li {
    line-height: 1.7;
    margin-bottom: 0.25rem;
}

/* Content with sidebar */
.content-with-sidebar {
    display: flex;
    gap: 2rem;
}

.content-with-sidebar .content-section {
    flex: 1;
    min-width: 0;
}

.sidebar-panel {
    display: none;
    width: 240px;
    flex-shrink: 0;
    background: var(--color-footer-bg);
    border-radius: 6px;
    padding: 1.25rem;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-height-shrunk) + 1rem);
}

.sidebar-panel h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #f08019;
}

.sprechzeiten {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.15rem;
}

.sprechzeiten dt {
    font-weight: bold;
    margin-top: 0.5rem;
}

.sprechzeiten dt:first-child {
    margin-top: 0;
}

.sprechzeiten dd {
    margin: 0;
}

.sidebar-phone {
    margin-top: 1rem;
    font-weight: bold;
}

@media (min-width: 750px) {
    .sidebar-panel {
        display: block;
    }
}

/* Footer */
.site-footer {
    background: var(--color-footer-bg);
    padding: 2rem var(--page-padding-inline);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
}

.footer-columns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.footer-col p {
    margin-bottom: 0.25rem;
}

.footer-col a {
    color: #f08019;
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 1.5rem;
    color: #aaaaaa;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    :root {
        --header-height: 90px;
        --header-height-shrunk: 63px;
        --header-logo-height: 58px;
        --header-logo-height-shrunk: 41px;
        --page-padding-inline: 1rem;
    }

    .nav-desktop {
        display: none;
    }

    .burger {
        display: flex;
    }

    .site-header.shrunk ~ .nav-mobile {
        top: var(--header-height-shrunk);
    }
}

@media (min-width: 961px) {
    body {
        border: 1px solid #d8d9da;
        border-top: none;
        box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.08);
        margin-bottom: 1rem;
    }
}

@media (min-width: 1200px) {
    :root {
        --page-max-width: 1100px;
    }
}
