/* ==========================================================================
   Site footer (modern) — opt-in via <footer class="site-footer">.
   Loaded after style.css; overrides the legacy `footer` rules there.
   ========================================================================== */

footer.site-footer {
    --f-bg: #1d3a2a;
    --f-bg-2: #17301f;
    --f-text: #e9f0eb;
    --f-muted: #a9bdb0;
    --f-line: rgba(255, 255, 255, 0.12);
    --f-accent: #8fad88;

    background: var(--f-bg);
    color: var(--f-text);
    padding: 0;
    text-align: left;
    margin-top: 0;
    position: relative;
}

body.dark-mode footer.site-footer {
    --f-bg: #101512;
    --f-bg-2: #0b0f0d;
    --f-line: rgba(255, 255, 255, 0.08);
}

/* Thin accent strip on top edge */
footer.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--f-accent), #25583c 60%, var(--f-accent));
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2rem 2.75rem;
    display: grid;
    grid-template-columns: auto 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ---- Logo ---- */
/* Plain logo: the PNG is transparent around the badge (badge ≈ 67% of the
   image), so it is drawn larger with negative margins to keep the layout. */
footer.site-footer .site-footer__brand img {
    width: 176px;
    height: 176px;
    margin: -28px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.3));
}

/* ---- Columns ---- */
footer.site-footer h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--f-accent);
    margin: 0 0 1rem;
}

footer.site-footer .site-footer__about p {
    color: var(--f-muted);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 52ch;
    margin: 0;
}

footer.site-footer .site-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

footer.site-footer .site-footer__col a {
    color: var(--f-text);
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    padding: 0.3rem 0;
    position: relative;
    transition: color 0.15s ease, transform 0.15s ease;
}
/* animated underline */
footer.site-footer .site-footer__col a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.2rem;
    width: 100%;
    height: 1px;
    background: var(--f-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}
footer.site-footer .site-footer__col a:hover {
    color: #fff;
    text-decoration: none;
    transform: translateX(3px);
}
footer.site-footer .site-footer__col a:hover::after { transform: scaleX(1); }
footer.site-footer a:focus-visible {
    outline: 2px solid var(--f-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---- Bottom bar (Autortiesības) ---- */
.site-footer__bottom {
    background: var(--f-bg-2);
    border-top: 1px solid var(--f-line);
}
.site-footer__bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
footer.site-footer .site-footer__bottom h3 {
    margin: 0;
    font-size: 0.72rem;
}
footer.site-footer .site-footer__bottom p {
    margin: 0;
    color: var(--f-muted);
    font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .site-footer__inner { grid-template-columns: auto 1fr; gap: 2rem; }
    .site-footer__about { grid-column: 2; }
    .site-footer__inner > .site-footer__col:last-child { grid-column: 2; }
    footer.site-footer .site-footer__brand img { width: 142px; height: 142px; margin: -23px; }
}

@media (max-width: 768px) {
    /* undo legacy centred mobile footer rules from style.css */
    footer.site-footer .site-footer__inner { text-align: left; }
    footer.site-footer .site-footer__col ul { align-items: flex-start; }
}

@media (max-width: 560px) {
    .site-footer__inner { grid-template-columns: 1fr; padding: 2.75rem 1rem 2rem; gap: 1.75rem; justify-items: center; }
    footer.site-footer .site-footer__inner { text-align: center; }
    .site-footer__about,
    .site-footer__inner > .site-footer__col:last-child { grid-column: auto; }
    footer.site-footer .site-footer__brand img { width: 124px; height: 124px; margin: -20px auto; }
    footer.site-footer .site-footer__about p { margin: 0 auto; }
    footer.site-footer .site-footer__col ul { align-items: center; }
    footer.site-footer .site-footer__col a:hover { transform: none; }
    footer.site-footer .site-footer__col a::after { transform-origin: center; }
    .site-footer__bottom-inner { padding: 1rem; flex-direction: column; justify-content: center; text-align: center; gap: 0.35rem; }
    footer.site-footer .site-footer__col a { padding: 0.45rem 0; } /* bigger tap targets */
}

@media (prefers-reduced-motion: reduce) {
    footer.site-footer *, footer.site-footer *::after { transition: none !important; transform: none !important; }
}
