/**
 * Way Car Wash footer
 * Desktop: Figma 15:13131 | Mobile: Figma 15:12785
 */

.cw-footer {
  --cw-footer-bg: #01110d;
  --cw-footer-text: #ffffff;
  --cw-footer-muted: #a7abb3;
  --cw-footer-secondary: #d3d5d9;
  --cw-footer-special: #0cf0bb;
  --cw-footer-on-special: #023126;
  --cw-footer-radius: 6px;
  --cw-font-heading: "Plus Jakarta Sans", system-ui, sans-serif;
  --cw-font-body: "Inter", system-ui, sans-serif;

  background: var(--cw-footer-bg);
  color: var(--cw-footer-text);
  /* Figma: top/bottom 120px, left/right 132px */
  padding: 120px 132px;
}

.cw-footer__inner {
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.cw-footer__grid {
  display: flex;
  justify-content: space-between;
  /* align-items: flex-start; */
  gap: 0;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Figma column widths on 1176 content row */
.cw-footer__col--newsletter {
  width: 300px;
  flex: 0 0 300px;
}

.cw-footer__col--contact {
  width: 216px;
  flex: 0 0 216px;
}

.cw-footer__col--links {
  width: 178px;
  flex: 0 0 178px;
}

.cw-footer__col--download {
  width: 216px;
  flex: 0 0 216px;
}

.cw-footer__headline {
  margin: 0 0 20px;
  max-width: 300px;
  font-family: var(--cw-font-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cw-footer-text);
}

.cw-footer__title {
  margin: 0 0 14px;
  font-family: var(--cw-font-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: var(--cw-footer-text);
}

.cw-footer__title--social {
  margin-top: 24px;
}

.cw-footer__social-wrap {
  margin-top: 24px;
}

.cw-footer__social-wrap .cw-footer__title {
  margin-top: 0;
}

.cw-footer__text {
  margin: 0 0 16px;
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--cw-footer-muted);
}

.cw-footer__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cw-footer__form-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  min-height: 52px;
  padding: 6px 6px 6px 16px;
  border: 1px solid #555963;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.cw-footer__input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--cw-footer-secondary) !important;
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0 !important;
}

.cw-footer__input::placeholder {
  color: var(--cw-footer-muted);
}

.cw-footer__input:-webkit-autofill,
.cw-footer__input:-webkit-autofill:hover,
.cw-footer__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--cw-footer-secondary);
  transition: background-color 99999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px transparent inset !important;
}

.cw-footer__submit {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 18px;
  border: 0 !important;
  border-radius: var(--cw-footer-radius) !important;
  background: var(--cw-footer-special) !important;
  color: var(--cw-footer-on-special) !important;
  font-family: var(--cw-font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none !important;
}

.cw-footer__submit--stack {
  display: none;
}

.cw-footer__submit:hover,
.cw-footer__submit:focus-visible {
  opacity: 0.92;
  outline: none;
}

.cw-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cw-footer__contact li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cw-footer__contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  line-height: 0;
  /* Circle background comes from the PNG assets */
  background: transparent;
  border-radius: 0;
  color: inherit;
}

.cw-footer__contact-icon img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.cw-footer__contact-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cw-footer__contact-label {
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--cw-footer-muted);
}

.cw-footer__contact-value {
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--cw-footer-text) !important;
  text-decoration: none !important;
}

.cw-footer__contact-value:hover {
  color: var(--cw-footer-special) !important;
}

/* The Twenty Twenty-One base paints a white block behind any focused link,
   which is unreadable on the dark footer. Swap it for a ring so keyboard
   focus stays visible. */
.site .cw-footer a:focus:not(.wp-block-button__link):not(.wp-block-file__button) {
  background: transparent;
  text-decoration: none;
}

.site .cw-footer a:focus-visible:not(.wp-block-button__link):not(.wp-block-file__button) {
  outline: 2px solid var(--cw-footer-special);
  outline-offset: 2px;
}

