/* Rebrand footer (Controls/General/Footer.ascx + Navigation/FooterMenuOpened, CMS menu 13 / static area 1).
   Loaded by the footer itself; every rule is scoped to body.bw-home-premium (the rebrand pages), so the legacy pages
   keep the theme footer. Builds on the footer block of css/home-premium.css (light background).
   One type system: titles 23px / 700, every link, the system lines and the tagline 18px / 400, all in the navy ink of
   the site. Layout: the four columns (logo, articles, about, systems) in one grid, RTL, right-aligned, same top. */

body.bw-home-premium .footer-classic {
    direction: rtl;
    text-align: right;
}

body.bw-home-premium .footer-classic-main {
    padding: 72px 0 60px;
}

/* the bootstrap row -> grid: logo | articles | about | systems (first column on the right) */
body.bw-home-premium .footer-classic-main .row {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.65fr);
    align-items: start;
    gap: 40px 36px;
    margin: 0;
}

body.bw-home-premium .footer-classic-main .row > * {
    width: auto;
    max-width: none;
    min-width: 0;
    flex: none;
    margin: 0;
    padding: 0;
}

/* no accent lines under the column titles */
body.bw-home-premium .footer-classic-list::before {
    display: none;
}

/* logo + tagline: the logo box has the height of a title line, so the logo and the titles start on one line */
body.bw-home-premium .footer-classic .brand {
    display: flex;
    align-items: center;
    height: 31px;
    margin: 0;
}

body.bw-home-premium .footer-classic .brand img {
    display: block;
    width: auto;
    max-width: 159px;
    height: auto;
}

body.bw-home-premium .footer-classic-main .footer-classic-tagline,
body.bw-home-premium .footer-classic-main .footer-classic-tagline span {
    display: block;
    max-width: none;
    margin: 18px 0 0;
    color: var(--bw-ink);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
}

/* the span carries an inline max-width (250px) for the legacy footer; here the column decides the width */
body.bw-home-premium .footer-classic-main .footer-classic-tagline span {
    max-width: none !important;
    margin: 0;
}

/* column titles: one style for all */
body.bw-home-premium .footer-classic-main .footer-classic-title,
body.bw-home-premium .footer-classic-main .footer-classic-title a,
body.bw-home-premium .footer-classic-main .footer-classic-title a:visited {
    margin: 0 0 20px;
    color: var(--bw-ink);
    font-family: Assistant, sans-serif;
    font-size: 23px;
    font-weight: 700;
    line-height: 31px;
    letter-spacing: 0;
    text-decoration: none;
}

body.bw-home-premium .footer-classic-main .footer-classic-title a {
    margin: 0;
}

body.bw-home-premium .footer-classic-main .footer-classic-title a:hover,
body.bw-home-premium .footer-classic-main .footer-classic-title a:focus {
    color: var(--bw-blue);
}

/* links: one style for every column */
body.bw-home-premium .footer-classic-main .footer-classic-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.bw-home-premium .footer-classic-main .footer-classic-list li {
    display: block;
    margin: 0;
    padding: 0;
}

body.bw-home-premium .footer-classic-main .footer-classic-list li + li {
    margin-top: 10px;
}

body.bw-home-premium .footer-classic-main .footer-classic-list a,
body.bw-home-premium .footer-classic-main .footer-classic-list a:visited,
body.bw-home-premium .footer-classic-main .footer-classic-list a span,
body.bw-home-premium .footer-classic-main .footer-classic-list a bdi {
    color: var(--bw-ink);
    font-family: Assistant, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
}

body.bw-home-premium .footer-classic-main .footer-classic-list a {
    display: inline-block;
    transition: color .2s ease;
}

body.bw-home-premium .footer-classic-main .footer-classic-list a:hover,
body.bw-home-premium .footer-classic-main .footer-classic-list a:focus,
body.bw-home-premium .footer-classic-main .footer-classic-list a:hover span,
body.bw-home-premium .footer-classic-main .footer-classic-list a:hover bdi,
body.bw-home-premium .footer-classic-main .footer-classic-list a:focus span,
body.bw-home-premium .footer-classic-main .footer-classic-list a:focus bdi {
    color: var(--bw-blue);
}

body.bw-home-premium .footer-classic-main .footer-classic-list a:focus-visible {
    outline: 2px solid var(--bw-blue);
    outline-offset: 3px;
    border-radius: 3px;
}

/* systems: "name – description" as one link, the same size, weight and colour for both; the description wraps under
   the line when it must */
body.bw-home-premium .footer-classic-main .footer-classic-list .footer-classic-item--described a {
    display: block;
}

body.bw-home-premium .footer-classic-main .footer-classic-list .footer-classic-item-sep {
    padding: 0 2px;
}

/* tablet: two columns (logo + articles, about + systems) */
@media (max-width: 991.98px) {
    body.bw-home-premium .footer-classic-main {
        padding: 56px 0 44px;
    }

    body.bw-home-premium .footer-classic-main .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 40px;
    }
}

/* phone: one column; the text stays 17px */
@media (max-width: 575.98px) {
    body.bw-home-premium .footer-classic-main .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    body.bw-home-premium .footer-classic-main .footer-classic-title,
    body.bw-home-premium .footer-classic-main .footer-classic-title a {
        margin-bottom: 14px;
        font-size: 21px;
        line-height: 29px;
    }

    body.bw-home-premium .footer-classic-main .footer-classic-title a {
        margin: 0;
    }

    body.bw-home-premium .footer-classic-main .footer-classic-tagline,
    body.bw-home-premium .footer-classic-main .footer-classic-tagline span,
    body.bw-home-premium .footer-classic-main .footer-classic-list a,
    body.bw-home-premium .footer-classic-main .footer-classic-list a span,
    body.bw-home-premium .footer-classic-main .footer-classic-list a bdi {
        font-size: 17px;
    }

    body.bw-home-premium .footer-classic-main .footer-classic .brand,
    body.bw-home-premium .footer-classic .brand {
        height: 29px;
    }
}

/* Social profiles under the tagline (Footer.ascx.cs; addresses from tblsocialnetworks): the brand icons in their own
   colours (LinkedIn, Facebook, Instagram), 26px, in one row with equal gaps. No plate, border or colour change: the link
   is a transparent 34px hit area; hover only scales the icon slightly and lowers its opacity a little. */
.footer-classic .bw-footer-social {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 20px -4px 0;
    padding: 0;
    list-style: none;
}

.footer-classic .bw-footer-social li {
    display: block;
    margin: 0;
    padding: 0;
}

.footer-classic .bw-footer-social-link,
.footer-classic .bw-footer-social-link:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    text-decoration: none;
}

.footer-classic .bw-footer-social-link svg {
    display: block;
    width: 26px;
    height: 26px;
    transition: transform .2s ease, opacity .2s ease;
}

.footer-classic .bw-footer-social-link:hover svg,
.footer-classic .bw-footer-social-link:focus-visible svg {
    opacity: .85;
    transform: scale(1.08);
}

.footer-classic .bw-footer-social-link:focus {
    outline: none;
}

.footer-classic .bw-footer-social-link:focus-visible {
    outline: 2px solid var(--bw-blue, #0b6aa1);
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .footer-classic .bw-footer-social {
        margin-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-classic .bw-footer-social-link svg {
        transition: none;
    }

    .footer-classic .bw-footer-social-link:hover svg,
    .footer-classic .bw-footer-social-link:focus-visible svg {
        transform: none;
    }
}