:root {
    --background1: #f5f5f5;
    --background2: #ffffff;
    --primary: #007bff;
    --primary-hover: #0056b3;
    --whatsapp: #25D366;
    --whatsapp-hover: #20B354;
    --text: #333333;
    --nav-height: 60px;
    --max-width: 1024px;
    --space: 1rem;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0, 91, 196, 0.3);
    --font-size-logo: 1.5rem;
    --font-size-hamburger: 1.5rem;
    --nav-align: flex-end;
    --mobile-nav-align: left;
    --star-filled: gold;
    --star-empty: silver;
    --radius: 5px;
    --transition: all 0.3s ease;
}

body {
    margin: 0;
    background-color: var(--background1);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--background2);
    z-index: 1000;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    align-items: center;
}

main {
    padding: calc(var(--nav-height) + var(--space)) var(--space) var(--space);
    max-width: var(--max-width);
    margin: 0 auto;
}

section {
    margin-top: 1rem;
    padding: var(--space);
    background-color: var(--background2);
    overflow: hidden;
    box-shadow: var(--shadow);
    scroll-margin-top: calc(var(--nav-height) + var(--space));
}

footer {
    padding: var(--space);
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

form {
    margin-bottom: 0;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

textarea { 
    height: 7rem;
}

input, textarea {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #cccccc;
    box-sizing: border-box;
    background-color: var(--background1);
}

a {
    color: var(--primary);    
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--primary);
    transition: var(--transition);
}

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

nav a {
    position: relative;
    text-decoration: none;
    /* font-weight: 400; ist optional, da Browser-Standard 400 ist */
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-hover);
    transition: var(--transition);
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space);
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    font-size: var(--font-size-logo);
    margin: 0;
    white-space: nowrap;
}

.nav-links {    
    display: none;
    list-style: none;    
    gap: var(--space);
    flex-direction: column;  
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background-color: var(--background2);
    padding-left: var(--space);
    padding-bottom: var(--space);
    box-shadow: var(--shadow);
    margin: 0;
}

.nav-links.active {
    display: flex;
}

.hamburger {
    display: block;
    cursor: pointer;
    font-size: var(--font-size-hamburger);
    background: none;
    border: none;
    color: var(--text);
    padding: 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    padding-top: var(--space);
}

.ueber-mich {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.ueber-mich-img {
    width: 200px;
    height: auto;
    align-self: center;
    display: block;
}

.ueber-mich p:first-child {
    margin-top: 0;
}

.faq-item {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: var(--background2);
}

.faq-item summary {
    padding: 0.75rem 1rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

.faq-item summary:hover {
    color: var(--primary-hover);
}

.faq-item p {
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    color: var(--text);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: var(--radius);
    border: none;
    margin-top: var(--space);
    font-weight: 600;
    height: 3.125rem;
    padding: 0 1.5rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.button-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.button-whatsapp {
    background-color: var(--whatsapp);
    margin-bottom: var(--space);
}

.button-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    color: white;
}

.button-whatsapp i { 
    margin-right: 0.5rem;    
    font-size: 1.5rem; 
}

.cta-container {
    text-align: center;
}

.text-center {
    text-align: center;
}

.bewertungen-container {
    background-color: var(--background1); 
    padding: 0.2rem; 
    text-align: center;
}

.star-rating {
    font-size: 1.5em;
    background: linear-gradient(to right, var(--star-filled) var(--fill-percentage), var(--star-empty) var(--fill-percentage));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

.swiper {
    margin-top: var(--space);
}

.swiper-slide {
    background: var(--background1);
    border-radius: var(--radius);
    padding: var(--space);
}

.star-filled {
    color: var(--star-filled);
}

.swiper-button-prev, .swiper-button-next {
    color: var(--primary);
}

.swiper-button-prev:hover, .swiper-button-next:hover {
    color: var(--primary-hover);
}

.abi-know-how-mathematik {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.abi-know-how-mathematik-img {
    width: 140px;
    height: auto;
    display: block;
}

.abi-know-how-mathematik-href {
    align-self: center;
}

.abi-know-how-mathematik-text {
    margin-top: 0;
}

.address-item {
    display: flex;
    align-items: center;
    padding: var(--space) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.address-item:last-child { 
    /* border-bottom: none; */
}

.icon {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.7rem;
    fill: var(--text);
    transition: var(--transition);
}

.icon-button {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    fill: white;
}

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0.8; /* Leichte Transparenz */
    z-index: 1001; /* Über Swiper-Slider (z-index: 1000 von header) */
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 0.8; /* Konsistente Transparenz im sichtbaren Zustand */
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
    opacity: 1; /* Volle Opazität beim Hover */
}

.scroll-to-top .icon-button {
    transform: translateX(0.2rem); /* Bestehende Zentrierung beibehalten */
}

.error-message {
    color: red;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;	
        flex-direction: row;    
        position: static;
        box-shadow: none;
        padding-bottom: 0;
    }

    .ueber-mich, .abi-know-how-mathematik {
        flex-direction: row;
    }
}
