/* Source styles for the three native PageBuilder sections and the book action. */
.mg-home-frame {
    box-sizing: border-box;
    inline-size: min(calc(100% - 32px), 1210px);
    margin-inline: auto;
    font-family: Arial, Helvetica, sans-serif;
}

.mg-home-section-heading p {
    margin: 0 0 12px;
    color: #155170;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mg-home-section-heading h2 {
    margin: 0;
    color: #242d37;
    font-size: clamp(1.75rem, 3.4vw, 2.625rem);
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -.025em;
    text-wrap: balance;
}

#schwerpunkte.mg-home-section,
#success-stories.mg-home-section,
#success-stories-grid.mg-home-section {
    scroll-margin-block-start: var(--mg-home-anchor-clearance, 112px);
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .mg-home-section {
        --mg-home-anchor-clearance: 174px;
    }
}

.mg-home-success-intro {
    max-inline-size: 46rem;
    margin: 22px 0 0;
    padding: 4px 0 4px 16px;
    border-inline-start: 2px solid #2d6585;
    color: #425e74;
    font-size: clamp(1rem, 1.28vw, 1.0625rem);
    line-height: 1.6;
    text-align: start;
    text-wrap: pretty;
}

.mg-home-success-intro span {
    display: block;
}

.mg-home-focus-grid,
.mg-home-project-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 18px;
}

.mg-home-focus-grid {
    --mg-home-focus-height: clamp(144px, 42vw, 176px);
    --mg-home-focus-padding: 20px;
    --mg-home-focus-link-size: clamp(.8125rem, 1.08vw, .875rem);
    --mg-home-focus-title-size: 20px;
    margin-block-start: clamp(18px, 4.2vw, 56px);
}

.mg-home-focus-card,
.mg-home-project-card {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
    border-radius: 5px;
    text-decoration: none;
}

.mg-home-focus-card {
    overflow: hidden;
    border: 1px solid #dbe1e6;
    background: #fff;
    color: #242d37;
}

.mg-home-focus-image {
    display: block;
    inline-size: 100%;
    block-size: var(--mg-home-focus-height);
    object-fit: cover;
    object-position: center var(--mg-home-focus-position, 50%);
}

.mg-home-focus-card:nth-child(1) {
    --mg-home-focus-position: 40%;
}

.mg-home-focus-card:nth-child(2) {
    --mg-home-focus-position: 28%;
}

.mg-home-focus-card:nth-child(3) {
    --mg-home-focus-position: 39%;
}

.mg-home-focus-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px var(--mg-home-focus-padding) 16px;
}

.mg-home-focus-body h3,
.mg-home-project-card h3 {
    margin: 0 0 12px;
    font-weight: 700;
    line-height: 1.19;
    letter-spacing: -.015em;
}

.mg-home-focus-body h3 {
    color: #242d37;
    font-size: var(--mg-home-focus-title-size);
}

.mg-home-focus-body p,
.mg-home-project-card p {
    margin: 0 0 14px;
    line-height: 1.58;
    text-wrap: pretty;
}

.mg-home-focus-body p {
    color: #536173;
    font-size: clamp(14px, 1.35vw, 17px);
}

