/* XMedicus – moderne design. Bruges af xmModernLayout.cshtml */
:root {
    --xm-ink: #16191d;
    --xm-ink-soft: #545a63;
    --xm-ink-muted: #8a9099;
    --xm-bg: #ffffff;
    --xm-surface: #f4f5f7;
    --xm-surface-strong: #eaecef;
    --xm-line: #e2e5e9;
    --xm-accent: #0f6e7a;
    --xm-accent-hover: #0b5862;
    --xm-accent-soft: #e3f1f2;
    --xm-radius: 22px;
    --xm-radius-small: 12px;
    --xm-width: 1120px;
    --xm-text-width: 760px;
    --xm-header-height: 60px;
    --xm-shadow: 0 1px 2px rgba(16, 24, 32, .04), 0 8px 28px rgba(16, 24, 32, .06);
    --xm-shadow-hover: 0 2px 4px rgba(16, 24, 32, .05), 0 18px 44px rgba(16, 24, 32, .10);
    --xm-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--xm-font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--xm-ink);
    background: var(--xm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--xm-accent); text-decoration: none; }
a:hover { color: var(--xm-accent-hover); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.xm-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background-color .2s ease;
}
.is-scrolled .xm-header { border-bottom-color: var(--xm-line); }

.xm-header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1320px;
    height: var(--xm-header-height);
    margin: 0 auto;
    padding: 0 24px;
}

.xm-logo { display: flex; flex-shrink: 0; }
.xm-logo img { width: 168px; height: auto; display: block; }

.xm-nav { flex: 1; display: flex; justify-content: center; }
.xm-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.xm-nav a {
    display: block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--xm-ink-soft);
    white-space: nowrap;
}
.xm-nav a:hover, .xm-nav a.is-active { color: var(--xm-ink); background: var(--xm-surface); text-decoration: none; }
.xm-nav-service { display: none !important; }

.xm-header-actions { display: flex; align-items: center; gap: 12px; }

.xm-search input {
    width: 130px;
    height: 34px;
    padding: 0 12px 0 34px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--xm-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a9099' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m14 14-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
    font: inherit;
    font-size: 14px;
    color: var(--xm-ink);
    transition: width .25s ease, border-color .2s ease, background-color .2s ease;
}
.xm-search input:focus { width: 200px; outline: none; border-color: var(--xm-accent); background-color: #fff; }

.xm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--xm-accent);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.xm-button:hover { background: var(--xm-accent-hover); color: #fff; text-decoration: none; }
.xm-button:active { transform: scale(.98); }
.xm-button-small { height: 34px; padding: 0 16px; font-size: 14px; }

.xm-link-arrow { font-size: 17px; font-weight: 500; }
.xm-link-arrow::after, .xm-tile-more::after { content: " ›"; font-size: 1.15em; }

.xm-menu-toggle {
    display: none;
    position: relative;
    width: 36px;
    height: 36px;
    border: 0;
    background: none;
    cursor: pointer;
}
.xm-menu-toggle span {
    position: absolute;
    left: 9px;
    right: 9px;
    height: 1.5px;
    background: var(--xm-ink);
    transition: transform .25s ease, top .25s ease;
}
.xm-menu-toggle span:first-child { top: 14px; }
.xm-menu-toggle span:last-child { top: 21px; }
.nav-open .xm-menu-toggle span:first-child { top: 17.5px; transform: rotate(45deg); }
.nav-open .xm-menu-toggle span:last-child { top: 17.5px; transform: rotate(-45deg); }

/* ---------- Forside ---------- */
.xm-hero {
    position: relative;
    overflow: hidden;
    padding: 110px 24px 96px;
    text-align: center;
    background:
        radial-gradient(60% 70% at 15% 10%, rgba(120, 200, 205, .35) 0%, rgba(120, 200, 205, 0) 70%),
        radial-gradient(55% 60% at 90% 30%, rgba(186, 196, 255, .35) 0%, rgba(186, 196, 255, 0) 70%),
        linear-gradient(180deg, #f7fafb 0%, #ffffff 100%);
}
.xm-hero-inner { max-width: 880px; margin: 0 auto; }
.xm-eyebrow {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--xm-accent);
}
.xm-hero h1 {
    margin: 0;
    font-size: clamp(40px, 6.4vw, 76px);
    line-height: 1.04;
    font-weight: 700;
    letter-spacing: -.035em;
}
.xm-lead {
    max-width: 680px;
    margin: 24px auto 0;
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.45;
    color: var(--xm-ink-soft);
}
.xm-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px; margin-top: 40px; }

