/*==================================================
  COMMON PROPERTY PROBLEMS — CLEAN PAGE STYLES
==================================================*/

/* Hero */
.problems-hero {
  padding: clamp(5rem, 8vw, 8rem) 0;
  background: var(--surface-alt);
}

.problems-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .72fr);
  gap: clamp(4rem, 8vw, 9rem);
  align-items: end;
}

.problems-hero h1 {
  max-width: 850px;
  margin: .6rem 0 1rem;
  color: var(--ink);
  font-size: clamp(4.5rem, 7vw, 7.6rem);
  font-weight: 500;
  line-height: .91;
  letter-spacing: -.065em;
}

.problems-hero__intro {
  max-width: 720px;
  margin: 1.7rem 0 0;
  color: var(--slate);
  font-size: 1.15rem;
  line-height: 1.75;
}

.problems-hero__visual {
  width: 100%;
  max-width: 460px;
  justify-self: start;
  align-self: end;
}

.problems-hero__image {
  width: 100%;
  height: 235px;
  overflow: hidden;
  background: var(--stone);
}

.problems-hero__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.problems-hero__panel {
  padding: clamp(2.5rem, 4vw, 4rem);
  background: var(--white);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-card);
}

.problems-hero__panel h2 {
  margin: .6rem 0 1.2rem;
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.problems-hero__panel > p:not(.eyebrow) {
  color: var(--slate);
  line-height: 1.7;
}

.problems-hero__panel-list {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.problems-hero__panel-list span {
  display: grid;
  grid-template-columns: 42px 1fr;
  padding: 1rem 0;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem;
}

.problems-hero__panel-list strong {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: .9rem;
}

/* Shared section headings */
.problems-featured,
.problem-library {
  padding: var(--section-space) 0;
}

.problems-featured {
  background: var(--white);
}

.problem-library {
  background: var(--surface-alt);
}

.problems-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr);
  gap: 6rem;
  align-items: end;
  margin-bottom: 3.5rem;
}

.problems-heading-row h2 {
  max-width: 850px;
  margin: .55rem 0 .8rem;
  color: var(--ink);
  font-size: clamp(3rem, 5vw, 5.3rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.05em;
}

.problems-heading-row > p {
  max-width: 520px;
  margin: 0 0 .6rem;
  color: var(--slate);
  line-height: 1.75;
}

/* Featured issues */
.problems-featured__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.problem-feature {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    transform var(--transition-standard),
    box-shadow var(--transition-standard);
}

.problem-feature:hover {
  position: relative;
  z-index: 2;
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.problem-feature__image {
  order: 1;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--stone);
}

.problem-feature__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-standard);
}

.problem-feature:hover .problem-feature__image img {
  transform: scale(1.035);
}

.problem-feature > span {
  order: 2;
  margin: 1.45rem 1.6rem 0;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem;
  font-weight: 500;
}

.problem-feature > h3 {
  order: 3;
  margin: .6rem 1.6rem .7rem;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.15;
}

.problem-feature > p {
  order: 4;
  flex: 1;
  margin: 0 1.6rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
}

.problem-feature > b {
  order: 5;
  margin: 1.2rem 1.6rem 1.55rem;
  color: var(--ink);
  font-size: .82rem;
}

/* Keep all four featured cards visually equal rather than privileging Damp. */
.problem-feature--navy {
  color: var(--ink);
  background: var(--white);
}

.problem-feature--navy > h3,
.problem-feature--navy > b {
  color: var(--ink);
}

.problem-feature--navy > p {
  color: var(--muted);
}

/* Search and filters */
.problem-tools {
  margin-bottom: 2.5rem;
}

.problem-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 720px;
  height: 64px;
  padding: 0 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
}

.problem-search svg {
  width: 22px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.problem-search input {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font: 500 1rem "Manrope", sans-serif;
}

.problem-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.problem-filters button {
  padding: .65rem 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  font: 700 .72rem "Manrope", sans-serif;
}

.problem-filters button.is-active,
.problem-filters button:hover {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

/* Problem library */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.problem-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  transition:
    transform var(--transition-standard),
    box-shadow var(--transition-standard);
}

.problem-card[hidden] {
  display: none;
}

.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(5, 27, 63, .07);
}

.problem-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--stone);
  border-bottom: 1px solid var(--line);
}

.problem-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-standard);
}

.problem-card:hover .problem-card__media img {
  transform: scale(1.025);
}

