/* Nimmerland migration fixes v5 */

/* Technical implementation credit: same orange as legal-notice headings. */
.nimmerland-technical-credit {
    color: #e66432 !important;
    text-decoration: none !important;
}

/* Keep the complete slider caption truly centered on mobile screens. */
@media screen and (max-width: 900px) {
    #main-slider .main-slides {
        position: relative !important;
    }

    #main-slider .slider-caption {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        padding: 20px 44px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
        -webkit-transform: none !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        z-index: 100000 !important;
        pointer-events: none;
    }

    #main-slider .slider-caption .mid-content,
    #main-slider .slider-caption .ak-container {
        display: block !important;
        width: min(100%, 760px) !important;
        max-width: 760px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        pointer-events: auto;
    }

    #main-slider .slider-caption .caption-title {
        width: 100% !important;
        max-width: 100% !important;
        font-size: clamp(24px, 7vw, 38px) !important;
        line-height: 1.08 !important;
        margin: 0 auto 14px !important;
        word-break: normal !important;
    }

    #main-slider .slider-caption .caption-description {
        width: 100% !important;
        max-width: 100% !important;
        font-size: clamp(16px, 4.5vw, 23px) !important;
        line-height: 1.32 !important;
        margin: 0 auto !important;
    }

    #main-slider .slider-caption .caption-description p {
        margin: 0 0 12px !important;
    }

    #main-slider .slider-caption .caption-description a {
        display: inline-block !important;
        font-size: 16px !important;
        line-height: 1.2 !important;
        padding: 10px 16px !important;
        margin-top: 2px !important;
    }
}

@media screen and (max-width: 480px) {
    #main-slider .slider-caption {
        padding: 18px 22px !important;
    }

    #main-slider .slider-caption .caption-title {
        font-size: clamp(22px, 7.2vw, 30px) !important;
        margin-bottom: 10px !important;
    }

    #main-slider .slider-caption .caption-description {
        font-size: clamp(15px, 4.4vw, 19px) !important;
        line-height: 1.25 !important;
    }

    #main-slider .slider-caption .caption-description p {
        margin-bottom: 9px !important;
    }

    #main-slider .slider-caption .caption-description a {
        font-size: 15px !important;
        padding: 8px 13px !important;
    }
}

/* Landscape phones have little vertical room. */
@media screen and (max-width: 900px) and (orientation: landscape) {
    #main-slider .slider-caption {
        padding: 12px 70px !important;
    }

    #main-slider .slider-caption .caption-title {
        font-size: clamp(20px, 3.5vw, 30px) !important;
        line-height: 1.05 !important;
        margin-bottom: 6px !important;
    }

    #main-slider .slider-caption .caption-description {
        font-size: clamp(13px, 2.1vw, 18px) !important;
        line-height: 1.16 !important;
    }

    #main-slider .slider-caption .caption-description p {
        margin-bottom: 5px !important;
    }

    #main-slider .slider-caption .caption-description a {
        font-size: 13px !important;
        padding: 6px 11px !important;
    }
}

/*
 * Fixed action buttons (v8)
 * Keep the existing "back to top" button at 30px from the bottom/right.
 * Place the two social buttons directly above it with a gap equal to
 * 1.5 button heights (75px for 50px buttons).
 */
:root {
    --nimmerland-fixed-button-size: 50px;
    --nimmerland-fixed-button-gap: 6px;
    --nimmerland-social-to-top-gap: 75px;
    --nimmerland-fixed-button-edge: 30px;
    --nimmerland-fixed-button-radius: 7px;
    --nimmerland-fixed-button-orange: #E66432;
    --nimmerland-fixed-button-orange-hover: #BA4F28;
    --nimmerland-fixed-button-shadow: 0 3px 9px rgba(0, 0, 0, 0.28);
}

/* Social group: aligned with the back-to-top button and 1.5 button heights above it. */
.nimmerland-social-fixed {
    position: fixed !important;
    right: var(--nimmerland-fixed-button-edge) !important;
    bottom: calc(
        var(--nimmerland-fixed-button-edge)
        + var(--nimmerland-fixed-button-size)
        + var(--nimmerland-social-to-top-gap)
    ) !important;
    z-index: 9998 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--nimmerland-fixed-button-gap) !important;
    width: var(--nimmerland-fixed-button-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.nimmerland-social-fixed .nimmerland-social-link,
#go-top {
    width: var(--nimmerland-fixed-button-size) !important;
    height: var(--nimmerland-fixed-button-size) !important;
    box-sizing: border-box !important;
    background: var(--nimmerland-fixed-button-orange) !important;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    border-radius: var(--nimmerland-fixed-button-radius) !important;
    box-shadow: var(--nimmerland-fixed-button-shadow) !important;
    overflow: hidden !important;
    transition: background-color 0.25s ease, box-shadow 0.25s ease !important;
}

.nimmerland-social-fixed .nimmerland-social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    color: #FFFFFF !important;
    font-size: 24px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
}

.nimmerland-social-fixed .nimmerland-social-link + .nimmerland-social-link {
    border-top: 1px solid rgba(255, 255, 255, 0.72) !important;
}

/* Preserve the existing back-to-top position. */
#go-top {
    right: var(--nimmerland-fixed-button-edge) !important;
    bottom: var(--nimmerland-fixed-button-edge) !important;
    line-height: var(--nimmerland-fixed-button-size) !important;
}

#go-top a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

/* Identical hover/focus treatment for all three buttons. */
.nimmerland-social-fixed .nimmerland-social-link:hover,
.nimmerland-social-fixed .nimmerland-social-link:focus,
#go-top:hover,
#go-top:focus-within {
    color: #FFFFFF !important;
    background: var(--nimmerland-fixed-button-orange-hover) !important;
    box-shadow: 0 4px 11px rgba(0, 0, 0, 0.34) !important;
    transform: none !important;
    outline: none !important;
}

@media screen and (max-width: 768px) {
    /* Keep the geometry identical on phones, matching the supplied reference. */
    .nimmerland-social-fixed {
        right: var(--nimmerland-fixed-button-edge) !important;
        bottom: calc(
            var(--nimmerland-fixed-button-edge)
            + var(--nimmerland-fixed-button-size)
            + var(--nimmerland-social-to-top-gap)
        ) !important;
    }

    .nimmerland-social-fixed .nimmerland-social-link {
        width: var(--nimmerland-fixed-button-size) !important;
        height: var(--nimmerland-fixed-button-size) !important;
        font-size: 24px !important;
    }
}
