/* General Body Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(160deg, #232526 0%, #00c6b4 70%, #ff9a4c 100%);
    background-attachment: fixed;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

main, footer {
    transition: filter 0.3s ease-in-out;
}

body.menu-open-blur main,
body.menu-open-blur footer {
    filter: blur(5px);
}

main {
    flex-grow: 1;
    padding: 2rem 1rem;
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Glassmorphism Effect Base */
.glass-panel, nav, footer, .button, form input, form textarea {
    background: rgba(30, 30, 40, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* --- Navbar --- */
nav {
    padding: 1rem 1.5rem;
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 1rem; /* Stick 1rem from the top */
    z-index: 10;
    margin: 1rem;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #f0f0f0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: background-color 0.3s, color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
}

nav .logo img {
    /* This will be removed, but for now, let's keep it clean */
}

nav .nav-links {
    display: flex;
    gap: 0.5rem;
}

/* --- Hamburger --- */
.hamburger {
    display: none;
    position: relative;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #ffffff;
    border-radius: 3px;
    left: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.is-active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }


/* --- Mobile Overrides --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        -webkit-hyphens: auto;
        hyphens: auto;
        word-break: break-word;
    }

    .hamburger {
        display: block;
    }

    nav .nav-links {
        /* Positioning and Styling */
        position: absolute;
        top: calc(100% + 10px); /* Position below nav with a small gap */
        left: 0;
        right: 0;
        background: rgba(40, 40, 50, 0.85);
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
        border-radius: 1rem; /* Rounded corners for the dropdown */
        border: 1px solid rgba(255, 255, 255, 0.1);
        
        /* Layout */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0.5rem 0;

        /* Animation */
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    nav .nav-links.nav-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        padding: 1rem 0;
        width: 100%;
        text-align: center;
        border-radius: 0;
    }

    .nav-links a:hover {
        background-color: rgba(0, 198, 255, 0.3);
    }
}


/* --- Rest of the styles --- */

/* Footer */
footer {
    color: #d0d0d0;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    margin: 1rem;
}

footer a {
    color: #d0d0d0;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #ffffff;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.75rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

/* Content Panels */
.content-panel {
    padding: 2rem;
    margin-top: 2rem;
    overflow-wrap: break-word;
    word-wrap: break-word; /* Legacy fallback */
}

/* General classes */
.text-center {
    text-align: center;
}

.button {
    display: inline-block;
    background: rgba(0, 198, 255, 0.8);
    color: #ffffff;
    font-weight: bold;
    padding: 1rem 2.5rem;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.button:hover {
    background: rgba(0, 198, 255, 1);
    transform: translateY(-3px);
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

form label {
    font-weight: bold;
    color: #f0f0f0;
}

form input,
form textarea {
    width: 100%;
    padding: 1rem;
    color: #ffffff;
    border-width: 1px;
    box-sizing: border-box;
}

form input::placeholder,
form textarea::placeholder {
    color: #a0a0a0;
}

form button {
    width: 100%;
}

/* Specific Page Adjustments */
.service-item, .quality-item, .price-card, .info-card, .form-card {
    padding: 2rem;
    margin-bottom: 2rem;
    overflow-wrap: break-word;
    word-wrap: break-word; /* Legacy fallback */
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Reduced min-width for small screens */
    gap: 2rem;
}

/* Styles for legal pages (Impressum, Datenschutz) */
.legal-page h2 {
    font-size: 1.5rem; /* Smaller headings */
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-page h2:first-of-type {
    margin-top: 0;
}

/* Responsive grid for service overview */
@media (min-width: 768px) {
    .content-panel > .grid-container {
        grid-template-columns: 1fr 1fr;
    }

    .content-panel > .grid-container .service-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}
