* { box-sizing: border-box; }

:root {
    --background: #1c1c1c;
    --nav: #1f1f1f;
    --line: rgba(255,255,255,.08);
    --text: #f4f4f4;
    --muted: #aaa;
    --page-width: 1060px;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* Startseite */
.home-hero {
    position: relative;
    width: 100%;
    height: min(61.7vw, 925px);
    min-height: 520px;
    overflow: hidden;
    background: #ececeb;
}

.home-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 41%;
    filter: grayscale(100%);
}

.hero-bottom-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 165px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.06) 42%, rgba(0,0,0,.24));
    pointer-events: none;
}

.hero-title-wrap {
    position: absolute;
    left: 50%;
    bottom: 58px;
    width: min(var(--page-width), calc(100% - 56px));
    transform: translateX(-50%);
    z-index: 2;
}

.hero-title-wrap h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(33px, 3.6vw, 62px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0,0,0,.16);
}

/* Navigation – KEINE Dropdown-Menüs */
.navigation-bar {
    width: 100%;
    height: 82px;
    background: var(--nav);
    border-top: 1px solid rgba(255,255,255,.03);
    border-bottom: 1px solid var(--line);
}

.navigation-inner {
    width: min(var(--page-width), calc(100% - 56px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
}

.main-nav {
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: 46px;
}

.main-nav > a {
    height: 100%;
    display: flex;
    align-items: center;
    color: #f4f4f4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.main-nav > a:hover,
.main-nav > a.active {
    opacity: .72;
}

.down-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-55%);
    color: #888;
    font-size: 36px;
    line-height: 1;
    text-decoration: none;
    font-weight: 300;
    user-select: none;
}

.menu-toggle { display: none; }

/* Unterseiten */
.page-heading {
    min-height: 310px;
    background: linear-gradient(120deg, #303030, #171717);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-end;
}

.page-heading-inner {
    width: min(var(--page-width), calc(100% - 56px));
    margin: 0 auto;
    padding: 72px 0 62px;
}

.eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #aaa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .21em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(44px, 6vw, 76px);
    font-weight: 300;
}

.page-heading p {
    max-width: 700px;
    margin: 17px 0 0;
    color: #bbb;
    line-height: 1.65;
}

.page-content {
    width: min(var(--page-width), calc(100% - 56px));
    margin: 0 auto;
    padding: 72px 0 110px;
}

.submenu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 22px;
}

.submenu-card {
    min-height: 190px;
    padding: 28px;
    border: 1px solid #363636;
    background: #242424;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background .15s ease, border-color .15s ease;
}

.submenu-card:hover {
    background: #292929;
    border-color: #4b4b4b;
}

.submenu-card h2 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 400;
}

.submenu-card p {
    margin: 0;
    color: #aaa;
    line-height: 1.55;
}

.submenu-card span {
    margin-top: 26px;
    font-size: 13px;
}

.prose {
    color: #ddd;
    line-height: 1.8;
    max-width: 760px;
}

.site-footer {
    border-top: 1px solid #2b2b2b;
    background: #191919;
}

.footer-inner {
    width: min(var(--page-width), calc(100% - 56px));
    min-height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #888;
    font-size: 12px;
}

.footer-links { display: flex; gap: 20px; }

@media (max-width: 980px) {
    .home-hero {
        height: 58vw;
        min-height: 450px;
    }
    .home-hero-image { object-position: 43% 40%; }
    .hero-title-wrap { bottom: 40px; }
    .main-nav { gap: 26px; }
}