.xm-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: var(--xm-width);
    margin: 0 auto;
    padding: 8px 24px 32px;
}
.xm-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 230px;
    padding: 32px;
    border-radius: var(--xm-radius);
    background: var(--xm-surface);
    color: var(--xm-ink);
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.xm-tile:hover { transform: translateY(-4px); background: #fff; box-shadow: var(--xm-shadow-hover); text-decoration: none; color: var(--xm-ink); }
.xm-tile-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.xm-tile-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: var(--xm-ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.xm-tile-more { font-size: 15px; font-weight: 600; color: var(--xm-accent); }

/* forsidens indhold - h1 vises i hero'en */
.is-home .PrintBox { display: none; }
.is-home .xm-main { padding-top: 48px; }

/* ---------- Undersider ---------- */
.xm-pagehead { max-width: var(--xm-width); margin: 0 auto; padding: 28px 24px 0; }
.xm-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--xm-ink-muted); }
.xm-breadcrumb a { color: var(--xm-ink-muted); }
.xm-breadcrumb a:hover { color: var(--xm-ink); }

.xm-main { padding: 12px 24px 96px; }
.xm-content { max-width: var(--xm-width); margin: 0 auto; }

/* typografi i indholdet */
.xm-content > article, .xm-content > form, .xm-content > div:not(.Addins):not(.Products):not(.References) {
    max-width: var(--xm-width);
}
.xm-content p, .xm-content ul, .xm-content ol, .xm-content table:not(.Form), .xm-content h2, .xm-content h3, .xm-content h4 {
    max-width: var(--xm-text-width);
}
.xm-content .PrintBox h1, .xm-content > form > h1 {
    max-width: 900px;
    margin: 18px 0 40px;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.03em;
}
.xm-content h2 { margin: 2em 0 .5em; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.xm-content h3 { margin: 1.8em 0 .4em; font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.xm-content h4 { margin: 1.5em 0 .3em; font-size: 17px; font-weight: 600; }
.xm-content p { margin: 0 0 1.1em; color: #2b3036; }
.xm-content ul { padding-left: 1.2em; }
.xm-content li { margin: .35em 0; }
.xm-content li::marker { color: var(--xm-accent); }
.xm-content hr { border: 0; border-top: 1px solid var(--xm-line); margin: 24px 0; }
.xm-content > article > br, .xm-content br + br { display: none; }
.xm-content table { border-collapse: collapse; }
.xm-content td { padding: 6px 16px 6px 0; vertical-align: top; }
.xm-content .object-center { text-align: center; margin: 0 0 24px; }
.xm-content .object-left { float: left; margin: 0 24px 16px 0; }
.xm-content .video-container { position: relative; max-width: var(--xm-text-width); aspect-ratio: 16 / 9; margin: 32px 0; border-radius: var(--xm-radius); overflow: hidden; box-shadow: var(--xm-shadow); }
.xm-content .video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Twitter-knapper og Trustpilot fra det gamle site virker ikke længere */
.xm-content aside, .xm-content .twitter-share-button, .xm-content .trustpilot-widget { display: none; }

/* forsidetekst */
#Frontpage { max-width: var(--xm-text-width); margin: 0 auto; }
#Frontpage .FrontText > p:first-child { font-size: 21px; line-height: 1.5; color: var(--xm-ink); }

/* ---------- Oversigter med kort (Journal, Moduler, Udvidelser, Tjenester) ---------- */
.Addins, .Products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.Addin, .Product {
    position: relative;
    display: flex;
    gap: 20px;
    padding: 28px;
    border-radius: var(--xm-radius);
    background: var(--xm-surface);
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.Addin:hover, .Product:hover { transform: translateY(-3px); background: #fff; box-shadow: var(--xm-shadow-hover); }
.Addin .Image, .Product .Image { flex-shrink: 0; }
.Addin .Image img, .Product .Image img {
    width: 56px;
    height: 56px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 32, .06);
    object-fit: contain;
}
.Addin .Text, .Product .Text { min-width: 0; }
.Addin .Text h2, .Product .Text h2 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.Addin .Text h2 a, .Product .Text h2 a { color: var(--xm-ink); }
/* hele kortet er klikbart */
.Addin .Text h2 a::after, .Product .Text h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--xm-radius); }
.Addin .Text a, .Addin .Text a:hover { color: inherit; text-decoration: none; }
.Addin .Text p, .Product .Text p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--xm-ink-soft); }
.Product .Text p p { margin: 0; }

