/* STELLA V2 – EXPOSÉ */

.stella-expose {
    max-width: 1440px;
    margin: 0 auto;
    background: #fff;
    padding: 28px;
    border: 1px solid var(--stella-border);
    border-radius: 12px;
    box-shadow: var(--stella-shadow);
}

.stella-expose-intro {
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(300px,.8fr);
    gap: 30px;
    align-items: start;
}

.stella-expose-summary h1 {
    color: var(--stella-primary-dark);
    font-size: clamp(22px,2vw,28px);
    line-height: 1.3;
    margin: 14px 0;
}

.stella-expose-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--stella-muted);
    font-size: 14px;
}

.stella-expose-new {
    background: var(--stella-primary);
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
}

.stella-expose-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--stella-primary-dark);
    margin: 18px 0;
}

.stella-expose-facts {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 18px;
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.stella-expose-facts li {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--stella-border);
}

.stella-expose-facts strong {
    margin-right: 7px;
}

.stella-expose-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.stella-expose-print,
.stella-expose-actions .favorite {
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid var(--stella-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.stella-expose-actions .favorite img {
    width: 23px;
    height: 23px;
    object-fit: contain;
    vertical-align: middle;
}

.stella-expose-details {
    margin-top: 24px;
}

.stella-expose-section,
.stella-expose-contact {
    padding: 18px 0;
    border-top: 1px solid var(--stella-border);
}

.stella-expose-section h2,
.stella-expose-contact h2 {
    color: var(--stella-primary-dark);
    font-size: 24px;
    margin: 0 0 20px;
}

.stella-expose-text {
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.stella-expose-gallery {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.stella-expose-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 7px;
}

@media(max-width:850px) {
    .stella-expose-intro {
        grid-template-columns: 1fr;
    }
}

@media(max-width:650px) {
    .stella-expose {
        padding: 16px;
    }

    .stella-expose-gallery {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }

    .stella-expose-gallery img {
        height: 150px;
    }
}

@media print {
    .stella-header,
    .stella-footer,
    .stella-sidebar,
    .stella-expose-actions {
        display: none !important;
    }

    .stella-expose {
        box-shadow: none;
        border: 0;
    }
}

/* STELLA V2 – EXPOSÉ DETAILOPTIMIERUNG */

.stella-expose-text p {
    margin: 0 0 12px;
}

.stella-expose-text p:last-child {
    margin-bottom: 0;
}

.stella-expose-energy > img {
    display: block;
    width: 250px;
    max-width: 100%;
    height: auto;
}

.stella-expose-energy > div {
    max-width: min(250px, 100%) !important;
}

.stella-expose-actions > a,
.stella-expose-actions > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.stella-expose-actions > a:not(.stella-expose-enquiry) {
    background: #e5f1f9;
    color: var(--stella-primary-dark);
}

.stella-expose-gallery a {
    display: block;
    overflow: hidden;
    border-radius: 7px;
    cursor: zoom-in;
}

.stella-expose-gallery a img {
    transition: transform .2s ease;
}

.stella-expose-gallery a:hover img {
    transform: scale(1.035);
}

#expose-contact,
#expose-gallery {
    scroll-margin-top: 55px;
}

.stella-photo-dialog {
    position: fixed;
    inset: 0;
    width: min(96vw, 1500px);
    max-width: 96vw;
    max-height: 94vh;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: #111820;
    color: white;
    overflow: hidden;
}

.stella-photo-dialog::backdrop {
    background: rgba(0,0,0,.88);
}

.stella-photo-dialog > img {
    display: block;
    width: 100%;
    height: 82vh;
    object-fit: contain;
}

.stella-photo-dialog button {
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #17212b;
    font-size: 26px;
    cursor: pointer;
}

.stella-photo-close {
    top: 16px;
    right: 16px;
}

.stella-photo-prev {
    top: 45%;
    left: 16px;
}

.stella-photo-next {
    top: 45%;
    right: 16px;
}

.stella-photo-counter {
    text-align: center;
    padding: 8px;
}

@media(max-width:850px) {
    .stella-expose-gallery {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media(max-width:480px) {
    .stella-expose-facts {
        grid-template-columns: 1fr;
    }
}

@media print {
    .stella-photo-dialog {
        display: none !important;
    }
}




/* Legacy Exposé-Fallback – HTML5 */

/* Legacy Exposé-Fallback – HTML5 */

.expose-listing {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.expose-listing > section {
    list-style: none;
}

.expose-listing img {
    max-width: 100%;
    height: auto;
}

.expose-listing h1,
.expose-listing h2,
.expose-listing h3 {
    color: var(--stella-primary-dark);
}

.expose-gallery-wrapper {
    margin: 30px 0;
}

.expose-fotos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    list-style: none;
    padding: 0;
}

.expose-fotos li {
    min-width: 0;
    list-style: none;
}

.expose-fotos img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.button-expose-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* HTML5 Kontaktbereich des Fallback-Exposés */

.expose-contact {
    display: block;
    width: 98%;
    margin: 30px 1%;
    padding: 22px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--stella-shadow);
}

.expose-contact > h2 {
    color: var(--stella-primary-dark);
    text-align: center;
    margin: 0 0 20px;
}


/* STELLA EXPOSE LEGACY STYLES – CONSOLIDATED */

/* Exposé-Inhaltsbereiche */
/* Informationsboxen */

.expose-listing > section.expose-description {
    background: #ffffff;
    padding: 24px 28px !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    box-shadow: 0 3px 12px rgba(0, 45, 75, 0.08);
    overflow-wrap: break-word;
}

/* Ueberschriften */

.expose-listing > section.expose-description > h3 {
    color: #006fb4 !important;
    text-align: left !important;
    font-size: 23px !important;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 18px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid #dce8ef;
}

/* Fliesstext */

.expose-listing > section.expose-description > p {
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-weight: 400;
    color: #333333 !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* Hauptbeschreibung */

.expose-listing > section#expose-beschreibung {
    width: 100% !important;
}

#expose-beschreibung > p {
    column-count: 2;
    column-gap: 40px !important;
    column-rule: none !important;
    -webkit-column-rule: none !important;
    column-fill: balance;
}

/* Energiezertifikat */

.expose-listing > section#pdf {
    text-align: center !important;
}

.expose-listing > section#pdf > div {
    display: inline-block !important;
    vertical-align: top;
    width: 44% !important;
    max-width: 260px !important;
    margin: 10px 2% 8px !important;
    text-align: left;
    color: #333333;
    font-size: 15px;
    line-height: 1.5;
}

