/* Footer Grid - Desktop & Tablet */
.footer,
footer.bg-primary {
  background: var(--primary-colour);
}

.footer-bottom-section {
  background: var(--primary-colour);
  color: var(--color-text-inverse);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  padding: 3rem 0;
}

.footer-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.section.footer-section {
    padding: 0px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--brand-secondary);
}

/* Social Icons - FIXED */
.social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-inverse, #ffffff);
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: var(--text-inverse, #ffffff);
}

.social-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: inherit;
}

/* Footer Bottom */
.footer-bottom-section {
  padding: 1.5rem 0;
}

.footer-bottom-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
  text-align: left;
}

.footer-brand-bottom {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.footer-brand-bottom p {
  color: var(--background-light);
  white-space: nowrap;
}

.footer-logo-bottom {
  display: none; /* only show on Tablet / Mobile */
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem 2rem;
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .footer-bottom-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.footer-legal a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: var(--brand-secondary);
}

/* Hide mobile-footer on Desktop + Tablet */
.mobile-footer {
  display: none;
}

/* Responsive Layouts */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-logo-bottom {
    display: block;
    margin-bottom: 0.75rem;
  }

  .footer-bottom-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-legal {
    justify-content: center;
  }

  /* Tablet social under divider */
  .tablet-social {
    position: relative;
    padding-top: 1.8rem;
    padding-bottom: 0rem;
  }

  .social-divider {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
    z-index: 1;
  }

  .tablet-social .flex {
    position: relative;
    z-index: 2;
    background: var(--brand-primary);
    padding-top: 1.8rem;
    padding-bottom: 0rem;
    width: fit-content;
    margin: 0 auto;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .footer-grid {
    display: none;
  }

  .mobile-footer {
    display: block;
    padding: 2rem 0;
  }

  .mobile-section {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .mobile-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1.25rem 0;
    cursor: pointer;
  }

  .mobile-toggle svg {
    color: var(--brand-secondary);
    transition: transform 0.3s ease;
  }

  .mobile-toggle.active svg {
    transform: rotate(180deg);
  }

  .mobile-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mobile-content.active {
    max-height: 300px;
    padding-bottom: 1rem;
  }

  .mobile-content a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s;
  }

  /* Mobile sub-footer */
  .footer-bottom-layout {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
  }

  .footer-brand-bottom {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .footer-logo-bottom {
    display: block;
    margin-bottom: 0.75rem;
  }

  .footer-legal {
    justify-content: center;
    gap: 1rem 2rem;
  }

  /* Mobile social under divider */
  .tablet-social {
    position: relative;
    padding-top: 1.8rem;
    padding-bottom: 0;
  }

  .social-divider {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
    z-index: 1;
  }

  .tablet-social .flex {
    position: relative;
    z-index: 2;
    background: var(--brand-primary);
    padding: 0 2rem;
    width: fit-content;
    margin: 0 auto;
  }

  /* Hide sub-footer line */
  .footer-bottom-section {
    border-top: none;
  }

  /* Show tablet-social */
  .tablet-social {
    display: block;
  }
}
