/* Wide, unboxed layout with a plain white page background. */
html, body { background: #fff !important; background-image: none !important; }
:root { --sonnhalde-page-width: 1600px; }
body #wrapper {
    width: 100%; max-width: none; margin: 0 auto; padding-top: 24px;
    background: #fff; box-shadow: none; border: 0;
}
body #wrapper .container, body #footer .container {
    width: 100% !important; max-width: 1530px; margin-left: auto; margin-right: auto;
}
body #footer {
    width: 100% !important; max-width: none; margin: 0 !important;
    box-shadow: none; border-left: 0; border-right: 0;
}

/* Full-width legacy pages nest their columns one level below the container. */
body #wrapper .container > .hentry > .sixteen.columns {
    box-sizing: border-box; display: block; float: none;
    width: 100% !important; max-width: none; margin-left: 0; margin-right: 0;
}
body #wrapper .sonnhalde-offer-card h3 { overflow-wrap: anywhere; }

/* Optional editorial template: keep every content row beside the image. */
body #wrapper .sonnhalde-richtext:has(> .sonnhalde-content-columns) { max-width: none; }
body #wrapper .sonnhalde-content-columns {
    display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start; gap: 28px;
}
body #wrapper .sonnhalde-content-copy { min-width: 0; }
body #wrapper .sonnhalde-content-side-image { float: none; width: auto; margin: 0; padding: 0; }
body #wrapper .sonnhalde-content-side-image img { display: block; width: 100%; height: auto; margin: 0; padding: 0; }
@media (max-width: 767px) {
    body #wrapper .sonnhalde-content-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Keep contact icons centred on their text, including when the row wraps. */
body #header { align-items: flex-start; }
body #header #logo { margin: 0; padding: 0 0 30px; }
body #header #logo :is(h1, h2) { margin: 0; padding: 0; line-height: 1; }
body #header #logo img { display: block; }
body #contact-details { display: flex; justify-content: flex-end; margin: 0; padding: 0; }
body #contact-details ul {
    display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 6px 18px; max-width: 100%; margin: 0; padding: 0;
}
body #contact-details ul li {
    display: inline-flex; align-items: center; gap: 6px;
    min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0;
}
body #contact-details ul li i {
    display: inline-block; flex: 0 0 14px; width: 14px;
    margin: 0; top: 0; vertical-align: middle;
}
body #contact-details ul li a { min-width: 0; margin: 0; line-height: 1.5 !important; }

/* Mobile navigation uses the desktop menu's navy, white and coral palette. */
body #navigation select.selectnav,
body #navigation select.selectnav option {
    background-color: #1d254e;
    color: #fff;
}
body #navigation select.selectnav { border-color: #1d254e; }
body #navigation select.selectnav:focus-visible {
    outline: 2px solid #ed625f;
    outline-offset: 2px;
}
body #navigation select.selectnav option:checked {
    background-color: #ed625f;
    color: #1d254e;
}

/* Rental content: one spacing rhythm instead of stacked legacy wrapper gaps. */
body.page-id-5189 #post-5189 .standard-table { margin: 0 0 24px; }
body.page-id-5189 #post-5189 .notification {
    box-sizing: border-box;
    margin: 24px 0;
    padding: 20px 40px 20px 24px;
}
body.page-id-5189 #post-5189 .notification > p { margin: 0; padding: 0; }
body.page-id-5189 #post-5189 .sixteen.columns > p:empty { display: none; }
body.page-id-5189 #post-5189 p:has(+ .w3eden) { margin-bottom: 8px; }
body.page-id-5189 #post-5189 .w3eden { padding: 0; margin: 0 0 24px; }
body.page-id-5189 #post-5189 .w3eden .link-template-default.card { margin-bottom: 0 !important; }
body.page-id-5189 #post-5189 .w3eden .link-template-default .card-body { padding: 16px 14px !important; }
@media (max-width: 640px) {
    body.page-id-5189 #post-5189 .notification { padding: 16px 36px 16px 16px; overflow-wrap: anywhere; }
}

/* Related offers are a distinct, quiet section in the wide variant only. */
body #wrapper .sonnhalde-related-offers {
    background: #f5f5f6; padding: 32px; margin-top: 40px;
}
body #wrapper .sonnhalde-related-offers > h2 { margin-top: 0; }
@media (max-width: 640px) {
    body #wrapper .sonnhalde-related-offers { padding: 20px 16px; margin-top: 28px; }
}

