/* Materialität des Rathauses. Ausschließlich im PHP-Bereich fotostudio geladen. */
body[data-section="fotostudio"] {
    --ca-paper: #f3eee5;
    --ca-white: #fffdf8;
    --ca-ink: #292c29;
    --ca-dark: #292c29;
    --ca-accent: #944b3b;
    --ca-accent-dark: #70382c;
    --ca-sand: #e7ddd0;
    --ca-sage: #deded4;
    --ca-tint-light: #e7ddd0;
    --ca-line: #d4c6b7;
    --studio-beam: #292c29;
    --studio-brick: #944b3b;
    --studio-mortar: #e7ddd0;
}

/* Beide Hauptmenüpunkte behalten unabhängig vom aktiven Zustand dieselbe graue Fläche. */
body[data-section="fotostudio"] .navbar-nav > .nav-item > .nav-link {
    color: #000;
    background: #e5e5e5;
    border-color: transparent;
    box-shadow: none;
}

body[data-section="fotostudio"] .navbar-nav > .nav-item > .nav-link.active {
    color: var(--ca-accent) !important;
    border-color: var(--ca-accent);
}

body[data-section="fotostudio"] .navbar-nav > .nav-item > .nav-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Rathausspitzen im Kopf: nur für den Fotostudio-Bereich und ohne zusätzliche Headerhöhe. */
body[data-fotostudio-path="true"] .site-header {
    --text-glow-color: rgba(243, 240, 233, .96);
    --studio-header-facade-position-x: 20%;
    --studio-header-ceiling-position-x: 100%;
    isolation: isolate;
    overflow: visible;
}

body[data-fotostudio-path="true"] .site-header::before {
    position: absolute;
    z-index: -1;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: .72;
    background-image: url('/assets/images/rathaus-vordergrund.png');
    background-repeat: no-repeat;
    background-position: var(--studio-header-facade-position-x) bottom;
    background-size: 24% auto;
    content: '';
    filter: saturate(.72) contrast(.92);
    pointer-events: none;
}

body[data-fotostudio-path="true"] .site-header::after {
    position: absolute;
    z-index: -2;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    background-image: url('/assets/images/fotostudio/header-historisch4.png');
    background-repeat: no-repeat;
    background-position: var(--studio-header-ceiling-position-x) bottom;
    background-size: auto 6.6rem;
    content: '';
    filter: saturate(.78) contrast(.94);
    pointer-events: none;
}

body[data-fotostudio-path="true"] .site-header > .container-xxl {
    position: relative;
    z-index: 1;
}

body[data-section="fotostudio"] .breadcrumb-bar {
    border-bottom: 1px solid var(--ca-line);
}

body[data-section="fotostudio"] .editorial-intro,
body[data-section="fotostudio"] .page-intro {
    border-bottom: 1px solid var(--ca-line);
    background-color: var(--ca-paper);
}

body[data-section="fotostudio"] .editorial-contact__box,
body[data-section="fotostudio"] .location-box {
    border-top: 3px solid var(--ca-accent);
}

body[data-section="fotostudio"] .site-footer {
    border-top: 4px solid var(--ca-accent);
}

/*
 * Wiederkehrende Rathaus-Syntax:
 * dunkler Tragbalken, darüber beziehungsweise darunter ein ruhiges Backsteinraster.
 * Die echten Fotografien bleiben die Hauptdarsteller.
 */
body[data-section="fotostudio"] .studio-architecture-band {
    min-height: 2.6rem;
    background-color: var(--studio-brick);
    background-image: url('/assets/images/fotostudio/rathaus-backstein-muster.svg');
    background-repeat: repeat;
    background-size: 9rem auto;
    border-top: .55rem solid var(--studio-beam);
    border-bottom: 1px solid var(--ca-line);
}

body[data-section="fotostudio"] .editorial-intro,
body[data-section="fotostudio"] .content-hero,
body[data-section="fotostudio"] .gallery-overview {
    position: relative;
    padding-bottom: calc(clamp(1.5rem, 3vw, 3rem) + 2.5rem);
    overflow: hidden;
}

