/* Footer (Etap 11, Task 4; nr 18, owner decision 12).
   Self-contained: sets every property the duplicate FOOTER rules in style.css set, so they can go (Etap 11 Task 3).
   This sheet prints last (inc/enqueue-scripts.php, mgredline_enqueue_late_styles), so equal selectors win here.
   Rows and targets are 44 px (WCAG 2.2 target size in the header and footer); links change colour on hover, nothing
   moves; the focus ring is the system one (white on the dark footer, controls.css). */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 56px 0 0;
    margin-top: auto;
    /* Seam: the dark CTA bands of Home and Technology run straight into the footer (#8a9096: 5.4:1 on --dark-color). */
    border-top: 1px solid var(--border-strong);
}

.mgredline-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    text-align: left;
}

.mgredline-footer-section h3 {
    color: var(--white);
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.3;
}

.mgredline-footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0 0 8px;
}

.mgredline-footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mgredline-footer-section ul li {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* One 44 px row per link. */
.mgredline-footer-section ul li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.mgredline-footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
}

.footer-contact i {
    color: var(--primary-color);
    width: 16px;
}

.footer-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--primary-color);
}

/* Social: flat 44 px targets, the icon lines up with the text above (12 px = (44 - 20) / 2). */
.footer-social {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    margin: 8px 0 0 -12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border-radius: 0;
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-social a i {
    font-size: 20px;
}

.footer-social a:hover {
    background: transparent;
    color: var(--primary-color);
}

.mgredline-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.3);
}

/* Legal links and payment methods on one row, the copyright under them. The .container gives the gutter. */
.footer-bottom-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
}

.footer-copyright {
    flex: 1 0 100%;
}

.footer-copyright p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-legal ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-legal li {
    margin: 0;
}

.footer-legal a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* Wrapper for compliance/CTA buttons (EU Order Withdrawal etc.). */
.footer-action-bar {
    margin: 0 0 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}
.footer-action-bar > p {
    margin: 0;
}

/* Withdrawal button (EU Order Withdrawal Button): a calm outline button,
   clearly distinct from the plain .footer-legal links (legal: must stand out,
   art. 11a Directive 2011/83/EU, par. 356a BGB). Deliberately not a `.button`;
   its look (ghost on the dark footer, outline elsewhere, 44px, focus ring) is in
   assets/css/components/controls.css (Etap 9). Here only its size limits. */
.mgredline-withdrawal-link {
    max-width: 100%;
}
.footer-action-bar .mgredline-withdrawal-link:hover {
    text-decoration: underline;
}

/* Payment methods (owner decision 12). Not links, so no hover. One set of equal cards: the Font Awesome card glyphs
   (fa-cc-*, 28 px) are a solid card 24.5 px high (448 of 512 units) with the brand knocked out, so Google Pay, BLIK and
   Przelewy24 get the same card: the same height, fill (0.8 white, 12:1 on the footer bottom), corner and a dark mark,
   centred in the 44 px row. */
.footer-payments {
    --payment-card-height: calc(28px * 448 / 512);
    --payment-card-fill: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
}

.footer-payments p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.payment-icons__item {
    display: flex;
    align-items: center;
    height: 44px;
    margin: 0;
}

.payment-icons i {
    font-size: 28px;
    color: var(--payment-card-fill);
    transition: none;
}

/* Google Pay is a bare wordmark in Font Awesome: drawn dark on a card like the others. */
.payment-icons__item--google-pay i,
.payment-icons__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: var(--payment-card-height);
    border-radius: 3px;
    background: var(--payment-card-fill);
    color: var(--dark-color);
}

.payment-icons__item--google-pay i {
    padding: 0 4px;
    line-height: var(--payment-card-height);
}

.payment-icons__label {
    padding: 0 6px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

/* Phones and small tablets: the company block across, "Quick links" and "Support" side by side, everything left. */
@media (max-width: 768px) {
    .site-footer {
        padding-top: 40px;
    }

    .mgredline-footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
        padding-bottom: 24px;
        text-align: left;
    }

    .mgredline-footer-section--company {
        grid-column: 1 / -1;
    }

    /* The plugin's <p> carries the core class .has-text-align-center (core rule :root .has-text-align-center). */
    .footer-action-bar,
    .footer-action-bar > p,
    .footer-action-bar > p.has-text-align-center {
        text-align: left;
    }

    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 8px;
    }

    .footer-copyright {
        flex: 0 0 auto;
    }

    .footer-payments {
        flex-direction: row;
        align-items: center;
        gap: 0 12px;
    }
}
