/* ------------------------------------------ */
/* PREMIUM FOOTER WITH ANIMATION + COLLAPSIBLES */
/* ------------------------------------------ */

.custom-footer {
  background: var(--md-footer-bg-color, var(--md-default-bg-color));
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--md-default-fg-color--lighter);
  color: var(--md-default-fg-color);
}

/* Layout */
.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 1200px;
  margin: auto;
  justify-content: space-between;
}

.footer-section {
  flex: 1 1 250px;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Branding */
.footer-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 48px;
  height: auto;
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
}

/* ------------------------------------------ */
/* REMOVE LIST BULLETS IN ALL FOOTER UL LISTS */
/* ------------------------------------------ */

.custom-footer ul,
.custom-footer ul li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

/* Footer link styling */
.custom-footer a {
  color: var(--md-accent-fg-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.custom-footer a:hover {
  opacity: 0.75;
}

/* ------------------------------------------ */
/* Collapsible Sitemap Styling                */
/* ------------------------------------------ */

.footer-collapsible summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0;
  position: relative;
  user-select: none;
}

/* Arrow icons */
.footer-collapsible summary::after {
  content: "▶";
  position: absolute;
  right: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.7;
}

.footer-collapsible details[open] summary::after {
  content: "▼";
  opacity: 1;
}

/* Collapsible content animation */
.footer-collapsible details > ul {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease-out;
}

.footer-collapsible details[open] > ul {
  max-height: 600px;
}

/* Active page highlight */
.active-footer-page > a {
  color: var(--md-accent-fg-color);
  font-weight: 700;
  text-decoration: underline;
}

.active-footer-summary {
  color: var(--md-accent-fg-color);
}

/* ------------------------------------------ */
/* Social Icons                               */
/* ------------------------------------------ */

.footer-social .twemoji {
  margin-right: 0.3rem;
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  opacity: 0.85;
  font-size: 0.85rem;
}

/* ------------------------------------------ */
/* MOBILE: close collapsibles + clean layout  */
/* ------------------------------------------ */

@media (max-width: 768px) {

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-branding {
    flex-direction: column;
  }

  .footer-logo {
    width: 50px;
  }

  /* Ensure collapsibles appear visually correct on mobile */
  .footer-collapsible summary::after {
    right: 50%;
    transform: translateX(50%);
  }

  .footer-collapsible details > ul {
    margin-left: 0;
  }
}
