/* North Texan Realty Commercial header/footer upgrade — scoped and reversible. */
:root {
  --ntrchf-deep: #173e2f;
  --ntrchf-deeper: #102d22;
  --ntrchf-green: #38b15a;
  --ntrchf-light: #f3faf5;
}

/* The logo's dimensions are deliberately untouched. Only the header's spacing changes. */
.ntrchf-compact-header {
  background: #f5f9f6;
}
@media (min-width: 900px) {
  .ntrchf-header-row {
    box-sizing: border-box;
    width: max-content !important;
    max-width: calc(100% - 40px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(24px, 5vw, 78px) !important;
    padding: 6px 0 !important;
  }
  .ntrchf-header-row > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}
@media (max-width: 899px) {
  .ntrchf-header-row {
    box-sizing: border-box;
    max-width: calc(100% - 20px) !important;
    margin-inline: auto !important;
  }
}
.ntrchf-compact-header .wp-block-navigation__container {
  column-gap: clamp(12px, 2vw, 26px) !important;
  row-gap: 10px !important;
}

/* New footer: complete design with balanced columns, no empty middle section. */
.ntrchf-footer {
  box-sizing: border-box;
  width: 100%;
  color: #fff;
  background: var(--ntrchf-deep);
  border-top: 3px solid #36a856;
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}
.ntrchf-footer, .ntrchf-footer * { box-sizing: border-box; }
.ntrchf-footer-inner {
  width: min(100% - 40px, 1200px);
  margin-inline: auto;
  padding: 30px 0 16px;
}
.ntrchf-footer-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(150px, .8fr) minmax(200px, 1fr) minmax(260px, 1.25fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.ntrchf-footer h2 {
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  letter-spacing: 0 !important;
}
.ntrchf-footer p {
  color: #e1ede5 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
}
.ntrchf-footer-brand h2 { font-size: 22px !important; margin-bottom: 4px !important; }
.ntrchf-footer-brand .ntrchf-footer-kicker {
  color: #86dfa1 !important;
  font-size: 11px !important;
  font-weight: 750;
  letter-spacing: 0.12em;
}
.ntrchf-footer-brand .ntrchf-footer-motto { color: #fff !important; font-weight: 650; }
.ntrchf-footer a {
  display: block;
  width: fit-content;
  max-width: 100%;
  color: #e4f5e9 !important;
  font-size: 14px !important;
  line-height: 1.55;
  margin: 0 0 9px;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.ntrchf-footer a:hover, .ntrchf-footer a:focus-visible {
  color: #fff !important;
  text-decoration: underline;
}
.ntrchf-footer-notices a {
  color: #fff !important;
  font-size: 15px !important;
  line-height: 1.55;
  text-decoration: underline;
  text-decoration-color: #88d6a0;
  text-underline-offset: 4px;
  padding-bottom: 4px;
}
.ntrchf-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  margin-top: 22px;
  padding-top: 12px;
  display: flex;
  gap: 8px 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #dae7de;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .ntrchf-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ntrchf-footer-inner { width: min(100% - 32px, 500px); padding: 24px 0 16px; }
  .ntrchf-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ntrchf-footer h2 { margin-bottom: 8px !important; }
  .ntrchf-footer-bottom { flex-direction: column; }
}

/* Scroll button is hidden until needed; responsive and keyboard accessible. */
.ntrchf-back-to-top {
  position: fixed;
  z-index: 10000;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 14px));
  height: 54px;
  min-width: 54px;
  padding: 8px;
  border-radius: 15px;
  background: #1d7e43;
  color: #fff;
  border: 1px solid #cbecd3;
  box-shadow: 0 6px 25px rgba(5, 36, 16, .24);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.ntrchf-back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.ntrchf-back-to-top > span:first-child { font-size: 27px; font-weight: 800; }
.ntrchf-back-to-top-label { font-size: 11px; font-weight: 650; }
.ntrchf-back-to-top:hover, .ntrchf-back-to-top:focus-visible { background: #115e2f; }
.ntrchf-back-to-top:focus-visible { outline: 3px solid #f2d46b; outline-offset: 3px; }
/* Keep the control above logged-in admin's Hostinger Agent bubble. */
body.logged-in .ntrchf-back-to-top { bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px)); }
@media (prefers-reduced-motion: reduce) { .ntrchf-back-to-top { transition: none; } }

/* v2.0 — True icon-only social marks: no pill, rectangle, or button background.
   Visible marks are monochrome NTR green on light, white on dark. The anchor
   retains an accessible 44px touch target and a keyboard focus indicator. */
.ntrchf-social {
  margin-top: 22px;
  max-width: 100%;
}
.ntrchf-social-label {
  color: #174633;
  font-weight: 720;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 7px;
  letter-spacing: .03em;
}
.ntrchf-social-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  max-width: 100%;
}
.ntrchf-social-link,
.ntrchf-footer .ntrchf-social-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 8px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  text-decoration: none !important;
  color: #1a7245 !important;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.ntrchf-social-icon {
  display: block;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  overflow: visible;
  fill: currentColor;
  filter: drop-shadow(0 2px 1px rgba(15, 66, 43, .15));
  transition: transform .16s ease, filter .16s ease, color .16s ease;
}
.ntrchf-social-link:hover,
.ntrchf-social-link:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  color: #0e5031 !important;
  text-decoration: none !important;
}
.ntrchf-social-link:hover .ntrchf-social-icon,
.ntrchf-social-link:focus-visible .ntrchf-social-icon {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 4px 2px rgba(15, 66, 43, .22));
}
.ntrchf-social-link:focus-visible,
.ntrchf-footer .ntrchf-social-link:focus-visible {
  outline: 2px solid #2f995d !important;
  outline-offset: 2px;
}
.ntrchf-footer .ntrchf-social { margin-top: 16px; }
.ntrchf-footer .ntrchf-social-label {
  color: #fff !important;
  margin: 0 0 7px !important;
  font-size: 13px !important;
  font-weight: 700;
}
.ntrchf-footer .ntrchf-social-items { gap: 11px; }
.ntrchf-footer .ntrchf-social-link { color: #f3fff6 !important; }
.ntrchf-footer .ntrchf-social-icon {
  filter: drop-shadow(0 2px 2px rgba(1, 14, 7, .3));
}
.ntrchf-footer .ntrchf-social-link:hover,
.ntrchf-footer .ntrchf-social-link:focus-visible {
  color: #b4f4c8 !important;
}
.ntrchf-footer .ntrchf-social-link:hover .ntrchf-social-icon,
.ntrchf-footer .ntrchf-social-link:focus-visible .ntrchf-social-icon {
  filter: drop-shadow(0 4px 3px rgba(1, 14, 7, .4));
}
@media (prefers-reduced-motion: reduce) {
  .ntrchf-social-icon { transition: none; }
  .ntrchf-social-link:hover .ntrchf-social-icon,
  .ntrchf-social-link:focus-visible .ntrchf-social-icon { transform: none; }
}

/* v2.1 — Recognizable original social brand colors, no button backgrounds. */
.ntrchf-social .ntrchf-social-link--x { color:#000000 !important; }
.ntrchf-social .ntrchf-social-link--linkedin { color:#0A66C2 !important; }
.ntrchf-social .ntrchf-social-link--facebook { color:#1877F2 !important; }
/* Instagram uses the official multicolor family through a per-placement SVG gradient. */
.ntrchf-social .ntrchf-social-link--instagram { color:#D62976 !important; }
.ntrchf-footer .ntrchf-social-link--x { color:#FFFFFF !important; }
.ntrchf-footer .ntrchf-social-link--linkedin { color:#0A66C2 !important; }
.ntrchf-footer .ntrchf-social-link--facebook { color:#1877F2 !important; }
.ntrchf-footer .ntrchf-social-link--instagram { color:#D62976 !important; }
.ntrchf-social .ntrchf-social-link--x:hover,
.ntrchf-social .ntrchf-social-link--linkedin:hover,
.ntrchf-social .ntrchf-social-link--facebook:hover,
.ntrchf-social .ntrchf-social-link--instagram:hover,
.ntrchf-footer .ntrchf-social-link:hover { opacity:.84; }
.ntrchf-social .ntrchf-social-link:focus-visible { outline-color:#2F995D!important; }
/* Preserve each platform's official color even when hovering or keyboard-focusing in the footer. */
.ntrchf-footer .ntrchf-social-link--x:hover,
.ntrchf-footer .ntrchf-social-link--x:focus-visible { color:#FFFFFF !important; }
.ntrchf-footer .ntrchf-social-link--linkedin:hover,
.ntrchf-footer .ntrchf-social-link--linkedin:focus-visible { color:#0A66C2 !important; }
.ntrchf-footer .ntrchf-social-link--facebook:hover,
.ntrchf-footer .ntrchf-social-link--facebook:focus-visible { color:#1877F2 !important; }
.ntrchf-footer .ntrchf-social-link--instagram:hover,
.ntrchf-footer .ntrchf-social-link--instagram:focus-visible { color:#D62976 !important; }


/* v3.1: Override the prior single-column phone footer rule.
   Two modest columns with brand/notices full width. */
@media (max-width: 750px) {
  body .ntrchf-footer .ntrchf-footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  body .ntrchf-footer .ntrchf-footer-brand,
  body .ntrchf-footer .ntrchf-footer-notices { grid-column: 1 / -1; }
}

/* v3.2 — Mobile footer fixes. Desktop footer layout stays unchanged. */
.ntrchf-footer .ntrchf-mobile-extras { display:none; }
@media (max-width: 750px) {
  /* Contact and Quick Links remain side by side; separate service line and social row span both columns. */
  body .ntrchf-footer .ntrchf-footer-contact > .ntrchf-service-area,
  body .ntrchf-footer .ntrchf-footer-contact > .ntrchf-social { display:none !important; }
  body .ntrchf-footer .ntrchf-mobile-extras {
    grid-column:1 / -1;
    display:block !important;
    width:100%;
    min-width:0;
    margin:0;
  }
  body .ntrchf-footer .ntrchf-mobile-service-area {
    display:block;
    white-space:nowrap;
    overflow-wrap:normal;
    font-size:clamp(10px, 2.7vw, 13px) !important;
    line-height:1.4;
    margin:0 0 16px !important;
    color:#e1ede5 !important;
  }
  body .ntrchf-footer .ntrchf-mobile-extras .ntrchf-social { margin:0; }
  body .ntrchf-footer .ntrchf-mobile-extras .ntrchf-social-items {
    display:flex !important;
    flex-flow:row nowrap !important;
    gap:14px !important;
    align-items:center;
    justify-content:flex-start;
    width:100%;
    max-width:100%;
  }
  body .ntrchf-footer .ntrchf-mobile-extras .ntrchf-social-link {
    flex:0 0 44px;
    width:44px !important;
    height:44px !important;
    min-width:44px;
    margin:0 !important;
  }
  body .ntrchf-footer .ntrchf-footer-notices { grid-column:1/-1; }
}
