/* The Snowberry website — Footer */
function SiteFooter() {
  const Social = ({ href, label, children }) => (
    <a href={href} target="_blank" rel="noopener noreferrer" aria-label={label}
       style={{ width: 38, height: 38, borderRadius: '50%', border: '1px solid rgba(253,251,248,0.28)', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', color: 'rgba(253,251,248,0.82)', textDecoration: 'none', transition: 'border-color 160ms ease, color 160ms ease' }}
       onMouseEnter={(e)=>{e.currentTarget.style.borderColor='var(--cream)';e.currentTarget.style.color='var(--cream)';}}
       onMouseLeave={(e)=>{e.currentTarget.style.borderColor='rgba(253,251,248,0.28)';e.currentTarget.style.color='rgba(253,251,248,0.82)';}}>
      {children}
    </a>
  );
  const affiliations = [
    'Texas Assisted Living Association (TALA)',
    'Texas Organization of Residential Care Homes (TORCH)',
    'AGE of Central Texas',
  ];
  return (
    <footer style={{ background: 'var(--green-900)', padding: '64px 40px 40px' }}>
      <div style={{ maxWidth: 'var(--container-max)', margin: '0 auto' }}>
        <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 40, flexWrap: 'wrap', paddingBottom: 40, borderBottom: '1px solid rgba(253,251,248,0.16)' }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
            <img src="assets/logos/sprig-cream.png" alt="" style={{ height: 52 }} />
            <div>
              <div style={{ fontFamily: 'var(--font-display)', fontSize: 24, color: 'var(--cream)', letterSpacing: '0.04em' }}>The Snowberry</div>
              <div style={{ fontFamily: 'var(--font-sans)', fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: 'rgba(253,251,248,0.6)', marginTop: 4 }}>Assisted Living &amp; Memory Care</div>
            </div>
          </div>
          <div className="sb-footer-right" style={{ fontFamily: 'var(--font-sans)', fontSize: 14, lineHeight: 1.8, color: 'rgba(253,251,248,0.82)', textAlign: 'right' }}>
            4318 W Crawford St · Denison, TX 75020<br />
            903.337.1003 · care@thesnowberry.com<br />
            <span style={{ color: 'rgba(253,251,248,0.55)' }}>HHSC Type A Licensed · Facility ID #100516</span>
            <div className="sb-footer-social" style={{ display: 'flex', gap: 12, justifyContent: 'flex-end', alignItems: 'center', marginTop: 18 }}>
              <a href="https://www.instagram.com/thesnowberrytx" target="_blank" rel="noopener noreferrer"
                 style={{ fontFamily: 'var(--font-sans)', fontSize: 13, color: 'rgba(253,251,248,0.7)', textDecoration: 'none', letterSpacing: '0.02em' }}
                 onMouseEnter={(e)=>e.currentTarget.style.color='var(--cream)'}
                 onMouseLeave={(e)=>e.currentTarget.style.color='rgba(253,251,248,0.7)'}>@thesnowberrytx</a>
              <Social href="https://www.facebook.com/profile.php?id=61587199786778" label="The Snowberry on Facebook">
                <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/></svg>
              </Social>
              <Social href="https://www.instagram.com/thesnowberrytx" label="The Snowberry on Instagram">
                <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"/></svg>
              </Social>
            </div>
          </div>
        </div>

        <div style={{ display: 'flex', alignItems: 'baseline', gap: 20, flexWrap: 'wrap', marginTop: 28, paddingBottom: 28, borderBottom: '1px solid rgba(253,251,248,0.16)' }}>
          <span style={{ fontFamily: 'var(--font-sans)', fontWeight: 600, fontSize: 11, letterSpacing: '0.2em', textTransform: 'uppercase', color: 'rgba(253,251,248,0.55)', flex: 'none' }}>Proud Member</span>
          <div style={{ display: 'flex', flexWrap: 'wrap', gap: '8px 0', fontFamily: 'var(--font-sans)', fontSize: 13, color: 'rgba(253,251,248,0.82)' }}>
            {affiliations.map((a, i) => (
              <span key={i} style={{ display: 'inline-flex', alignItems: 'center' }}>
                {i > 0 && <span aria-hidden="true" style={{ opacity: 0.45, margin: '0 14px' }}>·</span>}
                {a}
              </span>
            ))}
          </div>
        </div>

        <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 24, fontFamily: 'var(--font-sans)', fontSize: 12, color: 'rgba(253,251,248,0.5)', flexWrap: 'wrap', gap: 12 }}>
          <span>© {new Date().getFullYear()} The Snowberry. All rights reserved.</span>
          <span>Denison · Sherman Corridor, North Texas</span>
        </div>
      </div>
    </footer>
  );
}
window.SiteFooter = SiteFooter;
