﻿/* =========================================================
   CURABIS MENU.CSS
   Midlertidig isoleret menu/header-styling
   Indlæs efter main.css
   ========================================================= */

/* =========================
   1. Header shell
   ========================= */

.header {
    color: var(--default-color);
    background: #fff;
    padding: 6px 0px;
    z-index: 997;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.scrolled .header {
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.08);
}

.header .logo {
    line-height: 1;
    text-decoration: none;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.header .btn-getstarted,
.header .btn-getstarted:focus {
    color: var(--contrast-color);
    background: var(--accent-color);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: 0.3s;
    margin: 0;
}

    .header .btn-getstarted:hover,
    .header .btn-getstarted:focus:hover {
        color: var(--contrast-color);
        background: color-mix(in srgb, var(--accent-color), transparent 15%);
    }

/* Language switch */

.header__languages {
    position: relative;
    display: inline-flex;
    align-items: center;
}

    .header__languages .language-btn {
        cursor: pointer;
        padding: 6px 8px;
        border-radius: 4px;
        font-size: 12px;
        line-height: 1;
        border: 0;
        background: #f5f5f5;
        color: var(--accent-color);
        transition: 0.3s;
    }

        .header__languages .language-btn:hover {
            color: var(--accent-color);
            background: #efefef;
        }

    .header__languages .language-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        min-width: 52px;
        background-color: #fff;
        border-radius: 4px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
        z-index: 1000;
        overflow: hidden;
    }

        .header__languages .language-dropdown a {
            color: #212529;
            padding: 8px 10px;
            text-decoration: none;
            display: block;
            font-size: 12px;
            line-height: 1;
        }

            .header__languages .language-dropdown a:hover {
                color: var(--accent-color);
                background: #f7f7f7;
            }

    .header__languages .show {
        display: block;
    }

/* =========================
   2. Desktop header layout
   ========================= */

@media (min-width: 1200px) {
    .header-inner {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
    }

    .logo {
        position: relative;
        z-index: 3;
        flex: 0 0 auto;
    }

    .header-right {
        position: relative;
        z-index: 3;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .header-nav {
        position: absolute;
        inset: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }

    header #navmenu.navmenu {
        position: static !important;
        transform: none !important;
        width: max-content !important;
        pointer-events: auto;
    }

        header #navmenu.navmenu > ul {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 34px;
            margin: 0;
            padding: 0;
            white-space: nowrap;
        }
}

/* =========================
   3. Desktop top navigation
   ========================= */

@media (min-width: 1200px) {
    .navmenu {
        padding: 0;
    }

        .navmenu ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .navmenu li {
            position: relative;
        }

    header #navmenu.navmenu {
        position: static !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: auto !important;
    }

        header #navmenu.navmenu > ul {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: center;
            gap: 24px;
            white-space: nowrap;
            margin: 0;
            padding: 0;
        }

            header #navmenu.navmenu > ul > li {
                flex: 0 0 auto;
            }

    .navmenu > ul > li > a,
    .navmenu > ul > li > a:focus,
    .header .navmenu .nav-link {
        font-family: var(--nav-font);
        font-size: 14px;
        font-weight: 400;
        letter-spacing: 0.25px;
        color: rgba(0, 0, 0, 0.85);
        line-height: 1;
        color: var(--nav-color);
        padding: 8px 0;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        white-space: nowrap;
        text-decoration: none;
        background: transparent;
        box-shadow: none;
        outline: none;
    }

        .navmenu > ul > li > a i,
        .navmenu > ul > li > a:focus i,
        .header .navmenu .nav-link > .bi {
            font-size: 14px;
            line-height: 0;
            margin-left: 4px;
            transform: translateY(1px); /* optisk alignment */
            transition: 0.3s;
        }

        .navmenu li:hover > a,
        .navmenu .active,
        .navmenu .active:focus,
        .header .navmenu .nav-item.show > .nav-link,
        .header .navmenu .nav-link:hover {
            color: var(--nav-hover-color);
        }

    a[id^="flexmenu_"].dropdown-toggle::after,
    a[id^="flexmenu_"]::after {
        content: none !important;
        display: none !important;
    }
}

