/* ============================================================
 * wac footer — styling on top of the classes of ILIAS' footer component; the markup comes
 * from the plugin's footer renderer (templates/tpl.wac_footer.html, tpl.wac_footer_site.html).
 * Two layouts (ilWacFooterLayout):
 * - the bar: entries left | logo (centre) | entries and legal documents right; each entry a link
 *   or a plain text (entries: plugin language variables footer_<side>_<n>_label/_url);
 * - the site footer (.wac-site-footer) after wilkon-academy.com: a green tilt, three columns
 *   on light grey, below them copyright | logo | social links on white.
 * The font is the page's, i.e. the skin's (no font of its own); the titles of the site footer
 * take the skin's heading font. The logo comes from the skin (images/logo/FooterLogo.svg,
 * shared/footer-logo). No external requests. Colours from wilkon-academy.com.
 * ============================================================ */

.c-maincontrols__footer {
    --wac-text: #8a8a8a;
    --wac-hover: #443f3c;          /* link hover: brand dark */
    --wac-bar-bg: #ffffff;
    --wac-bar-border: #ebebeb;
    --wac-side-pad: clamp(1rem, 3vw, 3rem);

    font-family: inherit;
    color: var(--wac-text);
    font-size: .85rem;
    line-height: 1.65;

    /* left entries | logo | right entries; equal outer columns keep the logo centred */
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: clamp(1.5rem, 5vw, 5rem);
    align-items: center;
    background-color: var(--wac-bar-bg);
    border-top: 1px solid var(--wac-bar-border);
    /* full width: outer entries at the edges, the logo in the middle */
    padding-block: 0;
    padding-inline: var(--wac-side-pad);
}
.c-maincontrols__footer a { color: var(--wac-text); text-decoration: none; transition: color .15s ease; }
.c-maincontrols__footer a:hover, .c-maincontrols__footer a:focus { color: var(--wac-hover); }
.c-maincontrols__footer ul, .c-maincontrols__footer ol { list-style: none; padding: 0; margin: 0; }

/* Delos makes every footer section an internal repeat(4, 1fr) grid (>= 993px); each of
   our sections holds a single item, so they go back to plain flow. */
.c-maincontrols__footer-grid {
    display: block;
    margin: 0;
    padding: 1.1rem 0;
}

/* ---- left: e.g. "wilkon.academy" ---- */
.c-maincontrols__footer-grid[data-section="left"] {
    grid-column: 1;
    grid-row: 1;
}

/* ---- right: e.g. "Impressum | Datenschutz | Nutzungsvereinbarung" ---- */
.c-maincontrols__footer-grid[data-section="right"] {
    grid-column: 3;
    grid-row: 1;
}
/* Delos marks every footer item text-left; the list itself is laid out instead */
.c-maincontrols__footer-grid ul {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}
.c-maincontrols__footer-grid[data-section="right"] ul { justify-content: flex-end; }
/* an entry never breaks inside (Delos hyphenates the page); whole entries wrap instead */
.c-maincontrols__footer-grid li { white-space: nowrap; hyphens: none; }
/* separator after every entry but the last, so a wrapped line never starts with "|" */
.c-maincontrols__footer-grid li:not(:last-child)::after {
    content: "|";
    margin: 0 .45em;
    color: var(--wac-text);
}

/* ---- centre: logo, flush to the bottom edge; the image comes from the skin
   (images/logo/FooterLogo.svg, shared/footer-logo), so every skin brings its own ---- */
.c-maincontrols__footer::after {
    content: "";
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    width: 40px;
    height: 46px;
    background: center bottom / contain no-repeat;
}

/* ---- responsive ---- */
/* breakpoint matches ILIAS' own mobile switch (Delos turns the main bar into a fixed
   bottom bar at <= 991px). Stacked and centred: right entries, logo; the left entries are
   left out there so the bar stays short. */
@media (max-width: 991px) {
    .c-maincontrols__footer {
        grid-template-columns: 1fr;
        justify-items: center;
        row-gap: .75rem;
        padding-top: 1.1rem;
        /* ILIAS adds `footer { margin-bottom: 80px }` on mobile, leaving the logo floating
           above the fixed bottom bar. The content padding already clears the bar. */
        margin-bottom: 0;
    }
    .c-maincontrols__footer-grid { padding: 0; }
    .c-maincontrols__footer-grid[data-section="left"] { display: none; }
    .c-maincontrols__footer-grid[data-section="right"] { grid-column: 1; grid-row: 1; }
    .c-maincontrols__footer-grid ul,
    .c-maincontrols__footer-grid[data-section="right"] ul { justify-content: center; }
    .c-maincontrols__footer::after { grid-column: 1; grid-row: 2; }
    /* On startup/login pages there is no bottom bar, but ILIAS still reserves
       `.il-layout-page-content { padding-bottom: 60px }` for it. Drop it there
       (detected via .ilStartupSection); other pages keep it for the real bar. */
    .il-layout-page-content:has(.ilStartupSection) {
        padding-bottom: 0;
    }
}

