@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ============================================================
   BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #fcfcfc;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 500;
}

.logo img {
    height: 64px;
    display: block;
}

/* ============================================================
   DESKTOP NAV
   ============================================================ */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #1d4e89;
}

/* ============================================================
   HAMBURGER BUTTON
   ============================================================ */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 600;
}

.burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* X-Animation wenn offen */
body.nav-open .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .burger span:nth-child(2) {
    opacity: 0;
}

body.nav-open .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   OFF-CANVAS OVERLAY
   ============================================================ */
.offcanvas-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 700;
    opacity: 0;
    transition: opacity 0.3s;
}

.offcanvas-overlay.open {
    opacity: 1;
}

.offcanvas-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    padding: 70px 30px 40px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.offcanvas-overlay.open .offcanvas-panel {
    transform: translateX(0);
}

.offcanvas-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.offcanvas-nav ul li {
    border-bottom: 1px solid #f0f0f0;
}

.offcanvas-nav ul li a {
    display: block;
    padding: 15px 0;
    text-decoration: none;
    color: #333;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    transition: color 0.2s;
}

.offcanvas-nav ul li a:hover,
.offcanvas-nav ul li a.active {
    color: #1d4e89;
}

.offcanvas-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #555;
    line-height: 1;
    padding: 4px 8px;
}

