/* ITSOS footer — multi-column layout, CTA, clean links */

.footer--row-inner.footer-top-inner.footer-content-wrap {
  position: relative;
  padding-top: 36px;
  padding-bottom: 48px;
}

.footer--row-inner.footer-content-wrap > .container {
  width: 100%;
  max-width: 1480px;
  padding-left: 24px;
  padding-right: 24px;
}

.footer--row-inner.footer-content-wrap {
  overflow: visible;
}

.footer--row-inner.footer-top-inner.footer-content-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(100% - 64px);
  transform: translateX(-50%);
  border-top: 1px solid #000;
  pointer-events: none;
}

.itsos-footer-figure {
  position: absolute;
  left: 0;
  top: -12px;
  transform: translateX(-35%);
  z-index: 2;
  pointer-events: none;
}

.itsos-footer-figure__img {
  display: block;
  width: clamp(108px, 12vw, 184px);
  height: auto;
}

.itsos-site-footer {
  background: #fff;
  color: #000;
  font-family: var(--itsos-font-stack);
}

/* —— Grid —— */
.itsos-footer-grid--expanded {
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) repeat(3, minmax(140px, 1fr)) minmax(180px, 1.05fr);
  gap: 28px 36px;
  align-items: start;
}

.itsos-footer-grid--legacy {
  display: grid;
  grid-template-columns: minmax(220px, 30%) 1fr;
  gap: 24px 48px;
  align-items: start;
}

.itsos-footer-col__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f99b1c;
  line-height: 1.3;
}

.itsos-footer-col__title--sub {
  margin-top: 22px;
}

/* —— Brand column —— */
.itsos-footer-brand {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #000;
}

.itsos-footer-tagline {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
  color: #2b2b2b;
  max-width: 28ch;
}

.itsos-footer-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 260px;
}

.itsos-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  text-align: center;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.itsos-footer-btn:hover,
.itsos-footer-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.itsos-footer-btn--emergency {
  background: #1a1a1a;
  color: #fff !important;
  border-color: #1a1a1a;
}

.itsos-footer-btn--emergency:hover,
.itsos-footer-btn--emergency:focus-visible {
  background: #c62828;
  border-color: #c62828;
  color: #fff !important;
}

.itsos-footer-btn--primary {
  background: var(--itsos-primary, #ff9517);
  color: #fff !important;
  border-color: var(--itsos-primary, #ff9517);
}

.itsos-footer-btn--primary:hover,
.itsos-footer-btn--primary:focus-visible {
  background: #000;
  border-color: #000;
  color: #fff !important;
}

.itsos-footer-btn--outline {
  background: #fff;
  color: #000 !important;
  border-color: #000;
}

.itsos-footer-btn--outline:hover,
.itsos-footer-btn--outline:focus-visible {
  background: #000;
  color: #fff !important;
  border-color: #000;
}

/* —— Nav menus —— */
.itsos-footer-menu,
.itsos-site-footer .widget_nav_menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.itsos-footer-menu li,
.itsos-site-footer .widget_nav_menu li {
  margin: 0 0 8px;
  padding: 0;
}

.itsos-footer-menu a,
.itsos-site-footer .widget_nav_menu a,
.itsos-footer-contact a {
  display: inline-block;
  font-family: var(--itsos-font-stack) !important;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  color: #1a1a1a !important;
  text-decoration: none !important;
  border: none !important;
  border-bottom: none !important;
  background: none !important;
  box-shadow: none !important;
  transition: color 0.2s ease;
}

.itsos-footer-menu a:hover,
.itsos-footer-menu a:focus-visible,
.itsos-site-footer .widget_nav_menu a:hover,
.itsos-site-footer .widget_nav_menu a:focus-visible,
.itsos-footer-contact a:hover,
.itsos-footer-contact a:focus-visible {
  color: var(--itsos-primary, #ff9517) !important;
  text-decoration: underline !important;
  text-decoration-style: solid !important;
  text-underline-offset: 3px;
}

.itsos-footer-menu .current-menu-item > a {
  color: var(--itsos-primary, #ff9517) !important;
  font-weight: 500;
}

/* —— Contact —— */
.itsos-footer-contact__line {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
  color: #2b2b2b;
}

/* —— Widget overrides in footer —— */
.itsos-site-footer .widget {
  margin-bottom: 0;
}

.itsos-site-footer .widget p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
}

.itsos-site-footer .wp-block-button__link {
  text-decoration: none !important;
}

/* —— Bottom bar —— */
.itsos-footer-bottom {
  border-top: 1px solid #e3e3e3;
  padding: 18px 24px 28px;
  text-align: center;
}

.itsos-footer-bottom__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.itsos-footer-copyright {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.itsos-footer-copyright p {
  margin: 0;
}

/* —— Responsive —— */
@media (max-width: 1200px) {
  .itsos-footer-grid--expanded {
    grid-template-columns: repeat(3, 1fr);
  }
  .itsos-footer-col--brand {
    grid-column: 1 / -1;
    max-width: 520px;
  }
}

@media (max-width: 768px) {
  .itsos-footer-grid--expanded,
  .itsos-footer-grid--legacy {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .itsos-footer-ctas {
    max-width: none;
  }
  .footer--row-inner.footer-top-inner.footer-content-wrap::before {
    width: calc(100% - 32px);
  }
  .itsos-footer-figure {
    transform: translateX(-20%);
  }
}

/* Scroll-to-top */
.itsos-scroll-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: var(--itsos-primary, #ff9517);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  font: inherit;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.itsos-scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.itsos-scroll-to-top:hover,
.itsos-scroll-to-top:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

.itsos-scroll-to-top__icon {
  width: 14px;
  height: 14px;
  display: block;
}

@media (max-width: 600px) {
  .itsos-scroll-to-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .itsos-scroll-to-top,
  .itsos-footer-btn {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: none;
  }
}

#top-link.back-to-top {
  display: none !important;
}
