/* ==========================================================================
   Footer Bioglobal
   Figma: Footer Desktop (1079:27518) — frame 1920px · Footer Mobile (2820:17487) — 390px
   Usa as variáveis do header (--bio-blue, --bio-font, --bio-container…).
   ========================================================================== */

.bio-footer {
  --bio-footer-line: linear-gradient(90deg, rgba(86, 86, 85, 0.19) 0%, rgba(138, 138, 137, 0.19) 100%);

  position: relative;
  background: linear-gradient(90deg, #ffffff 0%, #f5f5f5 100%);
  font-family: var(--bio-font);
  color: #000;
}

/* separador do topo (Gradiente Black to Grey) */
.bio-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #111111 0%, #676766 100%);
}

.bio-footer *,
.bio-footer *::before,
.bio-footer *::after {
  box-sizing: border-box;
}

.bio-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bio-footer p {
  margin: 0;
}

.bio-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bio-footer a:hover {
  color: var(--bio-blue);
}

.bio-footer a:focus-visible,
.bio-footer button:focus-visible {
  outline: 2px solid var(--bio-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Textos com text-box-trim no Figma (a caixa do texto = altura das maiúsculas) */
.bio-footer__title,
.bio-footer__links a,
.bio-footer__label,
.bio-footer__value,
.bio-footer__note,
.bio-footer__legal-links a {
  text-box: trim-both cap alphabetic;
}

.bio-footer__inner,
.bio-footer__main {
  width: 100%;
  max-width: var(--bio-container, 1280px);
  margin: 0 auto;
}

/* --- Logo + colunas --- */

.bio-footer__main {
  padding: 41px 0 40px;
}

.bio-footer__logo {
  display: block;
  width: 126px;
}

.bio-footer__logo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 790 / 331;
}

.bio-footer__cols {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 42px; /* colunas a 136px do topo */
}

.bio-footer__col {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
  max-width: 262px;
}

.bio-footer__title {
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.bio-footer__toggle {
  display: none;
}

.bio-footer__links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bio-footer__links a {
  display: block;
  font-size: 16px;
  line-height: 20px;
}

/* --- Linha de contactos --- */

.bio-footer__info,
.bio-footer__legal {
  position: relative;
}

.bio-footer__info::before,
.bio-footer__legal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bio-footer-line);
}

.bio-footer__info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 21px 0 19px;
}

.bio-footer__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.bio-footer__group--phone {
  width: 140px;
}

.bio-footer__label {
  font-weight: 700;
  font-size: 11px;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.bio-footer__value {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: #000;
}

.bio-footer__note {
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
}

.bio-footer__social {
  display: flex;
  gap: 10px;
}

.bio-footer__icon {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
}

/* glifo (Figma) usado como máscara para mudar de cor no hover */
.bio-footer__icon::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 20px;
  height: 20px;
  background: #8a8a89;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  transition: background-color 0.2s ease;
}

.bio-footer__icon:hover::before,
.bio-footer__icon:focus-visible::before {
  background: var(--bio-blue);
}

/* --- Rodapé legal --- */

.bio-footer__legal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 34px;
  padding: 16px 0 14px;
}

.bio-footer__copy {
  font-size: 14px;
  line-height: 20px;
  color: #8a8a89;
}

.bio-footer__legal-links {
  display: flex;
  gap: 34px;
}

.bio-footer__legal-links a {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: #8a8a89;
}

/* --- Tablet (768–1199px): colunas e contactos passam para várias linhas --- */

@media (max-width: 1199px) {
  .bio-footer__inner,
  .bio-footer__main {
    max-width: calc(100% - 40px);
  }

  .bio-footer__cols {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px 64px;
  }

  .bio-footer__col {
    flex: 0 1 calc((100% - 128px) / 3);
    max-width: none;
  }

  .bio-footer__info-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 24px 48px;
  }
}

/* ==========================================================================
   Mobile (≤ 767px) — Figma: Footer Mobile, colunas em acordeão
   ========================================================================== */

@media (max-width: 767px) {
  .bio-footer {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 40px 20px 32px;
  }

  .bio-footer__main,
  .bio-footer__inner {
    max-width: none;
  }

  .bio-footer__main {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 0;
  }

  .bio-footer__logo {
    width: 131px;
  }

  /* Acordeão */
  .bio-footer__cols {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
  }

  .bio-footer__col {
    display: block;
    flex: none;
    max-width: none;
    border-top: 1px solid #111;
  }

  .bio-footer__title {
    display: none;
  }

  .bio-footer__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .bio-footer__toggle:hover,
  .bio-footer__toggle:focus {
    background: none;
    color: #000;
  }

  /* "+" que vira "−" */
  .bio-footer__sign {
    position: relative;
    flex: 0 0 auto;
    width: 12px;
    height: 28px; /* 20px × 1.4 */
  }

  .bio-footer__sign::before,
  .bio-footer__sign::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 1.4px;
    margin-top: -0.7px;
    border-radius: 1px;
    background: #000;
    transition: transform 0.25s ease;
  }

  .bio-footer__sign::after {
    transform: rotate(90deg);
  }

  .bio-footer__col.is-open .bio-footer__sign::after {
    transform: rotate(0deg);
  }

  .bio-footer__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
  }

  .bio-footer__col.is-open .bio-footer__panel {
    grid-template-rows: 1fr;
  }

  .bio-footer__links {
    min-height: 0;
    overflow: hidden;
    gap: 14px;
    visibility: hidden;
    transition: visibility 0s linear 0.3s;
  }

  .bio-footer__col.is-open .bio-footer__links {
    padding-bottom: 18px;
    visibility: visible;
    transition: visibility 0s;
  }

  .bio-footer__links a {
    font-size: 16px;
    line-height: 1.4;
    text-box: normal;
  }

  /* Contactos */
  .bio-footer__info::before,
  .bio-footer__legal::before {
    display: none;
  }

  .bio-footer__info-row {
    flex-direction: column;
    gap: 20px;
    padding: 0;
  }

  .bio-footer__group {
    gap: 4px;
    width: 100%;
  }

  .bio-footer__group--social {
    gap: 8px;
  }

  .bio-footer__label,
  .bio-footer__value,
  .bio-footer__note,
  .bio-footer__legal-links a {
    text-box: normal;
  }

  .bio-footer__label {
    font-size: 13px;
    line-height: 1.4;
  }

  .bio-footer__value {
    font-size: 16px;
    line-height: 1.4;
  }

  .bio-footer__note {
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
  }

  .bio-footer__social {
    gap: 12px;
  }

  .bio-footer__icon {
    width: 20px;
    height: 20px;
  }

  .bio-footer__icon::before {
    top: 0;
    left: 0;
  }

  /* Rodapé legal */
  .bio-footer__legal-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0;
  }

  .bio-footer__copy {
    font-size: 13px;
    line-height: 1.4;
  }

  .bio-footer__legal-links {
    gap: 20px;
  }

  .bio-footer__legal-links a {
    font-size: 14px;
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bio-footer__panel,
  .bio-footer__links,
  .bio-footer__sign::before,
  .bio-footer__sign::after {
    transition: none;
  }
}
