/* ===== Site Footer ===== */

.site-footer {
    background: linear-gradient(180deg, #115b46 0%, #0d4636 100%);
    color: #d9ece4;
    padding: 4rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    padding: 0 5vw;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h4 {
    margin: 0 0 1.25rem;
    color: var(--color-light);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-logo {
    width: 180px;
    margin-bottom: 1rem;
}

.footer-tagline {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    opacity: 0.85;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.footer-column a {
    color: #d9ece4;
    transition: color var(--transition-fast);
    font-size: 0.95rem;
}

    .footer-column a:hover,
    .footer-column a:focus-visible {
        color: #7cf5c4;
    }

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-contact-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.footer-map {
    margin-top: 1.25rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.footer-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.footer-map a {
    display: block;
    line-height: 0;
}

.footer-map img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--color-light);
}

.footer-bottom {
    padding: 1.5rem 0 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.75;
}

/* Client copy left, PVIntelligence credit right, on the footer content width */
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0 5vw;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copyright {
    text-align: left;
}

.footer-credit {
    text-align: right;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 1rem;
    }

    .footer-contact-item {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-map {
        max-width: 400px;
        margin: 1.25rem auto 0;
    }

    /* Stack, but keep client copy left and our credit right - never centered */
    .footer-bottom-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }
}

/* ===== Motion toggle (force-motion v4): in the footer's small-print line, shown only on pages with motion ===== */
.pvi-motion-toggle {
  --pvi-motion-size: 2.25rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: var(--pvi-motion-size);
  min-height: var(--pvi-motion-size);
  padding: var(--pvi-motion-padding, 0.4rem);
  margin: 0;
  color: var(--pvi-motion-fg, inherit);
  background: var(--pvi-motion-bg, transparent);
  border: 1px solid var(--pvi-motion-border, transparent);
  border-radius: var(--pvi-motion-radius, 0.5rem);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pvi-motion-toggle[hidden] { display: none !important; }
.pvi-motion-toggle:hover {
  background: var(--pvi-motion-hover-bg, rgba(127, 127, 127, 0.18));
  border-color: var(--pvi-motion-hover-border, var(--pvi-motion-border, transparent));
}
.pvi-motion-toggle:focus-visible {
  outline: 2px solid var(--pvi-motion-focus, currentColor);
  outline-offset: 2px;
}
.pvi-motion-toggle[aria-pressed="true"] {
  color: var(--pvi-motion-fg-active, var(--pvi-motion-fg, inherit));
  background: var(--pvi-motion-bg-active, var(--pvi-motion-bg, transparent));
}
.pvi-motion-toggle svg {
  display: block;
  width: var(--pvi-motion-icon, 1.25rem);
  height: var(--pvi-motion-icon, 1.25rem);
  pointer-events: none;
}
.pvi-motion-toggle .pvi-motion-slash { display: none; }
.pvi-motion-toggle[aria-pressed="true"] .pvi-motion-slash { display: inline; }
/* Touch layouts: at least 44 x 44 px. */
@media (pointer: coarse), (max-width: 820px) {
  .pvi-motion-toggle { min-width: max(var(--pvi-motion-size), 44px); min-height: max(var(--pvi-motion-size), 44px); }
}
/* Footer placement: reads like a footer link (icon + visible label, footer font and colour). */
.pvi-motion-toggle--footer {
  display: inline-flex;
  gap: 0.4em;
  min-width: 0;
  min-height: 0;
  padding: 0.25em 0.4em;
  font-size: inherit;
  line-height: inherit;
  color: var(--pvi-motion-fg, inherit);
  background: transparent;
  border-color: transparent;
  border-radius: var(--pvi-motion-radius, 0.35em);
  position: static;
}
.pvi-motion-toggle--footer:hover { background: var(--pvi-motion-hover-bg, transparent); }
.pvi-motion-toggle--footer:hover .pvi-motion-label { text-decoration: underline; }
.pvi-motion-toggle--footer svg {
  width: var(--pvi-motion-icon, 1.1em);
  height: var(--pvi-motion-icon, 1.1em);
}
@media (pointer: coarse), (max-width: 820px) {
  .pvi-motion-toggle--footer { min-width: 0; min-height: 44px; }
}

/* Between the copyright and our credit; matches the footer links on hover. */
.footer-bottom .pvi-motion-toggle {
    --pvi-motion-focus: #7cf5c4;
    margin: 0 auto 0 0;
}

.footer-bottom .pvi-motion-toggle:hover {
    color: #7cf5c4;
}

/* Narrow side-by-side widths: the credit drops to its own line (still right) instead of squeezing both texts. */
@media (min-width: 641px) {
    .footer-bottom-inner {
        flex-wrap: wrap;
    }

    .footer-bottom .footer-credit {
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .footer-bottom .pvi-motion-toggle {
        align-self: flex-start;
        margin: 0;
        padding-left: 0;
    }
}
