/* Port of src/components/shared/Footer.astro styles. */

.footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

.footer-topbar {
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--purple) 50%, var(--accent) 100%);
}

.footer-inner {
  padding: 20px 0 16px;
}

@media (min-width: 768px) {
  .footer-inner { padding: 72px 0 64px; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
    gap: 40px;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .footer-grid { gap: 56px; }
}

/* Brand column */
.footer-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .footer-brand {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
  }
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 100%;
}

@media (min-width: 768px) {
  .footer-tagline {
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 320px;
  }
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 9999px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.22);
  color: #16a34a;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px rgba(22, 163, 74, 0.5); }
  50% { box-shadow: 0 0 10px rgba(22, 163, 74, 0.9); }
}

/* Collapsible columns */
.footer-col {
  border-bottom: 1px solid var(--divider);
}

.footer-col:last-child { border-bottom: none; }

@media (min-width: 768px) {
  .footer-col { border-bottom: none; }
}

.footer-col-toggle {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 0;
  cursor: pointer;
}

@media (min-width: 768px) {
  .footer-col-toggle {
    padding: 0 0 16px 0;
    cursor: default;
    pointer-events: none;
  }
}

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #eab308;
}

.toggle-icon {
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .toggle-icon { display: none; }
}

[aria-expanded="true"] .toggle-icon { transform: rotate(180deg); }

.footer-list {
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-height: 800px;
  opacity: 1;
}

.footer-list.is-collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .footer-list {
    max-height: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible;
  }
}

/* Nav links */
ul.footer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 18px 0;
  list-style: none;
}

@media (min-width: 768px) {
  ul.footer-list { padding-bottom: 0; }
}

.footer-link {
  display: flex;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover { color: var(--primary); }

/* Contact list */
ul.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
}

@media (min-width: 768px) {
  ul.contact-list {
    padding-bottom: 0;
    margin-top: 4px;
  }
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2px;
}

.contact-value {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.45;
  text-decoration: none;
}

.contact-value--link { transition: color 0.2s ease; }
.contact-value--link:hover { color: var(--primary); }

/* Social links */
div.footer-list { padding-bottom: 18px; }

@media (min-width: 768px) {
  div.footer-list { padding-bottom: 0; }
}

.footer-social-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.footer-social-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(27, 84, 216, 0.1);
}

.social-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.footer-social-link:hover .social-icon-wrap { background: var(--primary-light); }

.social-label { flex: 1; }

.social-arrow {
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover .social-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.footer-trust {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 12px;
  background: var(--surface-2);
  border-radius: 8px;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--divider);
  padding: 14px 0;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 767px) {
  .footer-bottom {
    padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  .footer-bottom {
    padding: 20px 0;
    font-size: 13px;
  }
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.copyright {
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .copyright { font-size: 13px; }
}

.legal-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  position: relative;
  z-index: 2;
}

@media (min-width: 600px) {
  .legal-links {
    justify-content: flex-end;
    padding-right: 85px;
  }
}

.divider {
  color: var(--divider);
  font-size: 16px;
  line-height: 1;
}

.legal-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  z-index: 2;
}

.legal-link:hover { color: var(--heading); }
