/* ===== Mobile Footer Fixes ===== */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr !important; /* stack into one column */
    gap: 24px !important;
  }
  .footer-col {
    min-width: 0 !important;
    text-align: center !important;
  }
  .social-links {
    justify-content: center !important;
  }
}

/* ===== Desktop/Laptop: keep email on ONE line with icon ===== */
@media (min-width: 769px) {
  /* Give the Contact (last) column enough room so the email can fit */
  footer .footer-grid .footer-col:last-child {
    min-width: 360px !important; /* adjust to 380–420px if still breaking */
  }

  /* Make each Contact list item a single row (icon + text stay together) */
  footer .footer-grid .footer-col:last-child .footer-links li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;  /* don't wrap icon and text onto two lines */
    min-width: 0 !important;
  }

  /* Force the mailto link itself to never break */
  footer .footer-grid .footer-col:last-child .footer-links a[href^="mailto"] {
    white-space: nowrap !important;   /* never split the email */
    overflow-wrap: normal !important;
    word-break: normal !important;
    display: inline-block !important;
  }
}

/* ===== Safety: if some pages use nth-of-type(4) instead of last-child ===== */
@media (min-width: 769px) {
  footer .footer-grid .footer-col:nth-of-type(4) {
    min-width: 360px !important;
  }
  footer .footer-grid .footer-col:nth-of-type(4) .footer-links li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }
  footer .footer-grid .footer-col:nth-of-type(4) .footer-links a[href^="mailto"] {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    display: inline-block !important;
  }
}
