/*
 * messec/fullscreen-columns - landingpage-element
 * 1-4 kolonner, bredden deles ligeligt (100 / antal), altid fuld viewporthoejde.
 * Elementet fikseres til viewporten og ligger over alt andet (headeren har z-index 9998);
 * menu, footer og scroll-top skjules, saa kun kolonnerne er synlige.
 * Design afstemt efter storedage.idefadev.dk: Playfair Display, roed (#EC2527) pille-knap.
 */

/* Siden med elementet scroller ikke */
html:has(.fsc),
body:has(.fsc) {
    height: 100%;
    overflow: hidden;
}
/* Kun kolonnerne og logoet er synlige: ingen menu, footer eller scroll-top */
body:has(.fsc) .navigation-top-container > :not(.navigation-left),
body:has(.fsc) #page-footer,
body:has(.fsc) .scroll-top {
    display: none !important;
}

/* Logoet centreres over kolonnerne, ca. 100px fra toppen */
body:has(.fsc) .navigation-top-container {
    position: fixed !important;
    top: 100px;
    left: 0;
    right: 0;
    z-index: 10001;
    display: flex !important;
    justify-content: center;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    pointer-events: none;
}
body:has(.fsc) .navigation-top-container .navigation-left {
    display: flex;
    justify-content: center;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
body:has(.fsc) .navigation-top-container .navbar-brand {
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto;
}
/* Logoet er stoerre her end i den normale header (58px hoejt) */
body:has(.fsc) .navigation-top-container .navbar-brand img {
    width: auto !important;
    height: 150px !important;
    max-width: 80vw !important;
    max-height: none !important;
}
@media (max-width: 767.98px) {
    body:has(.fsc) .navigation-top-container {
        top: 40px;
    }
    body:has(.fsc) .navigation-top-container .navbar-brand img {
        height: 90px !important;
    }
}

.fsc {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    background: #411118;
}

.fsc__col {
    position: relative;
    flex: 0 0 calc(100% / var(--fsc-count, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    color: #fff;
    text-align: center;
}

/* !important: temaets generelle img-styling (afrunding, max-width/height, margin) maa ikke slaa igennem */
.fsc__bg {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: cover;
    object-position: center;
    transition: transform .8s ease;
}
.fsc__col:hover .fsc__bg {
    transform: scale(1.04);
}

/*
 * TwentyThree-video som baggrund (cover). Embed-koden kommer typisk som en wrapper-div med
 * padding-bottom-ratio og en absolut iframe - begge tvinges her til at fylde kolonnen.
 * Kolonnen er size-container, saa iframen kan daekke 16:9 uanset kolonnens form:
 * bredde = max(kolonnebredde, hoejde * 16/9), hoejde = max(kolonnehoejde, bredde * 9/16).
 */
.fsc__col--video {
    container-type: size;
}
.fsc__video,
.fsc__video > div {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    pointer-events: none;
}
.fsc__video iframe {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, 177.78cqh) !important;
    height: max(100cqh, 56.25cqw) !important;
    max-width: none !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    transform: translate(-50%, -50%) !important;
}
.fsc__col--video:hover .fsc__bg {
    transform: none;
}

/* Burgundy-toning som sitets thumbnailmenu, kraftigst i bunden hvor knappen sidder */
.fsc__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(65, 17, 24, .15) 0%, rgba(65, 17, 24, .55) 100%);
    pointer-events: none;
}

.fsc__content {
    position: relative;
    z-index: 1;
    max-width: 90%;
    padding: 2rem 1rem;
}

.fsc__header {
    margin: 0 0 .5rem;
    font-family: "Playfair Display", serif;
    font-weight: 400;
    font-size: clamp(2rem, calc(6.5vw / var(--fsc-count, 1)), 6rem);
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.fsc__subheader {
    margin: 0 0 1.5rem;
    font-family: "Playfair Display", serif;
    font-size: clamp(1rem, calc(2vw / var(--fsc-count, 1) + .6rem), 1.5rem);
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

.fsc__btn {
    display: inline-block;
    padding: 10px 25px;
    border: 0;
    border-radius: 40px;
    background: #EC2527;
    color: #fff;
    font-family: "Playfair Display", serif;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}
.fsc__btn:hover,
.fsc__btn:focus-visible {
    background: #411118;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}
.fsc__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Mobil: kolonnerne stables og deler hoejden i stedet for bredden - stadig ingen scroll */
@media (max-width: 767.98px) {
    .fsc {
        flex-direction: column;
    }
    .fsc__col {
        flex: 0 0 calc(100% / var(--fsc-count, 1));
        width: 100%;
    }
    .fsc__content {
        padding: 1rem;
    }
    /* Oeverste (stablede) kolonne holder sit indhold fri af logoet */
    .fsc__col:first-child .fsc__content {
        padding-top: 120px;
    }
    .fsc__header {
        font-size: clamp(1.5rem, calc(9vw - var(--fsc-count, 1) * .6vw), 2.5rem);
    }
    .fsc--cols-3 .fsc__subheader,
    .fsc--cols-4 .fsc__subheader {
        display: none;
    }
    .fsc--cols-4 .fsc__header {
        margin-bottom: .25rem;
    }
    .fsc__subheader {
        margin-bottom: 1rem;
    }
    .fsc__btn {
        padding: 8px 20px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fsc__bg,
    .fsc__btn {
        transition: none;
    }
    .fsc__col:hover .fsc__bg {
        transform: none;
    }
}
