.footer {
  color: var(--default-color);
  background-color: #fff;
  font-size: 14px;
  padding-bottom: 28px;
  position: relative;
  overflow-x: hidden;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.footer .footer-top {
  padding-top: 48px;
  padding-bottom: 12px;
}

.footer .footer-grid {
  display: grid;
  gap: 2rem 1.75rem;
  align-items: start;
  width: 100%;
}

/* Desktop: full-width balanced columns */
@media (min-width: 992px) {
  .footer .footer-grid {
    grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(0, 1fr));
    gap: 2rem 2.5rem;
  }
}

/* Tablet: about on top, link columns in 2x2 grid */
@media (min-width: 768px) and (max-width: 991.98px) {
  .footer .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer .footer-about {
    grid-column: 1 / -1;
    max-width: 520px;
  }
}

/* Mobile: 2-column link grid */
@media (max-width: 767.98px) {
  .footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
  }

  .footer .footer-about {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer .footer-about a.logo {
    justify-content: center;
  }
}

.footer .footer-divider {
  margin: 0;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  opacity: 1;
}

.footer .footer-bottom {
  padding-top: 1.25rem;
  padding-bottom: 0.25rem;
}

.footer .footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.footer .footer-copyright {
  font-size: 0.875rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 50%);
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-right: 0;
  transition: 0.3s;
  flex-shrink: 0;
}

.footer .social-links a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
}

.footer h4 {
  font-size: 15px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 0;
  color: var(--heading-color);
}

.footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-color);
}

.footer .footer-links {
  margin-bottom: 0;
  min-width: 0;
}

.footer .footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.footer .footer-links ul li {
  padding: 7px 0;
  display: flex;
  align-items: flex-start;
}

.footer .footer-links ul li:first-child {
  padding-top: 0;
}

.footer .footer-links ul a {
  display: inline-block;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  line-height: 1.45;
  word-break: break-word;
  transition: color 0.2s ease;
}

.footer .footer-links ul a:hover {
  color: var(--accent-color);
}

.footer .footer-about a {
  color: var(--heading-color);
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--heading-font);
}

.footer .footer-about img {
  width: 150px;
  max-width: 100%;
  height: auto;
}

.footer .footer-contact p {
  margin-bottom: 0;
  max-width: 100%;
  line-height: 1.65;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
}

/* Mobile refinements */
@media (max-width: 767.98px) {
  .footer {
    font-size: 13px;
    padding-bottom: 22px;
  }

  .footer .footer-top {
    padding-top: 32px;
  }

  .footer .footer-about img {
    width: 130px;
  }

  .footer .footer-contact p {
    font-size: 0.92rem;
  }

  .footer .footer-links h4 {
    font-size: 14px;
  }

  .footer .footer-links ul a {
    font-size: 0.8125rem;
  }

  .footer .footer-bottom-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .footer .social-links {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .footer .footer-grid {
    gap: 1.5rem 1rem;
  }

  .footer .social-links a {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

/* Legacy newsletter styles (kept for compatibility) */
.footer .footer-newsletter {
  background-color: color-mix(in srgb, var(--heading-color), transparent 95%);
  padding: 50px 0;
}

.footer .footer-newsletter h4 {
  font-size: 24px;
}

.footer .footer-newsletter h4::after {
  display: none;
}

.footer .footer-newsletter .newsletter-form {
  margin-top: 30px;
  margin-bottom: 15px;
  padding: 6px 8px;
  position: relative;
  background-color: color-mix(in srgb, var(--background-color), transparent 50%);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  box-shadow: 0px 2px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  transition: 0.3s;
  border-radius: 50px;
}

.footer .footer-newsletter .newsletter-form:focus-within {
  border-color: var(--accent-color);
}

.footer .footer-newsletter .newsletter-form input[type=email] {
  border: 0;
  padding: 4px;
  width: 100%;
  background-color: color-mix(in srgb, var(--background-color), transparent 50%);
  color: var(--default-color);
}

.footer .footer-newsletter .newsletter-form input[type=email]:focus-visible {
  outline: none;
}

.footer .footer-newsletter .newsletter-form input[type=submit] {
  border: 0;
  font-size: 16px;
  padding: 0 20px;
  margin: -7px -8px -7px 0;
  background: var(--accent-color);
  color: var(--contrast-color);
  transition: 0.3s;
  border-radius: 50px;
}

.footer .footer-newsletter .newsletter-form input[type=submit]:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 20%);
}

.footer .copyright {
  padding-top: 25px;
  padding-bottom: 25px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .copyright p {
  margin-bottom: 0;
}

.footer .credits {
  margin-top: 6px;
  font-size: 13px;
}