/* =========================
   4. Desktop dropdown base
   ========================= */

@media (min-width: 1200px) {
    .mm-dropdown {
        margin-top: 0px;
    }

    .header .navmenu .dropdown-menu,
    .navmenu .dropdown ul {
        --menu-radius: 8px;
        --menu-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.08);
        border: 0;
        border-radius: var(--menu-radius);
        box-shadow: var(--menu-shadow);
        background: var(--nav-dropdown-background-color);
    }

    /* Klassisk dropdown fallback */
    .navmenu .dropdown ul {
        margin: 0;
        padding: 10px 0;
        display: block;
        position: absolute;
        visibility: hidden;
        left: 0;
        top: 130%;
        opacity: 0;
        transition: 0.25s;
        z-index: 99;
        min-width: 220px;
    }

    .navmenu .dropdown:hover > ul {
        opacity: 1;
        top: 100%;
        visibility: visible;
    }

    .navmenu .dropdown ul li {
        min-width: 220px;
    }

    .navmenu .dropdown ul a {
        padding: 10px 18px;
        font-size: 15px;
        text-transform: none;
        color: var(--nav-dropdown-color);
        display: block;
        white-space: normal;
    }

        .navmenu .dropdown ul a:hover,
        .navmenu .dropdown ul .active:hover,
        .navmenu .dropdown ul li:hover > a {
            color: var(--nav-dropdown-hover-color);
        }

    .navmenu .dropdown .dropdown ul {
        top: 0;
        left: calc(100% - 8px);
        visibility: hidden;
    }

    .navmenu .dropdown .dropdown:hover > ul {
        opacity: 1;
        top: 0;
        left: 100%;
        visibility: visible;
    }

    .header .navmenu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

        .header .navmenu .dropdown-item .bi {
            font-size: 0.95rem;
            opacity: 0.9;
        }

    .header .navmenu .dropdown-menu a {
        white-space: normal;
    }
}

/* =========================================================
   5. Desktop mega menu – samlet og ryddet
   ========================================================= */

