/*
    Shared by all templates: base styles, page content (lists, cards), forms and signup.
    The page frame (header, menu, footer, sidebar) lives in templates/template-N.css.
    Association colours come from MainLayout as --primary and --secondary.
    Never put an association-specific value in this file.
*/

/* ---------- Base ---------- */

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

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #222;
    background: #f7f7f7;
    overflow-wrap: anywhere; /* a long e-mail address or word wraps instead of making the whole page wider */
}

h1, h2, h3 {
    line-height: 1.25;
    color: var(--primary);
}

h1:focus {
    outline: none;
}

a {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------- Menu drop-downs (SiteNav) ---------- */

/* A top-level menu link with children under it. The children open below it on hover and on keyboard focus
   (:focus-within), with no JavaScript. Each template sets --nav-sub-background to its own menu background, so the
   template's link colours work in the drop-down and in the phone menu too. */
.site-nav-group {
    position: relative;
    display: flex;
}

.site-nav-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 12rem;
    flex-direction: column;
    padding: 0.25rem 0;
    background: var(--nav-sub-background, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.site-nav-group:hover > .site-nav-sub,
.site-nav-group:focus-within > .site-nav-sub {
    display: flex;
}

/* In the side menu and the phone menu there is nothing to hover over: the children are always shown, indented under
   their parent. */
.site-sidebar .site-nav-group,
.site-nav-phone .site-nav-group {
    flex-direction: column;
}

.site-sidebar .site-nav-sub,
.site-nav-phone .site-nav-sub {
    display: flex;
    position: static;
    min-width: 0;
    padding: 0 0 0 1rem;
    background: none;
    box-shadow: none;
}

/* ---------- Phone menu (SiteNav) ---------- */

/* On phones and touch screens the menu folds away behind a "Menu" button. <details> opens and closes without
   JavaScript. The panel lies over the page from the edge of the header, so the page doesn't jump when it opens.
   Two-class selectors, because each template's own .site-nav rules are loaded after this file and would win. */
.site-menu {
    display: none;
}

.site-menu summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: fit-content;
    min-height: 44px; /* big enough to hit with a finger */
    padding: 0 0.75rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.site-menu summary::-webkit-details-marker {
    display: none;
}

/* Three lines, which become a cross when the menu is open. */
.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.site-menu-icon {
    position: relative;
}

.site-menu-icon::before,
.site-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.site-menu-icon::before {
    top: -6px;
}

.site-menu-icon::after {
    top: 6px;
}

.site-menu[open] .site-menu-icon {
    background: transparent;
}

.site-menu[open] .site-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.site-menu[open] .site-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* The panel is placed relative to whichever part of the page frame holds the menu. */
.site-header,
.menu-bar,
.site-sidebar {
    position: relative;
}

.site-nav.site-nav-phone {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    padding: 0.5rem 1rem 0.75rem;
    background: var(--nav-sub-background, #fff);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.site-nav.site-nav-phone a {
    display: block;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    border-radius: 4px;
}

@media (max-width: 800px), (hover: none) {
    .site-nav:not(.site-nav-phone) {
        display: none;
    }

    .site-menu {
        display: block;
        flex-shrink: 0;
    }

    /* The name on the left and the button on the right, in every template with both in the header. */
    .site .header-inner {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .brand-logo {
        flex-shrink: 0;
    }
}

/* ---------- Content ---------- */

/* Keeps the line breaks people typed, without allowing HTML. */
.plain-text {
    white-space: pre-line;
}

.item-list,
.card-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #ddd;
}

.item-title {
    margin: 0;
    font-size: 1.1rem;
}

.item p {
    margin: 0.25rem 0 0;
}

.item-meta {
    color: #4a4a4a; /* Phase 83: darker than the old #666, for older readers */
    font-size: 0.9rem; /* at least 14 px */
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 1rem;
    background: #fff;
    border-top: 4px solid var(--secondary);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.contact-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
}

.contact-details dt {
    font-weight: 600;
}

.contact-details dd {
    margin: 0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
}

.footer-text {
    margin: 0;
    max-width: 28rem;
}

/* "Administreret af …" (AdministratorDetails): one line in the footer, a small section on /kontakt. */
.footer-administrator {
    margin: 0;
    max-width: 28rem;
    font-size: 0.9em;
}

.administrator-details {
    margin-top: 1.5rem;
}

.administrator-logo {
    display: block;
    max-width: 10rem;
    max-height: 4rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    /* The start page on a phone: a smaller welcome heading. */
    .start-hero h1 {
        font-size: 1.5rem;
    }
}

/* ---------- Content styles (Association.WebsiteContentStyle, a class on .site from MainLayout) ---------- */
/* The same markup in every style: sections are "panel" (title + body), lists are "item-list" with "item" rows, the
   board are "card"s. Each style only changes how those look, so it works with every template. The templates set
   colours and fonts on top. */

.panel {
    margin-bottom: 1.5rem;
}

.panel-title {
    margin-top: 0;
}

/* -- "Enkel" (content-plain): no boxes; a coloured line under each section title, lines between items. -- */

.content-plain .panel-title {
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--secondary);
}

.content-plain .card {
    padding: 0.25rem 0 0.25rem 1rem;
    background: none;
    border-top: none;
    border-left: 3px solid var(--secondary);
    border-radius: 0;
    box-shadow: none;
}

/* -- "Rammer" (content-framed): white panels with a thin border and a light grey title strip. -- */

.content-framed .panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.content-framed .panel-title {
    margin: 0;
    padding: 0.6rem 1rem;
    font-size: 1.25rem;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.content-framed .panel-body {
    padding: 0.25rem 1rem 1rem;
}

.content-framed .panel-body > p:last-child {
    margin-bottom: 0;
}

/* Lists outside a panel (Nyheder, Kalender, Dokumenter) get one white frame around all their items. */
.content-framed .item-list {
    padding: 0 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.content-framed .panel .item-list {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.content-framed .item-list > .item:last-child {
    border-bottom: none;
}

.content-framed .card {
    border: 1px solid #ddd;
    border-top: 4px solid var(--secondary);
    box-shadow: none;
}

.content-framed .signup {
    border: 1px solid #ddd;
    border-left: 4px solid var(--secondary);
}

/* -- "Kort" (content-cards): news, events and documents as cards in a grid, the news picture on top of its card. -- */

.content-cards .news-list,
.content-cards .event-list,
.content-cards .document-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.content-cards .news-list > .item,
.content-cards .event-list > .item,
.content-cards .document-list > .item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #fff;
    border: none;
    border-top: 4px solid var(--secondary);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* The news picture across the top of its card, where the coloured top border would otherwise be. */
.content-cards .news-list .news-thumbnail {
    order: -1;
    float: none;
    width: calc(100% + 2rem);
    height: 9rem;
    margin: -1rem -1rem 0.75rem;
    border-radius: 0;
}

.content-cards .news-list > .item:has(.news-thumbnail) {
    border-top: none;
}

.content-cards .news-list > .item::after,
.content-cards .event-list > .item::after,
.content-cards .document-list > .item::after {
    display: none;
}

/* Contact details and signup forms are one card each. */
.content-cards .page-block-contact,
.content-cards .signup {
    padding: 1rem 1.25rem;
    background: #fff;
    border: none;
    border-top: 4px solid var(--secondary);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.content-cards .page-block-contact .panel-body > :last-child {
    margin-bottom: 0;
}

/* ---------- Contact page: details on the left, the form on the right (when the board has switched it on) ---------- */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-layout .signup {
    margin-top: 0;
}

@media (max-width: 700px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ---------- Forms ---------- */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* ---------- Event signup ---------- */

.signup {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-left: 4px solid var(--secondary);
    border-radius: 4px;
}

.signup h2 {
    margin-top: 0;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 24rem;
}

.signup-form input {
    font: inherit;
    padding: 0.5rem;
    border: 1px solid #bbb;
    border-radius: 4px;
}

/* "Hvem skal have din besked?" on /kontakt (Bestyrelsen or Administrator): two radio buttons, each on its own line. */
.recipient-choice {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    border: none;
}

.recipient-choice legend {
    padding: 0;
    margin-bottom: 0.2rem;
}

.recipient-choice label {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.signup-form .recipient-choice input {
    padding: 0;
}

/* The administrator's common questions on /kontakt: <details> boxes that open on a click, no script. */
.administrator-questions details {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.administrator-questions summary {
    cursor: pointer;
    font-weight: 600;
}

.administrator-questions details p {
    margin: 0.5rem 0 0;
}

button {
    font: inherit;
    align-self: flex-start;
    padding: 0.5rem 1.25rem;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.15);
}

/* The quieter of two answers ("Jeg kommer ikke" on the invitation page): outlined instead of filled. */
button.secondary {
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
}

.notice {
    padding: 0.75rem 1rem;
    background: #eef7ee;
    border-left: 4px solid #2e7d32;
}

/* The honeypot field: moved off screen so people never see it, but robots still fill it in. */
.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Error page (no association, no template) ---------- */

.plain-page {
    padding-top: 3rem;
    --primary: #2c3e50;
}

.error-notice {
    padding: 0.75rem 1rem;
    background: #fdecec;
    border-left: 4px solid #b32121;
}

/* ---------- Privacy page and footer link ---------- */

.privacy {
    max-width: 46rem;
}

.privacy li {
    margin-bottom: 0.4rem;
}

.footer-privacy {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ---------- Om foreningen ---------- */

.about {
    max-width: 46rem;
}

/* ---------- Own pages (OwnPage.razor) ---------- */
/* The blocks stack in one column; the template decides the look through the variables and its own CSS.
   Only the tags the text editor can make need styles (see RichTextSanitizer in the admin app). */

.own-page {
    max-width: 46rem;
}

/* "Bestyrelsen" block (Phase 74): one member per line, name first, then role and how to reach them. */
.board-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.board-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.6rem;
}

/* A page with a side column (Page.Layout) uses the whole content width: the main content ⅔ and the column ⅓, like the
   start page's right-hand column (≈ a two-cell table with fixed widths). On a phone the column comes after the main
   content. */
.own-page-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
    max-width: none;
}

.page-main,
.page-side {
    min-width: 0; /* lets a long word or a wide picture shrink instead of widening the column */
}

/* The first block in each column starts at the top, so the two columns line up. */
.page-main > .page-block:first-child > .block-heading:first-child,
.page-main > .page-block-text:first-child > h2:first-child,
.page-side > .page-block:first-child > .block-heading:first-child,
.page-side > .page-block-text:first-child > h2:first-child {
    margin-top: 0;
}

@media (max-width: 600px) {
    .own-page-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* A block's own heading (PageBlock.Title) above a text or an image: like the text's own h2. */
.page-block .block-heading {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.35rem;
}

.page-block {
    margin-bottom: 1.5rem;
}

.page-block-text h2,
.rich-text h2 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.35rem;
}

.page-block-text h3,
.rich-text h3 {
    margin: 1.25rem 0 0.4rem;
    font-size: 1.15rem;
}

.page-block-text ul,
.page-block-text ol,
.rich-text ul,
.rich-text ol {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
}

.page-block-text li,
.rich-text li {
    margin-bottom: 0.25rem;
}

.page-block-text blockquote,
.rich-text blockquote {
    margin: 1rem 0;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 4px solid var(--secondary);
    color: #444;
}

.page-block-text a,
.rich-text a {
    color: var(--primary);
}

/* A text block's image (Phase 79, TextBlock.razor): full width over or under the text, or floating right or left with
   the text around it. flow-root keeps a floating image inside its block (the next block starts below it). On a phone
   a floating image would leave a strip of a few words beside it, so it goes above the text in full width. */
.page-block-text {
    display: flow-root;
}

.text-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.text-image-above {
    margin: 0.5rem 0 1rem;
}

.text-image-below {
    margin: 1rem 0 0.5rem;
}

.text-image-right,
.text-image-left {
    max-width: 40%;
    margin-top: 0.4rem;
}

.text-image-right {
    float: right;
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.text-image-left {
    float: left;
    margin-right: 1.25rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
    .text-image-right,
    .text-image-left {
        float: none;
        max-width: 100%;
        margin: 0.5rem 0 1rem;
    }
}

/*
  "Fremhævet" (PageBlock.Style): the block in a box tinted with the association's second colour, the same in every
  template. The tint is only 10% of the colour on white, so it stays light whatever the colour is: dark text on it is
  always readable, and the main colour's headings keep a contrast of at least 3:1 (enough for large text) when the
  main colour passes the check in Udseende. Links in the box are dark and underlined, because normal-size text in the
  main colour may drop below 4.5:1 on the tint. (Checked by HighlightedBlockTests; change both together.)
*/
.block-highlighted {
    margin-bottom: 1.5rem;
    padding: 0.25rem 1.25rem 0.1rem;
    color: #222;
    background: #f2f2f2; /* browsers without color-mix() */
    background: color-mix(in srgb, var(--secondary) 10%, #fff);
    border-left: 4px solid var(--secondary);
    border-radius: 4px;
}

/* A block that shows nothing (e.g. a documents block without public documents) leaves no empty box. */
.block-highlighted:not(:has(*)) {
    display: none;
}

.block-highlighted > .page-block {
    margin-bottom: 1rem;
}

.own-page .block-highlighted a { /* stronger than the blocks' own link rules (.file-list a …) */
    color: #222;
    text-decoration: underline;
}

/* "Fremhævet" with "Rammer" or "Kort": the tinted box IS the block's frame. Without this the block's own white panel
   (or card) sat inside the tinted box, a box in a box. The panel's title strip becomes a line under the heading. */
.content-framed .block-highlighted,
.content-cards .block-highlighted {
    padding: 0.25rem 1rem 0.5rem;
    border: 1px solid color-mix(in srgb, var(--secondary) 35%, #fff);
    border-left: 4px solid var(--secondary);
}

.content-framed .block-highlighted .panel,
.content-framed .block-highlighted .item-list,
.content-framed .block-highlighted .signup,
.content-cards .block-highlighted .page-block-contact,
.content-cards .block-highlighted .signup {
    margin-bottom: 0.5rem;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.content-framed .block-highlighted .panel-title {
    padding: 0.6rem 0 0.4rem;
    background: none;
    border-bottom: 1px solid color-mix(in srgb, var(--secondary) 35%, #fff);
    border-radius: 0;
}

.content-framed .block-highlighted .panel-body {
    padding: 0.25rem 0 0.25rem;
}

.content-framed .block-highlighted .card {
    background: #fff;
}

/* Image block: as wide as the column, never wider than the image. */
.page-block-image {
    margin: 0 0 1.5rem;
}

.page-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.page-block-image figcaption {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #4a4a4a;
}

/* Gallery block: small photos in a grid (2 columns on phones, 3–4 on wider screens), each a link to the large one. */
.page-block-gallery h2 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.35rem;
}

.gallery-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 40rem) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    }
}

.gallery-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.gallery-grid a:focus-visible img {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.gallery-caption {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #4a4a4a;
}

/* News, events, documents and contact blocks: a heading like the text blocks' h2, then the usual list. */
.page-block-list h2,
.page-block-contact h2,
.page-block-files h2 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.35rem;
}

/* "Filer og links" (FilesAndLinksBlock): one line per file or link, a small coloured label for the kind of file
   (text, not an icon font: the website loads nothing but its own CSS), and small headings between groups. */
.file-group {
    margin: 1rem 0 0.35rem;
    font-size: 1.05rem;
}

.file-group:first-child {
    margin-top: 0;
}

.file-list {
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.file-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.file-list li:last-child {
    border-bottom: none;
}

.file-list a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
}

.file-list .item-meta {
    display: block;
    margin: 0.1rem 0 0;
    padding-left: 3.6rem; /* under the text, past the label */
}

.file-kind {
    flex: none;
    min-width: 3.1rem;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
    color: #fff;
    background: #5a6470; /* "Fil", "Tekst" */
}

/* Colours as the programs people know; dark enough for white text (contrast at least 4.5:1). */
.file-kind-pdf { background: #b3261e; }
.file-kind-word { background: #1d4f91; }
.file-kind-excel { background: #1b6b3a; }
.file-kind-billede { background: #6b4aa0; }
.file-kind-link { background: var(--primary); }

/* A documents block grouped by year: the year as a small label with a line over it, in the plain text font (a serif
   heading font such as Georgia draws "2023" with old-style figures that look small and uneven). */
.document-year {
    margin: 1.1rem 0 0.1rem;
    padding-top: 0.6rem;
    border-top: 2px solid rgba(0, 0, 0, 0.12);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: lining-nums;
}

.document-year:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Text for screen readers only, e.g. "(åbner et andet websted i et nyt vindue)" after an external link. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Calendar: past events ---------- */

.past-events-heading {
    margin-top: 2.5rem;
}

/* ---------- News images ---------- */

.news-image {
    display: block;
    width: 100%;
    max-width: 46rem;
    height: auto;
    margin: 0.75rem 0 1rem;
    border-radius: 4px;
}

/* Small image in news lists, floated to the right of the text. */
.news-thumbnail {
    float: right;
    width: 7.5rem;
    height: 5rem;
    margin: 0.25rem 0 0.5rem 0.75rem;
    object-fit: cover; /* crops instead of squashing */
    border-radius: 4px;
}

/* The same in an own page's narrow side column, at every width. No "display" here: "Kompakt" (template 6) hides the
   pictures, and this more specific rule must not show them again. */
.page-side .news-thumbnail {
    float: none;
    width: 100%;
    height: 9rem;
    margin: 0.25rem 0 0.5rem;
}

/* On a phone there is no room for text beside the picture (long words would split): it goes on top, across the item. */
@media (max-width: 600px) {
    .news-thumbnail {
        display: block;
        float: none;
        width: 100%;
        height: 9rem;
        margin: 0.25rem 0 0.5rem;
    }
}

.item::after {
    content: "";
    display: block;
    clear: both;
}

/* "← Nyere  Side 2  Ældre →" under long lists (Pager.razor). Shared by all three templates. */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
}

.pager a {
    color: var(--primary);
    font-weight: 600;
}

/* One category on /dokumenter. */
.document-group + .document-group {
    margin-top: 1.5rem;
}

/* "Fuldt booket" next to an event title in lists. */
.full-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: middle;
    color: #fff;
    background: var(--primary);
    border-radius: 999px;
}

/* The start page banner (3:1). Shared by all three templates: full width of the content area, rounded corners. */
.site-banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    margin: 0 0 1.5rem;
    border-radius: 6px;
}

/* "Forhåndsvis" from Udseende (Phase 83): a plain bar above the page, the same in every template, so the board member
   never mistakes the preview for the saved website. */
.preview-bar {
    margin: 0;
    padding: 0.6rem 1rem;
    background: #fff4d6;
    border-bottom: 2px solid #c98a00;
    color: #4a3500;
    font-size: 1rem;
    text-align: center;
}

.preview-bar a {
    color: inherit;
    font-weight: 700;
}

/* Phase 83: the small lines under titles (dates, places, sizes) a little larger on phones, where they were hard to read. */
@media (max-width: 600px) {
    .item-meta,
    .gallery-caption,
    .page-block-image figcaption {
        font-size: 0.95rem;
    }
}

/* The documents list: the file type as a coloured label before the title, as in "Filer og links" (Phase 83). */
.document-list .item-title a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
}

.document-list .file-kind {
    position: relative;
    top: -0.1rem;
}

/* Search on /dokumenter when there are many: a plain GET form, no script. */
.document-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.document-search input[type="search"] {
    flex: 1 1 14rem;
    padding: 0.5rem 0.6rem;
    font: inherit;
    border: 1px solid #999;
    border-radius: 4px;
}

/* Document titles in a list (17 November 2026): one step calmer than a heading, so a long title in the narrow side
   column doesn't fill three heavy lines. The underline is thin and shows fully under the mouse; the coloured file
   label still says "this is a file". */
.document-list .item-title,
.file-list .file-text {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.page-side .document-list .item-title,
.page-side .file-list .file-text {
    font-size: 1rem;
}

.document-list .item-title a,
.file-list a {
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: rgba(0, 0, 0, 0.25);
}

.document-list .item-title a:hover,
.document-list .item-title a:focus-visible,
.file-list a:hover,
.file-list a:focus-visible {
    text-decoration-color: currentColor;
}

/* The date and size under a document's title, in line with the title (past the file label). */
.document-list .item-meta {
    margin: 0.15rem 0 0;
    padding-left: 3.6rem;
}

/* An empty "Seneste nyheder" or "Kommende arrangementer" block (17 November 2026): kept, so the page keeps its shape,
   but quiet: one muted line and, for news, a way to be told when there is some. */
.page-block-empty .panel-body p {
    margin: 0 0 0.35rem;
}

.page-block-empty .panel-body p:last-child {
    margin-bottom: 0;
}

.empty-note {
    color: #4a4a4a;
}