/* ---------- Modul-/produktside med infoboks ---------- */
.AddinMain + footer, [itemtype="http://schema.org/Product"] > footer { margin-top: 8px; }
[itemtype="http://schema.org/Product"]:has(.AddinInfo) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: start;
}
.AddinInfo {
    position: sticky;
    top: calc(var(--xm-header-height) + 24px);
    padding: 28px;
    border-radius: var(--xm-radius);
    background: var(--xm-surface);
}
.AddinInfo img { display: block; width: 64px; height: 64px; padding: 10px; margin-bottom: 16px; border-radius: 16px; background: #fff; }
.AddinInfo h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--xm-ink-muted); }
.AddinInfo hr { display: none; }
.AddinInfo table { width: 100%; font-size: 15px; }
.AddinInfo td { padding: 10px 0; border-bottom: 1px solid var(--xm-line); }
.AddinInfo tr:last-child td { border-bottom: 0; }
.AddinInfo td:first-child { color: var(--xm-ink-muted); padding-right: 12px; white-space: nowrap; }
.AddinInfo [itemprop="price"] { font-size: 24px; font-weight: 700; color: var(--xm-ink); }

/* ---------- Nyheder ---------- */
.News > article { max-width: var(--xm-text-width); }
.News > article > .News {
    padding: 26px 0;
    border-bottom: 1px solid var(--xm-line);
}
.News header h3 { margin: 0; font-size: 21px; }
.News header h3 a { color: var(--xm-ink); }
.News header h3 a:hover { color: var(--xm-accent); }
.Date {
    display: inline-block;
    margin: 8px 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--xm-ink-muted);
}
.Teaser p { margin: 0 0 .5em; color: var(--xm-ink-soft); font-size: 16px; }

/* ---------- Referencer ---------- */
.References {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.References .Delimiter { display: none; }
.Reference {
    padding: 24px;
    border-radius: var(--xm-radius);
    background: var(--xm-surface);
    font-size: 14px;
    line-height: 1.55;
    color: var(--xm-ink-soft);
    overflow-wrap: anywhere;
}
.Reference .Image:empty { display: none; }
.Reference h3 { margin: 0 0 8px; font-size: 17px; }
.Reference h3 a { color: var(--xm-ink); }

/* ---------- Medarbejdere ---------- */
.Employees:has(.Employee) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.Employee { padding: 0; }
.EmployeeImage img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--xm-radius); }
.EmployeeInfo { padding-top: 12px; font-size: 15px; color: var(--xm-ink-soft); }
.EmployeeInfo h3 { margin: 0 0 4px; font-size: 18px; color: var(--xm-ink); }