@media (max-width: 760px) {
    .home-hero {
        height: 65vw;
        min-height: 380px;
    }
    .hero-title-wrap h1 { font-size: 26px; }
    .navigation-bar { height: 68px; }

    .menu-toggle {
        display: inline-grid;
        width: 40px;
        height: 40px;
        padding: 7px;
        gap: 5px;
        border: 0;
        background: transparent;
        margin-right: 10px;
    }
    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: -28px;
        right: -28px;
        top: 68px;
        height: auto;
        padding: 8px 28px 20px;
        flex-direction: column;
        gap: 0;
        background: #1b1b1b;
        border-bottom: 1px solid #333;
        z-index: 30;
    }

    .main-nav.open { display: flex; }

    .main-nav > a {
        height: 48px;
    }

    .submenu-grid {
        grid-template-columns: 1fr;
    }

    .down-arrow { right: 2px; font-size: 30px; }
}

@media (max-width: 520px) {
    .hero-title-wrap,
    .navigation-inner,
    .page-heading-inner,
    .page-content,
    .footer-inner {
        width: calc(100% - 28px);
    }

    .hero-title-wrap {
        bottom: 28px;
    }

    .hero-title-wrap h1 {
        font-size: 22px;
        line-height: 1.08;
    }
}


.legal-text h2,
.legal-text h3 {
    margin-top: 32px;
    margin-bottom: 10px;
    font-weight: 400;
}

.legal-text h2:first-child {
    margin-top: 0;
}

.legal-text a {
    text-decoration: underline;
    text-underline-offset: 3px;
}


.legal-text h1 {
    margin-top: 0;
    font-size: 36px;
    font-weight: 400;
}

.legal-text h3,
.legal-text h4 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: 400;
}

.legal-text ul {
    padding-left: 22px;
    line-height: 1.8;
}

.legal-text a {
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Portrait-Galerie: dichtes, variables Fotomosaik */
.portrait-gallery-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.portrait-upload-box {
    margin-bottom: 28px;
    padding: 30px 24px;
    border: 1px dashed #666;
    background: #232323;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}

.portrait-upload-box.dragover {
    border-color: #aaa;
    background: #292929;
}

.portrait-upload-box h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 400;
}

.portrait-upload-box p {
    margin: 0 0 18px;
    color: #aaa;
    line-height: 1.5;
}

.portrait-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #666;
    background: #1b1b1b;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.portrait-upload-button:hover {
    background: #303030;
}

.portrait-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.portrait-gallery-note {
    margin: -12px 0 24px;
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.5;
}

.portrait-masonry {
    columns: 5 180px;
    column-gap: 16px;
}

.portrait-photo {
    break-inside: avoid;
    margin: 0 0 16px;
    background: #111;
    overflow: hidden;
}

.portrait-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .2s ease, opacity .2s ease;
}

.portrait-photo:hover img {
    transform: scale(1.015);
    opacity: .93;
}

.portrait-empty {
    padding: 44px 24px;
    color: #aaa;
    text-align: center;
    border: 1px solid #333;
    background: #222;
}

@media (max-width: 800px) {
    .portrait-masonry {
        columns: 3 150px;
        column-gap: 12px;
    }

    .portrait-photo {
        margin-bottom: 12px;
    }
}

@media (max-width: 520px) {
    .portrait-gallery-wrap {
        width: calc(100% - 20px);
    }

    .portrait-masonry {
        columns: 2 130px;
        column-gap: 10px;
    }

    .portrait-photo {
        margin-bottom: 10px;
    }
}


/* Kleine Galerie-Diashow innerhalb einer Auswahlkarte */
.submenu-card.has-preview {
    padding: 0;
    overflow: hidden;
}

.card-preview {
    position: relative;
    width: 100%;
    height: 122px;
    overflow: hidden;
    background: #171717;
    border-bottom: 1px solid #343434;
}

.card-preview-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
}

.card-preview-slide.active {
    opacity: 1;
}

.card-preview-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.card-preview-body {
    min-height: 160px;
    padding: 22px 28px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-preview-empty {
    height: 122px;
    display: grid;
    place-items: center;
    color: #777;
    font-size: 12px;
    letter-spacing: .06em;
    background: #191919;
    border-bottom: 1px solid #343434;
}

@media (max-width: 760px) {
    .card-preview {
        height: 150px;
    }
}


/* Klickbare Galerie-Bilder + bildschirmangepasste Lightbox */
.gallery-clickable,
.portrait-photo-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    padding: 34px;
    background: rgba(0,0,0,.94);
}

