/*
Theme Name: Top Hat Roofing
Theme URI: https://www.tophatroofing.com.au
Author: Antigravity Code
Description: Custom built theme for Top Hat Roofing Sydney.
Version: 1.0.0
*/

/* ============================================
   TOP HAT ROOFING — Design System & Styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colour palette */
  --bg: #f7f3ef;
  --bg-warm: #f0ebe4;
  --panel: #fffdf9;
  --text: #1f1b18;
  --text-muted: #5d5a57;
  --line: #ddd4cb;
  --red: #b02822;
  --red-dark: #8f201b;
  --red-glow: rgba(176, 40, 34, 0.15);
  --dark: #1f1b18;
  --dark-warm: #2a2420;
  --cream: #f4eee8;

  /* Spacing */
  --max: 1440px;
  --radius: 20px;
  --radius-sm: 14px;

  /* Shadows */
  --shadow: 0 4px 24px rgba(31, 27, 24, 0.08);
  --shadow-lg: 0 16px 48px rgba(31, 27, 24, 0.12);
  --shadow-card: 0 2px 12px rgba(31, 27, 24, 0.06);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; max-width: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
h1, h2, h3 { margin: 0 0 0.5rem; line-height: 1.1; letter-spacing: -0.02em; }

.container {
  width: min(calc(100% - 3rem), var(--max));
  margin-inline: auto;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dark);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HEADER
   ============================================ */

/* Thin dark top bar — matches mockup */
.site-header::before {
  content: '';
  display: block;
  height: 6px;
  background: var(--dark);
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 2px solid var(--line);
  transition: box-shadow var(--duration) var(--ease);
  overflow: visible;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(31, 27, 24, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 84px; /* Lock height so logo doesn't stretch it */
  padding-left: 0;
  overflow: visible;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  align-self: flex-start; /* Stops the logo from sliding up into the black bar */
  width: 280px;
  height: 84px; /* Perfectly matches header height to prevent white padding blowouts */
  flex-shrink: 0;
  position: relative;
  z-index: 101;
  margin-left: 1.5rem; /* Pushes the logo right to center over the text block */
  transition: all 0.3s ease;
}
.brand img {
  width: 280px;
  height: auto;
  object-fit: contain;
  /* Restore the exact negative margins to keep the logo safely above the 'Top Quality' text */
  margin-top: -30px;
  margin-bottom: -110px;
  transition: all 0.3s ease;
}

/* Scrolled State for Logo */
.site-header.is-scrolled .brand {
  width: 100px;
  align-self: center; /* Center cleanly in the white bar */
  margin-left: 0;
}
.site-header.is-scrolled .brand img {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0; /* Remove hang so it fits completely in the header */
}

/* Navigation */
.site-nav {
  display: flex;
  flex: 1;
  gap: 0;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 1rem;
}
.site-nav a {
  position: relative;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  padding: 0.2rem 0;
  transition: color var(--duration) var(--ease);
}
.nav-specialist {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text);
  margin-left: 2rem;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration) var(--ease);
}
.site-nav a:hover { color: var(--red); }
.site-nav a:hover::after { transform: scaleX(1); }

/* Phone CTA */
.phone-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* keep contents centered */
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  padding: 0.65rem 1.85rem; /* Pushed horizontal padding out just a tiny bit for the final touch */
  border-radius: 4px; /* Matched to .btn-cta border radius */
  font-weight: 700; 
  font-size: 0.95rem; /* Exactly matched to standard .btn scale */
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
  flex-shrink: 0;
}
.phone-cta:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}
.phone-cta svg { flex-shrink: 0; }

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      100deg,
      rgba(244, 238, 232, 0.98) 0%,
      rgba(244, 238, 232, 0.96) 20%,
      rgba(244, 238, 232, 0.88) 35%,
      rgba(244, 238, 232, 0.50) 55%,
      rgba(244, 238, 232, 0.10) 70%,
      transparent 85%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 8.5rem 0 3rem 0; /* Clear overflowing logo */
}
.hero-content h1,
.hero-content .hero-lead,
.hero-content .btn-cta,
.hero-content .hero-contact {
  max-width: 420px;
}

.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 44ch;
  margin: 0 0 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 20px var(--red-glow);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--red-glow);
}
.btn-cta {
  padding: 1.1rem 2.2rem;
  font-size: 1rem;
  border-radius: 4px;
}

