body.cms-index-index .page-main {
    max-width: 1400px;
}

body.cms-index-index {
    overflow-x: hidden;
}

.mc-home-hero {
    position: relative;
    width: 100vw;
    margin-top: -40px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #fcfcfd;
    border-top: none;
    border-bottom: 1px solid rgba(225, 229, 237, 0.5);
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.02);
    padding: 56px 0 12px;
    margin-bottom: 40px;
    overflow: hidden;
}

.mc-home-hero__image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    background-image: var(--mc-home-hero-image);
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%);
            mask-image: linear-gradient(to right, transparent 0%, #000 4%);
    pointer-events: none;
}

.mc-home-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1700px;
    width: calc(100% - 160px);
    margin: 0 auto 48px;
    padding: 0;
    box-sizing: border-box;
    text-align: left;
}

.mc-home-hero__inner > * {
    max-width: 640px;
}

.mc-home-hero__title {
    margin: 0 0 16px;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--mc-text-color);
}

.mc-home-hero__lead {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--mc-text-secondary-color);
}

/* Full button styling — .mc-button base lives in Customer/account.css which is
   not loaded on the homepage, so the hero button styles itself standalone. */
.mc-home-hero__button,
.mc-home-hero__button:visited {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    border-radius: 6px;
    background: var(--mc-theme-primary, #006fce);
    border: 1px solid var(--mc-theme-primary, #006fce);
    color: var(--mc-theme-primary-text, #fff);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.mc-home-hero__button:hover,
.mc-home-hero__button:focus {
    background: var(--mc-theme-primary-hover, #005bad);
    border-color: var(--mc-theme-primary-hover, #005bad);
    color: var(--mc-theme-primary-text, #fff);
    text-decoration: none;
}

.mc-home-hero .mc-home-hero__features {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 auto;
    align-items: center;
    align-content: center;
    max-width: 1700px;
    width: calc(100% - 160px);
    /* YTTERKANT: avstand fra boksens kant til lenkene (øk for å trekke alt innover). */
    padding: 20px 48px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* MELLOMROM: avstand mellom lenkene. Styrer nå direkte (ingen space-between). */
    gap: 24px;
    background: var(--mc-surface-color);
    border: 1px solid rgba(225, 229, 237, 0.5);
    border-radius: var(--mc-card-radius);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.03);
}

.mc-home-hero__feature {
    display: flex;
    align-items: center;
    /* Sentrer ikon+tekst-gruppen i kolonnen (balansert luft), men teksten selv forblir venstrejustert. */
    justify-content: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    text-align: left;
}

/* Klientside-styrt synlighet (f.eks. Dashboard-lenken) — `hidden`-attributtet
   må vinne over `display: flex` over, ellers vises elementet alltid. */
.mc-home-hero__feature[hidden] {
    display: none;
}

.mc-home-hero__feature-text strong,
.mc-home-hero__feature-text span {
    margin: 0;
}

.mc-home-hero__feature-link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    border-radius: var(--mc-card-radius);
    transition: color .15s ease;
}

.mc-home-hero__feature-link:hover {
    color: var(--mc-text-color);
    text-decoration: none;
}

.mc-home-hero__feature-link:hover .mc-home-hero__feature-icon {
    background: #e9ebef;
}

.mc-home-hero__feature-svg {
    width: 22px;
    height: 22px;
}

.mc-home-hero__feature-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f4f5f7;
    color: var(--mc-text-color);
    transition: background .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mc-home-hero__feature-text {
    display: flex;
    flex-direction: column;
    /* Teksten venstrejustert, selv om hele elementet er sentrert i kolonnen. */
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.mc-home-hero__feature-text strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--mc-text-color);
    line-height: 1.3;
}

.mc-home-hero__feature-text span {
    font-size: 13px;
    color: var(--mc-text-muted-color);
    line-height: 1.4;
}

@media (max-width: 960px) {
    .mc-home-hero {
        padding: 56px 0 12px;
    }

    .mc-home-hero__image {
        display: none;
    }

    .mc-home-hero .mc-home-hero__inner,
    .mc-home-hero .mc-home-hero__features {
        width: calc(100% - 64px);
    }

    .mc-home-hero__title {
        font-size: 28px;
    }

    .mc-home-hero .mc-home-hero__features {
        grid-template-columns: repeat(2, 1fr);
        justify-content: stretch;
        padding: 20px 24px;
        gap: 16px 24px;
    }

    /* Venstrejuster lenkene når de stables, så ikon+tekst flukter pent. */
    .mc-home-hero__feature {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .mc-home-hero {
        padding: 48px 0 12px;
        margin-bottom: 24px;
    }

    .mc-home-hero .mc-home-hero__inner,
    .mc-home-hero .mc-home-hero__features {
        width: calc(100% - 32px);
    }

    .mc-home-hero .mc-home-hero__features {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
}

.page-container {
    display: flex;
    flex-wrap: wrap;
}

.page-container .fordelsprogram-banner {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.page-container .fordelsprogram-banner img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.page-container .sidebar-categories-custom {
    flex: 0.2;
    padding-right: 20px;
}

.page-container .sidebar-categories-custom .category-overskrift {
    font-size: 17px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.page-container .sidebar-categories-custom a {
    display: block;
    padding: 6px 0;
    margin-bottom: 6px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition:
        color .2s ease,
        padding-left .2s ease,
        background .2s ease;
}

.page-container .sidebar-categories-custom a p {
    margin: 0;
}

.page-container .sidebar-categories-custom a p::before {
    content: "";
    color: #888;
    font-weight: 600;
}

.page-container .sidebar-categories-custom a:hover {
    background: #f7f7f7;
    padding-left: 4px;
    border-radius: 4px;
}

.page-container .sidebar-categories-custom a:hover p::before {
    color: #000;
}

.page-container .container-content {
    flex: 0.8;
}

.page-container .block {
    background: #fff;
    padding: 25px;
    box-sizing: border-box;
}

.page-container .full-width:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.page-container .three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.page-container .red-color {
    color: #a3031b;
}

@media (max-width: 900px) {
    .page-container .three-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .page-container .three-cols {
        grid-template-columns: 1fr;
    }
}
