/* =========================================================
   AcourA - forsidekategorier paa mobil
   En kategori pr. raekke
   ========================================================= */

@media only screen and (max-width: 768px) {

    .frontpage-categories > .row {
        display: flex;
        flex-direction: column;
    }

    .frontpage-categories > .row > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }

    .frontpage-categories .category-item {
        margin-bottom: 16px;
    }
}


/* =========================================================
   AcourA Quick Navigation
   Hurtigmenu til lange landingssider
   Version 1.8 - 08.09.2026

   Desktop: maks. 4 knapper pr. raekke
   Tablet/mobil: maks. 2 knapper pr. raekke
   Meget smal mobil: 1 knap pr. raekke
   ========================================================= */

nav.acoura-quicknav {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;

    gap: 12px;

    width: 100%;

    margin-top: 40px !important;
    margin-bottom: 80px !important;

    padding: 0;
}


nav.acoura-quicknav > p {
    display: contents;
}


nav.acoura-quicknav .acoura-quicknav__link {
    display: grid !important;

    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    column-gap: 6px;

    flex: 0 0 calc((100% - 36px) / 4) !important;
    width: calc((100% - 36px) / 4) !important;
    max-width: calc((100% - 36px) / 4) !important;

    min-width: 0;

    height: 64px;
    min-height: 64px;

    margin: 0 !important;
    padding: 10px 14px;

    float: none !important;
    box-sizing: border-box;

    background: #526B3C;

    border: 1px solid #c9b9a5;
    border-radius: 7px;

    box-shadow:
        inset 3px 0 0 #7A1E1E,
        0 1px 2px rgba(0, 0, 0, 0.06);

    color: #F7F4EF !important;

    font-weight: 700;
    line-height: 1.25;

    text-decoration: none !important;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}


nav.acoura-quicknav .acoura-quicknav__link::before {
    content: "";
    grid-column: 1;
    width: 30px;
}


.acoura-quicknav__text {
    grid-column: 2;

    min-width: 0;

    text-align: center;

    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}


.acoura-quicknav__arrow {
    grid-column: 3;
    justify-self: center;

    width: 30px;
    margin: 0;

    text-align: center;

    color: #F7F4EF;

    font-size: 18px;
    line-height: 1;
}


nav.acoura-quicknav .acoura-quicknav__link:hover {
    background: #F7F4EF;
    border-color: #526B3C;

    color: #395735 !important;

    text-decoration: none !important;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.12);

    transform: translateY(-1px);
}


nav.acoura-quicknav .acoura-quicknav__link:hover
.acoura-quicknav__arrow {
    color: #7A1E1E;
}


nav.acoura-quicknav .acoura-quicknav__link:focus-visible {
    outline: 3px solid rgba(122, 30, 30, 0.28);
    outline-offset: 2px;

    border-color: #7A1E1E;
}


/* =========================================================
   Afstand over maal ved AcourA Quick Navigation
   Desktop: 150px
   Tablet/mobil: 110px
   ========================================================= */

:root {
    --acoura-anchor-offset: 150px;
}

@media (max-width: 850px) {
    :root {
        --acoura-anchor-offset: 110px;
    }
}

.acoura-anchor {
    scroll-margin-top: var(--acoura-anchor-offset);
}


@media (max-width: 850px) {

    nav.acoura-quicknav {
        gap: 10px;
    }

    nav.acoura-quicknav .acoura-quicknav__link {
        flex-basis: calc((100% - 10px) / 2) !important;
        width: calc((100% - 10px) / 2) !important;
        max-width: calc((100% - 10px) / 2) !important;

        height: 64px;
        min-height: 64px;

        padding: 10px 12px;
    }
}


@media (max-width: 480px) {

    nav.acoura-quicknav .acoura-quicknav__link {
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;

        height: 64px;
        min-height: 64px;
    }
}

/* =========================================================
   AcourA Back to Top
   Generel "Til toppen"-funktion
   Version 1.1 - 07.09.2026
   ========================================================= */

.acoura-back-to-top {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 48px;

    margin: 0;
    padding: 10px 16px;

    box-sizing: border-box;

    background: #7A1E1E;

    border: 1px solid #7A1E1E;
    border-radius: 7px;

    color: #ffffff;

    font: inherit;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.18);

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);

    pointer-events: none;

    transition:
        opacity 0.20s ease,
        visibility 0.20s ease,
        transform 0.20s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}


.acoura-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;
}


.acoura-back-to-top__arrow {
    font-size: 20px;
    line-height: 1;
}


/* Hover bruges kun paa enheder med rigtig mus */
@media (hover: hover) and (pointer: fine) {

    .acoura-back-to-top:hover {
        background: #526b3c;
        border-color: #526b3c;
    }
}


/* Mobil/touch skal forblive AcourA-roed */
.acoura-back-to-top:active {
    background: #7A1E1E;
    border-color: #7A1E1E;
}


.acoura-back-to-top:focus-visible {
    outline: 3px solid rgba(122, 30, 30, 0.30);
    outline-offset: 3px;
}


/* =========================================================
   Mobil
   Rund roed knap med kun pil
   ========================================================= */

@media (max-width: 600px) {

    .acoura-back-to-top {
        right: 14px;

        bottom: calc(
            14px + env(safe-area-inset-bottom)
        );

        width: 48px;
        height: 48px;
        min-height: 48px;

        padding: 0;

        border-radius: 50%;

        background: #7A1E1E;
        border-color: #7A1E1E;
    }

    .acoura-back-to-top__text {
        display: none;
    }

    .acoura-back-to-top__arrow {
        font-size: 22px;
    }
}