/* Hero contact info */
.hero-contact {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(221, 212, 203, 0.5);
}
.hero-contact p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.hero-contact strong {
  color: var(--text);
  font-weight: 700;
}
.hero-phone {
  margin-top: 0.15rem !important;
  font-weight: 700;
}
.hero-phone a {
  color: var(--text);
  transition: color var(--duration) var(--ease);
}
.hero-phone a:hover { color: var(--red); }

/* ============================================
   CONTENT BLEND WRAPPER (PURE CONTINUOUS PATTERN)
   ============================================ */
.content-blend-wrapper {
  position: relative;
  width: 100%;
  
  /* Zoom 300% to push framing leaves completely out of bounds! 
     Leaves behind a flawless, single, un-repeating pure pattern layer */
  background: url('assets/images/services-bg.png') center / 300% 300% no-repeat;
  background-color: var(--bg);
  
  z-index: 2;
  
  /* Footer Bleed overlap logic attached directly to the wrapper! */
  margin-bottom: -8rem;
  padding-bottom: 9rem;
  
  /* Drastic, deep 8rem atmospheric alpha cross-fade into footer sky! */
  mask-image: linear-gradient(180deg, black 0%, black calc(100% - 8rem), rgba(0,0,0,0.3) calc(100% - 4rem), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black calc(100% - 8rem), rgba(0,0,0,0.3) calc(100% - 4rem), transparent 100%);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
  padding: 4.5rem 0 1rem;
  background: transparent;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* "Specialising in:" line */
.specialising-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
}
.line-deco {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.specialising-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red);
  font-style: italic;
}

/* Service Card Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--panel);
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
  position: relative;
}
.service-card:nth-child(4n) { border-right: none; }
.service-card:nth-child(n+5) { border-bottom: none; }

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--red-glow), transparent);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  background: #fff;
}

.service-card img {
  width: 100px;
  height: 100px;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  border-radius: 12px;
  object-fit: contain;
  transition: transform var(--duration) var(--ease);
}
.service-card:hover img {
  transform: scale(1.08);
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.service-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 22ch;
  position: relative;
  z-index: 1;
}

/* ============================================
   ABOUT US
   ============================================ */
.about-us {
  position: relative;
  overflow: visible;
  border-top: none;
  background: transparent;
  
  /* Normal stacking context, tightened drastically to move it up (with slight breathing room added)! */
  padding-top: 2.5rem;
  padding-bottom: 0;
  z-index: 2;
}

.about-us-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  gap: 3.5rem;
}

.about-content {
  flex: 0 0 35%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 2.5rem;
  border-right: 1px solid rgba(168, 26, 26, 0.4);
}

.about-heading {
  font-size: 3.2rem;
  font-weight: 900;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
  line-height: 1;
  text-transform: uppercase;
}

.about-subheading {
  font-size: 1.4rem;
  font-weight: 700;
  color: #a81a1a;
  margin: 0 0 1.25rem;
}

.about-divider {
  width: 100%;
  height: 2px;
  background: rgba(168, 26, 26, 0.3);
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
  margin: 0;
  font-family: Arial, sans-serif;
}
.about-content p strong {
  font-style: italic;
  font-weight: 600;
}

.about-features {
  flex: 1;
  display: flex;
}

.about-feature {
  flex: 1;
  text-align: center;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.about-feature:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(168, 26, 26, 0.3);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  height: 90px;
}
.feature-icon::before, .feature-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px;
  height: 2px;
  background: rgba(168, 26, 26, 0.7);
  transform: translateY(-50%);
}
.feature-icon::before { left: -30px; }
.feature-icon::after { right: -30px; }

.feature-icon svg {
  height: 100%;
  width: auto;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.feature-desc {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 0;
}

/* Footer System Wrapper */
.site-footer {
  position: relative;
  overflow: hidden;
  background: transparent;
  padding-top: 6rem;
}
.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Massive top cross-fade to drastically dissolve the hard skyline frame into the site's beige texture */
  mask-image: linear-gradient(180deg, transparent 0%, black 8rem);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 8rem);
}
.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 1;
}
.footer-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(244, 238, 232, 0) 15%, 
    rgba(244, 238, 232, 0.95) 35%, 
    rgba(244, 238, 232, 0.95) 65%, 
    rgba(244, 238, 232, 0) 85%, 
    transparent 100%
  );
}

