:root {
    --primary-color: #e67e22; /* Orange aus dem Bild */
    --primary-hover: #d35400;
    --text-color: #333333;
    --bg-light: #f9f4f1; /* Helles Beige für den Hintergrund */
    --white: #ffffff;
    --header-height: 80px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Local Fonts - DSGVO Compliant */
@font-face {
    font-family: 'Open Sans';
    src: url('../assets/fonts/OpenSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif; /* Platzhalter Font, ähnlich wie im Bild */
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* Scroll Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Animation Classes - nur für einzelne Elemente */
.service-card {
    opacity: 0; /* Start hidden */
    transition: opacity 0.8s ease-out;
}

.service-card.animate {
    animation: fadeInUp 0.8s ease-out forwards;
}

.services-grid .service-card:nth-child(1).animate { animation-delay: 0s; }
.services-grid .service-card:nth-child(2).animate { animation-delay: 0.15s; }
.services-grid .service-card:nth-child(3).animate { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(4).animate { animation-delay: 0.45s; }

.slider-outer-wrapper {
    opacity: 0; /* Start hidden */
}

.slider-outer-wrapper.animate {
    animation: slideInLeft 0.8s ease-out forwards;
}

.about-text {
    opacity: 0; /* Start hidden */
}

.about-text.animate {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Kontakt Section Animations */
.contact-info {
    opacity: 0; /* Start hidden */
}

.contact-info.animate {
    animation: slideInLeft 0.8s ease-out forwards;
}

.contact-form {
    opacity: 0; /* Start hidden */
}

.contact-form.animate {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Global Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 5%;
}

/* Prevent horizontal scroll on mobile */
body, main, p, h1, h2, h3, h4, h5, h6, ul, li {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%; /* Fill the full header height */
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
    text-decoration: none;
}

.logo-main {
    font-size: 1.2rem;
    color: var(--text-color);
}

.logo-sub {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Desktop Nav */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600; /* SemiBold */
    font-size: 1.15rem;
    position: relative;
    transition: var(--transition);
}

nav ul li a.active,
nav ul li a:hover {
    color: var(--primary-color);
}

/* Scroll Spy Active Indicator */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition); /* Smooth color change */
    padding: 5px 10px; /* Increase clickable area */
    border-radius: 4px;
}

.phone-link:hover,
.phone-link:focus {
    color: var(--primary-color);
    background-color: rgba(230, 126, 34, 0.1); /* Light orange background */
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
    padding: 10px; /* Increase clickable area */
    margin: -10px; /* Compensate for padding in layout */
}

.bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Animated X for Mobile Menu */
.mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Sections General */
section {
    padding: 80px 0;
    scroll-margin-top: var(--header-height); /* Wichtig für Scroll Spy & Anker */
}

h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #5d4037; /* Brauner Ton aus Überschriften */
    position: relative;
    display: inline-block;
    width: 100%;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* Hero Section */
#home {
    height: 100vh;
    /* Darker overlay for better readability */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../assets/images/phsyio_start.webp') no-repeat center center/cover;
    /* Fallback background color if image is missing */
    background-color: #333; 
    display: flex;
    align-items: center;
    margin-top: var(--header-height); /* Offset fixed header */
    padding-top: 0; /* Reset padding for hero */
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Leistungen */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.service-card h3 {
    margin-bottom: 15px;
    color: #5d4037;
}

.service-note {
    text-align: center;
    margin-top: 40px;
    font-style: italic;
    color: var(--primary-color);
}

/* Über uns */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* --- Slider Styles --- */
.slider-outer-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.slider-container {
    position: relative;
    overflow: hidden;
    height: 400px; /* Fixed height to match placeholder */
    border-radius: 8px;
    background: #f0f0f0;
    width: 100%;
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    cursor: grab;
    transition: transform 0.3s ease-out; /* Smooth slide transition */
}

.slider-wrapper.grabbing {
    cursor: grabbing;
    transition: none; /* Immediate follow during drag */
}

.slider-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    display: block;
    pointer-events: none; /* Prevents image dragging ghost */
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s;
}

.slider-dot.active {
    background: var(--primary-color); /* Orange active dot */
    transform: scale(1.2);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot:hover {
    background-color: #bbb;
}

.slider-dot.active {
    background-color: var(--primary-color);
}

.about-text {
    flex: 1;
}

.about-text ul {
    list-style: none;
    margin-top: 20px;
}

.about-text ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-text ul li i {
    color: var(--primary-color);
}

/* Kontakt */
.contact-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background: url('../assets/images/towel-bg.jpg') no-repeat center/cover; /* Placeholder for towel image */
    padding: 30px;
    border-radius: 8px;
    color: #333;
    position: relative;
}
.contact-info::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(255,255,255,0.85); /* Overlay to make text readable */
    border-radius: 8px;
    z-index: 0;
}
.contact-details {
    position: relative;
    z-index: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 5px;
}

.info-link {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.info-link:hover {
    color: var(--primary-color);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px; /* Prevents zoom on iOS */
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

.form-check input {
    width: auto;
    margin-top: 4px;
}

.form-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

footer a {
    color: #fff;
    margin: 0 2px;
    text-decoration: none;
    transition: var(--transition);
    padding: 5px 8px;
    border-radius: 4px;
}

footer a:hover {
    color: var(--primary-color);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    max-width: 700px;
    width: 90%;
    background: var(--white);
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 2000;
    transition: transform 0.5s ease;
    border-left: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

#cookie-banner h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-color);
}

#cookie-banner p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0px;
}

#cookie-banner .cookie-links {
    font-size: 0.8rem;
    margin-bottom: 0px;
    text-align: center;
}

#cookie-banner .cookie-links a {
    color: var(--text-color);
    text-decoration: underline;
    margin-right: 15px;
}

#cookie-banner .cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        justify-content: center;
    }

    .logo {
        flex: 1;
        align-items: center;
    }

    .mobile-toggle {
        display: flex;
        position: absolute;
        right: 5%;
    }

    nav {
        display: flex;
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        padding: 40px 0;
        overflow-y: auto;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .mobile-legal-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
        padding-top: 40px;
        border-top: 1px solid #eee;
        align-items: center;
    }

    .mobile-legal-links a {
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        transition: var(--transition);
    }

    .mobile-legal-links a:hover {
        color: var(--primary-color);
    }
    
    .header-actions {
        display: none;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .slider-container {
        height: 350px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }

    /* Cookie Banner Mobile */
    #cookie-banner {
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        bottom: 10px;
        left: 50%;
        padding: 20px;
    }

    #cookie-banner h3 {
        font-size: 1rem;
    }

    #cookie-banner p {
        font-size: 0.85rem;
    }

    #cookie-banner .cookie-buttons {
        flex-direction: column;
    }

    #cookie-banner .cookie-buttons button {
        width: 100%;
    }
}

/* Desktop: Hide mobile legal links */
@media (min-width: 769px) {
    .mobile-legal-links {
        display: none;
    }
}
