/* css/footer.css - Enhanced Footer Styles */

/* ===== Footer Base ===== */
.footer {
  /* Keep footer independent from any preceding layout contexts */
  clear: both;
  width: 100%;
  padding: 52px 0 28px;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer .container {
  position: relative;
}

/* Wrapper (exists in HTML: .footer-inner) */
.footer .footer-inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Footer Grid Layout */
.footer-grid {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(160px, 1fr));
  gap: 26px;
  padding: 28px 28px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--shadow-1);
  margin-bottom: 18px;
}

/* Footer Brand Section */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand .brand {
  font-size: 16px;
}

.footer-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 52ch;
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links h4::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color var(--t-fast) var(--ease), padding var(--t-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--accent);
  padding-inline-start: 6px;
}

.footer-links a::before {
  content: '›';
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--t-fast) var(--ease);
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Footer Credits */
.footer-credits {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-credits h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.credit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(24, 174, 243, 0.08);
  border: 1px solid rgba(24, 174, 243, 0.15);
  transition: all var(--t-fast) var(--ease);
}

.credit-item:hover {
  background: rgba(24, 174, 243, 0.12);
  border-color: rgba(24, 174, 243, 0.25);
  transform: translateY(-2px);
}

.credit-item .chip {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(24, 174, 243, 0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.credit-item span:last-child {
  font-size: 12px;
  color: var(--muted);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface-3) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Improve readability/spacing for lists in footer columns */
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  line-height: 1.35;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--muted-2);
  margin: 0;
}

.footer-disclaimer {
  font-size: 11px !important;
  opacity: 0.7;
}

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* Light Mode Adjustments */
html[data-theme="light"] .footer-grid {
  background: color-mix(in srgb, var(--surface-1) 90%, transparent);
  border-color: rgba(11, 24, 29, 0.08);
}

html[data-theme="light"] .footer-bottom {
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  border-color: rgba(11, 24, 29, 0.06);
}

html[data-theme="light"] .credit-item {
  background: rgba(12, 163, 233, 0.06);
  border-color: rgba(12, 163, 233, 0.12);
}

html[data-theme="light"] .credit-item:hover {
  background: rgba(12, 163, 233, 0.1);
  border-color: rgba(12, 163, 233, 0.2);
}


/* ==========================================================
   Footer (Home + all pages) — Class-mismatch fix + layout
   This project uses: .footer-grid .footer-brand .footer-links
   ========================================================== */

.footer.section {
  padding: 28px 0 22px;
}

.footer.section .footer-inner {
  padding: 22px;
}

/* Grid */
.footer.section .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Brand */
.footer.section .footer-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.footer.section .footer-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 52ch;
}

/* Links columns */
.footer.section .footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer.section .footer-links h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.footer.section .footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  width: fit-content;
}

.footer.section .footer-links a:hover {
  color: var(--text);
  transform: translateX(-2px);
}

html[dir="ltr"] .footer.section .footer-links a:hover {
  transform: translateX(2px);
}

/* Bottom */
.footer.section .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  color: var(--muted);
  font-size: 12.5px;
}

.footer.section .footer-team {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.footer.section .footer-team .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-3) 78%, transparent);
  color: var(--text);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 980px) {
  .footer.section .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer.section .footer-inner {
    padding: 18px;
  }
  .footer.section .footer-links a {
    width: 100%;
  }
}
