:root {
    --primary: #7DF9FF;
    /* Bright blue-green accent */
    --primary-hover: #5CE1E6;
    /* Slightly darker for hover */
    --bg-color: #E0F2F1;
    /* Blau-grüner Hintergrund, heller Ton */
    --surface-color: #FFFFFF;
    /* White for cards/tiles */
    --text-main: #2D3748;
    /* Dark grey for readability */
    --text-muted: #718096;
    /* Lighter grey for subtitles */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Definiert das Aussehen aller Links */
a {
    text-decoration: underline;
    /* Unterstreichung wieder an */
    color: #0056b3;
    /* Ein klassisches Link-Blau */
}

/* Optional: Damit es beim Drüberfahren (Hover) schick aussieht */
a:hover {
    color: #003d80;
    /* Etwas dunkler beim Drüberfahren */
    text-decoration: none;
    /* Unterstrich weg beim Drüberfahren */
}

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

/* Header */
.main-header {
    background-color: var(--surface-color);
    padding: 40px 0;
    text-align: center;
    border-bottom: 4px solid var(--primary);
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

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

/* Main Split Content */
.content-split {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

/* Left side: 3x3 Grid */
.grid-nav-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px;
    row-gap: 20px;
    flex: 1;
    align-content: space-between;
}

.nav-tile {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}

a.nav-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.nav-tile.no-link {
    cursor: default;
}

.icon-placeholder {
    width: 85px;
    height: 85px;
    margin-bottom: 15px;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--primary);
}

.icon-placeholder img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    /* Optional: Fallback, if images aren't found, background color remains */
}

/* Workaround to show alt text nicely inside circle if image is broken */
.icon-placeholder img:after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    z-index: 10;
}

/* Nav Tile Text */
.nav-tile span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Cycle Container override for center tile */
.nav-tile.cycle-container {
    padding: 0;
    overflow: hidden;
    position: relative;
    border: none;
    /* optional: Remove border if desired for a seamless look, or keep it */
}

.nav-tile.cycle-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Right side: Main Image */
.main-image-section {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.image-wrapper {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    background-color: #e2e8f0;
    /* Fallback placeholder color */
}

.main-photo {
    height: 100%;
    min-height: 350px;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image Failback showing text when image is broken/missing */
.image-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
    z-index: 0;
}

.image-wrapper img {
    position: relative;
    z-index: 1;
    /* Ensures alt wrapper hides fallback text when image is loaded successfully */
    background-color: inherit;
}


/* Bottom Images */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.bottom-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.bottom-images .image-wrapper {
    aspect-ratio: 4 / 3;
}

.bottom-images .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid #e2e8f0;
}

/* Media Queries for Mobility */
@media (max-width: 900px) {
    .content-split {
        flex-direction: column;
    }

    .grid-nav {
        gap: 15px;
    }

    .main-photo {
        min-height: 250px;
    }

    .bottom-images {
        gap: 15px;
    }
}

@media (max-width: 600px) {
    .grid-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .bottom-images {
        grid-template-columns: 1fr;
    }

    .main-header h1 {
        font-size: 2rem;
    }
}

/* --- Button-Styling für die Rückkehr zur Startseite --- */

.back-link {
    margin-top: 50px;
    text-align: center;
    width: 100%;
}

/* Wir nutzen .btn-back zusätzlich zu .nav-tile, um das Quadrat-Design zu brechen */
.nav-tile.btn-back {
    display: inline-flex;
    aspect-ratio: auto;
    /* Hebt das Quadrat (1/1) der normalen Kacheln auf */
    width: auto;
    /* Button wird nur so breit wie der Text */
    min-width: 200px;
    padding: 12px 30px;
    background-color: var(--surface-color);
    border: 2px solid var(--primary);
    border-radius: 30px;
    /* Schöne abgerundete Pillen-Form */
    color: var(--text-main);
    text-decoration: none !important;
    /* Entfernt den Unterstrich von oben */
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-tile.btn-back:hover {
    background-color: var(--primary);
    /* Wird beim Drüberfahren komplett farbig */
    color: white;
    /* Text wird weiß für besseren Kontrast */
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none !important;
}