@font-face {
    font-family: 'Nunito';
    src: url('../assets/Nunito/static/Nunito-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('../assets/Nunito/static/Nunito-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('../assets/Nunito/static/Nunito-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('../assets/Nunito/static/Nunito-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('../assets/Nunito/static/Nunito-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Global Variables */
:root {
    --primary-color: #8C8596;
    /* Violettgrau - Leiser Moment (Markenfarbe) */
    --secondary-color: #A8B7A3;
    /* Salbeigrün - Natürlichkeit, Heilung */
    --accent-color: #B39BB3;
    /* Staubiges Mauve - sparsam einsetzen */
    --text-color: #3D3D3D;
    --light-bg: #F6F3EF;
    /* Cremeweiß - Weichheit */
    --warm-gray: #E6E4E7;
    /* Warmes Hellgrau - Neutralität */
    --white: #F6F3EF;
    /* Cremeweiß statt hartem Weiß */
    --font-heading: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --spacing-unit: 1rem;
    --container-width: 1200px;
    --logo-height: 140px;
    --logo-height-mobile: 92px;
    /* Header heights are derived from logo height to avoid overflow */
    --header-height: calc(var(--logo-height) + 24px);
    --header-height-mobile: calc(var(--logo-height-mobile) + 28px);
    /* Heights after scrolling */
    --header-height-scrolled: 70px;
    --logo-height-scrolled: 56px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-heading);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    padding-top: var(--header-height);
    /* Prevent content from being hidden behind fixed header */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utils */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
        background-color: #7A737F;
}

.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--light-bg);
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: var(--header-height);
    height: auto;
    background-color: rgba(246, 243, 239, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 2000;
    display: flex;
    align-items: center;
    transition: height 280ms cubic-bezier(.2,.8,.2,1), box-shadow 200ms ease;
    overflow: visible;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.logo img {
    height: var(--logo-height);
    /* Larger logo in header */
    width: auto;
    transition: height 280ms cubic-bezier(.2,.8,.2,1), transform 280ms ease;
    display: block;
}

/* Header shrunk state */
#main-header.scrolled {
    height: var(--header-height-scrolled);
    min-height: var(--header-height-scrolled);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

#main-header.scrolled .logo img {
    height: var(--logo-height-scrolled);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    /* Align links and button vertically */
}

.mobile-menu-toggle {
    display: none;
}

/* Header CTA logic updated */
.header-cta {
    margin-left: 0;
    /* logic handled by gap */
}

/* Hide the mobile cta item on desktop if we wanted, but we want it shown. 
   Just ensure it looks good. */
li.mobile-cta-item {
    display: block;
}

/* ... existing styles ... */

.hero-logo-container {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 900px;
    /* Increased from 600px */
}

.hero-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 1;
    /* Fully visible */
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: #555;
    font-weight: 300;
    max-width: 600px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

#osteopathie .content-grid {
    align-items: start;
}

#ueber-mich .content-grid {
    align-items: start;
}

#ueber-mich .profile-photo {
    aspect-ratio: 3 / 4;
    max-width: 400px;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse>* {
    direction: ltr;
}

.text-content p {
    margin-bottom: 1rem;
}

.treatment-details {
    margin-top: 1.5rem;
    border: 1px solid var(--warm-gray);
    border-radius: 10px;
    background-color: var(--light-bg);
    overflow: hidden;
}

.treatment-toggle {
    display: block;
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(140, 133, 150, 0.08);
    list-style: none;
}

.treatment-toggle::-webkit-details-marker {
    display: none;
}

.treatment-toggle::after {
    content: "+";
    float: right;
    font-size: 1.3rem;
    line-height: 1;
}

.treatment-details[open] .treatment-toggle::after {
    content: "-";
}

.treatment-panel {
    padding: 0 1.25rem;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    transition: max-height 320ms ease, opacity 260ms ease, transform 260ms ease, padding 260ms ease;
}

.treatment-details[open] .treatment-panel {
    padding: 1rem 1.25rem 1.25rem;
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
}

.treatment-panel h3 {
    margin: 1rem 0 0.5rem;
}

.treatment-panel p {
    margin-bottom: 0.9rem;
}

.vita-heading {
    margin: 1rem 0 0.6rem;
    color: var(--primary-color);
}

.vita-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.vita-list li {
    line-height: 1.5;
    color: var(--text-color);
}

.vita-list strong {
    color: var(--primary-color);
}

.vita-note {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.95rem;
    color: #5f5f66;
}

.impressum-content h2 {
    margin-top: 1.6rem;
    margin-bottom: 0.8rem;
}

.impressum-content p {
    margin-bottom: 1.25rem;
}

@media (min-width: 1280px) {
    #osteopathie .content-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }

    #ueber-mich .content-grid {
        grid-template-columns: 0.8fr 1.2fr;
    }
}