.footer-content-wrapper {
  position: relative;
  z-index: 2;
  padding: 0.5rem 0 0;
}

/* Footer Info Inner */
.footer-info-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 0;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.footer-brand img {
  width: 115px;
  height: auto;
}
.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.5rem;
}
.footer-company-name {
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0em;
  color: #1a1715;
  line-height: 1.1;
}
.footer-brand-text address {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 1.05rem;
  color: #4a4542;
}
.footer-address {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  display: inline-block;
}
.footer-services-list {
  font-size: 0.95rem !important;
  color: var(--dark);
  font-weight: 600;
}
.footer-services-list .pipe {
  color: rgba(0,0,0,0.15);
  margin: 0 0.4rem;
  font-weight: 400;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  padding-left: 2rem;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}
.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: #4a4542;
}
.footer-contact-item svg {
  flex-shrink: 0;
  color: #4a4542;
}
.footer-contact-item a {
  color: #4a4542;
  font-weight: 600;
  transition: color var(--duration) var(--ease);
}
.footer-contact-item a:hover {
  color: var(--red);
}

/* Footer CTA Box */
.footer-cta-box {
  background: rgba(12, 10, 8, 0.75);
  padding: 1.25rem 2rem 1rem;
  max-width: 1050px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
  border: none;
}

.cta-headline {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin: 0 0 0.5rem;
}
.cta-subtext {
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
  font-style: italic;
}
.cta-subtext::after {
  content: '';
  display: block;
  width: 220px;
  height: 4px;
  background: var(--red);
  margin: 0.8rem auto 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1080px) {
  .brand {
    width: auto;
    margin-left: 0;
    height: auto;
    flex-shrink: 1;
  }
  .brand img {
    width: 100px;
    margin-top: 0;
    margin-bottom: 0;
  }
  .header-inner { gap: 1rem; }
  .nav-toggle { display: block; order: 3; flex-shrink: 0; }
  .phone-cta { order: 2; margin-left: auto; flex-shrink: 0; }

  .site-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    gap: 0.25rem;
    z-index: 200;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 1.05rem;
  }
  .site-nav a:hover { background: var(--bg); }
  .site-nav a::after { display: none; }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-card:nth-child(4n) { border-right: 1px solid var(--line); }
  .service-card:nth-child(2n) { border-right: none; }
  .service-card:nth-child(n+5) { border-bottom: 1px solid var(--line); }
  .service-card:nth-child(n+7) { border-bottom: none; }

  .footer-info-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .footer-contact {
    align-items: flex-start;
    padding-left: 0;
    border-left: none;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .brand img { width: 90px; margin-top: 0; margin-bottom: 0; }
  .phone-cta span { display: none; }
  .phone-cta { padding: 0.7rem; border-radius: 50%; }

  .hero { min-height: 560px; }
  .hero-content { padding: 5rem 0 2.5rem 0; }
  .hero h1 { font-size: 2rem; }
  .hero-lead { font-size: 0.95rem; }

  .services { padding: 3rem 0; }
  .section-header h2 { font-size: 1.6rem; }
  .specialising-text { font-size: 1.3rem; }
  .line-deco { width: 40px; }

  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-card { border-right: none !important; }
  .service-card { border-bottom: 1px solid var(--line) !important; }
  .service-card:last-child { border-bottom: none !important; }

  .cta-headline { font-size: 1rem; }
  .cta-subtext { font-size: 0.85rem; }
}

/* Small phones */
@media (max-width: 420px) {
  .hero h1 { font-size: 1.7rem; }
  .btn-cta { padding: 0.9rem 1.5rem; font-size: 0.9rem; }
  .service-card { padding: 1.5rem 1rem; }
}