/* ---------- Formularer og søgning ---------- */
.xm-content input[type="text"], .xm-content input[type="email"], .xm-content textarea, .xm-content select, .xm-content input.box {
    width: 100%;
    max-width: 420px;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--xm-line);
    border-radius: var(--xm-radius-small);
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--xm-ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.xm-content textarea { height: auto; min-height: 140px; padding: 12px 16px; }
.xm-content input:focus, .xm-content textarea:focus { outline: none; border-color: var(--xm-accent); box-shadow: 0 0 0 4px var(--xm-accent-soft); }
.xm-content input[type="submit"], .xm-content .Submit {
    height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--xm-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.xm-content input[type="submit"]:hover { background: var(--xm-accent-hover); }
table.Form { width: 100%; max-width: 900px; border-spacing: 0 8px; border-collapse: separate; }
table.Form td.Title { width: 1%; padding-top: 12px; white-space: nowrap; font-size: 15px; color: var(--xm-ink-soft); }

.SearchResult { padding: 14px 0; border-bottom: 1px solid var(--xm-line); font-size: 18px; color: var(--xm-ink-muted); }
.SearchResult + br { display: none; }
.xm-content > form > div:first-of-type { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.xm-footer { background: var(--xm-surface); font-size: 14px; color: var(--xm-ink-soft); }
.xm-footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: var(--xm-width);
    margin: 0 auto;
    padding: 64px 24px 40px;
}
.xm-footer-brand img { width: 160px; height: auto; margin-bottom: 18px; }
.xm-footer-brand p { margin: 0 0 12px; line-height: 1.6; }
.xm-footer h2 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--xm-ink); }
.xm-footer ul { margin: 0; padding: 0; list-style: none; }
.xm-footer li { margin: 0 0 9px; }
.xm-footer a { color: var(--xm-ink-soft); }
.xm-footer a:hover { color: var(--xm-ink); }
.xm-footer-bottom {
    max-width: var(--xm-width);
    margin: 0 auto;
    padding: 20px 24px 32px;
    border-top: 1px solid var(--xm-line);
    font-size: 12px;
    color: var(--xm-ink-muted);
}

/* ---------- Mobil ---------- */
@media (max-width: 1240px) {
    .xm-header-actions .xm-button-small { display: none; }
}

@media (max-width: 1060px) {
    .xm-menu-toggle { display: block; }
    .xm-search, .xm-header-actions .xm-button-small { display: none; }
    .xm-header-actions { margin-left: auto; }
    .xm-nav {
        position: fixed;
        top: var(--xm-header-height);
        left: 0;
        right: 0;
        bottom: 0;
        display: block;
        padding: 16px 28px 40px;
        background: rgba(255, 255, 255, .97);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
    }
    .nav-open .xm-nav { opacity: 1; visibility: visible; transform: none; }
    .nav-open { overflow: hidden; }
    .xm-nav ul { display: block; }
    .xm-nav a { padding: 12px 0; border-radius: 0; font-size: 26px; font-weight: 600; color: var(--xm-ink); background: none !important; }
    .xm-nav-service { display: block !important; margin-top: 24px !important; padding-top: 16px !important; border-top: 1px solid var(--xm-line) !important; }
    .xm-nav-service a { font-size: 17px; font-weight: 500; color: var(--xm-ink-soft); }

    .xm-tiles { grid-template-columns: repeat(2, 1fr); }
    [itemtype="http://schema.org/Product"]:has(.AddinInfo) { grid-template-columns: 1fr; gap: 32px; }
    .AddinInfo { position: static; }
    .xm-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .xm-header-inner { padding: 0 16px; }
    .xm-logo img { width: 150px; }
    .xm-hero { padding: 72px 20px 64px; }
    .xm-tiles { grid-template-columns: 1fr; padding: 0 16px 24px; }
    .xm-tile { min-height: 0; padding: 26px; }
    .xm-main { padding: 8px 16px 72px; }
    .xm-pagehead { padding: 20px 16px 0; }
    .Addins, .Products { grid-template-columns: 1fr; }
    .Addin, .Product { padding: 22px; }
    table.Form, table.Form tbody, table.Form tr, table.Form td { display: block; width: 100%; }
    table.Form td.Title { padding: 8px 0 2px; }
    .xm-footer-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