.mg-home-card-action {
    display: inline-grid;
    grid-template-columns: max-content var(--mg-home-arrow-size, 20px);
    align-items: center;
    align-self: flex-start;
    gap: var(--mg-home-arrow-gap, 8px);
    min-block-size: 32px;
    margin-block-start: auto;
    font-size: var(--mg-home-focus-link-size, .875rem);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.mg-home-focus-card .mg-home-card-action {
    color: #155170;
}

.mg-home-card-action > span {
    grid-column: 1;
}

.mg-home-focus-label--short {
    display: none;
}

.mg-home-card-arrow {
    grid-column: 2;
    inline-size: var(--mg-home-arrow-size, 20px);
    block-size: auto;
    opacity: 0;
}

:is(.mg-home-focus-card, .mg-home-project-card):is(:focus-visible, :active) .mg-home-card-arrow {
    opacity: 1;
    transform: none;
}

:is(.mg-home-focus-card, .mg-home-project-card, .mg-home-book-buy):focus-visible {
    outline: 2px solid #39739a;
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    :is(.mg-home-focus-card, .mg-home-project-card):hover .mg-home-card-arrow {
        opacity: 1;
        transform: none;
    }

    .mg-home-focus-card:hover {
        box-shadow: 0 12px 26px #112b4514;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .mg-home-card-arrow {
        transform: translateX(-3px);
        transition: opacity .24s ease, transform .24s ease;
    }
}

@media (min-width: 700px) {
    .mg-home-focus-grid,
    .mg-home-project-grid {
        gap: 24px;
    }

    .mg-home-focus-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding-block-end: 28px;
        --mg-home-focus-height: clamp(108px, 15vw, 176px);
        --mg-home-focus-padding: clamp(7px, 1.05vw, 20px);
        --mg-home-focus-title-size: clamp(13px, 1.72vw, 20px);
        --mg-home-focus-link-size: clamp(11px, 1.28vw, 14px);
        --mg-home-arrow-gap: clamp(4px, .5vw, 8px);
        --mg-home-arrow-size: clamp(14px, 1.5vw, 20px);
    }

    .mg-home-focus-card:nth-child(even) {
        inset-block-start: 28px;
    }

    .mg-home-project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-block-end: 64px;
    }

    .mg-home-project-card:nth-child(3n + 2) {
        inset-block-start: 32px;
    }

    .mg-home-project-card:nth-child(3n) {
        inset-block-start: 64px;
    }
}

@media (min-width: 700px) and (max-width: 999.98px) {
    .mg-home-focus-label--full {
        display: none;
    }

    .mg-home-focus-label--short {
        display: inline;
    }
}