/* Replace fixed legacy sidebar floats with one shared two-column layout. */
body #wrapper .container:has(> .twelve.columns) {
    display: grid; grid-template-columns: minmax(0, 1fr) 240px;
    gap: 40px; align-items: start;
}
body #wrapper .container:has(> .twelve.left-sb) {
    grid-template-columns: 240px minmax(0, 1fr);
}
body #wrapper .container:has(> .twelve.columns)::before,
body #wrapper .container:has(> .twelve.columns)::after { display: none; }
body #wrapper .container:has(> .twelve.columns) > .columns {
    float: none; position: static; width: auto !important; min-width: 0;
    margin: 0; padding: 0; box-sizing: border-box;
}
body #wrapper .container > .twelve.columns { grid-column: 1; grid-row: 1; }
body #wrapper .container:has(> .twelve.columns) > .four.columns { grid-column: 2; grid-row: 1; }
body #wrapper .container > .twelve.left-sb { grid-column: 2; }
body #wrapper .container:has(> .twelve.left-sb) > .four.columns { grid-column: 1; }
body #wrapper .twelve.columns iframe { width: 100%; max-width: 100%; }
body #wrapper .blog-sidebar { padding: 0; margin: 0; }
@media (max-width: 767px) {
    body #wrapper .container:has(> .twelve.columns) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    body #wrapper .container:has(> .twelve.columns) > .four.columns { grid-column: 1; grid-row: 1; }
    body #wrapper .container > .twelve.columns { grid-column: 1; grid-row: 2; }
}

/* Homepage slideshow with an accessible, readable text overlay. */
body.home #page-title { display: none; }
body #wrapper .sonnhalde-home-hero {
    --hero-height: 560px;
    position: relative; height: var(--hero-height); margin: 24px 0 52px;
}
body #wrapper .sonnhalde-home-hero .metaslider,
body #wrapper .sonnhalde-home-hero .flexslider { margin: 0; height: var(--hero-height); }
body #wrapper .sonnhalde-home-hero .flex-viewport,
body #wrapper .sonnhalde-home-hero .slides > li,
body #wrapper .sonnhalde-home-hero .slides > li img {
    height: var(--hero-height) !important;
}
body #wrapper .sonnhalde-home-hero .slides > li img {
    width: 100%; object-fit: cover; object-position: center;
}
body #wrapper .sonnhalde-hero-overlay {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
    background: rgba(29, 37, 78, .76); padding: 24px 32px;
    pointer-events: none;
}
body #wrapper .sonnhalde-hero-title {
    color: #fff; margin: 0; padding: 0; max-width: 1000px;
    font-size: 28px !important; line-height: 1.35 !important;
}
body #wrapper .sonnhalde-home-hero .flex-control-nav { bottom: -32px; }
@media (max-width: 980px) {
    body #wrapper .sonnhalde-home-hero { --hero-height: 480px; }
}
@media (max-width: 640px) {
    body #wrapper .sonnhalde-home-hero { --hero-height: 426.667px; }
    body #wrapper .sonnhalde-hero-overlay { padding: 18px; }
}

body #wrapper .sonnhalde-hero-programme {
    display: inline-flex; align-items: center; gap: 12px;
    min-height: 44px; margin-top: 12px; padding: 0 12px;
    color: #fff !important; background: rgba(255, 255, 255, .12);
    border-radius: 3px; font-size: 16px; font-weight: 700;
    text-decoration: none !important; pointer-events: auto;
    transition: background-color .15s ease;
}
body #wrapper .sonnhalde-hero-programme:hover {
    background: rgba(255, 255, 255, .25);
}
body #wrapper .sonnhalde-hero-programme:focus-visible {
    outline: 2px solid #fff; outline-offset: 3px;
}