.expose-listing > section#pdf > div > strong {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-size: 16px;
}

.expose-listing > section#pdf > div > svg {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 8px;
}

.expose-listing > section#pdf > img {
    display: block;
    width: auto !important;
    max-width: 180px !important;
    height: auto !important;
    margin: 12px auto !important;
}

/* Tablet */

@media (max-width: 1100px) {

    #expose-beschreibung > p {
        column-count: 1 !important;
    }

    .expose-listing > section.expose-description {
        padding: 20px 24px !important;
    }
}

/* Smartphone */

@media (max-width: 700px) {

    .expose-listing > section.expose-description {
        display: block !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 16px !important;
        padding: 20px !important;
    }

    .expose-listing > section.expose-description > h3 {
        font-size: 21px !important;
    }

    .expose-listing > section.expose-description > p {
        font-size: 16px !important;
        line-height: 1.65 !important;
    }
}

/* Kleine Smartphones */

@media (max-width: 400px) {

    .expose-listing > section#pdf > div {
        display: block !important;
        width: 100% !important;
        margin: 12px auto 20px !important;
    }
}

/* Druckansicht */

@media print {

    .expose-listing > section.expose-description {
        box-shadow: none !important;
        break-inside: avoid;
    }

    #expose-beschreibung > p {
        column-count: 1 !important;
    }
}


/* Gleich hohe Informationsboxen */

@media screen and (min-width: 701px) {

    .expose-listing:has(> section.expose-und-eckdaten) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 18px;
        align-items: stretch !important;
    }

    .expose-listing > li.expose-und-eckdaten,
    .expose-listing > section#expose-beschreibung {
        grid-column: 1 / -1;
    }

    .expose-listing:has(> section.expose-und-eckdaten) > section {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        min-width: 0;
    }

    .expose-listing > section.expose-description {
        height: auto !important;
        align-self: stretch !important;
    }
}

/* Exposé-Kontaktformular */
.wpcf7 .contact {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    padding: 20px 24px;
    box-sizing: border-box;
}

.wpcf7 .contact .felder-links,
.wpcf7 .contact .felder-rechts {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0;
    box-sizing: border-box;
}

.wpcf7 .contact .felder-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
    align-content: start;
}