/* Form error banner (AJAX response) */
.form-error {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #fdecea;
  color: #9b1c14;
  border: 1px solid #f5b7b1;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

/* ============================================
   QUOTE MODAL
   ============================================ */
.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  visibility: hidden;
  transition: visibility var(--duration) var(--ease);
}
.quote-modal.is-active {
  pointer-events: auto;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 27, 24, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.quote-modal.is-active .modal-backdrop {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: var(--panel);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: all var(--duration) var(--ease);
  /* Scrollbar hide */
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.quote-modal.is-active .modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal-content::-webkit-scrollbar {
  display: none;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: rgba(31, 27, 24, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
  z-index: 10;
}
.modal-close:hover {
  background: var(--red-glow);
  color: var(--red);
  transform: rotate(90deg);
}

.modal-panel {
  padding: 3rem 2.5rem;
}

/* Header */
.modal-header {
  text-align: center;
  margin-bottom: 2rem;
}
.modal-deco {
  display: block;
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: var(--red);
  margin-bottom: 0.25rem;
}
.modal-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.modal-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a09d9a;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.custom-select-wrapper {
  position: relative;
}
.custom-select-wrapper select {
  appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}
.select-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.math-captcha-inline {
  background: var(--bg-warm);
  padding: 1rem;
  border-radius: 8px;
  border: 1px dashed var(--line);
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
}
.math-captcha-inline label {
  margin: 0;
}
.math-captcha-inline input {
  margin: 0;
}
.captcha-error {
  border-color: var(--red) !important;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.form-actions {
  margin-top: 2rem;
}
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  padding: 1rem;
}
.btn-submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}
.btn-submit.is-loading svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Success Panel */
.modal-success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}
.success-icon-wrap {
  width: 80px;
  height: 80px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px var(--red-glow);
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  transform: scale(0.5);
}
@keyframes popIn {
  to { opacity: 1; transform: scale(1); }
}
.success-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.success-desc {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 320px;
}
.btn-return {
  width: 100%;
  max-width: 200px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .modal-panel {
    padding: 2rem 1.5rem;
  }
  .math-captcha-inline {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .math-captcha-inline input {
    max-width: 100% !important;
  }
}
/* ============================================
   SERVICE PAGES
   ============================================ */

.service-hero {
    padding: 6rem 0 3rem;
    text-align: center;
    background: #fff;
}

.service-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(180deg, #fff 0%, #f7efe9 100%);
    border: 1px solid var(--line);
    border-radius: 50%;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-card);
}

.service-hero-icon img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.service-hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1.25rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.service-hero .hero-lead {
    max-width: 58ch;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-hero-cta {
    margin-top: 2rem;
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-secondary-link {
    color: var(--text-muted);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-secondary-link:hover { color: var(--red); }

.service-content {
    max-width: 780px !important;
    padding: 4rem 1rem 2rem;
    font-size: 1.08rem;
    line-height: 1.8;
    color: #333;
}

.service-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 3rem 0 1.25rem;
    color: var(--text);
}

.service-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}

.service-content p { margin-bottom: 1.5rem; }

.service-content ul, .service-content ol {
    margin: 0 0 1.75rem 1.25rem;
    padding-left: 1rem;
}

.service-content li { margin-bottom: 0.6rem; }

.service-content strong { color: var(--text); }

/* FAQ Section */
.service-faq-section {
    background: #fafafa;
    padding: 5rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.service-faq-container { max-width: 780px !important; }

.service-faq-heading {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text);
}

.service-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-faq-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s var(--ease);
}

.service-faq-item[open] { box-shadow: var(--shadow-card); }

.service-faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.service-faq-item summary::-webkit-details-marker { display: none; }
.service-faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--red);
    transition: transform 0.2s var(--ease);
    flex-shrink: 0;
}

.service-faq-item[open] summary::after { content: '−'; }

.service-faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Related Guides */
.service-related-section {
    padding: 5rem 0;
    text-align: center;
}

.service-related-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
}

.service-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.service-related-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.service-related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.service-related-card .card-meta {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.service-related-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    flex: 1;
}