/* Focal points refer to the uncropped originals, not MetaSlider thumbnails. */
body #wrapper .sonnhalde-home-hero .slides > li img {
    object-position: 50% var(--slide-focus-y, 35%);
}
body #wrapper .sonnhalde-home-hero .slide-6728 { --slide-focus-y: 50%; }
body #wrapper .sonnhalde-home-hero .slide-6772 { --slide-focus-y: 50%; }
body #wrapper .sonnhalde-home-hero .slide-6727 { --slide-focus-y: 40%; }
body #wrapper .sonnhalde-home-hero .slide-6762 { --slide-focus-y: 35%; }
body #wrapper .sonnhalde-home-hero .slide-6770 { --slide-focus-y: 30%; }
body #wrapper .sonnhalde-home-hero .slide-6771 { --slide-focus-y: 65%; }
body #wrapper .sonnhalde-home-hero .slide-6773 { --slide-focus-y: 15%; }
body #wrapper .sonnhalde-home-hero .slide-6775 { --slide-focus-y: 45%; }
body #wrapper .sonnhalde-home-hero .slide-6780 { --slide-focus-y: 45%; }
body #wrapper .sonnhalde-home-hero .slide-6782 { --slide-focus-y: 45%; }
body #wrapper .sonnhalde-home-hero .slide-6783 { --slide-focus-y: 20%; }
body #wrapper .sonnhalde-home-hero .slide-6789 { --slide-focus-y: 60%; }
body #wrapper .sonnhalde-home-hero .slide-6791 { --slide-focus-y: 75%; }
@media (max-width: 640px) {
    body #wrapper .sonnhalde-home-hero .slides > li img {
        object-fit: contain; object-position: center top; background: #1d254e;
    }
}

/* Shared filter-style controls across the public site. */
body :is(#wrapper, #footer) :is(
    button, input[type="submit"], input[type="button"], input[type="reset"],
    a.button, a.btn, a.sonnhalde-button, .sonnhalde-views a,
    .sonnhalde-month-nav > a, .sonnhalde-pagination a, .sonnhalde-pagination span
) {
    color: #555 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    text-shadow: none !important;
    text-decoration: none !important;
}
body :is(#wrapper, #footer) :is(
    button, input[type="submit"], input[type="button"], input[type="reset"],
    a.button, a.btn, a.sonnhalde-button, .sonnhalde-views a,
    .sonnhalde-month-nav > a, .sonnhalde-pagination a
):is(:hover, :focus-visible),
body :is(#wrapper, #footer) :is(button[aria-pressed="true"], .sonnhalde-views a[aria-current], .sonnhalde-pagination .current) {
    color: #fff !important;
    background: #f45d5f !important;
    border-color: #f45d5f !important;
}
body :is(#wrapper, #footer) :is(
    button, input[type="submit"], input[type="button"], input[type="reset"],
    a.button, a.btn, a.sonnhalde-button, .sonnhalde-views a,
    .sonnhalde-month-nav > a, .sonnhalde-pagination a
):focus-visible {
    outline: 2px solid #20274f;
    outline-offset: 3px;
}

/* Downloads share the flat agenda-row treatment. */
body #wrapper .w3eden .link-template-default.card {
    border: 0 !important; border-bottom: 1px solid #ddd !important;
    border-radius: 0 !important; box-shadow: none !important;
    background: #fff !important; transform: none !important;
}
body #wrapper .w3eden .link-template-default.card:is(:hover, :focus-within) {
    background: #f8e7e6 !important; border-color: #ddd !important;
    box-shadow: none !important;
}
body #wrapper .w3eden .link-template-default .card-body { padding: 20px 16px !important; }
body #wrapper .w3eden .link-template-default .media {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center !important; gap: 20px;
}
body #wrapper .w3eden .link-template-default :is(.media-body, .mr-3, .ml-3) {
    width: auto; min-width: 0; margin: 0 !important; padding: 0;
}
body #wrapper .w3eden .link-template-default .package-title { margin: 0 !important; }
body #wrapper .w3eden .link-template-default .img-48 {
    display: block;
    width: 64px !important; height: 64px !important;
    background: transparent url("icons/file.svg") center / 56px 56px no-repeat !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
