/* Anti-Aging.dk – hovedmenu / accordion / centreret søgning – desktop + mobil */

.site-header {
    position: relative;
    z-index: 1000;
}

.site-header .nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================================================
   Find tilbud – hovedmenu
   ========================================================= */

.main-menu {
    position: relative;
    margin-left: auto;
}

.main-menu > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 18px;
    color: #fff;
    background: #5a0f1a;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
    transition: background-color .2s ease, transform .2s ease;
}

.main-menu > summary:hover {
    background: #513d34;
}

.main-menu > summary:active {
    transform: translateY(1px);
}

.main-menu > summary::-webkit-details-marker,
.menu-section > summary::-webkit-details-marker {
    display: none;
}

.menu-arrow,
.section-arrow {
    display: inline-block;
    line-height: 1;
    transition: transform .2s ease;
}

.main-menu[open] > summary .menu-arrow {
    transform: rotate(180deg);
}

/* =========================================================
   Dropdown
   ========================================================= */

.menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8e0da;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(63, 48, 41, .14);
}

.menu-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #e8e0da;
    border-top: 1px solid #e8e0da;
    transform: rotate(45deg);
}

.menu-section {
    border-bottom: 1px solid #eee6df;
}

.menu-section > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 8px;
    color: #5a0f1a;
    font-size: 16px;
    font-weight: 600;
    user-select: none;
}

.menu-section > summary:hover,
.menu-section > summary:focus-visible {
    color: #8f2c2f;
}

.menu-section[open] > summary .section-arrow {
    transform: rotate(180deg);
}

.menu-links {
    display: grid;
    padding: 0 6px 9px;
}

.menu-links a {
    display: block;
    padding: 8px 8px;
    color: #55443c;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.35;
    border-radius: 7px;
}

.menu-links a:hover,
.menu-links a:focus-visible {
    background: #f7f1eb;
    color: #8f2c2f;
}

.menu-home-link {
    display: block;
    margin: 12px 6px 3px;
    padding: 10px 8px;
    color: #8f2c2f;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
}

.menu-home-link:hover,
.menu-home-link:focus-visible {
    background: #f7f1eb;
}

.main-menu summary:focus-visible,
.menu-panel a:focus-visible {
    outline: 2px solid #8f2c2f;
    outline-offset: 2px;
}

/* =========================================================
   Guide – samme stil som Find tilbud
   ========================================================= */

.guide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    padding: 11px 18px;
    color: #fff;
    background: #5a0f1a;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    transition: background-color .2s ease, transform .2s ease;
}

.guide-link:hover,
.guide-link:focus-visible {
    color: #fff;
    background: #513d34;
    text-decoration: none;
}

.guide-link:active {
    transform: translateY(1px);
}

/* =========================================================
   Søgning – centreret på desktop
   ========================================================= */

.site-search {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    width: 300px;
    height: 40px;
    margin: 0;
}

.site-search input {
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding: 8px 44px 8px 14px;
    border: 1px solid #e4ddd8;
    border-radius: 10px;
    background: #fff;
    color: #4b3a34;
    font: inherit;
    font-size: 14px;
}

.site-search input::placeholder {
    color: #8a817b;
}

.site-search input:hover {
    border-color: #d8cec7;
}

.site-search input:focus {
    outline: 2px solid rgba(139, 46, 50, .18);
    border-color: #8f2c2f;
}

/* Lup-knappen */
.site-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    padding: 0;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #4b3a34;

    cursor: pointer;
}

.site-search button:hover {
    background: #f5f1ee;
}

.site-search button:active {
    transform: translateY(calc(-50% + 1px));
}

.site-search button:focus-visible,
.site-search input:focus-visible {
    outline: 2px solid #8f2c2f;
    outline-offset: 2px;
}

.site-search svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1050px) {
    .site-search {
        width: 260px;
    }
}

/* =========================================================
   ALLE MOBILER – ens headerlayout
   ========================================================= */

@media (max-width: 700px) {

    .site-header .nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "logo menu guide"
            "search search search";

        align-items: center;

        column-gap: 6px;
        row-gap: 8px;

        padding: 8px 10px 9px;
    }

    /* Logo */
    .site-header .logo {
        grid-area: logo;
        justify-self: start;
        white-space: nowrap;
    }

    /* Find tilbud */
    .main-menu {
        grid-area: menu;
        margin-left: 0;
        justify-self: end;
    }

    .main-menu > summary {
        min-width: 100px;
        padding: 10px 12px;
        font-size: 14px;
        white-space: nowrap;
        gap: 5px;
    }

    /* Guide */
    .guide-link {
        grid-area: guide;
        justify-self: end;

        margin-left: 0;
        padding: 10px 13px;

        font-size: 14px;
        white-space: nowrap;
    }

    /* Søgefelt */
    .site-search {
        grid-area: search;

        position: relative;
        left: auto;
        top: auto;
        transform: none;

        width: 100%;
        height: 40px;

        margin: 0;
    }

    .site-search input {
        box-sizing: border-box;
        width: 100%;
        height: 40px;

        padding: 8px 42px 8px 13px;

        font-size: 14px;
    }

    .site-search button {
        right: 5px;

        width: 32px;
        height: 32px;
    }

    .site-search svg {
        width: 17px;
        height: 17px;
    }

    /* Dropdown-menu */
    .menu-panel {
        position: fixed;
        top: 64px;
        left: 10px;
        right: 10px;

        width: auto;
        max-height: calc(100vh - 76px);

        overflow-y: auto;

        padding: 12px;
        border-radius: 12px;
    }

    .menu-panel::before {
        display: none;
    }

    .menu-section > summary {
        padding: 14px 8px;
        font-size: 16px;
    }

    .menu-links a {
        padding: 10px 8px;
        font-size: 16px;
    }
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}