.service-related-card .read-more {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer CTA block */
.service-footer-section {
    padding: 4rem 0 7rem;
    background: #fff;
    border-top: 1px solid var(--line);
}

.service-footer-section .share-box {
    justify-content: center;
    margin-bottom: 4rem;
}

.service-cta-final {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background: linear-gradient(180deg, #faf5f2 0%, #fff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.service-cta-final h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.service-cta-final p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.service-cta-actions {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Clickable service cards on homepage */
a.service-card,
a.service-card:hover {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   ROOFING LIBRARY & ARTICLES
   ============================================ */

.library-hero, .article-header {
    padding: 6rem 0 3rem;
    text-align: center;
    background: #fff;
}

.library-hero .hero-lead, .article-header .hero-lead {
    margin-left: auto;
    margin-right: auto;
}

.library-hero h1, .article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.article-border {
    width: 80px;
    height: 4px;
    background: var(--red);
    margin: 2rem auto;
}

.library-grid {
    padding: 4rem 0 8rem;
}

.articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
}

.library-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.library-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-content {
    padding: 2.5rem;
}

.card-meta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.library-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.library-card h2 a:hover {
    color: var(--red);
}

.library-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.read-more {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--red);
}

/* Single Article */
.article-single {
    padding-bottom: 10rem;
}

.article-container {
    max-width: 800px !important;
}

.article-meta {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.article-meta .category {
    color: var(--red);
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2, .article-content h3 {
    margin: 3rem 0 1.5rem;
    color: var(--text);
}

.article-content p {
    margin-bottom: 2rem;
}

.share-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    margin-bottom: 3rem;
}

.share-box > strong {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    background: #f3f3f3;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.share-link:hover {
    transform: translateY(-1px);
    color: #fff;
}

.share-link.share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-link.share-twitter:hover  { background: #000;     border-color: #000; }
.share-link.share-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.share-link.share-email:hover    { background: var(--red); border-color: var(--red); }

.article-footer {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--line);
}

.article-cta {
    background: var(--bg-warm);
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 4rem;
}

.article-cta h3 {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.article-cta p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* ============================================
   AVAILABLE SERVICES (shown on single articles)
   ============================================ */

.article-services-section {
    padding: 5rem 0 7rem;
    background: linear-gradient(180deg, #faf5f2 0%, #fff 100%);
    border-top: 1px solid var(--line);
}

.article-services-heading {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.5rem;
}

.article-services-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1rem;
}

.article-services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}

.article-service-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
    flex: 1 1 260px;
    max-width: 320px;
}

.article-service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--red);
}

.article-service-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-service-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.article-service-card h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
}

.article-service-arrow {
    color: var(--red);
    font-size: 1.35rem;
    font-weight: 700;
    transition: transform 0.2s var(--ease);
}

.article-service-card:hover .article-service-arrow {
    transform: translateX(3px);
}

@media (max-width: 480px) {
    .article-services-section { padding: 3.5rem 0 5rem; }
    .article-services-heading { font-size: 1.4rem; }
    .article-services-sub { font-size: 0.92rem; margin-bottom: 2rem; }
    .article-services-grid { gap: 0.85rem; }
    .article-service-card { padding: 1rem 1.15rem; gap: 0.85rem; flex: 1 1 100%; max-width: 100%; }
    .article-service-icon, .article-service-icon img { width: 44px; height: 44px; }
    .article-service-card h3 { font-size: 0.95rem; }
}

/* ============================================
   MOBILE RESPONSIVENESS — Library, Article,
   Service pages, Share buttons, Final CTA
   ============================================ */

/* Tablet & large phones */
@media (max-width: 820px) {
    /* Library index */
    .library-hero { padding: 4rem 1rem 2rem; }
    .library-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
    .library-grid { padding: 2.5rem 1rem 5rem; }
    .articles-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
    .card-content { padding: 1.75rem; }
    .library-card h2 { font-size: 1.25rem; }

    /* Single article */
    .article-single { padding-bottom: 5rem; }
    .article-header { padding: 4rem 1rem 2rem; }
    .article-content { font-size: 1.05rem; line-height: 1.75; }
    .article-content h2 { font-size: 1.4rem; margin: 2.25rem 0 1rem; }
    .article-content h3 { font-size: 1.15rem; margin: 1.75rem 0 0.75rem; }
    .article-footer { margin-top: 3.5rem; padding-top: 2.5rem; }

    /* Service hero */
    .service-hero { padding: 3.5rem 1rem 2rem; }
    .service-hero h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); }
    .service-hero .hero-lead { font-size: 1rem; max-width: 100%; }

    /* Service content */
    .service-content { padding: 2.5rem 1rem 1.5rem; font-size: 1.02rem; }
    .service-content h2 { font-size: 1.4rem; margin: 2.25rem 0 1rem; }
    .service-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }

    /* Service FAQ */
    .service-faq-section { padding: 3.5rem 0; }
    .service-faq-heading { font-size: 1.5rem; margin-bottom: 1.75rem; }
    .service-faq-item summary { padding: 1rem 1.15rem; font-size: 0.95rem; }
    .service-faq-answer { padding: 0 1.15rem 1.15rem; }

    /* Service related */
    .service-related-section { padding: 3.5rem 0; }
    .service-related-section h2 { font-size: 1.4rem; margin-bottom: 1.75rem; }
    .service-related-card { padding: 1.5rem; }
    .service-related-card h3 { font-size: 1.05rem; }

    /* Service footer + final CTA */
    .service-footer-section { padding: 3rem 0 5rem; }
    .service-cta-final { padding: 2rem 1.5rem; }
    .service-cta-final h2 { font-size: 1.3rem; }

    /* Share block */
    .share-box { gap: 0.85rem 1rem; margin-bottom: 2.5rem; }
    .share-link { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
}

