/* ===== Footer ===== */
.footer {
  background: var(--background-dark);
  border-top: 1px solid var(--border-color-softer);
  padding: 60px 0 30px;
}

.footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

/* ===== Footer Brand/Logo ===== */
.footer__brand {
  flex-shrink: 0;
}

.footer__logo {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.footer__logo:hover {
  opacity: 0.8;
}

.footer__logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* ===== Footer Navigation ===== */
.footer__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.footer__nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__nav-item {
  margin: 0;
}

.footer__nav-link {
  color: var(--text-color-medium);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.footer__nav-link:hover {
  color: var(--text-color-light);
  text-decoration: none;
}

.footer__nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.footer__nav-link:hover::after {
  transform: scaleX(1);
}

/* ===== Language Toggle ===== */
.footer__language {
  position: relative;
  flex-shrink: 0;
}

.language-toggle {
  background: var(--background-card);
  border: 1px solid var(--border-color-softer);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-color-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 140px;
}

.language-toggle:hover {
  background: var(--background-card-soft);
  border-color: var(--accent-color);
}

.language-toggle:focus-visible {
  outline: var(--focus-visible-outline-width) solid var(--focus-outline-color);
  outline-offset: var(--focus-visible-outline-offset);
}

.language-toggle__text {
  flex: 1;
}

.language-toggle .fa-chevron-down {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.language-toggle.active .fa-chevron-down {
  transform: rotate(180deg);
}

/* ===== Language Dropdown ===== */
.language-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--background-card);
  border: 1px solid var(--border-color-softer);
  border-radius: 10px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.language-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  width: 100%;
  background: transparent;
  border: none;
  padding: 10px 12px;
  color: var(--text-color-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.language-option:hover {
  background: var(--background-card-soft);
}

.language-option.active {
  background: var(--background-card-soft);
  color: var(--text-color-light);
  border: 1px solid var(--accent-color);
}

.language-flag {
  font-size: 1.1rem;
}

/* ===== Footer Bottom ===== */
.footer__bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color-softer);
  text-align: center;
}

/* ===== Footer Disclaimer ===== */
.footer__disclaimer {
  margin-bottom: 20px;
}

.footer__disclaimer-text {
  color: var(--text-color-medium);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 8px 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.footer__disclaimer-text a {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer__disclaimer-text a[target="_blank"]::after {
  content: " ↗";
  text-decoration: none;
  display: inline;
}

.footer__disclaimer-text a:hover,
.footer__disclaimer-text a:focus {
  text-decoration-thickness: 3px;
  opacity: 0.9;
}

.footer__disclaimer-text a:focus-visible {
  outline: var(--focus-visible-outline-width) solid var(--focus-outline-color);
  outline-offset: var(--focus-visible-outline-offset);
  border-radius: 2px;
}

.footer__copyright {
  color: var(--text-color-medium);
  font-size: 0.9rem;
  margin: 0;
  font-weight: 500;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .footer {
    padding: 50px 0 25px;
    margin-top: 60px;
  }

  .footer__content {
    flex-direction: column;
    gap: 25px;
    text-align: center;
    margin-bottom: 30px;
  }

  .footer__nav {
    order: 2;
    justify-content: center;
    width: 100%;
  }

  .footer__nav-list {
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__language {
    order: 3;
  }

  .language-dropdown {
    right: 50%;
    transform: translateX(50%) translateY(-10px);
  }

  .language-dropdown.show {
    transform: translateX(50%) translateY(0);
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 40px 0 20px;
    margin-top: 50px;
  }

  .footer__content {
    gap: 20px;
    margin-bottom: 25px;
  }

  .footer__logo-image {
    height: 40px;
  }

  .footer__nav-list {
    gap: 20px;
    flex-direction: column;
  }

  .footer__nav-link {
    font-size: 0.9rem;
  }

  .language-toggle {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-width: 120px;
  }

  .footer__copyright {
    font-size: 0.85rem;
  }
}

/* ===== Click Outside Close ===== */
.language-dropdown.closing {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

@media (max-width: 768px) {
  .language-dropdown.closing {
    transform: translateX(50%) translateY(-10px);
  }
}
