.roofing-page { background: #f5f7fa; color: #17375f; padding-bottom: 80px; }
.roofing-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.roofing-breadcrumb { padding: 26px 0 20px; color: #697b91; font-size: .92rem; }
.roofing-breadcrumb a { color: #365b83; text-decoration: none; }
.roofing-hero {
  min-height: 330px;
  padding: 54px 58px;
  display: flex;
  align-items: center;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(10,48,89,.97), rgba(15,70,123,.9)),
    url('../images/polycarbonate-roofing-screw.png') center right 7% / 480px auto no-repeat;
  color: #fff;
  overflow: hidden;
}
.roofing-hero-content { max-width: 680px; }
.roofing-kicker { display:block; margin-bottom: 15px; font-size:.78rem; font-weight:800; letter-spacing:.13em; opacity:.78; }
.roofing-hero h1 { margin:0 0 18px; font-size: clamp(2.25rem, 5vw, 4.2rem); line-height:1.03; }
.roofing-hero p { margin:0; max-width:650px; font-size:1.08rem; line-height:1.75; color:rgba(255,255,255,.84); }
.roofing-tags { display:flex; gap:10px; flex-wrap:wrap; margin-top:25px; }
.roofing-tags span { padding:8px 13px; border:1px solid rgba(255,255,255,.22); border-radius:999px; background:rgba(255,255,255,.08); font-weight:650; font-size:.86rem; }
.roofing-intro { display:grid; grid-template-columns:1.25fr .75fr; gap:22px; margin-top:26px; }
.roofing-note, .roofing-mistakes { padding:28px 30px; border:1px solid #dfe7f0; border-radius:18px; background:#fff; }
.roofing-note h2, .roofing-mistakes h2 { margin:0 0 15px; font-size:1.22rem; }
.roofing-note ul, .roofing-mistakes ul { margin:0; padding:0; list-style:none; display:grid; gap:10px; color:#5c6f85; }
.roofing-note li::before { content:'✓'; color:#168357; font-weight:800; margin-right:10px; }
.roofing-mistakes li::before { content:'×'; color:#b74646; font-weight:800; margin-right:10px; }
.roofing-products { margin-top:70px; }
.roofing-section-heading { margin-bottom:28px; }
.roofing-section-heading span { display:block; margin-bottom:7px; color:#55718f; font-size:.78rem; font-weight:800; letter-spacing:.11em; }
.roofing-section-heading h2 { margin:0 0 8px; font-size:2rem; }
.roofing-section-heading p { margin:0; color:#687a90; }
.roofing-group { margin-top:42px; }
.roofing-group-title { display:flex; align-items:end; justify-content:space-between; gap:20px; padding-bottom:13px; border-bottom:1px solid #dbe4ee; }
.roofing-group-title h3 { margin:0; font-size:1.28rem; }
.roofing-group-title p { margin:0; color:#77879a; font-size:.92rem; }
.roofing-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:20px; }
.roofing-product-card { display:flex; flex-direction:column; min-height:360px; padding:22px; border:1px solid #dfe7f0; border-radius:17px; background:#fff; color:#17375f; text-decoration:none; transition:.2s ease; }
.roofing-product-card:hover { transform:translateY(-4px); border-color:#b8cce4; box-shadow:0 15px 34px rgba(23,55,95,.08); }
.roofing-product-media { height:190px; display:grid; place-items:center; margin-bottom:18px; }
.roofing-product-media img { max-width:88%; max-height:178px; object-fit:contain; }
.roofing-product-card h4 { margin:0 0 9px; font-size:1.08rem; line-height:1.4; }
.roofing-product-card p { margin:0; color:#66788d; line-height:1.55; font-size:.92rem; }
.roofing-card-link { margin-top:auto; padding-top:20px; display:inline-flex; align-items:center; justify-content:space-between; gap:12px; color:#075da9; font-weight:750; }
.link-circle-arrow { position:relative; width:34px; height:34px; flex:0 0 34px; display:inline-grid; place-items:center; border:1px solid #d7e4f2; border-radius:50%; background:#f8fbff; color:currentColor; transition:transform .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease; }
.link-circle-arrow::before { content:""; width:7px; height:7px; border-top:2px solid currentColor; border-right:2px solid currentColor; transform:translateX(-2px) rotate(45deg); }
.roofing-product-card:hover .link-circle-arrow { transform:translateX(3px); background:#075da9; border-color:#075da9; color:#fff; }
.roofing-checklist { display:grid; grid-template-columns:1fr .72fr; gap:24px; margin-top:72px; }
.checklist-panel, .roofing-cta { padding:34px; border-radius:20px; }
.checklist-panel { background:#fff; border:1px solid #dfe7f0; }
.checklist-panel h2, .roofing-cta h2 { margin:0 0 11px; }
.checklist-panel p { margin:0 0 23px; color:#6a7c91; }
.checklist-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 20px; }
.checklist-list label { display:flex; align-items:center; gap:11px; color:#39536f; font-weight:650; }
.checklist-list input { width:18px; height:18px; accent-color:#0d639f; }
.roofing-cta { display:flex; flex-direction:column; justify-content:center; background:#123f70; color:#fff; }
.roofing-cta p { color:rgba(255,255,255,.78); line-height:1.65; }
.roofing-cta a { display:inline-flex; justify-content:center; margin-top:14px; padding:13px 18px; border-radius:11px; background:#25d366; color:#fff; font-weight:800; text-decoration:none; }
@media (max-width: 900px) {
 .roofing-intro, .roofing-checklist { grid-template-columns:1fr; }
 .roofing-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .roofing-hero { padding:42px 34px; background:linear-gradient(90deg,rgba(10,48,89,.98),rgba(15,70,123,.94)); }
}
@media (max-width: 620px) {
 .roofing-shell { width:min(100% - 28px,1240px); }
 .roofing-breadcrumb { padding-top:18px; }
 .roofing-hero { min-height:0; padding:36px 25px; border-radius:17px; }
 .roofing-hero h1 { font-size:2.25rem; }
 .roofing-grid { grid-template-columns:1fr; }
 .roofing-product-card { min-height:0; }
 .roofing-product-media { height:170px; }
 .roofing-group-title { display:block; }
 .roofing-group-title p { margin-top:7px; }
 .checklist-list { grid-template-columns:1fr; }
 .checklist-panel, .roofing-cta { padding:27px 23px; }
}

/* Project detail breadcrumb follows the same hierarchy and styling as the product catalogue. */
.project-breadcrumb {
  padding: 28px 0 0;
  margin-bottom: 28px;
}
.project-breadcrumb a { color: var(--primary); font-weight: 700; }
.project-breadcrumb .breadcrumb-current { color: var(--muted); font-weight: 500; }

/* Project-to-project navigation. The centre route returns to the four-system
   chooser, while Previous and Next cycle continuously through the guides. */
.project-switcher {
  width: min(100%, 780px);
  margin: 18px auto 0;
  padding: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  border: 1px solid #dce5ef;
  border-radius: 17px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 28px rgba(17, 52, 91, .07);
}

.project-switcher a {
  min-width: 0;
  min-height: 58px;
  border-radius: 12px;
  color: #17375f;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.project-switcher-link {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.project-switcher-next {
  justify-content: flex-end;
  text-align: right;
}

.project-switcher-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.project-switcher small,
.project-switcher strong {
  display: block;
}

.project-switcher small {
  color: #71849a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.project-switcher-copy strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-switcher-arrow {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.project-switcher-previous .project-switcher-arrow {
  transform: rotate(-135deg);
}

.project-switcher-next .project-switcher-arrow {
  transform: rotate(45deg);
}

.project-switcher-all {
  min-width: 122px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #dbe7f3;
  background: #f5f9fd;
  text-align: left;
}

.project-switcher-all svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: #0b64b5;
  stroke-width: 1.7;
}

.project-switcher-all strong {
  font-size: 12px;
  line-height: 1.15;
}

.project-switcher-all small {
  margin-top: 3px;
  font-size: 9px;
}

.project-switcher a:hover {
  background: #edf5fc;
  color: #075da9;
}

.project-switcher a:active {
  transform: scale(.98);
}

.project-switcher a:focus-visible {
  outline: 3px solid rgba(25, 112, 200, .24);
  outline-offset: 1px;
}

/* Mobile project guides put the products first. The advice content remains
   available on larger screens, while mobile cards become a compact 2-column
   image-and-name grid. */
@media (max-width: 768px) {
  .roofing-page {
    padding-top: 12px;
    padding-bottom: 44px;
  }

  .roofing-shell {
    width: calc(100% - 24px);
  }

  .project-breadcrumb,
  .roofing-intro {
    display: none;
  }

  .roofing-hero {
    min-height: 0;
    padding: 22px 20px;
    border-radius: 17px;
  }

  .project-switcher {
    position: sticky;
    top: 8px;
    z-index: 50;
    width: calc(100% + 8px);
    margin: 10px -4px 0;
    padding: 5px;
    gap: 4px;
    border-radius: 14px;
    box-shadow: 0 9px 24px rgba(17, 52, 91, .13);
  }

  .project-switcher a {
    min-height: 52px;
  }

  .project-switcher-link {
    padding: 6px 8px;
    gap: 7px;
  }

  .project-switcher-copy {
    gap: 2px;
  }

  .project-switcher small {
    font-size: 8.5px;
  }

  .project-switcher-copy strong {
    font-size: 11.5px;
  }

  .project-switcher-all {
    min-width: 82px;
    padding: 6px 7px;
    gap: 6px;
  }

  .project-switcher-all svg {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .project-switcher-all strong {
    font-size: 10.5px;
  }

  .project-switcher-all small {
    font-size: 8px;
  }

  .roofing-kicker {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .roofing-hero h1 {
    margin-bottom: 10px;
    font-size: clamp(27px, 8.6vw, 34px);
    line-height: 1.04;
  }

  .roofing-hero p {
    font-size: 14px;
    line-height: 1.48;
  }

  .roofing-tags {
    gap: 6px;
    margin-top: 14px;
  }

  .roofing-tags span {
    padding: 6px 9px;
    font-size: 11px;
  }

  .roofing-products {
    margin-top: 20px;
  }

  .roofing-section-heading {
    margin-bottom: 14px;
    text-align: center;
  }

  .roofing-section-heading > span,
  .roofing-section-heading > p,
  .roofing-group-title > p {
    display: none;
  }

  .roofing-section-heading h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.15;
  }

  .roofing-group {
    margin-top: 24px;
  }

  .roofing-section-heading + .roofing-group {
    margin-top: 0;
  }

  .roofing-group-title {
    display: block;
    padding-bottom: 8px;
  }

  .roofing-group-title h3 {
    font-size: 17px;
    line-height: 1.25;
  }

  .roofing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
  }

  .roofing-product-card {
    display: grid;
    grid-template-rows: 116px minmax(0, 1fr);
    min-width: 0;
    min-height: 190px;
    height: 190px;
    padding: 11px 9px 12px;
    gap: 8px;
    align-items: start;
    overflow: hidden;
    border-radius: 15px;
    text-align: center;
  }

  .roofing-product-media {
    width: 100%;
    height: 116px;
    margin: 0;
  }

  .roofing-product-media img {
    width: 100%;
    height: 100%;
    max-width: 124px;
    max-height: 112px;
    object-fit: contain;
  }

  .roofing-product-card h4 {
    display: -webkit-box;
    align-self: center;
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.22;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .roofing-product-card > p,
  .roofing-card-link {
    display: none;
  }

  .roofing-checklist {
    display: block;
    margin-top: 28px;
  }

  .checklist-panel {
    display: none;
  }

  .roofing-cta {
    padding: 22px 18px;
    border-radius: 16px;
    text-align: center;
  }

  .roofing-cta h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .roofing-cta p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .project-switcher-link {
    padding-right: 6px;
    padding-left: 6px;
  }

  .project-switcher-copy strong {
    font-size: 10.5px;
  }

  .project-switcher-all {
    min-width: 74px;
  }

  .project-switcher-all svg {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-switcher a {
    transition: none;
  }
}
