/* Overrides on top of theme.css (build output of the Bolt 3 SCSS, sources not in this repo). */

/* --- Header ---------------------------------------------------------------------------- */

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

/* Hero photo as <img> (see partials/_header.twig), laid out like the former background-size: cover. */
.hero-image {
    position: relative;
}
.hero-image > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    filter: none;
}

/* LeerGut logo below the homepage hero. */
div.svg-title {
    position: absolute;
    bottom: -4.8rem;
    width: 23rem;
    height: 10rem;
    background: url('../media/LeerGut_RGB_MarkeRot.svg') no-repeat;
    background-size: contain;
}
@media screen and (min-width: 769px) {
    div.svg-title {
        bottom: -3.8rem;
        width: 29rem;
    }
}
@media screen and (min-width: 1216px) {
    div.svg-title {
        bottom: -3.2rem;
        width: 49rem;
        height: 13rem;
    }
}

/* --- Responsive ----------------------------------------------------------------------- */

/* Long URLs and e-mail addresses in editor content must not widen the page on phones. */
.content,
.timeline-content,
.card-content {
    overflow-wrap: anywhere;
}

/* Flex children may shrink below their content width (otherwise a long word still overflows). */
.columns > .column,
.timeline .timeline-item,
.media-content {
    min-width: 0;
}

/* Buttons with long labels wrap instead of running off the screen. */
a.button {
    white-space: normal;
    height: auto;
    text-align: center;
}

/* Editor content: images and embedded media never wider than their column. */
.content img,
.content iframe,
.content video {
    max-width: 100%;
    height: auto;
}

/* Tables in editor content scroll inside themselves instead of widening the page. */
.content table {
    display: block;
    overflow-x: auto;
}

@media screen and (max-width: 768px) {
    /* The LeerGut logo below the homepage hero is 23rem wide: keep it inside the viewport. */
    div.svg-title {
        width: calc(100vw - 2.5rem);
        max-width: 23rem;
    }

    /* The timeline indent costs too much width on phones. */
    .timeline .timeline-item {
        margin-left: 0.5em;
    }
    .timeline .timeline-item .timeline-content {
        padding-left: 1.25em;
    }

    /* Agent cards: the fixed minimum height leaves big gaps on phones. */
    .card {
        min-height: 0;
    }

    /* Open mobile menu: tap-friendly items. */
    .navbar-menu.is-active .navbar-item {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* --- Page "Unterstützen" -------------------------------------------------------------- */

.donation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e1e4f4;
}

.sponsors-listing .card {
    min-height: 0;
}

.sponsor-logo {
    margin: 0 0 1rem;
}

.sponsor-logo img {
    max-height: 6rem;
    width: auto;
    filter: none;
}

/* --- Accessibility -------------------------------------------------------------------- */

/* #777 on white at 90% size is below the WCAG AA contrast ratio. */
p.meta {
    color: #5c5c5c;
}