.gallery-lightbox.open {
    display: grid;
}

.gallery-lightbox img {
    display: block;
    max-width: calc(100vw - 68px);
    max-height: calc(100vh - 68px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-lightbox-close {
    position: absolute;
    top: 12px;
    right: 20px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .gallery-lightbox {
        padding: 18px;
    }

    .gallery-lightbox img {
        max-width: calc(100vw - 36px);
        max-height: calc(100vh - 36px);
    }
}


/* Galerie-Auswahlkarten: Text links, Diashow rechts */
.submenu-card.has-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42%;
    min-height: 190px;
    padding: 0;
    overflow: hidden;
}

.submenu-card.has-preview .card-preview-body {
    min-height: 190px;
    padding: 26px 28px;
    order: 1;
}

.submenu-card.has-preview .card-preview,
.submenu-card.has-preview .card-preview-empty {
    order: 2;
    width: 100%;
    height: 100%;
    min-height: 190px;
    border-left: 1px solid #343434;
    border-bottom: 0;
    background: #181818;
}

.submenu-card.has-preview .card-preview-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #181818;
}

/* Galerieansicht: Bildschirmbreite besser ausnutzen */
.gallery-grid,
.portrait-masonry {
    width: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.portrait-gallery-wrap {
    width: calc(100% - 24px);
    max-width: none;
    padding-left: 12px;
    padding-right: 12px;
}

.portrait-masonry {
    columns: 6 220px;
    column-gap: 12px;
}

.portrait-photo {
    margin-bottom: 12px;
}

.portrait-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Lightbox Navigation */
.gallery-lightbox {
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: 1fr;
    gap: 12px;
}

.gallery-lightbox img {
    grid-column: 2;
    max-width: 100%;
    max-height: calc(100vh - 68px);
    justify-self: center;
    align-self: center;
}

.gallery-lightbox-nav {
    width: 52px;
    height: 70px;
    border: 0;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    align-self: center;
}

.gallery-lightbox-prev {
    grid-column: 1;
    justify-self: end;
}

.gallery-lightbox-next {
    grid-column: 3;
    justify-self: start;
}

.gallery-lightbox-nav:hover {
    background: rgba(255,255,255,.14);
}

@media (max-width: 760px) {
    .submenu-card.has-preview {
        grid-template-columns: 1fr;
    }

    .submenu-card.has-preview .card-preview-body {
        order: 2;
        min-height: 150px;
    }

    .submenu-card.has-preview .card-preview,
    .submenu-card.has-preview .card-preview-empty {
        order: 1;
        min-height: 150px;
        height: 150px;
        border-left: 0;
        border-bottom: 1px solid #343434;
    }

    .portrait-masonry {
        columns: 3 150px;
    }

    .gallery-lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 4px;
        padding: 14px;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 58px;
        font-size: 32px;
    }
}

@media (max-width: 520px) {
    .portrait-masonry {
        columns: 2 130px;
    }
}


.page-version {
    margin-top: 8px;
    color: #8d8d8d;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .08em;
}


