/* ═══════════════════════════════════════
   ROOFING-SERVICES-AND-ROOF-REPAIR-LOUISVILLE.CSS - roofing services page
   Sections: hero, services at a glance, roof repair, new roof installation,
   replacement process, storm damage and insurance, roof maintenance, FAQ,
   final CTA
═══════════════════════════════════════ */

/* ── HERO ── */
/* Same sizing and layout as the home page hero: large photo on the left,
   text on the right. */
.page-hero {
  background: var(--page-gray);
  padding: 2rem 0 4rem;
  border-bottom: var(--border);
}
.page-hero .container {
  max-width: 1640px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2rem, 3.5vw, 4rem);
  align-items: start; /* photo and text share the same top edge */
}
/* The whole photo is always shown at its natural 4:3 shape, never cropped. */
.page-hero-image {
  border: var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}
.page-hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}
.page-hero-text .eyebrow { text-align: center; font-size: clamp(0.8rem, 1.2vw, 1rem); margin-bottom: 0.3rem; }
.page-hero-text .lead { font-size: clamp(1.1rem, 1.3vw, 1.3rem); margin-bottom: 1.6rem; }
/* Heading styled after the logo, the same as the home page hero: big navy
   block capitals, with the second line in red between two red rules. */
.hero-title {
  font-family: var(--font-logo);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  /* Shrink the heading to the width of its main line and centre it, so the
     red rules and the location line sit centred under it. */
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.5rem;
}
.hero-title span { display: block; }
/* A thin white outline with a red drop shadow behind it, so the title stands
   off the light background, the same as the home page hero. */
.hero-title-main {
  color: var(--navy);
  font-size: clamp(2.6rem, 5.6vw, 5.25rem);
  white-space: nowrap;
  text-shadow:
    0 0 1px var(--white),
    0 0 2px var(--white),
    0 0 2px var(--white),
    0 0 3px var(--white),
    2px 2px 0 var(--white),
    3px 3px 0 var(--white),
    5px 5px 0 var(--red),
    6px 6px 0 var(--red);
}
.hero-title-sub {
  display: flex !important;
  align-items: center;
  gap: 0.9rem;
  color: var(--red);
  font-size: clamp(1.4rem, 2.7vw, 2.5rem);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
  white-space: nowrap;
}
.hero-title-sub::before,
.hero-title-sub::after {
  content: "";
  flex: 1;
  height: 5px;
  background: var(--red);
}
.hero-title-loc {
  color: var(--navy);
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
  text-align: center;
}
/* Certification logos under the buttons. */
.page-hero-certs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: var(--border);
}
.page-hero-certs p {
  flex-basis: 100%;
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.page-hero-certs img { height: 48px; width: auto; }
.page-hero-certs img.cert-tall { height: 72px; }

/* ── SERVICES AT A GLANCE ── */
/* White boxes on navy, like the "Why Integrity" boxes on the home page. Each
   box links down to its section. */
.glance {
  background: var(--navy);
  color: var(--white);
}
.glance .container { max-width: 1410px; }
.glance h2 { color: var(--white); }
.glance-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.glance-list li {
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--white);
  border-left: 6px solid var(--red);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  font-size: 1.05rem;
  line-height: 1.55;
}
.glance-list strong {
  display: block;
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.glance-list a {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.9rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
}
.glance-list a:hover { color: var(--navy); }

/* ── SERVICE ROWS ── */
/* Photo on one side; a short paragraph, a bulleted list and a button on the
   other. The sides swap on the alternate (gray) rows. */
.roofing-row { background: var(--white); }
.roofing-row-alt {
  background: var(--light-gray);
  border-top: var(--border);
  border-bottom: var(--border);
}
.roofing-row .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.roofing-row-alt .roofing-row-image { order: 2; }
.roofing-row-image {
  border: var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}
.roofing-row-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.roofing-row-text h2 { margin-bottom: 1rem; }
.roofing-row-text p { font-size: 1.15rem; line-height: 1.7; margin-bottom: 1.25rem; }
/* Short bold label above each bulleted list. */
.roofing-row-text h3,
.storm-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}
.roofing-list {
  list-style: none;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}
