/* ========================================
   FOOTER STYLES
   Mobile-first, 5-column grid on desktop
   ======================================== */

/* ----------------------------------------
   Footer Base
   ---------------------------------------- */
.uae-footer {
  background-color: #2A303B;
}

.footer-inner {
  max-width: 1170px;
  margin: 0 auto;
  padding: 64px 20px 48px;
}

/* ----------------------------------------
   Footer Grid
   Mobile: stacked columns
   Desktop: 5 columns with specified widths
   ---------------------------------------- */
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ----------------------------------------
   Footer Columns
   ---------------------------------------- */
.footer-col {
  display: flex;
  flex-direction: column;
}

/* Column Titles */
.footer-col-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

/* ----------------------------------------
   Brand Column
   ---------------------------------------- */
.footer-col--brand {
  gap: 24px;
}

.footer-logo {
  display: inline-block;
}

.footer-logo-img {
  width: 143px;
  height: 143px;
}

/* App Badges */
.footer-app-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.footer-app-badge {
  display: block;
  width: 100%;
  transition: opacity 0.2s ease;
}

.footer-app-badge img {
  width: 100%;
  height: auto;
  max-width: 172px;
}

.footer-app-badge:hover {
  opacity: 0.8;
}

/* Brand Tagline */
.footer-brand-tagline {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.2px;
}

/* Social Icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.footer-social-link:hover {
  opacity: 0.7;
}

.footer-social-link img {
  display: block;
}

/* ----------------------------------------
   Link Columns (Company, Modules, Resources)
   ---------------------------------------- */
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-static {
  margin-top: 12px;
}

.footer-nav-link {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-nav-link:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.05);
}

/* ----------------------------------------
   Contact Column
   ---------------------------------------- */
.footer-col--contact {
  justify-content: space-between;
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-item {
  display: block;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.footer-contact-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.footer-contact-link:hover .footer-contact-value {
  color: #FFFFFF;
}

/* Country: Flag + Name container */
.footer-contact-country {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.footer-contact-flag {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.footer-contact-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  margin: 0;
}

/* Mail icon */
.footer-contact-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.8;
}

.footer-contact-value {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  text-align: end;
  transition: color 0.2s ease;
}

/* Contact Content Wrapper */
.footer-contact-content {
  display: flex;
  flex-direction: column;
}

/* SOC Badge */
.footer-badge {
  align-self: flex-end;
}

.footer-badge-img {
  width: 80px;
  height: auto;
}

/* ----------------------------------------
   Bottom Bar
   ---------------------------------------- */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-inner {
  max-width: 1170px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-copyright-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  text-align: center;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-legal-link {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: #FFFFFF;
}


/* ========================================
   TABLET (768px+)
   2-column layout for link sections
   ======================================== */
@media (min-width: 768px) {
  .footer-inner {
    padding: 72px 24px 56px;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px 40px;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
  }

  .footer-app-badges {
    flex-direction: row;
    gap: 16px;
  }

  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 24px;
  }

  .footer-copyright-text {
    text-align: start;
  }
}


/* ========================================
   DESKTOP (992px+)
   5-column grid with specified widths
   ======================================== */
@media (min-width: 992px) {
  .footer-inner {
    padding: 80px 15px 64px;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 172px 122px 230px 180px 212px;
    gap: 0;
    justify-content: space-between;
    align-items: stretch;
  }

  .footer-col--brand {
    grid-column: auto;
    flex-direction: column;
    gap: 24px;
  }

  .footer-app-badges {
    flex-direction: column;
    gap: 12px;
  }

  .footer-col-title {
    margin-bottom: 24px;
  }

  .footer-links {
    gap: 14px;
  }

  .footer-links-static {
    margin-top: 14px;
  }

  .footer-contact-list {
    gap: 14px;
  }

  .footer-bottom-inner {
    padding: 28px 15px;
  }
}


/* ========================================
   LARGE DESKTOP (1200px+)
   Fine-tune spacing
   ======================================== */
@media (min-width: 1200px) {
  .footer-inner {
    padding: 80px 15px 64px;
  }

  .footer-grid {
    gap: 0;
  }
}


/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   WCAG AA Compliant (4.5:1 contrast ratio)
   ======================================== */

/* ----------------------------------------
   Color Contrast Fixes
   Background #2A303B requires 4.5:1 minimum
   ---------------------------------------- */

/* Boost from 0.6 to 0.75 opacity for 4.5:1+ contrast */
.footer-brand-tagline {
  color: rgba(255, 255, 255, 0.75);
}

.footer-copyright-text {
  color: rgba(255, 255, 255, 0.75);
}

.footer-legal-link {
  color: rgba(255, 255, 255, 0.75);
}

/* ----------------------------------------
   Focus States (WCAG 2.4.7)
   ---------------------------------------- */
.uae-footer a:focus-visible,
.uae-footer button:focus-visible {
  outline: 2px solid #4DA8DA;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enhanced hover/focus states */
.footer-nav-link:focus {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.08);
}

.footer-legal-link:focus {
  color: #FFFFFF;
}

.footer-contact-link:focus .footer-contact-value {
  color: #FFFFFF;
}

/* ----------------------------------------
   Skip Link for Keyboard Navigation
   ---------------------------------------- */
.footer-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #008483;
  color: #FFFFFF;
  padding: 8px 16px;
  z-index: 100;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 4px 0;
  transition: top 0.2s ease;
}

.footer-skip-link:focus {
  top: 0;
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* ----------------------------------------
   High Contrast Mode Support
   ---------------------------------------- */
@media (prefers-contrast: high) {
  .footer-brand-tagline,
  .footer-copyright-text,
  .footer-legal-link,
  .footer-nav-link,
  .footer-contact-value {
    color: #FFFFFF;
  }

  .uae-footer a:focus,
  .uae-footer button:focus {
    outline: 3px solid #FFFFFF;
    outline-offset: 3px;
  }
}

/* ----------------------------------------
   Reduced Motion Support
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .uae-footer a,
  .uae-footer button,
  .footer-skip-link {
    transition: none;
  }
}

/* ----------------------------------------
   RTL Support
   ---------------------------------------- */
[dir="rtl"] .footer-contact-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

[dir="rtl"] .footer-contact-value {
  margin-inline-start: 28px; /* 20px flag + 8px gap */
  text-align: start;
}