.problem-card__button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 1rem;
  align-items: start;
  width: 100%;
  min-height: 126px;
  padding: 1.4rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.problem-card__button .problem-card__icon,
.problem-card__number {
  display: none;
}

.problem-card__button > span {
  min-width: 0;
}

.problem-card__button strong {
  display: block;
  margin: 0 0 .35rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.problem-card__button small {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .78rem;
}

.problem-card__button i {
  color: var(--gold);
  font-style: normal;
  font-size: 1.25rem;
}

.problem-card__detail {
  padding: 0 1.4rem;
}

.problem-card__detail p {
  margin: 0;
  padding: 0 0 1.5rem;
  color: var(--slate);
  font-size: .86rem;
  line-height: 1.7;
}

.problem-card:has(.show) {
  box-shadow: inset 0 3px 0 var(--gold), 0 16px 36px rgba(5, 27, 63, .07);
}

.problem-card:has(.show) .problem-card__button i {
  transform: rotate(45deg);
}

.problem-empty {
  padding: 2rem;
  color: var(--slate);
  background: var(--white);
  text-align: center;
}

/* Image crop tuning */
#asbestos .problem-card__media img { object-position: center 42%; }
#cob .problem-card__media img { object-position: center; }
#damp .problem-card__media img { object-position: center 35%; }
#movement .problem-card__media img { object-position: center; }

/* Advice */
.problems-advice {
  padding: var(--section-space) 0;
  color: var(--white);
  background: var(--ink);
}

.problems-advice__grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 8rem;
}

.problems-advice h2 {
  max-width: 650px;
  margin: .6rem 0;
  font-size: clamp(3.2rem, 5vw, 5.4rem);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.05em;
}

.problems-advice__steps article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.problems-advice__steps span {
  color: var(--gold);
  font: .78rem "IBM Plex Mono", monospace;
}

.problems-advice__steps h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
}

.problems-advice__steps p {
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: .86rem;
  line-height: 1.6;
}

/* Disclaimer */
.problems-disclaimer {
  padding: 2rem 0;
  background: #fff8d8;
  border-top: 1px solid #eadb83;
  border-bottom: 1px solid #eadb83;
}

.problems-disclaimer__inner {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
}

.problems-disclaimer p {
  margin: 0;
  color: var(--slate);
  font-size: .88rem;
  line-height: 1.65;
}

/* Editorial heading rule spacing */
h2 + .service-page-rule,
h2 + .service-heading-rule {
  margin-top: var(--heading-rule-gap);
}

/* Responsive */
@media (max-width: 1199.98px) {
  .problems-featured__grid,
  .problem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .problem-feature {
    min-height: 470px;
  }
}

@media (max-width: 991.98px) {
  .problems-hero__grid,
  .problems-heading-row,
  .problems-advice__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .problems-hero h1 {
    font-size: clamp(4rem, 11vw, 6rem);
  }

  .problems-hero__visual {
    width: 100%;
    max-width: 620px;
  }

  .problems-hero__image {
    height: 260px;
  }
}

@media (max-width: 767.98px) {
  .problems-hero {
    padding: 2.5rem 0 3.5rem;
  }

  .problems-hero h1 {
    font-size: clamp(3.35rem, 15vw, 4.6rem);
  }

  .problems-hero__visual {
    max-width: none;
  }

  .problems-hero__image {
    height: 210px;
  }

  .problems-hero__panel {
    padding: 1.6rem;
  }

  .problems-featured,
  .problem-library,
  .problems-advice {
    padding: var(--section-space-mobile) 0;
  }

  .problems-heading-row {
    margin-bottom: 2rem;
  }

  .problems-heading-row h2 {
    font-size: clamp(2.7rem, 12vw, 3.8rem);
  }

  .problems-featured__grid,
  .problem-grid {
    grid-template-columns: 1fr;
    gap: .8rem;
  }

  .problem-feature {
    min-height: 0;
  }

  .problem-feature__image {
    aspect-ratio: 16 / 9;
  }

  .problem-card__media {
    aspect-ratio: 16 / 10;
  }

  .problem-card__button {
    min-height: 108px;
    grid-template-columns: minmax(0, 1fr) 18px;
    padding: 1.2rem;
  }

  .problem-card__detail {
    padding: 0 1.2rem;
  }

  .problem-card__detail p {
    padding-bottom: 1.3rem;
  }

  .problem-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .4rem;
  }

  .problem-filters button {
    flex: 0 0 auto;
  }

  .problems-disclaimer__inner {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
}
