/**
 * TLJCC Site Footer Stylesheet
 * Replicated from Figma Design Specification
 * Design System: Tunku Laksamana Johor Cancer Centre
 */

/* ==========================================================================
   GLOBAL FOOTER (FIGMA REPLICATION)
   ========================================================================== */
.footer {
  background: var(--navy-deep, #081028);
  color: rgba(255, 255, 255, 0.72);
  padding: 72px 0 38px;
  font-size: 13px;
  font-family: 'Avenir', 'Avenir Next', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  width: 100%;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.footer .shell {
  width: min(calc(100% - 48px), var(--container, 1320px));
  max-width: var(--container, 1320px);
  margin-inline: auto;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1.15fr;
  gap: clamp(28px, 3.2vw, 56px);
  align-items: start;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: none !important; /* Remove redundant divider */
}

.footer hr,
.site-footer hr {
  display: none !important;
}

/* Brand Column */
.footer-col-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
  margin-inline: auto;
  align-self: center;
  text-decoration: none;
  color: inherit;
  width: fit-content;
  text-align: center;
}

.footer-brand img,
.footer-brand .footer-logo-img {
  width: 48px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform .2s ease;
}

.footer-brand:hover img,
.footer-brand:hover .footer-logo-img {
  transform: scale(1.03);
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-brand strong,
.footer-brand span {
  display: block;
  font-family: "Times New Roman", Times, "Liberation Serif", serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #ffffff;
  text-align: center;
  width: 100%;
}

.footer-brand span {
  margin-top: 2px;
  color: #ffffff;
}

.footer-desc {
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  margin: 0 0 16px;
  max-width: 380px;
}

.footer-quote {
  margin: 0 !important;
  color: var(--yellow, #f6eb16) !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
}

/* Section Headings */
.footer h5 {
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 0 0 20px;
  font-family: 'Avenir', 'Avenir Next', system-ui, -apple-system, sans-serif;
  line-height: 1.3;
}

/* Navigation & Info Lists */
.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0;
  margin: 0;
}

.footer li {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.footer a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-decoration: none;
  transition: color .2s ease;
}

.footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-info-address {
  color: rgba(255, 255, 255, 0.72);
}

/* Bottom Bar (Centered) */
.footer-bottom {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  gap: 12px;
  width: 100%;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  width: 100%;
}

.footer-legal-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  text-decoration: none;
  transition: color .2s ease;
  text-align: center;
}

.footer-legal-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Align the brand column to the content edge on desktop. */
@media (min-width: 1081px) {
  .footer-col-brand,
  .footer-col-brand .footer-brand-text {
    align-items: flex-start;
    text-align: start;
  }

  .footer-col-brand .footer-brand {
    justify-content: flex-start;
    align-self: flex-start;
    margin-inline: 0;
    text-align: start;
  }

  .footer-col-brand .footer-brand strong,
  .footer-col-brand .footer-brand span,
  .footer-col-brand .footer-desc,
  .footer-col-brand .footer-quote {
    text-align: start;
  }
}

/* ==========================================================================
   Responsive Adaptations (Tablet & Mobile Centralized Layout)
   ========================================================================== */
@media (max-width: 1080px) {
  .footer {
    padding: 56px 0 32px;
    text-align: center;
  }

  .footer .shell {
    width: min(calc(100% - 40px), var(--container, 1320px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    gap: 36px !important;
    text-align: center !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }

  .footer-col-brand,
  .footer-col-nav,
  .footer-col-services,
  .footer-col-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto 18px;
    align-self: center;
  }

  .footer-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .footer-brand strong,
  .footer-brand span {
    text-align: center;
    width: 100%;
  }

  .footer-desc {
    text-align: center;
    margin: 0 auto 16px;
    max-width: 480px;
  }

  .footer-quote {
    text-align: center;
    margin: 0 auto !important;
  }

  .footer h5 {
    text-align: center;
    margin: 0 auto 16px;
    width: 100%;
  }

  .footer ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    gap: 12px;
  }

  .footer li {
    text-align: center;
    width: 100%;
  }

  .footer a {
    text-align: center;
    display: inline-block;
  }

  .footer-info-address {
    text-align: center;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    width: 100%;
    max-width: 600px;
    margin: 32px auto 0 !important;
    padding-top: 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
  }

  .footer-copyright {
    text-align: center;
    width: 100%;
  }

  .footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 auto;
  }

  .footer-legal-links a {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 44px 0 24px;
  }

  .footer .shell {
    width: min(calc(100% - 32px), var(--container, 1320px));
  }

  .footer-grid {
    gap: 32px !important;
  }

  .footer-bottom {
    margin-top: 24px !important;
    padding-top: 18px !important;
    gap: 12px;
  }

  .footer-legal-links {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .footer .shell {
    width: min(calc(100% - 24px), var(--container, 1320px));
  }
}