.wpcf7 .contact .felder-links p,
.wpcf7 .contact .felder-rechts p {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.wpcf7 .contact label {
    display: block;
    font-size: 16px;
    line-height: 1.5;
}

.wpcf7 .contact .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.wpcf7 .contact input[type="text"],
.wpcf7 .contact input[type="email"],
.wpcf7 .contact input[type="tel"],
.wpcf7 .contact textarea {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #b8c8d2;
    border-radius: 4px;
    background: #fff;
    padding: 10px 12px;
    margin: 5px 0 0 !important;
    font: inherit;
    color: #222;
}

.wpcf7 .contact input[type="text"],
.wpcf7 .contact input[type="email"],
.wpcf7 .contact input[type="tel"] {
    height: 42px !important;
}

.wpcf7 .contact textarea {
    height: 200px !important;
    resize: vertical;
}

.wpcf7 .contact input:focus,
.wpcf7 .contact textarea:focus {
    border-color: #0075b9;
    outline: 2px solid #dceef9;
}

.wpcf7 .contact .felder-rechts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wpcf7 .contact .wpcf7-list-item {
    margin: 0 !important;
}

.wpcf7 .contact .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}

.wpcf7 .contact input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    margin: 3px 0 0;
}

.wpcf7 .contact input[type="submit"] {
    display: inline-block;
    align-self: flex-start;
    width: auto !important;
    min-width: 180px;
    padding: 12px 24px !important;
    border: 0 !important;
    border-radius: 3px;
    background: #006fb4 !important;
    color: #fff !important;
    font-size: 16px !important;
    cursor: pointer;
}

.wpcf7 .contact input[type="submit"]:hover {
    background: #00558b !important;
}

.wpcf7 .contact input[type="submit"]:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.wpcf7 .contact .wpcf7-not-valid-tip {
    font-size: 13px !important;
    line-height: 1.4;
    margin-top: 4px;
}

.wpcf7 .contact .wpcf7-not-valid {
    border-color: #dc3232 !important;
}

@media (max-width: 900px) {
    .wpcf7 .contact {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .wpcf7 .contact .felder-links {
        grid-template-columns: 1fr;
    }

    .wpcf7 .contact input[type="submit"] {
        width: 100% !important;
    }
}

/* STELLA EXTERNAL MEDIA CSS */

.sv3-external-media {
    margin: 12px 16px 20px;
    text-align: center;
}

.sv3-external-media [hidden] {
    display: none !important;
}

.sv3-media-placeholder {
    background: #f3f6f9;
    border: 1px solid #dce4eb;
    border-radius: 5px;
    padding: 32px 20px;
}

.sv3-media-icon {
    color: #1586d0;
    font-size: 42px;
    margin-bottom: 12px;
}

.sv3-media-placeholder h3 {
    color: #333;
    font-size: 20px;
    font-weight: 500;
}

.sv3-media-placeholder p {
    max-width: 650px;
    margin: 14px auto;
    font-size: 15px;
    line-height: 1.6;
}

.sv3-media-load,
.sv3-media-close {
    background: #1586d0;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 12px 26px;
    font-size: 16px;
    cursor: pointer;
}

.sv3-media-load:hover,
.sv3-media-close:hover {
    background: #106eaf;
}

.sv3-media-placeholder a {
    color: #1586d0;
    font-size: 14px;
    text-decoration: underline;
}

.sv3-media-player iframe {
    display: block;
    width: 100%;
    border: 0;
    aspect-ratio: 16 / 9;
}

.sv3-external-media[data-type="tour"] iframe {
    aspect-ratio: auto;
    height: 600px;
}

.sv3-media-close {
    margin-top: 12px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .sv3-external-media {
        margin: 8px;
    }

    .sv3-media-placeholder {
        padding: 20px 12px;
    }

    .sv3-external-media[data-type="tour"] iframe {
        height: 420px;
    }
}

/* STELLA V2 – BACK TO TOP */

.stella-back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 99990;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #1689d0;
    color: #fff;

    box-shadow: 0 3px 14px rgba(0, 45, 75, .25);

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(12px);

    transition:
        opacity .25s ease,
        transform .25s ease,
        background .2s ease,
        visibility .25s ease;
}

.stella-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.stella-back-to-top:hover {
    background: #106eaf;
}

.stella-back-to-top:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.stella-back-to-top svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 600px) {
    .stella-back-to-top {
        right: 16px;
        bottom: 20px;
        width: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stella-back-to-top {
        transition: none;
    }
}

