/*
 * Cross-page additions on top of document.css + ui.css.
 * Keep this file small — only patterns that the homepage doesn't use.
 */

/* Sub-page hero — shorter than the homepage 88vh hero, but tall enough on
 * desktop to feel like a real block instead of text glued to the nav.
 * Floor values keep mobile compact; vh values give desktop real breathing room. */
.idx section.hero.page-hero {
  min-height: clamp(18rem, 55vh, 32rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(2.5rem, 11vh, 8rem);
  padding-bottom: clamp(1.5rem, 5vh, 3.5rem);
  margin-bottom: 1rem;
}

/* Give sub-page sections a bit more breathing room than the homepage
 * default 3rem, since these sections carry richer cards/lists. */
.idx main > section.hero.page-hero ~ section:not(.hero) {
  margin-top: clamp(3rem, 6vh, 4.5rem);
}

.idx .page-hero .hero-main {
  margin: 0;
}

.idx .hero-subtitle {
  font-size: 1.05rem;
  color: var(--idx-muted);
  margin: 0.65rem 0 0;
  max-width: 38rem;
}

/* Section header eyebrow inside <header> on sub-pages */
.idx main > section > .container > header h2,
.idx main > section > header h2 {
  font-family: var(--idx-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--idx-ink);
}

.idx main > section > .container > header > p,
.idx main > section > header > p {
  margin: -0.5rem 0 1.25rem;
  color: var(--idx-muted);
}

/* Sub-pages still wrap things in .container — collapse it inside the idx-flow measure */
.idx .container {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* Long-form prose blocks used across sub-pages */
.idx .about-text {
  margin: 0;
  color: var(--idx-muted);
}

.idx .about-text p {
  margin: 0 0 1rem;
}

.idx .about-text p:last-child {
  margin-bottom: 0;
}

.idx .about-text h3 {
  font-family: var(--idx-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--idx-ink);
}

.idx .about-text h3:first-child {
  margin-top: 0;
}

/* Bulleted feature list (residential "What's included", "Is it right for you") */
.idx .feature-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--idx-line);
}

.idx .feature-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.5rem;
  border-bottom: 1px solid var(--idx-line);
  color: var(--idx-muted);
  font-size: 0.95rem;
}

.idx .feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--idx-accent);
  border-bottom: 2px solid var(--idx-accent);
  transform: rotate(45deg);
}

.idx .feature-list strong {
  color: var(--idx-ink);
  font-weight: 600;
}

/* Sectors grid — used on commercial */
.idx .sectors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--idx-line);
}

@media (min-width: 640px) {
  .idx .sectors-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
  }
}

.idx .sector-block {
  padding: 1rem 0;
  border-bottom: 1px solid var(--idx-line);
}

.idx .sector-block h3 {
  font-family: var(--idx-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--idx-ink);
}

.idx .sector-block p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--idx-muted);
}

/* Leadership grid — used on why-watchdog */
.idx .leadership-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--idx-line);
}

.idx .leadership-grid .service-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--idx-line);
  cursor: default;
}

.idx .leadership-grid .service-card:hover {
  background: transparent;
  padding-left: 0;
}

.idx .leadership-grid .service-card h3 {
  font-family: var(--idx-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--idx-ink);
}

.idx .leadership-grid .service-card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--idx-muted);
  line-height: 1.6;
}

/* Strip stray Font Awesome icons inside service-card / sector-block by default.
 * The new `.feature-grid` modifier (in blocks.css) re-enables them with proper
 * styling, so any sub-page upgrading to feature-grid gets icons back. */
.idx .services-grid:not(.feature-grid) .service-card > i,
.idx .services-grid:not(.feature-grid) .service-card > .service-icon,
.idx .leadership-grid .service-card > i,
.idx .leadership-grid .service-card > .service-icon,
.idx .sectors-grid:not(.sectors-bars) > .sector-block > i,
.idx .sectors-grid:not(.sectors-bars) > .sector-block > .service-icon {
  display: none;
}

/* Contact "Get in touch" block (no form, info-items only) */
.idx .contact-info-only {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* 3-up only when there's enough width for addresses to sit on one line.
   Below this they stack 1-up rather than wrap awkwardly mid-width. */
@media (min-width: 860px) {
  .idx .contact-info-only {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* Slim contact CTA card used on the homepage in place of the full form */
.idx .contact-cta {
  border: 1px solid var(--idx-line);
  border-radius: 4px;
  padding: 1.5rem 1.25rem;
  background: rgba(16, 16, 18, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.idx .contact-cta h2 {
  margin: 0;
}

.idx .contact-cta p {
  margin: 0;
  color: var(--idx-muted);
}

.idx .contact-cta .contact-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  margin-top: 0.5rem;
}

/* Social share buttons (footer) — kept simple on sub-pages */
.idx .social-sharing {
  margin-top: 1rem;
}

.idx .share-buttons {
  display: flex;
  gap: 0.5rem;
}

.idx .share-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--idx-line);
  border-radius: 50%;
  color: var(--idx-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.idx .share-btn:hover {
  color: var(--idx-accent);
  border-color: var(--idx-accent);
}