body[data-section="fotostudio"] .editorial-intro::after,
body[data-section="fotostudio"] .content-hero::after,
body[data-section="fotostudio"] .gallery-overview::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2.5rem;
    background-color: var(--studio-beam);
    background-image: url('/assets/images/fotostudio/sectionkante.png');
    background-repeat: repeat-x;
    background-position: center top;
    background-size: auto 2.5rem;
    content: '';
}

body[data-section="fotostudio"] .studio-service-photo {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: 100%;
    justify-self: center;
    overflow: hidden;
    padding: .65rem;
    border: 1px solid var(--ca-line);
    background: var(--ca-white);
}

body[data-section="fotostudio"] .studio-service-photo::before {
    position: static;
    display: block;
    flex: 0 0 .65rem;
    width: auto;
    height: .65rem;
    margin: 0;
    background: linear-gradient(
        to right,
        var(--studio-beam) 0 60%,
        var(--studio-brick) 60% 89%,
        var(--studio-beam) 89% 100%
    );
    content: '';
}

body[data-section="fotostudio"] .studio-service-photo > img,
body[data-section="fotostudio"] .studio-service-photo .hero-lightbox__trigger > img,
body[data-section="fotostudio"] .studio-service-photo .photo-restore > img:first-child {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 32rem;
    object-fit: contain;
}

body[data-section="fotostudio"] .studio-service-photo:has(.photo-restore) {
    width: 100%;
}

