/* Sterling Roofers redesign layer. Same theme as the site: red #d80009, blue #005d98, Poppins.
   Loaded by includes/seo-page-template.php after seo-pages.css. Components are prefixed rd-. */
.seo-page {
  --rd-blue: #005d98;
  --rd-blue-dark: #003152;
  --rd-blue-mid: #0a4a78;
  --rd-red: #d80009;
  --rd-red-dark: #a50007;
  --rd-ink: #152433;
  --rd-muted: #526171;
  --rd-line: #dce4ea;
  --rd-soft: #f4f7f9;
  --rd-radius: 14px;
  --rd-shadow: 0 12px 34px rgba(0, 49, 82, .12);
}

.rd-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------- Hero ---------- */
.rd-hero {
  position: relative;
  color: #fff;
  background: var(--rd-blue-dark);
  overflow: hidden;
}
.rd-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.rd-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0, 38, 64, .96) 0%, rgba(0, 61, 101, .9) 46%, rgba(0, 93, 152, .55) 100%);
}
.rd-hero__bg::before {
  content: ""; position: absolute; z-index: 1; inset: 0;
  background: linear-gradient(135deg, transparent 62%, rgba(216, 0, 9, .85) 62%, rgba(216, 0, 9, .85) 63.2%, transparent 63.2%);
  pointer-events: none;
}
.rd-hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: center;
  padding-block: clamp(56px, 7vw, 104px);
}
.rd-eyebrow {
  margin: 0 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #ffd4d6;
}
.rd-section .rd-eyebrow, .rd-eyebrow--dark { color: var(--rd-red); }
.rd-hero h1 {
  margin: 0 0 20px; color: #fff; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.04; letter-spacing: -.03em;
}
.rd-hero__lead { margin: 0 0 14px; max-width: 640px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: 1.7; color: rgba(255,255,255,.93); }
.rd-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.rd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease; border: 2px solid transparent;
}
.rd-btn:hover { transform: translateY(-2px); }
.rd-btn--red { background: var(--rd-red); color: #fff !important; box-shadow: 0 10px 24px rgba(216, 0, 9, .35); }
.rd-btn--red:hover { background: var(--rd-red-dark); }
.rd-btn--ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.7); }
.rd-btn--ghost:hover { background: rgba(255,255,255,.12); }
.rd-btn--blue { background: var(--rd-blue); color: #fff !important; }
.rd-btn--blue:hover { background: var(--rd-blue-dark); }
.rd-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.rd-chips li { padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); font-size: .88rem; font-weight: 600; }

.rd-hero__card {
  background: #fff; color: var(--rd-ink); border-radius: 18px; padding: 28px 28px 24px; box-shadow: 0 22px 54px rgba(0, 20, 40, .35);
  border-top: 6px solid var(--rd-red);
}
.rd-hero__card h2 { margin: 0 0 6px; color: var(--rd-blue-dark); font-size: 1.35rem; line-height: 1.25; }
.rd-hero__card p { margin: 0 0 16px; color: var(--rd-muted); font-size: .95rem; line-height: 1.6; }
.rd-hero__card ul { margin: 0 0 18px; padding: 0; list-style: none; }
.rd-hero__card li { position: relative; padding: 8px 0 8px 30px; border-bottom: 1px solid var(--rd-line); font-size: .95rem; font-weight: 600; }
.rd-hero__card li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--rd-blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat;
  background: var(--rd-red);
}
.rd-hero__card .rd-btn { width: 100%; }
.rd-hero__phone { display: block; margin-top: 12px; text-align: center; font-weight: 700; color: var(--rd-blue) !important; text-decoration: none; font-size: 1.15rem; }