/* Version 1.01 – optimierte Galeriegrößen */
.portrait-masonry {
    columns: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.portrait-photo {
    margin: 0;
    background: #151515;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Einheitliche sichtbare Bildhöhe */
.portrait-photo-button {
    width: 100%;
    height: clamp(280px, 31vw, 460px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #151515;
}

/* Standard: Portrait vollständig sichtbar */
.portrait-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Landscape ca. 10 % größer */
.portrait-photo.is-landscape {
    transform: scale(1.10);
    z-index: 1;
}

.portrait-photo.is-landscape .portrait-photo-button {
    height: clamp(300px, 34vw, 500px);
}

.portrait-photo.is-landscape img {
    object-fit: contain;
}

/* Portrait gleiche Höhe wie Landscape, aber vollständig sichtbar */
.portrait-photo.is-portrait .portrait-photo-button {
    height: clamp(300px, 34vw, 500px);
}

.portrait-photo.is-portrait img {
    object-fit: contain;
}

@media (max-width: 900px) {
    .portrait-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portrait-photo.is-landscape {
        transform: scale(1.05);
    }
}

@media (max-width: 560px) {
    .portrait-masonry {
        grid-template-columns: 1fr;
    }

    .portrait-photo.is-landscape {
        transform: none;
    }

    .portrait-photo-button,
    .portrait-photo.is-landscape .portrait-photo-button,
    .portrait-photo.is-portrait .portrait-photo-button {
        height: auto;
        min-height: 260px;
    }
}


/* Version 1.02 – Galerieansicht ähnlich Screenshot:
   gleich hohe Bildreihen, Querformat breiter, Hochformat schmaler,
   Bilder vollständig sichtbar, dichter und bildschirmfüllender */
.portrait-gallery-wrap {
    width: min(1600px, calc(100% - 20px)) !important;
    max-width: none !important;
    margin: 0 auto;
    padding: 10px 10px 24px !important;
}

.portrait-masonry {
    --gallery-row-height: clamp(135px, 11vw, 190px);
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    columns: unset !important;
    grid-template-columns: none !important;
}

.portrait-photo {
    --item-ratio: 1;
    flex: 0 0 auto;
    width: calc(var(--gallery-row-height) * var(--item-ratio));
    margin: 0 !important;
    background: #151515;
    overflow: hidden;
    display: block;
    transform: none !important;
}

.portrait-photo.is-landscape,
.portrait-photo.is-portrait {
    transform: none !important;
}

.portrait-photo-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--gallery-row-height) !important;
    min-height: 0 !important;
    padding: 0;
    border: 0;
    background: #151515;
    cursor: zoom-in;
}

.portrait-photo.is-landscape .portrait-photo-button,
.portrait-photo.is-portrait .portrait-photo-button {
    height: var(--gallery-row-height) !important;
}

.portrait-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain !important;
    object-position: center;
    background: #151515;
}

.portrait-photo.is-landscape img,
.portrait-photo.is-portrait img {
    object-fit: contain !important;
}

.portrait-empty {
    width: 100%;
    padding: 42px 24px;
    text-align: center;
}

@media (max-width: 1100px) {
    .portrait-masonry {
        --gallery-row-height: clamp(125px, 12vw, 170px);
        gap: 9px;
    }
}