.photo-restore {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.photo-restore:focus-visible {
    outline: 3px solid var(--studio-brick);
    outline-offset: 4px;
}

body[data-section="fotostudio"] .digitalisierung .photo-restore__overlay {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
}

body[data-section="fotostudio"] .digitalisierung .photo-restore[aria-pressed="true"] .photo-restore__overlay {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    body[data-section="fotostudio"] .digitalisierung .photo-restore__overlay {
        transition: none;
    }
}

body[data-section="fotostudio"] .service-page__section,
body[data-section="fotostudio"] .content-page__section {
    position: relative;
}

body[data-section="fotostudio"] .service-page__section + .service-page__section::before,
body[data-section="fotostudio"] .content-page__section + .content-page__section::before {
    position: absolute;
    top: 0;
    right: clamp(1.25rem, 4vw, 4rem);
    left: clamp(1.25rem, 4vw, 4rem);
    height: .45rem;
    background: var(--studio-beam);
    content: '';
}

body[data-section="fotostudio"] .service-page__section-heading,
body[data-section="fotostudio"] .content-page__section-heading {
    position: relative;
    padding: clamp(1.15rem, 2.6vw, 2rem);
    background-color: var(--ca-paper);
    background-image: url('/assets/images/fotostudio/rathaus-backstein-muster.svg');
    background-repeat: repeat;
    background-size: 9rem auto;
    border-left: .35rem solid var(--studio-beam);
}

body[data-section="fotostudio"] .service-page__section-heading h2,
body[data-section="fotostudio"] .content-page__section-heading h2 {
    position: relative;
    z-index: 1;
}

body[data-section="fotostudio"] .editorial-pictures {
    position: relative;
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

body[data-section="fotostudio"] .gallery-choice-card {
    border-top: .45rem solid var(--studio-beam);
}

body[data-section="fotostudio"] .gallery-overview .row > div:nth-child(even) .gallery-choice-card {
    border-top-color: var(--studio-brick);
}

body[data-section="fotostudio"] .editorial-contact__box,
body[data-section="fotostudio"] .contact-cta__box {
    position: relative;
    overflow: hidden;
    border-top: .7rem solid var(--studio-beam);
}

body[data-section="fotostudio"] .editorial-contact__box::before,
body[data-section="fotostudio"] .contact-cta__box::before {
    position: absolute;
    top: 0;
    right: 0;
    width: min(24rem, 36%);
    height: 100%;
    opacity: .16;
    background-image: url('/assets/images/fotostudio/rathaus-backstein-muster.svg');
    background-repeat: repeat;
    background-size: 9rem auto;
    content: '';
    pointer-events: none;
}

body[data-section="fotostudio"] .editorial-contact__box > *,
body[data-section="fotostudio"] .contact-cta__box > * {
    position: relative;
    z-index: 1;
}

/* Das vorhandene Portalmotiv erhält Platz, statt Textflächen zu überlagern. */
body[data-section="fotostudio"] .studio-video-hero {
    background-color: var(--ca-dark);
    border-bottom: 0;
}

body[data-section="fotostudio"] .studio-video-hero__architecture {
    opacity: .2;
    background-image: url('/assets/images/fotostudio/rathaus-portal-muster.svg');
    background-repeat: repeat-x;
    background-position: center bottom;
    background-size: 20rem auto;
}

body[data-section="fotostudio"] .studio-video-hero__intro h1 {
    line-height: .98;
}

body[data-section="fotostudio"] .studio-benefits {
    background: var(--ca-paper);
    border-top: 4px solid var(--ca-accent);
    box-shadow: none;
}

body[data-section="fotostudio"] .studio-benefit {
    padding: clamp(1.4rem, 3vw, 2.25rem);
    background: var(--ca-paper);
}

body[data-section="fotostudio"] .studio-benefit h2 {
    line-height: 1.08;
}

body[data-section="fotostudio"] .studio-benefits__controls {
    background: var(--ca-paper);
    border-top: 1px solid var(--ca-line);
}

body[data-section="fotostudio"] .studio-benefits__arrow {
    width: 2.75rem;
    height: 2.75rem;
}

body[data-section="fotostudio"] .studio-benefits__pagination button {
    height: 1.5rem;
    border-block: .6rem solid var(--ca-paper);
    background-color: var(--ca-accent);
    background-clip: padding-box;
    opacity: .55;
}

body[data-section="fotostudio"] .studio-benefits__pagination button.is-active {
    opacity: 1;
}

@media (max-width: 991.98px) {
    body[data-section="fotostudio"] .studio-video-hero__content {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        min-height: 0;
    }
    body[data-section="fotostudio"] .studio-benefits {
        max-width: none;
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    body[data-section="fotostudio"] .editorial-intro,
    body[data-section="fotostudio"] .content-hero,
    body[data-section="fotostudio"] .gallery-overview {
        padding-bottom: calc(clamp(1.5rem, 3vw, 3rem) + 2.5rem);
    }

    body[data-section="fotostudio"] .editorial-intro::after,
    body[data-section="fotostudio"] .content-hero::after,
    body[data-section="fotostudio"] .gallery-overview::after {
        height: 2.5rem;
    }

    body[data-section="fotostudio"] .service-page__section-heading,
    body[data-section="fotostudio"] .content-page__section-heading {
        padding: 1rem 1.15rem;
    }
}

/* Die zwei Hauptwege bleiben im Fotostudio auch auf Tablet und Mobil sichtbar. */
@media (max-width: 1199.98px) {
    body[data-fotostudio-path="true"] .site-header::before {
        opacity: .72;
        background-size: 32% auto;
    }

    body[data-fotostudio-path="true"] .site-header::after {
        display: none;
    }

    body[data-section="fotostudio"] .navbar-toggler {
        display: none;
    }

    body[data-section="fotostudio"] .site-nav__bar .navbar-collapse,
    body[data-section="fotostudio"] .site-nav__bar .navbar-collapse:not(.show) {
        display: flex;
        flex-basis: 100%;
        order: 3;
        width: 100%;
        margin: 0;
        padding: .75rem 0 1rem;
    }

    body[data-section="fotostudio"] .navbar-nav {
        width: 100%;
        flex-direction: row;
        align-items: center !important;
        gap: .5rem;
    }

    body[data-section="fotostudio"] .navbar-nav > .nav-item {
        flex: 1 1 0;
    }

    body[data-section="fotostudio"] .navbar-nav > .nav-item > .nav-link {
        display: flex;
        min-height: 2.8rem;
        align-items: center;
        justify-content: center;
        padding: .55rem .75rem !important;
        text-align: center;
    }

    body[data-section="fotostudio"] .navbar-nav > .nav-item > .site-submenu {
        display: none;
    }
}

@media (max-width: 575.98px) {
    body[data-fotostudio-path="true"] .site-header::before {
        opacity: .72;
        background-size: 46% auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-section="fotostudio"] .studio-benefit.is-active { animation: none; }
}