.cw-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cw-footer__links li,
.cw-footer__col--links .menu li {
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

.cw-footer__links a,
.cw-footer__col--links .menu a {
  display: inline-block;
  padding: 2px 0;
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--cw-footer-muted) !important;
  text-decoration: none !important;
}

.cw-footer__links a:hover,
.cw-footer__col--links .menu a:hover {
  color: var(--cw-footer-secondary) !important;
}

.cw-footer__col--links .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cw-footer__stores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cw-footer__store {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none !important;
  line-height: 0;
}

.cw-footer__store img {
  display: block;
  width: 135px;
  height: auto;
  max-width: 100%;
}

.cw-footer__social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cw-footer__social a {
  display: inline-flex;
  color: var(--cw-footer-text) !important;
  text-decoration: none !important;
}

.cw-footer__social a:hover {
  color: var(--cw-footer-special) !important;
}

.cw-footer__copy {
  margin: 40px 0 0;
  text-align: center;
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--cw-footer-muted);
}

/* Widget / block content inside footer columns */
.cw-footer__col > .wp-block-heading,
.cw-footer__col > h2:not([class]),
.cw-footer__col > h3:not([class]) {
  margin: 0 0 14px;
  font-family: var(--cw-font-heading);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cw-footer-text);
}

.cw-footer__col--newsletter > .wp-block-heading,
.cw-footer__col--newsletter > h2:not([class]) {
  margin-bottom: 20px;
  max-width: 300px;
}

.cw-footer__col .wp-block-list,
.cw-footer__col > ul:not([class]) {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cw-footer__col .wp-block-list a,
.cw-footer__col > ul:not([class]) a {
  color: var(--cw-footer-muted) !important;
  text-decoration: none !important;
  font-size: 14px;
}

.cw-footer__col .wp-block-list a:hover,
.cw-footer__col > ul:not([class]) a:hover {
  color: var(--cw-footer-secondary) !important;
}

@media (max-width: 1100px) {
  .cw-footer {
    padding: 80px 40px;
  }

  .cw-footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 48px;
    justify-content: initial;
    align-items: start;
  }

  .cw-footer__col--newsletter,
  .cw-footer__col--contact,
  .cw-footer__col--links,
  .cw-footer__col--download {
    width: 100%;
    max-width: none;
    flex: initial;
    min-width: 0;
  }

  /* Fill each grid cell so left/right columns balance on tablet */
  .cw-footer__headline,
  .cw-footer__col--newsletter > .wp-block-heading,
  .cw-footer__col--newsletter > h2:not([class]),
  .cw-footer__form-wrap {
    max-width: none;
    width: 100%;
  }
}

/* Mobile — Figma 15:12785 (375 artboard, content x=20) */
@media (max-width: 767px) {
  .cw-footer {
    padding: 48px 20px 32px;
  }

  .cw-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cw-footer__col--newsletter,
  .cw-footer__col--contact,
  .cw-footer__col--links,
  .cw-footer__col--download {
    width: auto;
    flex: initial;
  }

  .cw-footer__headline {
    max-width: none;
    margin-bottom: 16px;
  }

  .cw-footer__text {
    display: none; /* Not in mobile Figma */
  }

  .cw-footer__form {
    gap: 10px;
  }

  .cw-footer__form-wrap {
    max-width: none;
    min-height: 52px;
    padding: 0 16px;
  }

  .cw-footer__submit--inline {
    display: none;
  }

  .cw-footer__submit--stack {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border-radius: 8px !important;
    font-size: 16px;
  }

  .cw-footer__terms-extra {
    display: none; /* Mobile shows "Terms" only */
  }

  .cw-footer__title {
    margin-bottom: 16px;
  }

  .cw-footer__links {
    gap: 4px;
  }

  .cw-footer__copy {
    margin-top: 40px;
    font-size: 13px;
    text-align: left;
  }
}