@media (max-width: 760px) {
    .portrait-gallery-wrap {
        width: calc(100% - 12px) !important;
        padding: 8px 6px 20px !important;
    }

    .portrait-masonry {
        --gallery-row-height: clamp(110px, 20vw, 145px);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .portrait-masonry {
        --gallery-row-height: clamp(95px, 26vw, 125px);
        gap: 6px;
    }
}





/* Version 1.04 – breitere Rasterspalten statt künstlich verbreiterter Bilder */
.portrait-masonry {
    --gallery-row-height: clamp(165px, 14vw, 230px);
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

/*
   Die Grundhöhe wurde gegenüber Version 1.02 deutlich erhöht.
   Dadurch werden die schmalen Raster-/Bildbereiche ungefähr doppelt so breit,
   während jedes Foto weiterhin sein echtes Seitenverhältnis behält.
*/
.portrait-photo {
    --item-ratio: 1;
    flex: 0 0 auto;
    width: calc(var(--gallery-row-height) * var(--item-ratio)) !important;
    margin: 0 !important;
    transform: none !important;
}

.portrait-photo-button,
.portrait-photo.is-landscape .portrait-photo-button,
.portrait-photo.is-portrait .portrait-photo-button {
    width: 100%;
    height: var(--gallery-row-height) !important;
    min-height: 0 !important;
}

.portrait-photo img,
.portrait-photo.is-landscape img,
.portrait-photo.is-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
}

@media (max-width: 1000px) {
    .portrait-masonry {
        --gallery-row-height: clamp(145px, 18vw, 190px);
        gap: 10px;
    }
}

@media (max-width: 650px) {
    .portrait-masonry {
        --gallery-row-height: clamp(120px, 28vw, 155px);
        gap: 8px;
    }
}


/* Version 1.05 – deutlich breitere Zwischenräume/Balken im Galerieraster */
.portrait-masonry {
    gap: 24px !important;
}

@media (max-width: 1000px) {
    .portrait-masonry {
        gap: 20px !important;
    }
}

@media (max-width: 650px) {
    .portrait-masonry {
        gap: 14px !important;
    }
}


/* Version 1.08 – Drag & Drop direkt in jeder lokalen Galerie */
.gallery-local-upload {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
}

.gallery-drop-zone {
    position: relative;
    min-height: 118px;
    padding: 24px;
    border: 2px dashed #666;
    background: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    text-align: center;
}

.gallery-drop-zone.dragover {
    background: #2a2a2a;
    border-color: #aaa;
}

.gallery-drop-zone strong {
    font-size: 18px;
    font-weight: 400;
}

.gallery-drop-zone span {
    color: #aaa;
    font-size: 13px;
}

.gallery-drop-zone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.gallery-upload-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gallery-upload-actions button {
    padding: 11px 17px;
    border: 0;
    background: #eee;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.gallery-upload-actions button:disabled {
    opacity: .45;
    cursor: default;
}

#galleryUploadInfo {
    color: #aaa;
    font-size: 13px;
}

.gallery-upload-message,
.gallery-upload-error {
    margin-top: 12px;
    padding: 11px 14px;
    background: #282828;
    font-size: 13px;
}

.gallery-upload-error {
    color: #e5b0b0;
}


/* Version 1.09 – Einzelbild-Upload mit sichtbarem Fortschritt */
.gallery-progress { margin-top: 16px; }
.gallery-progress-bar {
    height: 12px;
    background: #151515;
    border: 1px solid #3b3b3b;
    overflow: hidden;
}
.gallery-progress-fill {
    width: 0;
    height: 100%;
    background: #bdbdbd;
    transition: width .12s linear;
}
.gallery-progress-text,
.gallery-upload-results {
    margin-top: 8px;
    color: #aaa;
    font-size: 13px;
    line-height: 1.55;
}
.gallery-upload-results ul {
    margin: 8px 0 0;
    padding-left: 20px;
}


/* Version 1.10 – Vita mit Portrait links und Text rechts */
.vita-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    max-width: 980px;
}

.vita-photo-column {
    width: 100%;
}

.vita-portrait {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.vita-copy {
    color: #e4e4e4;
    font-size: 16px;
    line-height: 1.5;
}

.vita-copy p {
    margin: 0 0 26px;
}

.vita-copy .vita-section-title {
    color: #ffff00;
    font-weight: 400;
}

.vita-external-link {
    color: #ff1b1b;
    text-decoration: underline;
}

.vita-external-link:hover {
    color: #ff5a5a;
}

.pending-link {
    cursor: default;
}

@media (max-width: 760px) {
    .vita-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .vita-photo-column {
        width: min(250px, 70vw);
    }
}


/* Version 1.11 – Vita-Portrait links oben bündig neben dem Text */
.vita-layout {display:grid;grid-template-columns:300px minmax(0,1fr);gap:42px;align-items:start;max-width:1040px;}
.vita-photo-column{align-self:start;margin-top:0;}
.vita-portrait{display:block;width:100%;height:auto;margin:0;object-fit:contain;object-position:top left;}
.vita-copy{align-self:start;margin-top:0;}
.vita-copy>p:first-child{margin-top:0;}
@media(max-width:760px){.vita-layout{grid-template-columns:1fr;gap:26px}.vita-photo-column{width:min(300px,78vw)}}


/* Version 1.14 – eigene Galerien mit Erklärungstext */
.gallery-manager {
    width: min(920px, calc(100% - 32px));
    margin: 28px auto 42px;
    padding: 22px;
    background: #252525;
    border: 1px solid #393939;
}

.gallery-manager h2,
.custom-gallery-section h2 {
    margin-top: 0;
    font-weight: 400;
}

.gallery-manager p {
    color: #aaa;
    line-height: 1.55;
}

.gallery-create-form {
    display: grid;
    gap: 16px;
}

.gallery-create-form label {
    display: grid;
    gap: 7px;
    color: #ddd;
}

.gallery-create-form input,
.gallery-create-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #555;
    background: #171717;
    color: #eee;
    font: inherit;
}

