/* ─── Footer ──────────────────────────────────────────────────────── */

.footer {
  position: relative;
  background: #ffffff;
  color: var(--color-ink-600);
}

.footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0,
    rgba(16, 152, 162, .4) 30%,
    rgba(99, 91, 255, .32) 60%,
    transparent 100%
  );
}

/* ── Top (Brand + Menus) ─────────────────────────────────────────────────────────── */

.footer-top {
  padding: clamp(32px, 4.5vw, 52px) 0 clamp(24px, 3.5vw, 40px);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
}

/* Brand column */
.footer-brand {
  max-width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.footer-logo__img {
  height: clamp(32px, 4vw, 44px);
  width: auto;
  display: block;
}

.footer-logo__text {
  display: grid;
  gap: 2px;
}

.footer-logo__text strong {
  color: #078f9d;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
}

.footer-logo__text small {
  color: #7a8fa3;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .01em;
}

.footer-brand__desc {
  color: #7a8fa3;
  font-size: .88rem;
  line-height: 1.65;
  margin: 0;
  text-align: justify;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact-info a {
  color: #62778d;
  font-size: .88rem;
  text-decoration: none;
  transition: color .2s;
}

.footer-contact-info a span {
  color: var(--color-brand);
  font-weight: 600;
  margin-right: 4px;
}

.footer-contact-info a:hover {
  color: var(--color-brand);
}

/* Menus */
.footer-menus {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  flex-direction: column;
}

.footer-nav__title {
  display: flex;
  align-items: center;
  color: var(--color-ink-950);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  list-style: none;
}

/* Hide default details marker for WebKit/Blink */
.footer-nav__title::-webkit-details-marker {
  display: none;
}

.footer-nav__icon {
  display: none; /* Hidden on desktop */
}

.footer-nav ul {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a,
.footer-nav__address {
  color: #62778d;
  font-size: .88rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 200ms ease;
}

.footer-nav__address {
  cursor: default;
  line-height: 1.5;
}

.footer-nav a:hover {
  color: var(--color-brand);
}

/* ── Mid (Social + Legal) ───────────────────────────────────────────────────────── */

.footer-mid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-mid > .container {
  border-top: 1px solid #e3eaf1;
  border-bottom: 1px solid #e3eaf1;
}

.footer-social {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid #edf1f6;
}

.footer-social__label {
  color: #b0bfcc;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.footer-social__links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-social__links a {
  color: #62778d;
  font-size: .875rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 200ms ease;
}

.footer-social__links a:hover { color: var(--color-brand); }

.footer-legal-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: #a8b8c8;
  font-size: .78rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 200ms ease;
}

.footer-legal-links a:hover { color: var(--color-brand); }

/* ── Bottom (Copyright) ─────────────────────────────────────────────────────────── */

.footer-bottom { padding: 18px 0; }

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom__copy {
  font-size: .77rem;
  color: #b0bfcc;
  letter-spacing: .01em;
}

.footer-bottom__dev {
  font-size: .72rem;
  color: #b0bfcc;
  letter-spacing: .02em;
}

.footer-bottom__dev a {
  color: #8fa3b5;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}

.footer-bottom__dev a:hover { color: var(--color-brand); }

/* ── Responsive ───────────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .footer-grid {
    flex-direction: column;
    gap: 48px;
  }
  .footer-menus {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .footer-top {
    padding: 44px 0 36px;
  }
  
  .footer-brand {
    align-items: center;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .footer-menus {
    flex-direction: column;
    gap: 0;
  }
  
  .footer-nav {
    border-bottom: 1px solid #e3eaf1;
    padding: 0;
    width: 100%;
  }
  .footer-nav:first-child {
    border-top: 1px solid #e3eaf1;
  }
  
  .footer-nav__title {
    margin: 0;
    padding: 20px 0;
    cursor: pointer;
    position: relative;
    justify-content: center;
    text-align: center;
  }
  
  .footer-nav__icon {
    display: inline-flex;
    align-items: center;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #8fa3b5;
    transition: transform .2s ease;
  }
  .footer-nav__icon svg { width: 16px; height: 16px; }
  
  /* Details/Summary animation & state */
  .footer-nav[open] .footer-nav__icon {
    transform: translateY(-50%) rotate(180deg);
  }
  
  .footer-nav[open] .footer-nav__title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(16,152,162,0), rgba(16,152,162,.8), rgba(16,152,162,0));
  }
  
  .footer-nav ul {
    padding: 4px 0 24px;
    text-align: center;
  }
  
  /* Mid */
  .footer-social { justify-content: center; }
  .footer-social__links { gap: 16px; }
  .footer-legal-links { justify-content: center; }

  /* Contact */
  .footer-contact-info { align-items: center; text-align: center; }
  .footer-brand__desc { text-align: center; }

  /* Bottom */
  .footer-bottom__inner { flex-direction: column; gap: 4px; align-items: center; }
  .footer-bottom__copy,
  .footer-bottom__dev { text-align: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-contact-info a,
  .footer-nav a,
  .footer-social__links a,
  .footer-legal-links a,
  .footer-bottom__dev a {
    transition: none;
  }
}
