/*
    Template 5 – "Moderne": visual. A slim white menu bar at the top; on the start page the banner fills the full width
    with the association's name on top of it (on a dark fade, so the text is readable on any photo); without a banner,
    a block in --primary instead. (Cards come from the content style "Kort", app.css; this template looks best with it.)
    Inner pages: a narrow coloured band with the page title instead of the big banner.
    Page frame: TopMenuFrame.razor. System fonts (from app.css).
*/

/* Sticky footer, and no sideways scrolling from the full-width bands (100vw includes the scrollbar). */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

h1, h2, h3 {
    font-weight: 650;
}

/* ---------- Header: slim and white, menu on the right ---------- */

.site-header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1; /* the shadow lies over the coloured band below */
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #222;
    text-decoration: none;
}

.brand-logo {
    height: 36px;
    width: auto;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 650;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem;
}

.site-nav a {
    color: #333;
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: var(--primary);
}

/* ---------- Main ---------- */

.site-main {
    flex: 1;
    padding-top: 0; /* the hero / title band starts right under the header */
    padding-bottom: 2.5rem;
}

/* Start page: full width (wider than the content column, like template 4's banner band). */
.start-hero {
    position: relative;
    margin: 0 calc(50% - 50vw) 2rem;
    background: var(--primary);
}

.start-hero h1 {
    margin: 0;
    padding: 3.5rem calc(50vw - 50% + 1rem) 3rem; /* text lines up with the content column */
    color: #fff;
    font-size: 2.4rem;
}

.start-hero .banner-band {
    margin: 0;
}

.start-hero .site-banner {
    width: 100%;
    max-height: 70vh;
    margin: 0;
    border-radius: 0;
}

/* With a banner: the name on top of the picture, at the bottom, on a dark fade. */
.start-hero.has-banner h1 {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 5rem max(1rem, calc(50vw - 480px + 1rem)) 1.5rem;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.65));
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Inner pages: the page title in a narrow coloured band from edge to edge. (On the start page the h1 is inside
   .start-hero, so it isn't the first child of main.) */
.site-main > h1:first-child {
    margin: 0 calc(50% - 50vw) 1.5rem;
    padding: 1.25rem calc(50vw - 50% + 1rem);
    color: #fff;
    background: var(--primary);
    font-size: 1.8rem;
}

/* ---------- Footer ---------- */

.site-footer {
    background: #222;
    color: #ddd;
    font-size: 0.9rem;
}

.site-footer a {
    color: #fff;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* ---------- Phone width ---------- */

@media (max-width: 600px) {
    .start-hero h1 {
        padding-top: 2rem;
        padding-bottom: 1.75rem;
        font-size: 1.7rem;
    }

    /* The banner is too low on a phone to hold the name: it goes under the picture, on the template's coloured block. */
    .start-hero.has-banner h1 {
        position: static;
        padding: 0.75rem 1rem;
        font-size: 1.3rem;
        background: none;
        text-shadow: none;
    }

    .site-main > h1:first-child {
        font-size: 1.4rem;
    }
}