.gallery-create-form textarea {
    resize: vertical;
}

.gallery-create-form button {
    justify-self: start;
    padding: 11px 18px;
    border: 0;
    background: #eee;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.gallery-manager-message,
.gallery-manager-error {
    margin: 14px 0;
    padding: 10px 12px;
    background: #1b1b1b;
}

.gallery-manager-error {
    color: #e5b0b0;
}

.custom-gallery-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 48px;
}

.custom-gallery-card {
    overflow: hidden;
}

.custom-gallery-preview {
    height: 170px;
    background: #171717;
}

.custom-gallery-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.custom-gallery-card .submenu-card-body {
    padding: 16px;
}

.custom-gallery-card .submenu-card-body h3 {
    margin-top: 0;
}

.custom-gallery-card .submenu-card-body p {
    margin-bottom: 0;
    color: #aaa;
    line-height: 1.45;
}


/* Version 1.21 – Lesemodus / Admin-Bereich */
.privacy-admin-link {
    width: min(980px, calc(100% - 32px));
    margin: 20px auto 40px;
    padding-top: 14px;
    border-top: 1px solid #333;
    font-size: 12px;
}

.privacy-admin-link a {
    color: #888;
    text-decoration: none;
}

.privacy-admin-link a:hover {
    color: #ccc;
    text-decoration: underline;
}


/* Version 1.22 – Admin: Galerien/Bilder löschen und Beschreibung ändern */
.gallery-admin-manage {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 48px;
}

.gallery-admin-row {
    padding: 18px;
    margin-bottom: 14px;
    background: #242424;
    border: 1px solid #393939;
}

.gallery-admin-edit-form {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.gallery-admin-edit-form label {
    display: grid;
    gap: 6px;
}

.gallery-admin-edit-form input,
.gallery-admin-edit-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #555;
    background: #171717;
    color: #eee;
    font: inherit;
}

.gallery-admin-edit-form button,
.gallery-admin-delete-form button {
    padding: 10px 14px;
    border: 0;
    font-weight: 700;
    cursor: pointer;
}

.gallery-admin-delete-form {
    margin-top: 10px;
}

.danger-button,
.gallery-image-delete-button {
    background: #6a1c1c;
    color: #fff;
}

.gallery-image-delete-form {
    margin-top: 7px;
}

.gallery-image-delete-button {
    width: 100%;
    padding: 7px 10px;
    border: 0;
    cursor: pointer;
    font-size: 12px;
}

@media (max-width: 820px) {
    .gallery-admin-edit-form {
        grid-template-columns: 1fr;
    }
}

/* Version 1.23 – Navigation überall, in Foto-Vollansicht ausgeblendet */
body.lightbox-open .navigation-bar { display:none !important; }
.gallery-lightbox[aria-hidden="false"] { z-index:99999; }


/* Version 1.26 – Admin-Verwaltung und Mehrfachauswahl */
.admin-dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 40px auto 70px;
}

.admin-section {
    margin: 28px 0;
    padding: 24px;
    background: #222;
    border: 1px solid #3a3a3a;
}

.admin-gallery-editor {
    margin-top: 18px;
    padding: 18px;
    background: #1a1a1a;
    border: 1px solid #333;
}