.mg-home-project-card {
    box-sizing: border-box;
    padding: clamp(20px, 2.9vw, 32px);
    background: linear-gradient(145deg, #153c5c, #0e2843);
    color: #fff;
}

.mg-home-project-meta {
    display: flex;
    min-block-size: 54px;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: clamp(16px, 3vw, 35px);
}

.mg-home-project-meta span {
    color: #8caec6;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    letter-spacing: .08em;
    line-height: 1;
}

.mg-home-project-logo {
    display: block;
    inline-size: clamp(64px, 26%, 100px);
    block-size: clamp(30px, 5.4vw, 54px);
    object-fit: contain;
    object-position: top right;
}

.mg-home-project-card h3 {
    color: #fff;
    font-size: clamp(1.125rem, 1.8vw, 1.5rem);
    text-wrap: balance;
}

.mg-home-project-card p {
    color: #d8e4ef;
    font-size: clamp(.875rem, 1.28vw, 1rem);
}

.mg-home-project-card .mg-home-card-action {
    color: #fff;
}

.mg-home-book-action {
    display: flex;
    justify-content: flex-end;
}

.mg-home-book-buy {
    display: inline-flex;
    min-block-size: 48px;
    align-items: center;
    justify-content: center;
    padding: .65rem 1.4rem;
    border-radius: 999px;
    background: #123d60;
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
}

.mg-home-book-buy:is(:hover, :focus-visible) {
    background: #0a2b49;
    color: #fff;
}

/* Interaction layers paint over fixed card geometry. */
.mg-home-focus-card,
.mg-home-project-card,
.mg-home-book-buy {
    position: relative;
}

.mg-home-focus-card::before {
    position: absolute;
    z-index: 1;
    inset: 0 0 auto;
    block-size: var(--mg-home-focus-height);
    background: #081f332e;
    opacity: var(--mg-home-focus-highlight, 0);
    pointer-events: none;
    content: "";
}

.mg-home-focus-circle {
    position: absolute;
    z-index: 2;
    inset-inline-start: 50%;
    inset-block-start: calc(var(--mg-home-focus-height) / 2);
    box-sizing: border-box;
    display: grid;
    place-items: center;
    inline-size: 46px;
    block-size: 46px;
    border: 1px solid #ffffff85;
    border-radius: 50%;
    background: #0a2943f0;
    color: #fff;
    box-shadow: 0 7px 22px #00000038;
    opacity: var(--mg-home-focus-highlight, 0);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.mg-home-focus-circle-arrow {
    inline-size: 21px;
    block-size: auto;
}

.mg-home-focus-card:is(:focus-visible, :active) {
    --mg-home-focus-highlight: 1;
    box-shadow: 0 12px 26px #112b4514;
}

.mg-home-project-card {
    isolation: isolate;
}

.mg-home-project-card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse at 90% 0%, #65b6df2b, transparent 65%),
        linear-gradient(140deg, #164970, #0d3151);
    opacity: var(--mg-home-project-highlight, 0);
    pointer-events: none;
    content: "";
}

.mg-home-project-card:is(:focus-visible, :active) {
    --mg-home-project-highlight: 1;
    z-index: 1;
    box-shadow: 0 26px 38px -8px #05192c66, 0 8px 15px #05192c33, 0 0 0 1px #7ec1e74d;
}

.mg-home-book-arrow {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: .5rem;
    inline-size: 18px;
    block-size: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
}

.mg-home-book-buy:is(:focus-visible, :active) .mg-home-book-arrow {
    opacity: 1;
}

.mg-home-book-buy:is(:focus-visible, :active) .mg-home-book-label {
    transform: translateX(-6px);
}

.mg-home-book-buy:is(:focus-visible, :active) {
    box-shadow: 0 7px 20px #0b304018;
}

@media (hover: hover) and (pointer: fine) {
    .mg-home-focus-card:hover {
        --mg-home-focus-highlight: 1;
    }

    .mg-home-project-card:hover {
        --mg-home-project-highlight: 1;
        z-index: 1;
        box-shadow: 0 26px 38px -8px #05192c66, 0 8px 15px #05192c33, 0 0 0 1px #7ec1e74d;
    }

    .mg-home-book-buy:hover {
        box-shadow: 0 7px 20px #0b304018;
    }

    .mg-home-book-buy:hover .mg-home-book-arrow {
        opacity: 1;
    }

    .mg-home-book-buy:hover .mg-home-book-label {
        transform: translateX(-6px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    :is(.mg-home-focus-card, .mg-home-project-card) {
        transition: translate .25s ease, box-shadow .25s ease;
    }

    .mg-home-focus-card::before,
    .mg-home-project-card::before {
        transition: opacity .34s ease;
    }

    .mg-home-focus-circle {
        transform: translate(-60%, -50%);
        transition: opacity .3s ease, transform .42s cubic-bezier(.2, .7, .2, 1);
    }

    .mg-home-focus-card:is(:focus-visible, :active) .mg-home-focus-circle {
        transform: translate(-50%, -50%);
    }

    .mg-home-project-card:focus-visible {
        translate: 0 -8px;
    }

    .mg-home-project-logo {
        transition: transform .35s ease;
    }

    .mg-home-project-card:focus-visible .mg-home-project-logo {
        transform: scale(1.07);
    }

    .mg-home-book-buy {
        transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
    }

    .mg-home-book-label {
        transition: transform .38s ease;
    }

    .mg-home-book-arrow {
        transform: translate(-6px, -50%);
        transition: opacity .38s ease, transform .38s ease;
    }

    .mg-home-book-buy:is(:focus-visible, :active) .mg-home-book-arrow {
        transform: translate(0, -50%);
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .mg-home-focus-card:hover {
        translate: 0 -3px;
    }

    .mg-home-focus-card:hover .mg-home-focus-circle {
        transform: translate(-50%, -50%);
    }

    .mg-home-project-card:hover {
        translate: 0 -8px;
    }

    .mg-home-project-card:hover .mg-home-project-logo {
        transform: scale(1.07);
    }

    .mg-home-book-buy:hover .mg-home-book-arrow {
        transform: translate(0, -50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(.mg-home-focus-card, .mg-home-project-card).sppb-wow {
        animation-fill-mode: none;
        animation-timing-function: step-start;
    }
}