.roofing-row-text .roofing-list { margin-bottom: 1.75rem; }
.roofing-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
}
/* Red square bullets in place of the default dots. */
.roofing-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 9px;
  height: 9px;
  background: var(--red);
}

/* ── PROCESS ── */
.process { background: var(--white); }
.process-list {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.process-list li {
  counter-increment: step;
  position: relative;
  background: var(--white);
  border: var(--border);
  border-radius: 6px;
  padding: 1.2rem 1.2rem 1.2rem 4.4rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
/* Numbered red circle for each step. */
.process-list li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
}
.process-list strong {
  display: block;
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

/* ── STORM DAMAGE & INSURANCE ── */
.storm {
  background: var(--navy);
  color: var(--white);
}
.storm .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.storm h2 { color: var(--white); margin-bottom: 1rem; }
.storm-text p { font-size: 1.15rem; line-height: 1.7; margin-bottom: 1.5rem; }
.storm-box {
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--white);
  border-left: 6px solid var(--red);
  border-radius: 4px;
  padding: 1.5rem;
}
.storm-box .roofing-list li:last-child { margin-bottom: 0; }
/* The reading link under the list. */
.storm-box p {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--page-gray);
}

/* ── FAQ ── */
.faq {
  background: var(--light-gray);
  border-top: var(--border);
}
.faq .container { max-width: 900px; }
.faq-item {
  border: var(--border);
  border-left: 6px solid var(--red);
  border-radius: 4px;
  margin-bottom: 0.85rem;
  background: var(--white);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.15rem; font-weight: 800; }
/* Plus sign that turns into a minus when the answer is open. */
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  padding: 0 1.2rem 1.2rem;
  font-size: 1.1rem;
}

/* ── FINAL CTA ── */
.final-cta {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.final-cta .container { max-width: 820px; }
.final-cta .eyebrow { color: var(--white); }
.final-cta h2 { color: var(--white); }
.final-cta h2 em { font-style: normal; color: var(--red); }
.final-cta p { margin: 1rem auto 1.75rem; font-size: 1.2rem; }
.final-cta .btn-group { justify-content: center; }
/* Red buttons sit on navy here, so hover goes white instead of navy. */
.storm .btn:not(.btn-light):hover,
.storm .btn:not(.btn-light):focus-visible,
.final-cta .btn:not(.btn-light):hover,
.final-cta .btn:not(.btn-light):focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

/* ══════════════════════
   TABLET (≤ 1100px)
══════════════════════ */
@media (max-width: 1100px) {
  .page-hero .container { grid-template-columns: 1fr; gap: 2rem; max-width: 900px; }
  .glance-list { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════
   MOBILE (≤ 860px)
══════════════════════ */
@media (max-width: 860px) {
  .page-hero { padding: 2.5rem 0; }
  .page-hero .container { gap: 1.75rem; }
  /* Centre the certification logos and their label on phones. */
  .page-hero-certs { justify-content: center; }
  .page-hero-certs p { text-align: center; }
  .roofing-row .container,
  .storm .container { grid-template-columns: 1fr; gap: 1.75rem; }
  /* The photo always sits above its text once the row stacks. */
  .roofing-row-alt .roofing-row-image { order: 0; }
}

@media (max-width: 600px) {
  .glance-list,
  .process-list { grid-template-columns: 1fr; }
}

/* ══════════════════════
   PHONES (≤ 768px): bigger hero title, matching the home page
══════════════════════ */
@media (max-width: 768px) {
  /* The main title line is allowed to break onto two lines on phones so it
     can be set much larger. The size is chosen so the longest single word in
     any page title ("Installation") still fits the width. */
  .hero-title-main {
    font-size: clamp(2.6rem, 16.5vw, 5.25rem);
    line-height: 0.95;
    white-space: normal;
    text-align: center;
  }
  .page-hero-text { min-width: 0; }
  .hero-title-sub { font-size: clamp(1.7rem, 8.6vw, 2.9rem); }
  .hero-title-loc { font-size: clamp(1.5rem, 7vw, 2.4rem); }
  /* Larger hero text on phones so it reads easily, the same on every main page. */
  .page-hero-text .eyebrow { font-size: 1.3rem; }
  .page-hero-text .lead { font-size: 1.35rem; line-height: 1.6; }
}
