/* Footer layout: 5 columns (logo + 4 footer regions) with no duplicated logo. */
#footer.site-footer .footer-top > .container,
#footer.site-footer .footer-center > .container,
#footer.site-footer .copyright > .container {
  max-width: 1320px;
  width: 100%;
}

/* Neutralize legacy pseudo-logo/padding from template.css (higher specificity there). */
#footer.site-footer .footer-center .container {
  padding-left: 15px;
  padding-right: 15px;
}

#footer.site-footer .footer-center .container::before {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

.topbar .idep-topbar-language-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.topbar .idep-topbar-language-switcher::before {
  content: "\f0ac";
  display: inline-block;
  font-family: FontAwesome;
  font-size: 13px;
  line-height: 1;
  margin-right: 8px;
  opacity: 0.9;
}

.topbar .idep-topbar-language-switcher .links,
.topbar .idep-topbar-language-switcher ul.language-switcher-language-url {
  display: inline-flex !important;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  justify-content: flex-end;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
  white-space: nowrap;
}

.topbar .idep-topbar-language-switcher .links li,
.topbar .idep-topbar-language-switcher ul.language-switcher-language-url li {
  display: inline-flex !important;
  align-items: center;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1;
  width: auto !important;
}

.topbar .idep-topbar-language-switcher .links li + li::before,
.topbar .idep-topbar-language-switcher ul.language-switcher-language-url li + li::before {
  content: "|";
  display: inline-block;
  margin: 0 7px;
  opacity: 0.55;
}

.topbar .idep-topbar-language-switcher .links a,
.topbar .idep-topbar-language-switcher ul.language-switcher-language-url a {
  display: inline-flex !important;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar .idep-topbar-language-switcher .links a.is-active,
.topbar .idep-topbar-language-switcher ul.language-switcher-language-url a.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Base footer grid behavior: keep 5 columns in one row at desktop-like widths. */
@media (min-width: 640px) {
  #footer.site-footer .footer-content {
    display: grid;
    grid-template-columns: 120px minmax(0, 1.55fr) minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 18px;
    align-items: flex-start;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  #footer.site-footer .footer-content > [class*='col-'] {
    float: none;
    min-width: 0;
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  #footer.site-footer .footer-content .footer-logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
  }

  #footer.site-footer .footer-content .footer-logo .block {
    margin-bottom: 0;
  }

  #footer.site-footer .footer-content .footer-logo .site-branding-logo {
    display: inline-flex;
    width: 120px;
    max-width: 120px;
  }

  #footer.site-footer .footer-content .footer-logo .site-branding-logo img {
    width: 120px;
    height: auto;
    max-width: 120px;
  }

  /* Footer block internals: avoid oversized min-width from custom block HTML. */
  #footer.site-footer .footer-content .footer-column {
    min-width: 0 !important;
    width: auto;
  }

  #footer.site-footer .footer-content .column,
  #footer.site-footer .footer-content .block-content,
  #footer.site-footer .footer-content .content {
    min-width: 0;
  }

  #footer.site-footer .footer-content a {
    word-break: break-word;
  }

  #footer.site-footer #block-gavias-edmix-language-switcher .links {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #footer.site-footer #block-gavias-edmix-language-switcher .links li {
    margin: 0 0 8px;
  }

  #footer.site-footer #block-gavias-edmix-language-switcher .links a {
    display: inline-flex;
    align-items: center;
    color: inherit;
    font-weight: 500;
    line-height: 1.45;
  }

  #footer.site-footer #block-gavias-edmix-language-switcher .links a.is-active {
    font-weight: 700;
  }

  /* Tighten stacked blocks inside Follow Us/Subscribe for better balance. */
  #footer.site-footer .footer-content .footer-third .block {
    margin-bottom: 14px;
  }

  #footer.site-footer .footer-content .footer-third .block:last-child {
    margin-bottom: 0;
  }

  #footer.site-footer .footer-content .footer-third .block-title {
    line-height: 1.25;
  }
}

@media (min-width: 1200px) {
  #footer.site-footer .footer-content {
    grid-template-columns: 140px minmax(0, 1.6fr) minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 34px;
  }

  #footer.site-footer .footer-content .footer-logo .site-branding-logo,
  #footer.site-footer .footer-content .footer-logo .site-branding-logo img {
    width: 140px;
    max-width: 140px;
  }
}

@media (max-width: 639px) {
  #footer.site-footer .footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-left: 0;
    margin-right: 0;
  }

  #footer.site-footer .footer-content > [class*='col-'] {
    float: none;
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  #footer.site-footer .footer-content .footer-logo {
    max-width: 108px;
  }

  #footer.site-footer .footer-content .footer-logo .site-branding-logo img {
    max-width: 108px;
  }
}

/* Desktop hard-lock (1200px+): keep all 5 footer sections on one row. */
@media (min-width: 1200px) {
  #footer.site-footer .footer-center > .container,
  #footer.site-footer .footer-top > .container,
  #footer.site-footer .copyright > .container {
    max-width: 1520px;
  }

  #footer.site-footer .footer-center .row.footer-content,
  #footer.site-footer .footer-content {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    column-gap: 94px !important;
    row-gap: 36px !important;
  }

  #footer.site-footer .footer-content > [class*='col-'] {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #footer.site-footer .footer-content > .footer-logo {
    flex: 0 0 140px !important;
    max-width: 140px !important;
    margin-right: 12px !important;
  }

  #footer.site-footer .footer-content > .footer-logo .site-branding-logo,
  #footer.site-footer .footer-content > .footer-logo .site-branding-logo img {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
  }

  #footer.site-footer .footer-content > .footer-first {
    flex: 1.6 1 0 !important;
  }

  #footer.site-footer .footer-content > .footer-second {
    flex: 1.3 1 0 !important;
  }

  #footer.site-footer .footer-content > .footer-third {
    flex: 1.4 1 0 !important;
  }

  #footer.site-footer .footer-content > .footer-four {
    flex: 1 1 0 !important;
  }
}