@media (min-width: 1200px) {

    .mm-heading,
    .mm-intro,
    .mm-tile-title,
    .mm-tile-desc,
    .mm-feature-title,
    .mm-feature-desc {
        white-space: normal;
    }

    .mm-tile {
        position: relative;
    }

    .mm-tile-arrow {
        position: absolute;
        top: 22px;
        right: 22px;
        font-size: 18px;
        line-height: 1;
        color: #1c1c1b;
        opacity: 0;
        transform: translateY(6px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;
    }

    .mm-tile:hover .mm-tile-arrow,
    .mm-tile:focus-within .mm-tile-arrow {
        opacity: 1;
        transform: translateY(0);
    }


    .header .navmenu .dropdown-menu.desktop-dropdown {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: min(1380px, calc(100vw - 80px)) !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-top: 32px !important;
        padding: 10px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .mm-dropdown {
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .mm-panel {
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
    }

    .mm-surface {
        background: #f3f3f3;
        border-radius: 28px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        width: 100%;
    }


    .mm-main {
        min-width: 0;
        background: #fbfbfb;
        border-radius: 22px;
        padding: 20px 20px 24px;
    }

    .mm-layout {
        display: grid;
        align-items: start;
        gap: 34px;
    }

        .mm-layout.has-featured {
            grid-template-columns: minmax(0, 1fr) 280px;
        }

        .mm-layout.no-featured {
            grid-template-columns: minmax(0, 1fr);
        }

    .mm-main,
    .mm-side {
        min-width: 0;
    }

    .mm-head {
        margin-bottom: 28px;
    }

    .mm-heading {
        font-family: var(--nav-font);
        font-size: 24px;
        line-height: 1.1;
        font-weight: 600;
        margin: 0 0 18px;
        color: #1c1c1b;
    }

    .mm-heading-link {
        color: #1c1c1b;
        text-decoration: none;
    }

        .mm-heading-link:hover {
            color: var(--accent-color);
        }

    .mm-intro {
        max-width: none;
        color: #1c1c1b;
        font-size: 12px;
        line-height: 1.55;
    }

        .mm-intro p:last-child {
            margin-bottom: 0;
        }

    .mm-teasers {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 20px;
        align-items: stretch;
    }

    .mm-tile {
        position: relative;
        min-width: 0;
        border-radius: 22px;
        padding: 28px 20px 20px;
        background: transparent;
        transition: background-color 0.18s ease, transform 0.18s ease;
    }

        .mm-tile:hover,
        .mm-tile:focus-within {
            background: #f1d4c8;
            transform: translateY(-1px);
        }

    .mm-tile-link {
        text-decoration: none;
    }

    .mm-tile-icon-wrap {
        margin-bottom: 22px;
    }

    .mm-tile-icon {
        width: 54px;
        height: 54px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #f4e5de;
        color: #1c1c1b;
        font-size: 28px;
        line-height: 1;
        font-weight: 300;
    }

    .mm-tile:hover .mm-tile-icon,
    .mm-tile:focus-within .mm-tile-icon {
        background: var(--accent-color);
        color: #fff;
    }
    /* overskrift i orange boks */
    .mm-tile-title {
        font-family: var(--nav-font);
        font-size: 20px;
        line-height: 1.2;
        font-weight: 500;
        color: #1c1c1b;
        margin: 0 0 12px;
        overflow-wrap: anywhere;
        word-break: break-word !important;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: calc(2 * 1.2em);
    }

    .mm-tile-desc {
        color: #9aa0af;
        font-size: 12px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word !important;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: calc(3 * 1.45em);
    }

    .mm-feature-card {
        position: relative;
        min-height: 100%;
        background-color: transparent;
        border: 0;
        padding: 0;
        border-radius: 22px;
        overflow: hidden;
    }

    .mm-feature-media {
        border-radius: 22px;
        overflow: hidden;
        margin-bottom: 14px;
        aspect-ratio: 4 / 3;
        background: #ececec;
    }

        .mm-feature-media img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
    
    /* overskrift i feature boks */
    .mm-feature-title {
        font-family: var(--nav-font);
        font-size: 20px;
        line-height: 1.2;
        font-weight: 500;
        color: #1c1c1b;
        margin: 0 0 10px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .mm-feature-desc {
        color: #9aa0af;
        font-size: 12px;
        line-height: 1.45;
        overflow: hidden;
        overflow-wrap: anywhere;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

        .mm-feature-desc p:last-child {
            margin-bottom: 0;
        }
}

/* Lidt mere kompakt på mindre desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
    .header .navmenu .dropdown-menu.desktop-dropdown {
        width: min(1320px, calc(100vw - 64px)) !important;
    }

    .mm-surface {
        padding: 26px 24px 22px;
    }

    .mm-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 28px;
    }

    .mm-teasers {
        gap: 16px;
    }

    .mm-tile {
        padding: 24px 16px 16px;
    }

    .mm-tile-desc,
    .mm-feature-desc,
    .mm-intro {
        font-size: 12px;
    }
}

/* Mobil: den simple liste bruges stadig */
@media (max-width: 1199px) {
    .mm-dropdown {
        display: none !important;
    }
}


/* =========================
   8. Mobile navigation
   ========================= */

@media (max-width: 1199px) {
    .header .logo {
        order: 1;
    }

    .header-right {
        order: 2;
        gap: 8px;
    }

    .header-nav {
        order: 3;
    }

    .header .btn-getstarted,
    .header .btn-getstarted:focus {
        padding: 6px 12px;
    }

    .mobile-nav-toggle {
        color: var(--nav-color);
        font-size: 28px;
        line-height: 0;
        margin-right: 10px;
        cursor: pointer;
        transition: color 0.3s;
    }

    .navmenu {
        padding: 0;
        z-index: 9997;
    }

        .navmenu ul {
            display: none;
            list-style: none;
            position: absolute;
            inset: 60px 20px 20px 20px;
            padding: 10px 0;
            margin: 0;
            border-radius: 8px;
            background-color: var(--nav-mobile-background-color);
            overflow-y: auto;
            transition: 0.3s;
            z-index: 9998;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
        }

            .navmenu > ul > li > a,
            .navmenu ul > li > a:focus {
                color: var(--nav-dropdown-color);
                padding: 10px 20px;
                font-family: var(--nav-font);
                font-size: 17px;
                font-weight: 500;
                display: flex;
                align-items: center;
                justify-content: space-between;
                white-space: nowrap;
                transition: 0.3s;
            }

                .navmenu > ul > li > a > i,
                .navmenu > ul > li > a:focus > i {
                    font-size: 12px;
                    line-height: 0;
                    width: 30px;
                    height: 30px;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 50%;
                    background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
                    transition: 0.3s;
                    margin-left: 10px;
                    flex: 0 0 auto;
                }

        .navmenu a i:hover,
        .navmenu a:focus i:hover {
            background-color: var(--accent-color);
            color: var(--contrast-color);
        }

        .navmenu a:hover,
        .navmenu .active,
        .navmenu .active:focus {
            color: var(--nav-dropdown-hover-color);
        }

            .navmenu .active i,
            .navmenu .active:focus i {
                background-color: var(--accent-color);
                color: var(--contrast-color);
                transform: rotate(180deg);
            }

        .navmenu .dropdown ul {
            position: static;
            display: none;
            z-index: 99;
            padding: 10px 10px;
            margin: 10px 20px;
            background-color: var(--nav-dropdown-background-color);
            border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
            box-shadow: none;
            transition: all 0.5s ease-in-out;
        }

            .navmenu .dropdown ul ul {
                background-color: rgba(33, 37, 41, 0.1);
            }

        .navmenu .dropdown > .dropdown-active {
            display: block;
            background-color: rgba(33, 37, 41, 0.03);
        }

    .mobile-nav-active {
        overflow: hidden;
    }

        .mobile-nav-active .mobile-nav-toggle {
            color: #fff;
            position: absolute;
            font-size: 32px;
            top: 15px;
            right: 15px;
            margin-right: 0;
            z-index: 9999;
        }

        .mobile-nav-active .navmenu {
            position: fixed;
            overflow: hidden;
            inset: 0;
            background: rgba(33, 37, 41, 0.8);
            transition: 0.3s;
        }

            .mobile-nav-active .navmenu > ul {
                display: block;
            }

    .header__languages .language-btn {
        display: none;
    }

    .navmenu .dropdown-menu.desktop-dropdown {
        display: none !important;
    }

    #navmenu ul,
    #navmenu li {
        list-style: none !important;
    }

        #navmenu li::before,
        #navmenu li::marker,
        #navmenu a::before,
        #navmenu a::marker {
            content: none !important;
        }
}

/* =========================
   9. Mobile teaser cleanup
   ========================= */

@media (max-width: 1199px) {
    .dm-media,
    .dm-desc,
    .mm-teaser-media picture,
    .mm-teaser-desc,
    .dropdown-menu .container .text-uppercase {
        display: none;
    }

    .dropdown .dm-title h3 {
        margin-bottom: 0;
        color: #000;
    }
}

/* =========================
   10. Small screen teaser fallback
   ========================= */

@media (max-width: 420px) {
    .dropdown-menu .mm-teaser-media {
        grid-template-columns: 1fr;
    }

        .dropdown-menu .mm-teaser-media img {
            width: 100%;
            height: auto;
            aspect-ratio: 4 / 3;
        }
}


/* ======================
   11. Customer Portal
   ====================== */
.header__portal {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.portal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--nav-color);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
    background: transparent;
    transition: color 0.2s ease, background-color 0.2s ease;
}

    .portal-link:hover {
        color: var(--accent-color);
        background: rgba(0, 0, 0, 0.04);
    }

    .portal-link i {
        font-size: 14px;
        line-height: 1;
    }

@media (max-width: 1199px) {
    .header__portal {
        display: none;
    }
}

@media (min-width: 1200px) {
    .mm-layout.has-featured {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

        .mm-layout.has-featured .mm-main {
            grid-column: 1;
            grid-row: 1;
        }

        .mm-layout.has-featured .mm-side {
            grid-column: 2;
            grid-row: 1;
        }
}