/*-- -------------------------- -->
<---            Footer           -->
<--- -------------------------- -*/

/* Cream background with the site's stone texture. Four-column info grid
   (brand/contact, quick links, services, practice-area map) above the
   existing "Stay Connected" capture, then a safeguarding note and a
   bottom bar with legal links -- same information shape as the
   reference footer, recoloured to this site's cream/navy/sage palette
   instead of its dark navy one. */
@media only screen and (min-width: 0rem) {
  #cs-footer {
    width: 100%;
    padding: 3.5rem 1.5rem 2rem;
    background-color: var(--cream);
    background-image: url("../images/FOOTERBACKGROUND.svg");
    background-size: cover;
    background-position: center;
  }
  #cs-footer .cs-container {
    width: 100%;
    max-width: 72rem;
    margin: auto;
  }

  /* Top info grid */
  #cs-footer .cs-footer-top {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin: 0 0 3rem;
  }
  #cs-footer .cs-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin: 0 0 1.25rem;
  }
  #cs-footer .cs-footer-logo .cs-logo-mark {
    width: 2rem;
    height: 2rem;
    color: var(--navy);
    flex: none;
  }
  #cs-footer .cs-footer-wordmark {
    font-family: var(--headingFont);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
  }
  #cs-footer .cs-footer-wordmark em {
    display: block;
    font-family: var(--scriptFont);
    font-style: normal;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--accentTextDark);
    line-height: 1.2em;
  }
  #cs-footer .cs-contact-list {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  #cs-footer .cs-contact-list li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--bodyFont);
    font-size: 0.9375rem;
    color: var(--bodyTextColor);
  }
  #cs-footer .cs-contact-list a {
    color: var(--bodyTextColor);
    text-decoration: none;
  }
  #cs-footer .cs-contact-list a:hover {
    color: var(--navy);
  }
  #cs-footer .cs-contact-list svg {
    width: 1.125rem;
    height: 1.125rem;
    flex: none;
    color: var(--primaryDark);
  }

  #cs-footer .cs-footer-heading {
    font-family: var(--bodyFont);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accentTextDark);
    margin: 0 0 1.25rem;
  }
  #cs-footer .cs-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  #cs-footer .cs-footer-links a {
    font-family: var(--bodyFont);
    font-size: 0.9375rem;
    color: var(--bodyTextColor);
    text-decoration: none;
  }
  #cs-footer .cs-footer-links a:hover {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 0.25rem;
  }

  #cs-footer .cs-map-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--secondaryLight);
  }
  #cs-footer .cs-map-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
  }

  /* Stay Connected */
  #cs-footer .cs-footer-connect {
    text-align: center;
    margin: 0 0 2.5rem;
  }
  #cs-footer .cs-connect-title {
    font-family: var(--headingFont);
    font-weight: 400;
    font-size: 1.75rem;
    color: var(--navy);
    margin: 0 0 1rem;
  }
  #cs-footer .cs-connect-text {
    font-family: var(--bodyFont);
    font-size: 0.9375rem;
    line-height: 1.6em;
    color: var(--bodyTextColor);
    max-width: 30rem;
    margin: 0 auto 2rem;
  }
  #cs-footer .cs-form {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }
  #cs-footer .cs-input-wrapper {
    flex: 1 1 auto;
    height: 3.5rem;
    background-color: transparent;
    border: 1px solid var(--secondaryLight);
    border-radius: 3.5rem;
    padding: 0 0.5rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  #cs-footer .cs-input-wrapper input {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: none;
    outline: none;
    font-family: var(--bodyFont);
    font-size: 0.9375rem;
    color: var(--navy);
  }
  #cs-footer .cs-input-wrapper input::placeholder {
    color: var(--bodyTextColor);
    opacity: 0.7;
  }
  #cs-footer .cs-input-icon {
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: var(--primaryLight);
    color: var(--primaryDark);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #cs-footer .cs-input-icon svg {
    width: 0.9375rem;
    height: 0.9375rem;
  }
  #cs-footer .cs-submit {
    flex: none;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--primaryDark);
    color: var(--primaryDark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
  }
  #cs-footer .cs-submit:hover {
    background-color: var(--primaryDark);
    color: var(--cream);
  }
  #cs-footer .cs-submit svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  #cs-footer .cs-divider {
    width: 100%;
    height: 1px;
    background-color: var(--secondaryLight);
    border: none;
    margin: 0 0 2rem;
  }

  /* Safeguarding note */
  #cs-footer .cs-safeguard {
    font-family: var(--bodyFont);
    font-size: 0.8125rem;
    line-height: 1.6em;
    text-align: center;
    color: var(--bodyTextColor);
    max-width: 44rem;
    margin: 0 auto 2rem;
  }
  #cs-footer .cs-safeguard a {
    color: var(--accentTextDark);
    text-decoration: underline;
    text-underline-offset: 0.2rem;
  }

  /* Bottom bar */
  #cs-footer .cs-footer-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  #cs-footer .cs-credit {
    font-family: var(--bodyFont);
    font-size: 0.8125rem;
    color: var(--bodyTextColor);
    margin: 0;
  }
  #cs-footer .cs-policy-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.5rem;
  }
  #cs-footer .cs-policy-links a {
    font-family: var(--bodyFont);
    font-size: 0.8125rem;
    color: var(--bodyTextColor);
    text-decoration: underline;
    text-underline-offset: 0.2rem;
  }
  #cs-footer .cs-policy-links a:hover {
    color: var(--navy);
  }
}

/* Tablet - 40rem: brand column full width, links/services/map share a row */
@media only screen and (min-width: 40rem) {
  #cs-footer .cs-footer-top {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    row-gap: 2.5rem;
  }
  #cs-footer .cs-footer-brand {
    grid-column: 1 / -1;
  }
}

/* Desktop - 64rem: all four columns in a single row, bottom bar spreads out */
@media only screen and (min-width: 64rem) {
  #cs-footer .cs-footer-top {
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  }
  #cs-footer .cs-footer-brand {
    grid-column: auto;
  }
  #cs-footer .cs-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