.admin-gallery-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-gallery-actions a,
.admin-gallery-links a {
    color: #ddd;
}

.admin-gallery-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-gallery-links a {
    display: inline-block;
    padding: 9px 12px;
    border: 1px solid #555;
    text-decoration: none;
}

.gallery-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: #222;
    border: 1px solid #3a3a3a;
}

.gallery-bulk-toolbar button {
    padding: 8px 12px;
    cursor: pointer;
}

.gallery-bulk-toolbar button:disabled {
    opacity: .45;
    cursor: default;
}

.admin-image-selection .portrait-photo {
    position: relative;
}

.gallery-select-image {
    position: absolute;
    z-index: 6;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(0,0,0,.78);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.gallery-select-image input {
    width: 18px;
    height: 18px;
}

.portrait-photo.selected-for-delete {
    outline: 3px solid #9b3030;
    outline-offset: -3px;
}


/* Version 1.27 – eindeutiger Admin-Modus und Abmeldung */
.admin-mode-strip {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 7px 18px;
    background: #111;
    border-bottom: 1px solid #353535;
    color: #bbb;
    font-size: 12px;
}

.admin-mode-strip a {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
}

body.lightbox-open .admin-mode-strip {
    display: none !important;
}


/* Version 1.30 – Studio und Kontakt */
.contact-panel {
    width: min(760px, 100%);
    padding: 24px;
    background: #222;
    border: 1px solid #3a3a3a;
}

.contact-panel a {
    color: #ddd;
}




/* Version 1.37 – Startseitenbild im Admin */
.admin-home-hero-preview {
    width: min(900px, 100%);
    margin: 16px 0 22px;
    border: 1px solid #3a3a3a;
    background: #111;
    overflow: hidden;
}

.admin-home-hero-preview img {
    display: block;
    width: 100%;
    height: auto;
}


/* Version 1.04 – Standardgalerien im Admin */
.admin-gallery-note {
    margin: 12px 0 0;
    color: #999;
    font-size: 13px;
}




/* Server Version 1.06 – kompaktere Seiten-Kopfzone */
.page-heading {
    min-height: 185px;
}

.page-heading-inner {
    padding-top: 34px;
    padding-bottom: 28px;
}

.page-heading .eyebrow {
    font-size: 11px;
    margin-bottom: 10px;
}

.page-heading h1 {
    font-size: clamp(28px, 3.2vw, 46px);
    line-height: 1.05;
    margin-bottom: 12px;
}

.page-heading p {
    margin-top: 0;
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .page-heading {
        min-height: 150px;
    }

    .page-heading-inner {
        padding-top: 26px;
        padding-bottom: 22px;
    }

    .page-heading h1 {
        font-size: clamp(25px, 8vw, 38px);
    }
}


/* Server Version 1.07 – Kopfzone noch kompakter */
.page-heading {
    min-height: 132px;
}

.page-heading-inner {
    padding-top: 16px;
    padding-bottom: 14px;
}

.page-heading .eyebrow {
    margin-bottom: 7px;
}

.page-heading h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.page-heading p {
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .page-heading {
        min-height: 118px;
    }

    .page-heading-inner {
        padding-top: 14px;
        padding-bottom: 12px;
    }
}


/* Server Version 1.08 – Galeriekarten in der Galerienübersicht ca. 10 % schmaler */
.gallery-overview-grid {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 760px) {
    .gallery-overview-grid {
        width: 100%;
    }
}


/* Server Version 1.09 – responsive Galerienübersicht und vollständige Startseite */

/* Galeriekarten: Breite aus 1.08 bleibt, Höhe nominal ca. 10 % geringer. */
.gallery-overview-grid .submenu-card.has-preview {
    min-height: 171px;
}

.gallery-overview-grid .submenu-card.has-preview .card-preview-body {
    min-height: 171px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.gallery-overview-grid .submenu-card.has-preview .card-preview,
.gallery-overview-grid .submenu-card.has-preview .card-preview-empty {
    min-height: 171px;
}

/*
   Auf sehr breiten Monitoren wird der Bereich breiter genutzt und es passen
   drei Galeriekarten nebeneinander. Auf normalen Desktop-Monitoren bleiben
   zwei Spalten, auf kleinen Geräten eine Spalte.
*/
@media (min-width: 1600px) {
    .gallery-overview-content {
        width: min(1500px, calc(100% - 80px));
    }

    .gallery-overview-grid {
        width: 90%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/*
   Startseite: Der gesamte Bereich unterhalb der Navigation passt sich an die
   tatsächliche Viewport-Höhe an. Das Bild wird vollständig gezeigt und nicht
   durch object-fit: cover auf Widescreens abgeschnitten.
*/
.home-hero {
    height: calc(100vh - 82px) !important;
    height: calc(100svh - 82px) !important;
    min-height: 0 !important;
    max-height: none !important;
    background: #ececeb;
}

.home-hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
}

@media (max-width: 760px) {
    .home-hero {
        height: calc(100vh - 68px) !important;
        height: calc(100svh - 68px) !important;
        min-height: 0 !important;
    }

    .gallery-overview-grid .submenu-card.has-preview,
    .gallery-overview-grid .submenu-card.has-preview .card-preview-body,
    .gallery-overview-grid .submenu-card.has-preview .card-preview,
    .gallery-overview-grid .submenu-card.has-preview .card-preview-empty {
        min-height: 135px;
    }
}


/* Server Version 1.10 – Galeriebilder im Admin per Drag & Drop sortierbar */
.gallery-sortable-item {
    position: relative;
    cursor: grab;
}

.gallery-sortable-item:active {
    cursor: grabbing;
}

.gallery-sortable-item.is-dragging {
    opacity: .38;
    outline: 2px dashed rgba(255,255,255,.65);
    outline-offset: -2px;
}

.gallery-order-handle {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 8;
    display: inline-block;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.4);
    background: rgba(0,0,0,.78);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.gallery-order-hint {
    color: #aaa;
    font-size: 12px;
}

#saveImageOrder:not(:disabled) {
    font-weight: 700;
}


/* Server Version 1.11 – Internetseiten erstellen */
.website-creation-content {
    max-width: 900px;
}

.website-creation-content p {
    margin-top: 0;
    white-space: normal;
}


/* Server Version 1.12 – Hauptnavigation mit zusätzlichem Menüpunkt zuverlässig sichtbar */
.navigation-inner {
    width: min(1460px, calc(100% - 56px));
}

@media (max-width: 1320px) and (min-width: 1061px) {
    .main-nav {
        gap: 24px;
    }
}

/* Bei Breiten, auf denen alle acht Menüpunkte nicht mehr sauber nebeneinander
   passen, wird rechtzeitig auf das vorhandene mobile Menü umgeschaltet. */
@media (max-width: 1060px) {
    .navigation-bar {
        height: 68px;
    }

    .menu-toggle {
        display: inline-grid;
        width: 40px;
        height: 40px;
        padding: 7px;
        gap: 5px;
        border: 0;
        background: transparent;
        margin-right: 10px;
    }

    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: -28px;
        right: -28px;
        top: 68px;
        height: auto;
        padding: 8px 28px 20px;
        flex-direction: column;
        gap: 0;
        background: #1b1b1b;
        border-bottom: 1px solid #333;
        z-index: 30;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav > a {
        height: 48px;
    }

    /* Startseite: bei kompakter Navigation die verfügbare Bildschirmhöhe
       weiterhin korrekt berechnen. */
    .home-hero {
        height: calc(100vh - 68px) !important;
        height: calc(100svh - 68px) !important;
    }
}


/* Server Version 1.13 – Navigation und sichtbare Server-Version */
.nav-internetseiten {
    visibility: visible !important;
    opacity: 1 !important;
}

.page-version {
    display: block;
}
