.site-footer {
  position: relative;
  color: var(--white);
  background: linear-gradient(145deg, #0e3320, #0a2744);
  margin-top: 2rem;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr) minmax(220px, 0.8fr);
  gap: 3rem;
  padding: 4rem 5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  max-width: 520px;
}

.footer-logo {
  display: grid;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  place-items: center;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.footer-logo img {
  width: 50px;
  height: auto;
  object-fit: contain;
}

.footer-brand strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-brand p,
.footer-column p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  font-size: 0.98rem;
}

body:not(.landing-page) .footer-brand > div > p:last-of-type {
  position: relative;
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  color: transparent;
  background: rgba(164, 229, 194, 0.1);
  border-left: 4px solid #a4e5c2;
  border-radius: 8px;
  display: inline-block;
  font-size: 0;
  line-height: 1.5;
}

body:not(.landing-page) .footer-brand > div > p:last-of-type::before {
  content: "നിങ്ങളുടെ കുടുംബത്തിന്റെ ആരോഗ്യം, ഞങ്ങളുടെ പ്രതിബദ്ധത";
  color: #d9f7e9;
  font-family: "Noto Serif Malayalam", serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.landing-page .footer-brand > div > p:last-of-type {
  display: none;
}

.footer-column {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.footer-column h2 {
  margin-bottom: 0.5rem;
  color: #a4e5c2;
  font-size: 0.9rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.footer-column a {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  transition: color 200ms ease, transform 200ms ease;
  width: fit-content;
}

.footer-column a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin-top: 0.5rem;
  padding: 0.8rem 1.2rem;
  color: #0e3320 !important;
  background: #a4e5c2;
  border-radius: 8px;
  font-weight: 800;
  transition: background 200ms ease, transform 200ms ease;
}

.footer-phone:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 5rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.copyright {
  margin: 0;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  transition: color 200ms ease;
}

.back-to-top:hover {
  color: #ffffff;
}

.back-to-top svg {
  transition: transform 200ms ease;
}

.back-to-top:hover svg {
  transform: translateY(-3px);
}

@media (max-width: 1050px) {
  .footer-main,
  .footer-bottom {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .footer-main,
  .footer-bottom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    padding-top: 3rem;
    gap: 2.5rem;
  }

  .footer-brand {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .footer-main,
  .footer-bottom {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-main {
    gap: 2rem;
    padding-top: 2.5rem;
  }

  .footer-logo {
    width: 60px;
    height: 60px;
  }

  .footer-logo img {
    width: 42px;
  }

  .footer-brand strong {
    font-size: 1.25rem;
  }

  body:not(.landing-page) .footer-brand > div > p:last-of-type {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  body:not(.landing-page) .footer-brand > div > p:last-of-type::before {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .footer-phone,
  .footer-column a {
    width: 100%;
    justify-content: center;
  }
}