body #wrapper .w3eden .link-template-default .img-48 .wpdm_icon { display: none !important; }
body #wrapper .w3eden .link-template-default .img-48::before { content: none !important; }
body #wrapper .w3eden .link-template-default.card:is(:hover, :focus-within) .wpdm-download-link {
    color: #fff !important; background: #f45d5f !important; border-color: #f45d5f !important;
}
body #wrapper .w3eden .link-template-default .wpdm-download-link:focus-visible::after { outline-color: #f45d5f; }
@media (max-width: 640px) {
    body #wrapper .w3eden .link-template-default .media {
        grid-template-columns: 48px minmax(0, 1fr); gap: 12px;
    }
    body #wrapper .w3eden .link-template-default .img-48 { width: 48px !important; height: 56px !important; background-size: 48px 48px !important; }
    body #wrapper .w3eden .link-template-default .ml-3 { grid-column: 2; justify-self: start; }
    body #wrapper .w3eden .link-template-default .wpdm-download-link { width: auto; }
}

/* Shared red for editorial, contact and utility links, including visited links. */
body :is(#wrapper, #footer) :is(
    .sonnhalde-richtext, .entry-content, .post-content, .hentry, #contact-details,
    .sonnhalde-section-link, .sonnhalde-detail > p
) a:not(:is(.button, .btn, .sonnhalde-button, .sonnhalde-card-link, .wpdm-download-link, .shd-download-button)),
body :is(#wrapper, #footer) a[href^="mailto:"],
body :is(#wrapper, #footer) a[href^="tel:"],
body #wrapper a.sonnhalde-calendar-link,
body #wrapper .sonnhalde-detail > .sonnhalde-richtext > p > a:not(:is(.button, .btn, .sonnhalde-button)) {
    color: #f45d5f !important;
}
body :is(#wrapper, #footer) :is(
    .sonnhalde-richtext, .entry-content, .post-content, .hentry, #contact-details,
    .sonnhalde-section-link, .sonnhalde-detail > p
) a:not(:is(.button, .btn, .sonnhalde-button, .sonnhalde-card-link, .wpdm-download-link, .shd-download-button)):is(:hover, :focus-visible),
body :is(#wrapper, #footer) a:is([href^="mailto:"], [href^="tel:"]):is(:hover, :focus-visible),
body #wrapper a.sonnhalde-calendar-link:is(:hover, :focus-visible) {
    color: #c94043 !important;
}

/* Imported inline spans must follow the contact link's normal/hover colour. */
body :is(#wrapper, #footer) a:is([href^="mailto:"], [href^="tel:"]) * {
    color: inherit !important;
}

/* Editorial notices use readable neutral panels instead of legacy green bars. */
body #wrapper .sonnhalde-richtext .notification.success {
    clear: both;
    display: flow-root;
    width: auto; height: auto;
    margin: 24px 0;
    padding: 20px 24px !important;
    box-sizing: border-box;
    background: #f5f5f6 !important;
    color: #555 !important;
    border: 0 !important;
    border-left: 3px solid #ddd !important;
    border-radius: 0;
    box-shadow: none;
}
body #wrapper .sonnhalde-richtext .notification.success > p {
    margin: 0; padding: 0;
    font-size: 18px !important; line-height: 1.6 !important;
}
@media (max-width: 640px) {
    body #wrapper .sonnhalde-richtext .notification.success { padding: 16px !important; }
    body #wrapper .sonnhalde-richtext .notification.success a[href^="mailto:"] {
        display: inline; white-space: normal; overflow-wrap: anywhere;
    }
}

/* Content headings have deliberate spacing, without legacy heading padding. */
body #wrapper .sonnhalde-richtext h2 {
    margin: 32px 0 14px !important;
    padding: 0 !important;
}
body #wrapper .sonnhalde-richtext h2:first-child { margin-top: 0 !important; }
body #wrapper .sonnhalde-richtext h2 > strong {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Align page headings with the 44px filter row, including pages without filters. */
body #wrapper #page-title {
    margin-top: 26px;
    margin-bottom: 26px;
    padding: 0 0 20px;
}
body #wrapper :is(#page-title, .sonnhalde-section-heading, .sonnhalde-offers-toolbar) > h1 {
    display: block;
    box-sizing: border-box;
    min-height: 44px;
    margin: 0 !important;
    padding: 4.5px 0 !important;
}

/* Give the newspaper headline a little space below the media card's top edge. */
body #wrapper .sonnhalde-offer-card a[href$="/portfolio/in-den-medien/"] .sonnhalde-card-media img {
    object-position: 50% calc(50% + 8px);
}