/* Small phones */
@media (max-width: 480px) {
    /* Library index */
    .library-hero { padding: 3rem 1rem 1.5rem; }
    .library-hero h1 { font-size: clamp(1.7rem, 8vw, 2.3rem); }
    .library-hero .hero-lead, .article-header .hero-lead { font-size: 0.95rem; }
    .articles-list { grid-template-columns: 1fr; gap: 1.25rem; }
    .card-content { padding: 1.5rem; }

    /* Single article */
    .article-header { padding: 3rem 1rem 1.5rem; }
    .article-meta { font-size: 0.8rem; flex-wrap: wrap; }
    .article-content { font-size: 1rem; }

    /* Service hero */
    .service-hero { padding: 2.5rem 1rem 1.5rem; }
    .service-hero-icon { width: 96px; height: 96px; margin-bottom: 1.25rem; }
    .service-hero-icon img { width: 72px; height: 72px; }
    .service-hero h1 { font-size: clamp(1.8rem, 8vw, 2.25rem); letter-spacing: 0; }
    .service-hero .hero-lead { font-size: 0.95rem; }
    .service-hero-cta { flex-direction: column; gap: 0.75rem; width: 100%; }
    .service-hero-cta .btn-primary,
    .service-hero-cta .btn { width: 100%; text-align: center; }

    /* Service content */
    .service-content { padding: 2rem 1rem 1rem; font-size: 1rem; }
    .service-content h2 { font-size: 1.25rem; margin: 2rem 0 0.85rem; }
    .service-content h3 { font-size: 1.05rem; }
    .service-content ul, .service-content ol { margin-left: 0.75rem; padding-left: 1rem; }

    /* Service FAQ */
    .service-faq-section { padding: 2.75rem 0; }
    .service-faq-heading { font-size: 1.3rem; margin-bottom: 1.5rem; }
    .service-faq-item summary { padding: 0.9rem 1rem; font-size: 0.9rem; gap: 0.5rem; }
    .service-faq-item summary::after { font-size: 1.25rem; }
    .service-faq-answer { padding: 0 1rem 1rem; font-size: 0.95rem; }

    /* Service related */
    .service-related-grid { grid-template-columns: 1fr; gap: 1rem; }
    .service-related-card { padding: 1.35rem; }

    /* Final CTA */
    .service-cta-final { padding: 1.75rem 1.15rem; }
    .service-cta-final h2 { font-size: 1.15rem; line-height: 1.3; }
    .service-cta-final p { font-size: 0.95rem; }
    .service-cta-actions { flex-direction: column; gap: 0.75rem; width: 100%; }
    .service-cta-actions .btn-primary,
    .service-cta-actions .btn { width: 100%; text-align: center; }

    /* Share block — keep inline but shrink */
    .share-box { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .service-footer-section .share-box { align-items: center; text-align: center; }
    .share-links { gap: 0.4rem; flex-wrap: wrap; justify-content: flex-start; }
    .service-footer-section .share-links { justify-content: center; }
    .share-link { padding: 0.45rem 0.8rem; font-size: 0.78rem; }
    .share-link svg { width: 14px; height: 14px; }

    /* Form error banner */
    .form-error { font-size: 0.85rem; padding: 0.75rem 0.85rem; }
}

/* ============================================
   MOBILE — About Us section
   ============================================ */

@media (max-width: 820px) {
    .about-us { padding-top: 1.5rem; padding-bottom: 2rem; }

    .about-us-inner {
        flex-direction: column;
        gap: 2.5rem;
    }

    .about-content {
        flex: 1 1 auto;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(168, 26, 26, 0.3);
        padding-bottom: 2rem;
        text-align: center;
    }

    .about-heading { font-size: 2.25rem; }
    .about-subheading { font-size: 1.15rem; }
    .about-divider { margin-left: auto; margin-right: auto; }

    .about-features {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }

    .about-feature {
        padding: 0 1rem;
        flex: 1 1 auto;
    }

    /* Remove vertical divider bars between features (now stacked) */
    .about-feature:not(:last-child)::after {
        display: none;
    }

    /* Remove the decorative "dashes" flanking feature icons (they overflow on narrow screens) */
    .feature-icon::before,
    .feature-icon::after {
        display: none;
    }

    .feature-icon { height: 72px; margin-bottom: 1rem; }
    .feature-title { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .about-us { padding-top: 1rem; }
    .about-heading { font-size: 1.8rem; }
    .about-subheading { font-size: 1rem; }
    .about-content { padding-bottom: 1.5rem; }
    .about-content p { font-size: 0.95rem; }
    .about-features { gap: 1.5rem; }
    .feature-title { font-size: 1rem; }
}

/* ============================================
   MOBILE — Footer (cityscape bg was washing out
   text when content stacked vertically)
   ============================================ */

@media (max-width: 820px) {
    /* Hide the cityscape image and the center-column gradient on mobile.
       Replaced with a solid site-background tone so every contact line
       has guaranteed contrast. */
    .footer-bg { display: none; }
    .site-footer {
        background: var(--bg, #f4eee8);
        padding-top: 3rem;
    }

    .footer-content-wrapper { padding-top: 0; }

    .footer-info-inner {
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .footer-brand {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-brand img { width: 96px; }
    .footer-company-name { font-size: 1.6rem; }
    .footer-brand-text { padding-top: 0; align-items: center; }
    .footer-brand-text address { align-items: center; }
    .footer-address { text-align: center; }

    .footer-contact {
        align-items: center !important;
        gap: 0.6rem;
        width: 100%;
    }
    .footer-contact-item {
        font-size: 0.95rem;
        justify-content: center;
        text-align: center;
        flex-wrap: wrap;
    }

    .footer-cta-box {
        margin: 1.5rem 1rem 0;
        padding: 1.25rem 1rem;
        text-align: center;
    }

    .footer-bottom-bar { display: none; }
}

@media (max-width: 480px) {
    .site-footer { padding-top: 2.5rem; }
    .footer-company-name { font-size: 1.35rem; }
    .footer-brand-text address { font-size: 0.95rem; }
    .footer-services-list { font-size: 0.85rem !important; }
    .footer-contact-item { font-size: 0.9rem; }
    .footer-cta-box { margin: 1.25rem 0.75rem 0; }
}

/* ============================================
   MOBILE — Modal quote form polish
   ============================================ */

@media (max-width: 600px) {
    .quote-modal { padding: 0; align-items: stretch; }
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        margin: 0;
    }
    .modal-panel { padding: 2rem 1.25rem 2.5rem; }
    .modal-close { top: 0.75rem; right: 0.75rem; }
    .modal-header h2 { font-size: 1.5rem; }
    .btn-submit { width: 100%; justify-content: center; }
    .form-actions { width: 100%; }
}

/* ============================================
   MOBILE — Homepage services section + hero CTA
   ============================================ */

@media (max-width: 480px) {
    .hero { min-height: 520px; }
    .hero-content { padding: 4rem 0 2rem 0; }
    .hero h1 { font-size: 1.75rem; }
    .hero-lead { font-size: 0.92rem; }
    .btn-cta { padding: 0.95rem 1.5rem; font-size: 0.95rem; width: 100%; text-align: center; display: inline-block; }
    .hero-content h1,
    .hero-content .hero-lead,
    .hero-content .btn-cta,
    .hero-content .hero-contact { max-width: 100%; }

    .services { padding: 2.5rem 0 0.5rem; }
    .section-header h2 { font-size: 1.4rem; }
    .specialising-text { font-size: 1.05rem; }
    .line-deco { width: 28px; }

    .service-card { padding: 1.5rem 1rem; }
    .service-card h3 { font-size: 1rem; }
    .service-card p { font-size: 0.85rem; max-width: 28ch; }
    .service-card img { width: 80px; height: 80px; }
}

/* ============================================
   MOBILE — Defensive: ensure all images scale,
   nothing overflows the viewport horizontally
   ============================================ */

@media (max-width: 820px) {
    img, video, iframe, svg { max-width: 100%; height: auto; }
    pre, code { white-space: pre-wrap; word-break: break-word; }
    .service-content a,
    .article-content a { word-break: break-word; }
}
