/* =========================================================
   Base / Reset (Mobile First)
   ========================================================= */

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

html, body { height: 100%; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.container-services {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 10px;
}

#page-content {
    flex: 1;
}

/* =========================================================
   Anchor offset for sticky navigation
   ========================================================= */

section[id] {
    scroll-margin-top: calc(100px + 2rem); /* Logo (100px) + nav padding */
}

/* Utility */
.hidden { display: none; }

/* =========================================================
   Navigation (Mobile)
   ========================================================= */

nav {
    background: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: black;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo-img {
    display: block;              /* entfernt “inline image baseline gap” */
    height: 100px;                /* <- DER entscheidende Wert */
    width: auto;
    max-width: 150px;            /* begrenzt Breite */
}

.logo span {
    color: black;
    font-weight: 300;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #007c95;

    font-size: 3rem;
    line-height: 1;

    padding: 0.75rem;
    min-width: 48px;
    min-height: 48px;

    cursor: pointer;
}

nav ul {
    display: none;
    list-style: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

nav ul.active {
    display: flex;
}

nav ul li {
    width: 100%;
}

nav ul li a {
    padding: 1rem;
    display: flex;
    width: 100%;
}

nav a {
    color: #007c95;
    text-decoration: none;
    transition: opacity 0.3s, transform 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 150%;
}

nav a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.nav-icon {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

/* =========================================================
   Hero (Mobile)
   ========================================================= */

.hero {
    background: linear-gradient(90deg, #169f5b 0%, #007c95 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(22,159,91,0.1) 100%, rgba(0,124,149,0.1) 0%);
}

.hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
}

/* Fallback für Hero auf Seiten ohne Klassen (Aktuelles/Datenschutz/Impressum) */
.hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.3rem;
}

.hero p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

/* Home-Hero mit Klassen (dein Wunsch-Setup) */
.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.3rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

/* =========================================================
   Services (Mobile)
   ========================================================= */

.services {
    padding: 5rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 1.7rem;
    margin-bottom: 1rem;
    background: #169f5b;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    padding: 0 10px;
}

.section-claim {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    color: #666;
    font-weight: 400;
    padding: 0 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
}

.service-card {
    padding: 2.5rem;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-top: 4px solid transparent;
    background: linear-gradient(white, white), linear-gradient(90deg, #169f5b 0%, #007c95 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,124,149,0.2);
}

.service-card img {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    object-fit: cover;
}

.service-card h3 {
    color: #007c95;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.service-card p {
    color: #666;
    line-height: 1.8;
}

/* =========================================================
   News / Timeline (Mobile)
   ========================================================= */

.news {
    padding: 5rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Mobile: Linie links */
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #169f5b 0%, #007c95 100%);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #169f5b;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #169f5b;
    z-index: 1;
}

.timeline-date {
    text-align: left;
    padding-right: 0;
    margin-bottom: 0.5rem;
}

.timeline-date h3 {
    color: #007c95;
    font-size: 1.5rem;
    font-weight: 700;
}

.timeline-content {
    padding-left: 0;
}

.timeline-content h2 {
    color: #169f5b;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    word-wrap: break-word;
    hyphens: auto;
}

.timeline-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.timeline-image {
    margin: 1.5rem 0;
    text-align: center;
    background: transparent !important;
}

.timeline-image img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    mix-blend-mode: multiply;
}

.timeline-image a {
    display: inline-block;
    background: transparent !important;
}

/* =========================================================
   Contact (Mobile)
   ========================================================= */

.contact {
    padding: 5rem 0;
    background: white;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.contact-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 0;
    align-self: start;
}

.contact-content h2 {
    background: #169f5b;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.6rem;
    /* margin-bottom: 1.5rem; */
    font-weight: 700;
    word-wrap: break-word;
}

.contact-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contact-lines {
    margin-top: 1.2rem;          /* Abstand zum Text darüber */
    display: flex;
    flex-direction: column;
    gap: 0.4rem;                 /* Abstand E-Mail <-> Telefon */
}

.contact-content p.contact-line {
    margin: 0;              /* killt ALLES (top/bottom/left/right) */
}

.contact-link {
    color: #007c95;            /* Farbe bleibt wie bisher */
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.contact-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: currentColor;  /* nimmt #007c95 automatisch */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.contact-link:hover::after {
    transform: scaleX(1);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: 300px;
    align-self: start;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================
   Footer (Mobile)
   ========================================================= */

footer {
    background: linear-gradient(90deg, #169f5b 0%, #007c95 100%);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: auto auto; /* Inhalt bestimmt Breite */
    gap: 6rem;                        /* kontrollierter Abstand */
    justify-content: center;          /* gesamtes Grid zentrieren */
    align-items: start;               /* oben ausrichten */
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 15px;
}

.footer-left p {
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

/* zusätzlicher Abstand vor den Kontaktdaten */
.footer-contact {
    margin-top: 1.5rem;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-right a {
    position: relative;
    font-weight: 500;
    display: inline-block;
}

.footer-right a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

footer a {
    color: white;
    text-decoration: none;
}

.footer-right a:hover::after {
    transform: scaleX(1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    opacity: 0.9;
}

/* =========================================================
   Legal Pages (Mobile)
   ========================================================= */

.legal-page {
    padding: 0 0 5rem 0;
    background: white;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.legal-content h1 {
    background: linear-gradient(90deg, #169f5b 0%, #007c95 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-weight: 700;
}

.legal-content h2 {
    color: #169f5b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.3rem;
    word-wrap: break-word;
}

.legal-content h3 {
    color: #007c95;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #333;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content ul li {
    margin-bottom: 0.5rem;
    color: black;
}

.legal-content a {
    color: #007c95;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.legal-content a:hover {
    border-bottom-color: #007c95;
}

/* =========================================================
   Breakpoints (min-width)
   ========================================================= */

/* Tablet and up */
@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Navigation: Desktop layout */
    .menu-toggle {
        display: none;
    }

    .footer-right {
        flex-direction: row;
        gap: 2rem;
        align-items: center;
    }

    nav ul {
        display: flex;
        position: static;
        flex-direction: row;
        gap: 2rem;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }

    nav ul li {
        width: auto;
    }

    nav ul li a {
        padding: 0;
        width: auto;
    }

    /* Hero scaling */
    .hero {
        padding: 3.5rem 0;
    }

    .hero h1,
    .hero-title {
        font-size: 3rem;
    }

    .hero p,
    .hero-subtitle {
        font-size: 1.8rem;
    }

    /* Services */
    .section-title {
        font-size: 2.5rem;
        padding: 0;
    }

    .section-claim {
        font-size: 1.2rem;
        padding: 0;
    }

    /* Timeline: center line + 2 columns */
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        grid-template-columns: 1fr 1fr;
        padding-left: 0;
    }

    .timeline-item::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-date {
        text-align: right;
        padding-right: 3rem;
        margin-bottom: 0;
    }

    .timeline-content {
        padding-left: 3rem;
    }

    .timeline-content h2 {
        font-size: 1.8rem;
        hyphens: none;
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .contact-content h2 {
        font-size: 2.5rem;
    }

    .map-container {
        height: 400px;
    }

    /* Legal */
    .legal-content {
        padding-left: 0;
        padding-right: 0;
        padding-top: 2rem;
    }

    .legal-content h2 {
        font-size: 1.5rem;
    }
}

/* Desktop and up */
@media (min-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large desktop and up */
@media (min-width: 1200px) {
    .hero {
        padding: 4rem 0; /* mehr Luft oben/unten ohne feste Höhe */
    }

    .hero h1,
    .hero-title {
        font-size: 4rem;
    }

    .hero p,
    .hero-subtitle {
        font-size: 2.4rem;
    }

    .section-claim {
        max-width: 1200px;
        font-size: 1.4rem;
    }
}