/* ============================================================
 * Site footer (wilkon-academy.com): columns | bottom row, measured on the site on 2026-11-04
 * (computed styles at 1920px): content in a centred container of 1600px, the grounds across
 * the full width. Columns: ground #f8f8f8, 42px above, each column with 20px above and 28px
 * padding all round; title Aleo 24px/24px regular at 40 % of the brand dark, 10px below it;
 * text Roboto Flex 15.4px/24.64px at 50 %, paragraphs 14px apart; links at 60 %, on hover
 * teal #007ea0 with a 1px underline in the brand dark. Bottom row: white, 90px high;
 * copyright 14px #8a8a8a, 28px from the top, 42px in from the container; the wilkon label
 * 40px wide at the bottom centre; social links at the start of the last third, 24px squares
 * #d0d0d0 with 6px rounding, white 12px glyphs, 10px apart, 34px from the top. The site's
 * green tilt above the columns belongs to its testimonials and is left out, as is any other
 * edge (decision Simon 2026-11-04). The container is centred as on the site; a skin may align it
 * to the start of the page column instead (e.g. next to the main menu, in line with a
 * left-aligned content area) through the custom properties --wac-site-pad-left/-right,
 * --wac-site-first-column-margin, --wac-site-first-column-pad-left,
 * --wac-site-copyright-indent, and place the label (--wac-site-logo-left, --wac-site-logo-shift;
 * default: the container's centre).
 * ============================================================ */
.c-maincontrols__footer.wac-site-footer {
    --wac-site-container: 1600px;
    --wac-site-columns-bg: #f8f8f8;
    --wac-site-title: rgba(68, 63, 60, .4);
    --wac-site-text: rgba(68, 63, 60, .5);
    --wac-site-link: rgba(68, 63, 60, .6);
    --wac-site-link-hover: #007ea0;
    --wac-site-dark: #443f3c;
    --wac-site-copyright: #8a8a8a;
    --wac-site-column-gap: 20px;
    --wac-site-column-pad: 28px;
    --wac-site-social-bg: #d0d0d0;
    --wac-site-social-size: 24px;
    --wac-site-social-icon: 12px;
    --wac-site-social-gap: 10px;
    /* the centred container: side padding that leaves at most the container width */
    --wac-site-content-pad: max(0px, calc((100% - var(--wac-site-container)) / 2));
    --wac-site-pad-left: var(--wac-site-content-pad);
    --wac-site-pad-right: var(--wac-site-content-pad);
    --wac-site-first-column-margin: var(--wac-site-column-gap);
    --wac-site-first-column-pad-left: var(--wac-site-column-pad);
    --wac-site-copyright-indent: 42px;
    /* the label at the bottom centre of the container; a skin may move it (percentages resolve
       against the bottom row, which the label is placed against) */
    --wac-site-logo-left: calc(var(--wac-site-pad-left) + (100% - var(--wac-site-pad-left) - var(--wac-site-pad-right)) / 2);
    --wac-site-logo-shift: -50%;

    display: block;
    padding: 0;
    border-top: 0;
    background: var(--wac-bar-bg);
    color: var(--wac-site-text);
    font-size: 15.4px;
    line-height: 1.6;
}
/* no tilt and no edge towards the page; the bar's ::after logo has its own element here */
.wac-site-footer::before,
.wac-site-footer::after {
    content: none;
}

/* ---- columns: the grey ground spans the full width, the grid sits in the container ---- */
.wac-site-footer .wac-site-footer__columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 42px var(--wac-site-pad-right) 0 var(--wac-site-pad-left);
    background: var(--wac-site-columns-bg);
}
.wac-site-footer .wac-site-footer__column {
    margin: var(--wac-site-column-gap) 0 0 var(--wac-site-column-gap);
    padding: var(--wac-site-column-pad);
}
.wac-site-footer .wac-site-footer__column:first-child {
    margin-left: var(--wac-site-first-column-margin);
    padding-left: var(--wac-site-first-column-pad-left);
}
.c-maincontrols__footer.wac-site-footer .wac-site-footer__title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 400;
    line-height: 24px;
    color: var(--wac-site-title);
}
.wac-site-footer .wac-site-footer__block {
    margin: 0 0 14px;
    color: var(--wac-site-text);
}
.wac-site-footer .wac-site-footer__block:last-child { margin-bottom: 0; }
.wac-site-footer .wac-site-footer__text,
.wac-site-footer .wac-site-footer__line {
    display: block;
}
.wac-site-footer .wac-site-footer__lead { margin-right: .25em; }
.wac-site-footer .wac-site-footer__entry { white-space: nowrap; hyphens: none; }
.wac-site-footer .wac-site-footer__entry:not(:last-child)::after {
    content: "|";
    margin: 0 .3em;
}
.c-maincontrols__footer.wac-site-footer .wac-site-footer__entry a,
.c-maincontrols__footer.wac-site-footer .wac-site-footer__entry .btn-link {
    padding: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    color: var(--wac-site-link);
    font: inherit;
    text-decoration: none;
    vertical-align: baseline;
    transition: color .15s ease;
}
.c-maincontrols__footer.wac-site-footer .wac-site-footer__entry a:hover,
.c-maincontrols__footer.wac-site-footer .wac-site-footer__entry a:focus,
.c-maincontrols__footer.wac-site-footer .wac-site-footer__entry .btn-link:hover,
.c-maincontrols__footer.wac-site-footer .wac-site-footer__entry .btn-link:focus {
    border-bottom-color: var(--wac-site-dark);
    color: var(--wac-site-link-hover);
    text-decoration: none;
}