/* ---------- Trust bar ---------- */
.rd-trust { background: #fff; border-bottom: 1px solid var(--rd-line); }
.rd-trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.rd-trust__item { padding: 22px 18px; text-align: center; border-right: 1px solid var(--rd-line); }
.rd-trust__item:last-child { border-right: 0; }
.rd-trust__big { display: block; color: var(--rd-blue); font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.rd-trust__stars { color: #f5a623; letter-spacing: 2px; font-size: 1.05rem; }
.rd-trust__small { display: block; margin-top: 4px; color: var(--rd-muted); font-size: .86rem; line-height: 1.4; }

/* ---------- Sections ---------- */
.rd-section { padding-block: clamp(56px, 7vw, 100px); background: #fff; }
.rd-section--soft { background: var(--rd-soft); }
.rd-section--blue { background: linear-gradient(120deg, var(--rd-blue-dark), var(--rd-blue)); color: #fff; }
.rd-section--blue h2, .rd-section--blue h3 { color: #fff; }
.rd-section--blue .rd-eyebrow { color: #ffd4d6; }
.rd-head { max-width: 760px; margin: 0 auto clamp(30px, 4vw, 52px); text-align: center; }
.rd-head h2 { margin: 0 0 14px; color: var(--rd-ink); font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.12; letter-spacing: -.02em; }
.rd-head p { margin: 0; color: var(--rd-muted); font-size: 1.05rem; line-height: 1.7; }
.rd-section--blue .rd-head h2 { color: #fff; }
.rd-section--blue .rd-head p { color: rgba(255,255,255,.9); }
.rd-left { text-align: left; margin-inline: 0; }

/* ---------- Cards ---------- */
.rd-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.rd-cards--3 { grid-template-columns: repeat(3, 1fr); }
.rd-cards--2 { grid-template-columns: repeat(2, 1fr); }
.rd-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--rd-radius); overflow: hidden;
  border: 1px solid var(--rd-line); box-shadow: 0 2px 10px rgba(0, 49, 82, .06); transition: transform .2s ease, box-shadow .2s ease;
}
.rd-card:hover { transform: translateY(-5px); box-shadow: var(--rd-shadow); }
.rd-card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--rd-soft); }
.rd-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-card__img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rd-red); }
.rd-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.rd-card h3 { margin: 0 0 10px; color: var(--rd-blue-dark); font-size: 1.2rem; line-height: 1.25; }
.rd-card p { margin: 0 0 16px; color: var(--rd-muted); font-size: .95rem; line-height: 1.65; }
.rd-card__link { margin-top: auto; color: var(--rd-red); font-weight: 700; text-decoration: none; }
.rd-card__link::after { content: " \2192"; }
.rd-card--plain { padding: 26px; }
.rd-card--plain h3 { margin-top: 0; }

/* ---------- Split ---------- */
.rd-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.rd-split--rev .rd-split__media { order: 2; }
.rd-split__media { position: relative; }
.rd-split__media img { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: var(--rd-shadow); }
.rd-split__media::before {
  content: ""; position: absolute; z-index: -1; left: -14px; bottom: -14px; width: 56%; height: 56%; border-radius: 18px; background: var(--rd-red); opacity: .9;
}
.rd-split h2 { margin: 0 0 16px; color: var(--rd-ink); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; }
.rd-split p { margin: 0 0 14px; color: var(--rd-muted); line-height: 1.75; }
.rd-list { margin: 18px 0 22px; padding: 0; list-style: none; }
.rd-list li { position: relative; padding: 9px 0 9px 34px; color: var(--rd-ink); line-height: 1.55; }
.rd-list li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--rd-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.rd-note { padding: 18px 20px; border-left: 5px solid var(--rd-red); background: var(--rd-soft); border-radius: 0 12px 12px 0; color: var(--rd-ink); line-height: 1.65; }

/* ---------- Steps ---------- */
.rd-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: rdstep; }
.rd-step { position: relative; padding: 30px 24px 26px; background: #fff; border-radius: var(--rd-radius); border: 1px solid var(--rd-line); counter-increment: rdstep; }
.rd-section--blue .rd-step { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.rd-step::before {
  content: counter(rdstep); display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 50%; background: var(--rd-red); color: #fff; font-size: 1.2rem; font-weight: 700;
}
.rd-step h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--rd-blue-dark); }
.rd-section--blue .rd-step h3 { color: #fff; }
.rd-step p { margin: 0; color: var(--rd-muted); font-size: .94rem; line-height: 1.65; }
.rd-section--blue .rd-step p { color: rgba(255,255,255,.88); }

/* ---------- Reviews ---------- */
.rd-reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rd-review { margin: 0; padding: 28px; background: #fff; border-radius: var(--rd-radius); border: 1px solid var(--rd-line); box-shadow: 0 2px 10px rgba(0, 49, 82, .06); }
.rd-review__stars { color: #f5a623; letter-spacing: 3px; margin-bottom: 12px; }
.rd-review blockquote { margin: 0 0 16px; color: var(--rd-ink); line-height: 1.7; font-size: .98rem; }
.rd-review figcaption { color: var(--rd-muted); font-size: .88rem; font-weight: 600; }
.rd-review a { color: var(--rd-blue); }

/* ---------- Areas ---------- */
.rd-areas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.rd-areas a {
  display: inline-block; padding: 11px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--rd-line); color: var(--rd-blue-dark);
  font-weight: 600; text-decoration: none; transition: background .18s, color .18s, border-color .18s;
}
.rd-areas a:hover { background: var(--rd-blue); color: #fff; border-color: var(--rd-blue); }

/* ---------- FAQ ---------- */
.rd-faq { max-width: 880px; margin: 0 auto; }
.rd-faq details { background: #fff; border: 1px solid var(--rd-line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.rd-faq summary { cursor: pointer; padding: 18px 54px 18px 22px; position: relative; list-style: none; font-weight: 700; color: var(--rd-blue-dark); line-height: 1.4; }
.rd-faq summary::-webkit-details-marker { display: none; }
.rd-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--rd-red); font-weight: 400; }
.rd-faq details[open] summary::after { content: "\2212"; }
.rd-faq details[open] summary { border-bottom: 1px solid var(--rd-line); }
.rd-faq p { margin: 0; padding: 16px 22px 20px; color: var(--rd-muted); line-height: 1.75; }

/* ---------- CTA band ---------- */
.rd-cta { background: linear-gradient(120deg, var(--rd-red-dark), var(--rd-red)); color: #fff; padding-block: clamp(40px, 5vw, 64px); }
.rd-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.rd-cta h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; }
.rd-cta p { margin: 0; color: rgba(255,255,255,.92); }
.rd-btn--white { background: #fff; color: var(--rd-red) !important; }
.rd-btn--white:hover { background: #f4f7f9; }
.rd-btn--outline-white { background: transparent; color: #fff !important; border-color: #fff; }

/* ---------- Gallery ---------- */
.rd-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rd-gallery figure { margin: 0; border-radius: var(--rd-radius); overflow: hidden; background: var(--rd-soft); }
.rd-gallery img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; display: block; }
.rd-gallery figcaption { padding: 10px 14px; font-size: .85rem; color: var(--rd-muted); }

/* ---------- Page header (inner pages) ---------- */
.rd-pagehead { position: relative; color: #fff; background: var(--rd-blue-dark); overflow: hidden; }
.rd-pagehead .rd-hero__bg::after { background: linear-gradient(100deg, rgba(0, 38, 64, .95) 0%, rgba(0, 61, 101, .86) 60%, rgba(0, 93, 152, .6) 100%); }
.rd-pagehead__inner { position: relative; z-index: 2; padding-block: clamp(46px, 6vw, 84px); max-width: 860px; }
.rd-pagehead h1 { margin: 0 0 16px; color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -.025em; }
.rd-pagehead p { margin: 0 0 12px; color: rgba(255,255,255,.93); font-size: 1.1rem; line-height: 1.7; }
.rd-crumbs { margin: 0 0 14px; font-size: .86rem; color: rgba(255,255,255,.8); }
.rd-crumbs a { color: #fff; }

/* ---------- Sticky mobile call bar ---------- */
.rd-callbar { display: none; }

@media (max-width: 1020px) {
  .rd-cards { grid-template-columns: repeat(2, 1fr); }
  .rd-steps { grid-template-columns: repeat(2, 1fr); }
  .rd-hero__inner { grid-template-columns: 1fr; }
  .rd-trust__grid { grid-template-columns: repeat(2, 1fr); }
  .rd-trust__item:nth-child(2) { border-right: 0; }
  .rd-trust__item:nth-child(-n+2) { border-bottom: 1px solid var(--rd-line); }
}
@media (max-width: 760px) {
  .rd-cards, .rd-cards--3, .rd-cards--2, .rd-steps, .rd-reviews, .rd-gallery, .rd-split { grid-template-columns: 1fr; }
  .rd-split--rev .rd-split__media { order: 0; }
  .rd-hero__bg::before { display: none; }
  .rd-actions .rd-btn { width: 100%; }
  .rd-callbar {
    display: flex; position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -6px 20px rgba(0, 0, 0, .16);
  }
  .rd-callbar a { flex: 1; padding: 15px 10px; text-align: center; font-weight: 700; text-decoration: none; }
  .rd-callbar a:first-child { background: var(--rd-red); color: #fff; }
  .rd-callbar a:last-child { color: var(--rd-blue-dark); }
  .seo-page { padding-bottom: 54px; }
}

/* Closing band (template): let long button labels wrap on small screens */
.seo-page-closing__inner > div { min-width: 0; }
.seo-page-closing .button, .seo-page-closing .button span { white-space: normal; text-align: center; max-width: 100%; }
.seo-page-closing .button { width: auto; height: auto; line-height: 1.3; }
@media (max-width: 760px) {
  .seo-page-closing .seo-page-closing__actions { width: 100%; }
  .seo-page-closing .button { display: block; width: 100%; padding: 14px 18px; }
}

.rd-steps--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1020px) { .rd-steps--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .rd-steps--3 { grid-template-columns: 1fr; } }
.rd-reviews--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .rd-reviews--2 { grid-template-columns: 1fr; } }
