/* style.css */

/* --- SCHRIFTARTEN (Lokal geladen für DSGVO) --- */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

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

/* --- VARIABLEN & RESET --- */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #333333;
    --secondary-text: #666666;
    --border-color: #f0f0f0;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --success-bg: #d4edda;
    --success-text: #155724;
    --font-main: 'Inter', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
    --header-height: 80px; /* Höhe des fixierten Headers auf Mobile */
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-size: 16px;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    /* Wichtig: Padding-Top nur auf Mobile, damit Inhalt nicht unter dem fixierten Header verschwindet */
    padding-top: 0;
}

/* --- TYPOGRAFIE & LINKS --- */
h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.3;
    margin-top: 0;
}

h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Barrierefreiheit: Fokus sichtbar machen */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 2px;
}

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

/* --- LAYOUT KLASSEN --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.content-wrap {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
    width: 100%;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative; /* Basis für Desktop */
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.03em;
    white-space: nowrap;
    z-index: 1002; /* Über dem Menü */
}

.site-logo:hover {
    opacity: 0.7;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.site-nav a {
    color: var(--secondary-text);
    font-size: 1rem;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Aktiver Navigations-Link */
.nav-link {
    color: var(--secondary-text);
    font-size: 1rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.nav-link.active {
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
    text-decoration: none;
    pointer-events: none;
}

.nav-link.active:hover {
    color: var(--text-color);
    text-decoration: none;
}

/* --- FOOTER --- */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: #888;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: var(--text-color);
}

/* --- GALERIE --- */
.gallery-grid {
    column-count: 2;
    column-gap: 2rem;
    width: 100%;
    padding: 2rem 0 4rem 0;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    display: inline-block;
    width: 100%;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease-in-out;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    background-color: #f0f0f0;
}

.image-info {
    padding: 0.75rem 0.5rem 0.5rem;
}

.image-info h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.image-info p {
    font-size: 0.875rem;
    color: var(--secondary-text);
    margin: 0;
}

.statement {
    border-left: 3px solid #18435a;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #18435a;
    background: #f8f9fb;
    padding: 1.5rem;
    border-radius: 0 4px 4px 0;
}

/* --- FORMULARE --- */
.contact-box {
    background: #fff;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
    font-family: inherit;
}

.btn-primary:hover {
    background: #555;
    text-decoration: none;
    color: white;
}

.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #c3e6cb;
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #f5c6cb;
}

/* --- ÜBER MICH --- */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-image {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

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

.about-text {
    flex: 1;
    width: 100%;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.7;
}

/* --- BURGER MENU BUTTON --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002; /* Über dem Menü */
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: flex-end;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* --- RESPONSIVE: DESKTOP & TABLET (> 768px) --- */
@media (min-width: 769px) {
    .about-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .about-image {
        max-width: 300px;
    }
    .gallery-grid {
        column-count: 3;
    }
    .menu-toggle {
        display: none !important;
    }
    .site-nav {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        border: none !important;
        gap: 2rem !important;
    }
    /* Reset Header für Desktop */
    .site-header {
        position: static;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .header-inner {
        position: relative;
        padding: 0 2rem;
    }
    .site-logo, .menu-toggle {
        position: static;
    }
    main {
        padding-top: 0;
    }
}

/* --- RESPONSIVE: MOBILE (< 768px) --- */
@media (max-width: 768px) {
    
    /* Header fixieren */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 0;
        border-bottom: 1px solid var(--border-color);
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1001;
        height: var(--header-height);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
  
  	.site-header + .container {
  		margin-top: var(--header-height);
  	}

    .header-inner {
        max-width: 100%;
        height: 100%;
        padding: 0 1.5rem;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        margin: 0;
        width: 100%;
    }

    /* Logo fixieren */
    .site-logo {
        position: absolute;
        left: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        font-size: 1.5rem;
        z-index: 1000;
    }

    /* Burger Button fixieren */
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
        background: transparent;
    }

    /* Hauptinhalt nach unten schieben, damit er nicht unter dem Header verschwindet */
    main {
        padding-top: var(--header-height);
    }

    .content-wrap {
        margin: 2rem auto;
    }

    .contact-box {
        padding: 0;
    }

    .gallery-grid {
        column-count: 1;
    }

    h1 { font-size: 1.75rem; }
  	body { font-size: 1.2rem;}

    /* Navigation als Overlay von rechts */
    .site-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 6rem 2rem 2rem; /* Mehr Platz oben wegen fixiertem Header */
        gap: 1.5rem;
        transition: right 0.3s ease-in-out;
        z-index: 1001;
        border-left: 1px solid var(--border-color);
        align-items: flex-start;
    }

    .site-nav.open {
        right: 0;
    }

    .site-nav a, 
    .site-nav .nav-link {
        font-size: 1.25rem;
        color: var(--text-color);
        padding: 0.5rem 0;
        border-bottom: 1px solid transparent;
        white-space: normal;
    }

    .site-nav .nav-link.active {
        font-weight: 600;
        color: var(--accent-color);
        border-bottom: 2px solid var(--accent-color);
    }

    /* Burger Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    body.menu-open {
        overflow: hidden;
    }
}