/* ---- bottom row on white: copyright | label | social links, in the container ---- */
.wac-site-footer .wac-site-footer__bottom {
    display: grid;
    grid-template-columns: 2fr 1fr;
    position: relative; /* the label is placed against the row */
    box-sizing: border-box;
    width: 100%;
    min-height: 90px;
    margin: 0;
    padding: 0 var(--wac-site-pad-right) 0 var(--wac-site-pad-left);
    background: var(--wac-bar-bg);
    font-size: 14px;
    line-height: 24px;
}
.wac-site-footer .wac-site-footer__copyright {
    grid-column: 1;
    grid-row: 1;
    padding: 28px 0 14px var(--wac-site-copyright-indent);
    color: var(--wac-site-copyright);
}
/* the logo of the skin (image: images/logo/FooterLogo.svg via shared/footer-logo), by default at
   the bottom centre of the container */
.wac-site-footer .wac-site-footer__logo {
    position: absolute;
    bottom: 0;
    left: var(--wac-site-logo-left);
    width: 40px;
    height: 46px;
    transform: translateX(var(--wac-site-logo-shift));
    background: center bottom / contain no-repeat;
}
.wac-site-footer .wac-site-footer__social {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: flex-start;
    gap: var(--wac-site-social-gap);
    margin: 0 0 0 var(--wac-site-column-gap);
    padding: 34px var(--wac-site-column-pad) 14px;
}
/* no "|" separators between the icons (the bar's rule for list entries) */
.wac-site-footer .wac-site-footer__social .wac-site-footer__social-item::after { content: none; }
.wac-site-footer .wac-site-footer__social-item a {
    display: block;
    position: relative;
    width: var(--wac-site-social-size);
    height: var(--wac-site-social-size);
    border-radius: 6px;
    background-color: var(--wac-site-social-bg);
    color: transparent;           /* the label stays for screen readers */
    font-size: 0;
    overflow: hidden;
    transition: transform .2s ease, background-color .15s ease;
}
.wac-site-footer .wac-site-footer__social-item a:hover,
.wac-site-footer .wac-site-footer__social-item a:focus {
    background-color: var(--wac-site-dark);
    transform: scale(1.1);
}
/* the icon: a white glyph (templates/images/<network>.svg, Font Awesome Free brands, see
   LICENSE-FontAwesome.txt) masked over a white square */
.wac-site-footer .wac-site-footer__social-item a::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: var(--wac-site-social-icon);
    height: var(--wac-site-social-icon);
    background: #ffffff;
    -webkit-mask: var(--wac-site-social-glyph) center / contain no-repeat;
    mask: var(--wac-site-social-glyph) center / contain no-repeat;
}
.wac-site-footer [data-network="linkedin"] a::before { --wac-site-social-glyph: url("images/linkedin-in.svg"); }
.wac-site-footer [data-network="youtube"] a::before { --wac-site-social-glyph: url("images/youtube.svg"); }

/* ---- responsive: columns and bottom row stacked and centred ---- */
@media (max-width: 991px) {
    .c-maincontrols__footer.wac-site-footer {
        padding-top: 0;
    }
    .wac-site-footer .wac-site-footer__columns {
        grid-template-columns: minmax(0, 1fr); /* not wider than the screen, whatever an entry's width */
        padding-top: 14px;
    }
    .wac-site-footer .wac-site-footer__entry { white-space: normal; } /* long entries may break inside */
    .wac-site-footer .wac-site-footer__column,
    .wac-site-footer .wac-site-footer__column:first-child {
        margin: 0;
        padding: 20px var(--wac-side-pad);
    }
    .wac-site-footer .wac-site-footer__bottom {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 0 0 60px;
    }
    .wac-site-footer .wac-site-footer__copyright { grid-column: 1; grid-row: 1; padding: 20px 0 0; text-align: center; }
    /* stacked: the label in the middle, whatever a skin set for wide screens */
    .wac-site-footer .wac-site-footer__logo { left: 50%; transform: translateX(-50%); }
    .wac-site-footer .wac-site-footer__social { grid-column: 1; grid-row: 2; justify-content: center; margin: 0; padding: 14px 0 0; }
}