.offcanvas-close:hover {
    color: #1d4e89;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    display: flex;
    padding: 60px 50px;
    justify-content: center;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.hero-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.page-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.page-title {
    color: #bdbdbd;
    text-transform: uppercase;
    font-size: 28px;
    font-weight: 300;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.quote {
    text-align: center;
    font-style: italic;
    font-size: 20px;
    color: #666;
    margin-bottom: 50px;
    font-weight: 300;
    line-height: 1.5;
}

/* ============================================================
   CONTENT FLEX (Leistungen, Kontakt, Vita)
   ============================================================ */
.content-flex {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.content-left {
    flex: 1;
    line-height: 1.6;
}

.content-right {
    flex: 1;
}

.content-right img {
    width: 100%;
    display: block;
}

.leistungen-text {
    line-height: 1.6;
    max-width: 700px;
}

h3 {
    color: #333;
    font-size: 16px;
    margin-top: 25px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

ul.leistungen-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 30px;
}

ul.leistungen-list li {
    margin-bottom: 10px;
}

/* ============================================================
   PROJEKTE
   ============================================================ */
.projekte-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sidebar-menu {
    flex: 0 0 210px;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu ul li {
    margin-bottom: 14px;
}

.sidebar-menu ul li a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: color 0.3s;
}

.sidebar-menu ul li a:hover,
.sidebar-menu ul li a.active {
    color: #1d4e89;
    font-weight: 600;
}

/* Project gallery */
.project-gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Grosses Hauptbild */
.gallery-main {
    width: 100%;
}

.gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.gallery-main img:hover {
    opacity: 0.93;
}

/* Thumbnail-Reihe */
.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.65;
}

.gallery-thumbs img:hover {
    opacity: 1;
}

.gallery-thumbs img.active {
    border-color: #1d4e89;
    opacity: 1;
}

/* Mobile: Sidebar als Select-Dropdown */
.sidebar-select {
    display: none;
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    margin-bottom: 20px;
    cursor: pointer;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    padding: 10px 18px;
    transition: color 0.2s;
    line-height: 1;
}

.lightbox-close {
    top: 20px;
    right: 30px;
    font-size: 28px;
}

.lightbox-prev {
    left: 20px;
    font-size: 56px;
}

.lightbox-next {
    right: 20px;
    font-size: 56px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #1d4e89;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #1d4e89;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.checkbox-container a {
    color: #1d4e89;
    text-decoration: none;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

button[type="submit"] {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 12px 25px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-start;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 1px;
}

button[type="submit"]:hover {
    background-color: #1d4e89;
}

/* ============================================================
   LINKS / PARTNER GRID
   ============================================================ */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #e0e0e0;
}

.partner-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    border: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.partner-cell:hover {
    background-color: #f9f9f9;
}

.partner-cell a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-cell img {
    max-width: 160px;
    max-height: 75px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.partner-cell img:hover {
    filter: grayscale(0%);
}

.partner-section-title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #444;
    margin-bottom: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 25px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    border-top: 1px solid #eaeaea;
    flex-wrap: wrap;
    gap: 10px;
}

.footer a {
    color: #888;
    text-decoration: none;
}

.footer a:hover {
    color: #1d4e89;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 8888;
    padding: 18px 50px;
    display: none;
}

.cookie-banner.visible {
    display: block;
}

.cookie-banner-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-banner-content p {
    flex: 1;
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.cookie-banner-content a {
    color: #1d4e89;
    text-decoration: none;
}

.cookie-banner-content a:hover {
    text-decoration: underline;
}

#cookie-accept {
    background-color: #1d4e89;
    color: #fff;
    border: none;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
    text-transform: uppercase;
    flex-shrink: 0;
}

#cookie-accept:hover {
    background-color: #163b6b;
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content {
    max-width: 820px;
}

.legal-content h2 {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 35px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.legal-content p,
.legal-content li {
    line-height: 1.7;
    color: #555;
    margin-bottom: 12px;
    font-size: 14px;
}

.legal-content a {
    color: #1d4e89;
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* ============================================================
   VITA
   ============================================================ */
.vita-subtitle {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 30px;
    font-weight: 400;
}

.vita-table {
    width: 100%;
    border-collapse: collapse;
}

.vita-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

.vita-table td {
    padding: 10px 14px;
    font-size: 14px;
    color: #555;
    border: none;
}

.vita-table td:first-child {
    white-space: nowrap;
    font-weight: 500;
    color: #333;
    width: 90px;
}

.vita-section-title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 15px;
    margin-top: 5px;
}

/* ============================================================
   RESPONSIVE – TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    header {
        padding: 15px 24px;
    }

    .main-content {
        padding: 40px 24px;
    }

    .footer {
        padding: 20px 24px;
    }

    .cookie-banner {
        padding: 16px 24px;
    }

    /* Projekte: Sidebar oben, Gallery darunter */
    .projekte-container {
        flex-direction: column;
        gap: 20px;
    }

    .sidebar-menu {
        flex: none;
        width: 100%;
    }

    /* Vita: Bild oben, Text darunter */
    .content-flex {
        flex-direction: column;
        gap: 30px;
    }

    .content-right[style] {
        flex: none !important;
        width: 100%;
    }

    .content-right img {
        max-height: 340px;
        object-fit: cover;
        width: 100%;
    }

    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partner-cell {
        padding: 28px 16px;
    }
}

/* ============================================================
   RESPONSIVE – MOBILE (≤ 680px)
   ============================================================ */
@media (max-width: 680px) {

    /* Header: Desktop-Nav verstecken, Burger zeigen */
    header nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .logo img {
        height: 50px;
    }

    header {
        padding: 12px 18px;
    }

    .main-content {
        padding: 28px 18px;
    }

    .page-title {
        font-size: 20px;
        letter-spacing: 1px;
        margin-bottom: 24px;
    }

    .quote {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Hero-Bild auf Startseite volle Breite */
    .hero-image {
        max-width: 100%;
    }

    /* Projekte: Sidebar als Dropdown */
    .sidebar-menu {
        display: none;
    }

    .sidebar-select {
        display: block;
    }

    /* Thumbnails kleiner auf Mobile */
    .gallery-thumbs img {
        width: 64px;
        height: 48px;
    }

    /* Lightbox Pfeile kleiner */
    .lightbox-prev,
    .lightbox-next {
        font-size: 36px;
    }

    .lightbox-prev {
        left: 6px;
    }

    .lightbox-next {
        right: 6px;
    }

    /* Partner-Grid 1-spaltig */
    .partner-grid {
        grid-template-columns: 1fr 1fr;
    }

    .partner-cell {
        padding: 20px 12px;
    }

    .partner-cell img {
        max-width: 120px;
        max-height: 55px;
    }

    /* Footer gestapelt */
    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 18px 18px;
    }

    /* Cookie Banner */
    .cookie-banner {
        padding: 14px 18px;
    }

    .cookie-banner-content {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    /* Kontakt: nebeneinander → untereinander */
    .content-flex {
        flex-direction: column;
        gap: 24px;
    }

    .contact-form {
        max-width: 100%;
    }

    /* Off-Canvas Overlay sichtbar machen */
    .offcanvas-overlay {
        display: block;
        pointer-events: none;
    }

    .offcanvas-overlay.open {
        pointer-events: all;
    }
}

/* Body lock wenn Menü offen */
body.nav-open {
    overflow: hidden;
}