/* =========================================
     WCAG 2.2 FOOTER CONTRAST FIXES
     ========================================= */

  /* 1. Ensure Background & Text Contrast */
  /* Assuming Main Footer is Dark (Primary Color) */
  .main-footer {
    background-color: var(--primary-color); /* Enforce dark bg if not set */
    color: var(--secondary-color) !important; /* Light text for readability */
  }

  /* 2. Heading Contrast */
  /* Previous: Dark Blue on Dark Blue -> Invisible */
  /* New: White -> Pass (15:1) */
  /* New: White -> Pass (15:1) */
  .footer-motionis .motionis-text {
    color: var(--primary-color) !important;
    background-color: var(--white-color) !important;
    padding: 5px 15px;
    border-radius: 8px;
    display: inline-block;
  }

  .about-footer-content h2 {
    color: var(--white-color) !important;
  }

  /* Fix: Footer Links Headings (Pills) text must be dark */
  .footer-links h2 {
     color: var(--primary-color) !important;
  }

  /* 3. Link Contrast & Interactive States */
  .footer-links ul li a {
    color: var(--secondary-color) !important;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    padding: 12px 15px;
    min-height: 44px;
    border-radius: 4px;
    margin-left: -15px; /* Offset the padding so the text stays aligned */
  }

  .footer-links ul li a:hover,
  .footer-links ul li a:focus {
    color: var(--white-color) !important;
    text-decoration: underline;
    outline: 2px solid var(--white-color);
    outline-offset: 2px;
  }

  /* 4. Social Icons */
  .footer-links.social-links {
    text-align: left !important;
  }

  .footer-links.social-links ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }
  
  .footer-links.social-links ul li {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .footer-links.social-links ul li::before {
    display: none !important; /* Hide dot bullet points */
  }

  .footer-links.social-links ul li a {
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  .footer-links.social-links ul li a:hover,
  .footer-links.social-links ul li a:focus {
    color: var(--primary-color) !important; /* Invert color to dark blue */
    background-color: var(--white-color) !important; /* Solid white circle background */
    border-color: var(--white-color) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25) !important;
    outline: none !important;
  }

  /* Fix: Social Heading Contrast (Light Pill requires Dark Text) */
  .footer-links.social-links h2 {
    color: var(--primary-color) !important;
  }

  /* Working Hours: Single-line row layout with separators */
  .footer-links.working-links {
    width: 100% !important; /* Forces it to occupy its own line, spanning full width */
    margin-top: 15px !important;
  }

  .footer-links.working-links ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    column-gap: 20px !important;
    row-gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .footer-links.working-links ul li {
    display: inline-flex !important;
    align-items: center !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    white-space: nowrap !important;
    color: var(--white-color) !important;
  }

  .footer-links.working-links ul li::before {
    display: none !important; /* Hide standard bullet dots completely */
  }

  /* Dot separator after items */
  .footer-links.working-links ul li::after {
    content: "•" / "" !important;
    display: inline-block !important;
    margin-left: 20px !important;
    margin-right: 20px !important;
    color: var(--secondary-color) !important;
    font-size: 14px !important;
  }

  /* Hide separator after the last item */
  .footer-links.working-links ul li:last-child::after {
    display: none !important;
  }

  /* =========================================
     FOOTER COLUMNS RESPONSIVE GRID OVERRIDES
     ========================================= */
  
  /* Desktop layout (3 columns on Row 1, Working Hours spanning Row 2) */
  @media (min-width: 992px) {
    .footer-links.quick-links,
    .footer-links.social-links {
      width: calc(25% - 75px) !important;
      text-align: left !important;
    }
    .footer-links.footer-contact-details {
      width: calc(50% - 50px) !important; /* Spans 50% on desktop to match the remaining space */
      text-align: left !important;
    }
    .footer-links.working-links {
      width: 100% !important; /* Working hours sits on Row 2 at 100% width */
      text-align: left !important;
    }
  }

  /* Tablet (2x2 Grid) */
  @media (min-width: 576px) and (max-width: 991px) {
    .footer-links.quick-links,
    .footer-links.social-links,
    .footer-links.footer-contact-details {
      width: calc(50% - 15px) !important;
      text-align: left !important;
    }
    .footer-links.working-links {
      width: 100% !important;
      text-align: left !important;
    }
  }

  /* Mobile (1 Column Stack) */
  @media (max-width: 575px) {
    .footer-links.quick-links,
    .footer-links.social-links,
    .footer-links.footer-contact-details,
    .footer-links.working-links {
      width: 100% !important;
      text-align: left !important;
    }
  }

  /* 5. Contact Icons (SVG) */
  /* If icons are dark, invert them to white */
  .footer-info-box .icon-box img {
    filter: brightness(0) invert(1) !important;
    opacity: 0.9;
  }

  /* 6. Copyright Text */
  .footer-copyright-text p {
    color: var(--secondary-color) !important;
    opacity: 0.8; /* Slight dim but still compliant */
  }

  /* 7. Footer Contact Layout Fix (Vertical Stacking) */
  .footer-contact-box {
    display: flex !important;
    flex-direction: column !important; /* Stack vertically to prevent "cutting" */
    align-items: flex-start !important;
    gap: 12px;
    margin-top: 20px;
  }

  .footer-contact-details .footer-info-box {
    margin-right: 0 !important;
    width: 100%;
    display: flex;
    align-items: center;
  }

  /* Ensure phone and email don't wrap internally */
  .footer-info-box-content p {
    white-space: nowrap !important;
    color: var(--white-color) !important;
    font-size: 1.05rem;
  }

/* =========================================
   ACCESSIBILITY CONTRAST OVERRIDES
   ========================================= */

/* Light & Invert Modes: Black icons, light grey background, no hover shifts */
html[data-contrast="light"] .footer-links.social-links ul li a,
html[data-contrast="invert"] .footer-links.social-links ul li a {
  color: #000000 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  background-color: rgba(0, 0, 0, 0.08) !important;
}

html[data-contrast="light"] .footer-links.social-links ul li a:hover,
html[data-contrast="light"] .footer-links.social-links ul li a:focus,
html[data-contrast="invert"] .footer-links.social-links ul li a:hover,
html[data-contrast="invert"] .footer-links.social-links ul li a:focus {
  color: #000000 !important;
  background-color: rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  transform: none !important;
}

/* Dark Mode: Yellow icons, transparent background, no hover shifts */
html[data-contrast="dark"] .footer-links.social-links ul li a {
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  background-color: transparent !important;
}

html[data-contrast="dark"] .footer-links.social-links ul li a:hover,
html[data-contrast="dark"] .footer-links.social-links ul li a:focus {
  color: #ffff00 !important;
  background-color: transparent !important;
  border-color: #ffff00 !important;
  transform: none !important;
}

html[data-contrast="light"] .footer-info-box-content p,
html[data-contrast="light"] .footer-info-box-content p a {
  color: #000000 !important;
}

html[data-contrast="light"] .footer-info-box .icon-box img {
  filter: brightness(0) !important;
}
