:root {
    --primary-dark: #283d5c;
    --primary-mid: #5d6f85;
    --muted: #878f9c;
    --surface: #e6e1db;
    --surface-alt: #c9c6ba;
    --surface-strong: #abaa98;
    --white: #ffffff;
    --text: #000000;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background: var(--surface);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
}

/* Header & Navigation */
header {
    background: var(--primary-dark);
    padding: 10px 5%;
    position: fixed;
    width: 90%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--surface-strong);
}

.header-logo {
    height: 40px;
}

.logo-text {
    color: var(--surface);
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
    font-weight: 600;
}

nav a:hover,
.lang-switcher button:hover {
    color: var(--surface-alt);
}

.lang-switcher {
    margin-left: 20px;
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
}

.menu-toggle {
    display: none;
    color: var(--surface);
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* Startseite */
.hero {
    background: var(--primary-dark);
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-logo {
    width: 150px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--surface);
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
}

section {
    padding: 80px 10%;
}

/* Startseite: lesbarer und weniger breit */
body:not(.legal-page) section {
    max-width: 980px;
    margin: 0 auto;
    box-sizing: border-box;
}

body:not(.legal-page) section p,
body:not(.legal-page) section li {
    font-size: 1.05rem;
}

body:not(.legal-page) section h2 {
    font-size: 1.9rem;
}

.bg-light {
    background: var(--surface-alt);
}

.gold-line {
    width: 50px;
    height: 3px;
    background: var(--primary-mid);
    margin: 20px 0;
}

.hero-cta {
    background: var(--primary-mid);
    color: var(--white);
    padding: 12px 30px;
    text-decoration: none;
    margin-top: 20px;
    font-weight: bold;
    display: inline-block;
}

.project-image {
    width: 100%;
    max-width: 800px;
    height: 220px;
    border-radius: 5px;
    margin-bottom: 20px;
    object-fit: cover;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--surface-strong);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-card h3 {
    margin-top: 4px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.project-card p {
    margin: 8px 0;
}

.project-slider {
    position: relative;
}

.slider-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(40, 61, 92, 0.82);
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow.prev {
    left: 10px;
}

.slider-arrow.next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}

.slider-dot.active {
    background: #fff;
}

.project-meta {
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.contact-form {
    display: grid;
    gap: 15px;
    max-width: 600px;
    margin-top: 30px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid var(--muted);
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.contact-form button {
    background: var(--primary-mid);
    color: var(--white);
    padding: 15px;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
}

.contact-form button:hover {
    background: var(--primary-dark);
}

.form-feedback {
    padding: 12px 14px;
    border-radius: 6px;
    margin: 14px 0;
    font-weight: 600;
}

.form-feedback.success {
    background: #e9f8ef;
    color: #1d6b3b;
    border: 1px solid #b8e7ca;
}

.form-feedback.error {
    background: #fdecec;
    color: #8f1d1d;
    border: 1px solid #f6c4c4;
}

.admin-panel {
    margin-top: 24px;
}

.admin-links {
    margin-top: 18px;
}

.admin-project-list {
    padding-left: 18px;
}

.admin-project-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-delete-form {
    display: inline-block;
    margin: 0;
}

.edit-btn {
    background: var(--primary-mid);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.edit-btn:hover {
    background: var(--primary-dark);
}

.delete-btn {
    background: var(--muted);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
}

.delete-btn:hover {
    background: var(--primary-dark);
}

.existing-images {
    margin-top: 6px;
}

.existing-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.existing-image-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.existing-image-item img {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid var(--surface-strong);
}

/* Rechtliche Seiten */
body.legal-page {
    background-color: var(--surface-alt);
}

body.legal-page h1,
body.legal-page h2,
body.legal-page h3 {
    color: var(--primary-dark);
}

main {
    padding: 120px 10% 40px 10%;
    background-color: var(--surface);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

main .gold-line {
    margin: 10px 0 30px 0;
}

main h2 {
    font-size: 1.5rem;
    margin-top: 30px;
}

main h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

main h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
    margin-top: 20px;
}

main p,
main li {
    font-size: 0.95rem;
    color: var(--text);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 40px 10%;
    text-align: center;
    border-top: 2px solid var(--surface-strong);
}

body.legal-page footer {
    margin-top: 40px;
}

footer a {
    color: var(--white);
    text-decoration: none;
}

footer a:hover {
    color: var(--surface-alt);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--primary-dark);
    color: var(--white);
    padding: 15px;
    text-align: center;
    z-index: 2000;
    border-top: 2px solid var(--primary-mid);
    display: none;
}

#cookie-banner a {
    color: var(--surface);
    text-decoration: underline;
}

#cookie-banner button {
    background: var(--primary-mid);
    color: var(--white);
    border: none;
    padding: 5px 15px;
    margin-left: 15px;
    cursor: pointer;
}

/* Lightbox (Bild vergroessern) */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 3001;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
}

.lightbox-arrow.prev {
    left: 14px;
}

.lightbox-arrow.next {
    right: 14px;
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Mobile */
@media (max-width: 768px) {
    header {
        width: 100%;
        left: 0;
        padding: 10px 16px;
        box-sizing: border-box;
    }

    .header-logo {
        height: 32px;
    }

    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        padding: 6px;
    }

    nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        border-bottom: 2px solid var(--primary-mid);
        padding: 12px 0 16px 0;
    }

    nav.active {
        display: block;
    }

    /* Rechtliche Seiten haben kein Hamburger-Menue,
       daher Navigation dort auf Mobile sichtbar lassen. */
    header nav:not(#nav-menu) {
        display: block;
        position: static;
        width: auto;
        background: transparent;
        border-bottom: 0;
        padding: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav a,
    .lang-switcher {
        margin: 10px 0;
        display: block;
        font-size: 1rem;
    }

    header nav:not(#nav-menu) a {
        margin: 0;
        display: inline-block;
        font-size: 0.95rem;
    }

    header nav:not(#nav-menu) .lang-switcher {
        display: inline-block;
        margin: 0 0 0 10px;
    }

    .hero {
        min-height: 70vh;
        height: auto;
        padding: 100px 16px 40px 16px;
        box-sizing: border-box;
    }

    .hero-logo {
        width: 110px;
        margin-bottom: 14px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin: 0 0 8px 0;
    }

    .hero p {
        font-size: 1.08rem;
        max-width: 100%;
    }

    .project-image {
        height: 190px;
    }

    .slider-arrow {
        width: 30px;
        height: 30px;
    }

    .hero-cta {
        width: 100%;
        max-width: 320px;
        box-sizing: border-box;
        text-align: center;
        padding: 12px 16px;
    }

    section {
        padding: 56px 16px;
        max-width: 100%;
    }

    .gold-line {
        margin: 14px 0;
    }

    .contact-form {
        max-width: 100%;
        margin-top: 20px;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form button {
        font-size: 16px;
    }

    main {
        padding: 92px 16px 28px 16px;
        box-shadow: none;
    }

    main h2 {
        font-size: 1.25rem;
    }

    main h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    main h3 {
        font-size: 1rem;
    }

    footer {
        padding: 24px 16px;
    }

    #cookie-banner {
        padding: 12px;
        text-align: left;
        font-size: 0.9rem;
    }

    #cookie-banner button {
        margin: 10px 0 0 0;
        width: 100%;
        padding: 10px 14px;
    }
}

@media (max-width: 932px) and (orientation: landscape) {
    main h1 {
        font-size: 1.35rem;
        letter-spacing: 0.01em;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .project-image {
        height: 170px;
    }

    nav a,
    .lang-switcher {
        font-size: 0.95rem;
    }
}