.profile-photo {
    width: 100%;
    max-width: 400px;
    /* Adjust as needed */
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    /* Slightly rounded */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

/* Contact Section */
.contact-wrapper {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.cta-box {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #EEE;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links {
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 1rem;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Desktop Styles (Large Screens) */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex !important;
        flex-direction: row;
        position: static;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        gap: 2rem;
    }

    .mobile-cta-item {
        display: block;
    }
}

/* Tablet Screens (769px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-width: 95%;
        --header-height: 80px;
    }

    .section {
        padding: 4rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .content-grid {
        gap: 3rem;
    }

    .contact-wrapper {
        padding: 2.5rem;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 1.5rem 1rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        text-align: center;
        gap: 1rem;
        z-index: 2050;
        border-bottom: 1px solid #eee;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        transition: opacity 220ms ease, transform 220ms ease, max-height 260ms ease, visibility 220ms ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 75vh;
        pointer-events: auto;
    }

    body.nav-open .nav-links {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 75vh;
        pointer-events: auto;
    }

    body.nav-open #main-header,
    body.nav-open #main-header.scrolled {
        overflow: visible;
    }

    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 40px;
        height: 40px;
        padding: 10px;
        margin-right: 12px;
        cursor: pointer;
        z-index: 3000;
        position: relative;
        pointer-events: auto;
        background: none;
        border: none;
        appearance: none;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-links li a {
        font-size: 1.25rem;
        display: block;
        padding: 0.65rem 0;
        color: var(--primary-color);
        font-weight: 500;
    }

    .mobile-cta-item {
        width: 100%;
        padding: 1rem 0;
        border-top: 1px solid #eee;
    }

    .nav-links .mobile-cta-item .header-cta {
        display: inline-block;
        width: 100%;
        max-width: none;
        background-color: var(--primary-color);
        color: var(--white);
        text-align: center;
        padding: 0.9rem 1rem;
        font-size: 1.05rem;
        line-height: 1.2;
        border-radius: 6px;
    }
}

/* Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: var(--header-height-mobile);
        --logo-height: var(--logo-height-mobile);
        --container-width: 100%;
    }

    body {
        padding-top: var(--header-height);
    }

    .container {
        padding: 0 1rem;
    }

    /* Header Optimization */
    .header-content {
        padding: 0 0.75rem;
        justify-content: space-between;
    }

    .logo img {
        height: var(--logo-height);
        width: auto;
    }

    /* Navigation Menu */
    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 1.5rem 1rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        text-align: center;
        gap: 1rem;
        z-index: 2050;
        border-bottom: 1px solid #eee;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        transition: opacity 220ms ease, transform 220ms ease, max-height 260ms ease, visibility 220ms ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 75vh;
        pointer-events: auto;
    }

/* Support body-level toggle for more robust control */
body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 75vh;
    pointer-events: auto;
}

/* When menu is open allow header to show the dropdown even if scrolled */
body.nav-open #main-header,
body.nav-open #main-header.scrolled {
    overflow: visible;
}

    .nav-links li {
        padding: 0.75rem 0;
    }

    .nav-links li a {
        font-size: 1.25rem;
        display: block;
        padding: 0.65rem 0;
        color: var(--primary-color);
        font-weight: 500;
    }

    .nav-links li a:hover {
        color: var(--accent-color);
    }

    /* Mobile CTA Button */
    .mobile-cta-item {
        display: block;
        width: 100%;
        padding: 1rem 0;
        border-top: 1px solid #eee;
    }

    .header-cta {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 4px;
    }

    .nav-links .mobile-cta-item .header-cta {
        display: inline-block;
        width: 100%;
        max-width: none;
        background-color: var(--primary-color);
        color: var(--white);
        text-align: center;
        padding: 0.9rem 1rem;
        font-size: 1.05rem;
        line-height: 1.2;
        border-radius: 6px;
    }

    /* Hamburger Menu */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 40px; /* Increased width */
        height: 40px; /* Increased height */
        padding: 10px; /* Adjusted padding for larger touch area */
        margin-right: 12px; /* Slightly increased margin */
        cursor: pointer;
        z-index: 3000;
        position: relative;
        pointer-events: auto;
        background: none;
        border: none;
        appearance: none;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hero Section */
    #hero {
        padding: 2rem 0;
    }

    .hero-content {
        text-align: center;
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

    .hero-content .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }

    /* Content Grid */
    .content-grid,
    .content-grid.reverse {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        direction: ltr;
    }

    .text-content {
        order: 2;
    }

    .image-content {
        order: 1;
    }

    .content-grid.reverse .text-content {
        order: 1;
    }

    .content-grid.reverse .image-content {
        order: 2;
    }

    .profile-photo {
        max-width: 100%;
        aspect-ratio: 3 / 4;
        object-fit: cover;
    }

    /* Typography */
    h1 {
        font-size: 1.9rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .text-content p {
        font-size: 1.05rem;
        line-height: 1.8;
        margin-bottom: 1rem;
    }

    /* Contact Section */
    .contact-wrapper {
        padding: 1.5rem;
        margin: 0 -1rem;
        border-radius: 0;
    }

    .contact-info h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .contact-info p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }

    .cta-box {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #eee;
    }

    .btn {
        padding: 0.7rem 1.3rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 260px;
    }

    /* Sections */
    .section {
        padding: 2.5rem 0;
    }

    .map-placeholder {
        padding: 2rem 1rem;
        text-align: center;
        background-color: var(--light-bg);
        border-radius: 4px;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
    }

    .footer-logo {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .footer-links {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }

    .footer-links a {
        margin: 0 0.5rem;
    }

    footer p {
        font-size: 0.85rem;
    }
}

/* Extra Small Screens (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --header-height: 65px;
    }

    .container {
        padding: 0 0.75rem;
    }

    .logo img {
        height: var(--logo-height);
        width: auto;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    .text-content p,
    .contact-info p {
        font-size: 0.98rem;
    }

    .nav-links {
        padding: 1rem;
        gap: 0.75rem;
    }

    .nav-links li a {
        font-size: 1.25rem;
    }

    .contact-wrapper {
        padding: 1rem;
        margin: 0;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 2rem 0;
    }

    .mobile-menu-toggle {
        width: 32px;
        height: 28px;
        padding: 4px;
        margin-right: 4px;
    }

    .mobile-menu-toggle span {
        height: 2.5px;
    }
}

