/* Scoped unified shell for non-SPA WordPress pages + shared layout polish */
html, body {
  overflow-x: clip;
  max-width: 100%;
}

body .tcx2-nav,
body .tcx2-footer,
body .tcx2-wa,
body .elementor-location-header,
body [data-elementor-type="header"],
body .elementor-location-footer,
body [data-elementor-type="footer"],
body .tcxe-topbar {
  display: none !important;
}

/* Prevent wide legacy /treks/ hero filter grid from overflowing at 1280px */
body.tcx2 .tcx2-hero__grid {
  grid-template-columns: 1fr !important;
}

body.tcx2 .tcx2-hero__grid > * {
  min-width: 0;
}

body.tcx2 .tcx2-search {
  grid-template-columns: minmax(200px, 1.5fr) repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 980px) {
  body.tcx2 .tcx2-search {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 640px) {
  body.tcx2 .tcx2-search {
    grid-template-columns: 1fr !important;
  }
}

.tcxm-site-header {
  position: sticky;
  top: 0;
  z-index: 9990;
  background: #ffffff;
  border-bottom: 1px solid #dce3e9;
  color: #102a43;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
}

.tcxm-site-header *,
.tcxm-site-footer * {
  box-sizing: border-box;
}

.tcxm-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.tcxm-nav-row {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tcxm-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #062159;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 0.05em;
  font-weight: 700;
  flex-shrink: 0;
}

.tcxm-brand b {
  font-size: 20px;
  font-weight: 800;
  color: #062159;
}

.tcxm-brand-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #062159;
  border-radius: 50%;
  color: #ffde3b;
  flex-shrink: 0;
}

.tcxm-brand-symbol svg {
  width: 30px;
  height: 30px;
}

.tcxm-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

.tcxm-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 4px;
  font-size: 15px;
  font-weight: 650;
  color: #102a43;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tcxm-nav-links a:hover,
.tcxm-nav-links a.is-active {
  color: #174f9a;
  border-bottom-color: #174f9a;
}

.tcxm-nav-links a.tcxm-nav-cta {
  padding: 9px 16px;
  border-radius: 8px;
  background: #062159;
  color: #ffffff;
  border-bottom: 0;
  font-weight: 700;
}

.tcxm-nav-links a.tcxm-nav-cta:hover {
  background: #0b327d;
  color: #ffffff;
}

.tcxm-nav-links svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.tcxm-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dce3e9;
  border-radius: 10px;
  background: #ffffff;
  color: #062159;
  cursor: pointer;
  padding: 0;
}

.tcxm-menu-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 960px) {
  .tcxm-nav-links {
    gap: 14px;
  }
  .tcxm-nav-links a {
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .tcxm-shell {
    width: calc(100% - 28px);
  }
  .tcxm-nav-row {
    min-height: 68px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .tcxm-menu-toggle {
    display: inline-flex;
  }
  .tcxm-nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 0 6px;
    border-top: 1px solid #e6ecf1;
  }
  .tcxm-site-header.is-open .tcxm-nav-links {
    display: flex;
  }
  .tcxm-nav-links a {
    padding: 11px 10px;
    border-bottom: 0;
    border-radius: 8px;
  }
  .tcxm-nav-links a.is-active {
    background: #f3f6f8;
  }
  .tcxm-nav-links a.tcxm-nav-cta {
    justify-content: center;
    margin-top: 6px;
  }
}

/* Unified Navy Footer */
.tcxm-site-footer {
  background: #07213d;
  color: #f2f6fb;
  padding: 50px 0 24px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.tcxm-footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 32px;
}

.tcxm-footer-brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.08rem;
  color: #ffffff;
  margin-bottom: 14px;
}

.tcxm-site-footer p {
  color: #b9cbdc;
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.tcxm-site-footer h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
}

.tcxm-site-footer a {
  display: block;
  color: #d7e3ef;
  text-decoration: none;
  margin: 9px 0;
  font-size: 0.92rem;
  font-weight: 500;
}

.tcxm-site-footer a:hover {
  color: #ffde3b;
  text-decoration: underline;
}

.tcxm-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid #28445e;
  margin-top: 34px;
  padding-top: 22px;
  color: #c3d0db;
  font-size: 0.86rem;
}

.tcxm-footer-legal {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tcxm-footer-legal a {
  margin: 0;
}

@media (max-width: 960px) {
  .tcxm-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .tcxm-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
