/* Basic Styles & Color Scheme from Business Card */
:root {
  --primary-blue: #004d99;
  --secondary-blue: #0072c6;
  --light-grey: #f0f0f0;
  --text-color: #333;
  --white: #fff;
  --font-family: "Roboto", sans-serif;
  --hero-mobile-bg-height-scale: 120%; /* 🔹 vertical stretch amount */
}
/* Global box-sizing + root overflow guard */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0; /* safety: remove any default padding */
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
  background-color: var(--light-grey); /* matches header background */
  overflow-x: hidden; /* 👈 prevents the carousel from triggering a scroll bar while sliding */
}

.main-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* logo, then contact, then actions */
  gap: 2rem; /* was 3rem – slightly tighter */
  padding: 0.01rem 1% 0.9rem;
  background-color: var(--light-grey);
}

.main-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-blue);
  z-index: 5;
}

.logo-container {
  text-align: left;
  flex-shrink: 0;
}

.logo {
  max-width: clamp(240px, 24vw, 320px);
  height: auto;
}

.contact-info-wrapper {
  display: flex;
  align-items: center;
  border-left: 1px solid #ccc; /* thinner divider */
  padding-left: 1rem; /* was 1.5rem */
  margin-left: 0.5rem; /* was 1.5rem – pulls text closer to logo */
  flex: 0 0 auto;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 0 0 auto;
}

.phone-number {
  font-weight: bold;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  white-space: nowrap;
}

.email-link {
  font-size: clamp(1.4rem, 1.8vw, 1.9rem);
  color: #666;
  text-decoration: none;
  white-space: nowrap;
}

/* BUTTON + GAS SAFE IMAGE – pushed to far right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto; /* pushes this block to the right edge */
  flex: 1 1 auto;
  justify-content: flex-end;
}

.cta-button {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 0.9rem 2.2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  border: none;
}

.cta-button.header-cta {
  font-size: clamp(1.5rem, 1.8vw, 2rem);
  text-align: center;
  white-space: normal; /* allows wrapping if needed */
  flex: 1 1 auto; /* this is what scales with width */
  max-width: 260px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.header-cta-image {
  height: 100px;
  width: auto;
  display: block;
}

.cta-button.header-cta:hover {
  background-color: var(--secondary-blue);
  transform: translateY(-2px);
}
/* Gas Safe logo + Profile button stack */
.gas-safe-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.gas-safe-link {
  display: inline-flex;
}

.gas-safe-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  background: var(--white);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  border-radius: 999px;

  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.35rem 1rem;

  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gas-safe-profile-btn:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-1px);
}

/* -------------------- QUOTE OVERLAY (TOP REQUEST A QUOTE) -------------------- */
.quote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55); /* semi-transparent dark around box */
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 800; /* above hero, below terms modal (which is 999) */
}

.quote-overlay.is-visible {
  display: flex;
}

.quote-overlay-inner {
  background: rgba(255, 255, 255, 0.8); /* semi-transparent white */
  border-radius: 16px; /* curved corners */
  border: 3px solid var(--primary-blue); /* blue border */
  width: min(700px, 90%);
  max-height: 90vh;
  padding: 2rem 2.5rem 2rem;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.quote-overlay-close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.quote-overlay-emergency {
  text-align: center;
  margin-bottom: 0.75rem;
}

.overlay-emergency-text {
  display: block;
  font-weight: 700;
  color: #333;
}

.overlay-emergency-number {
  display: block;
  color: var(--primary-blue);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-decoration: none;
}

.quote-overlay-title {
  text-align: center;
  margin: 0 0 1rem;
  color: var(--primary-blue);
}
/* Override terms colours inside the quote overlay box */
.quote-overlay-inner .terms-label {
  color: #000; /* black text */
  font-weight: 500;
}

.quote-overlay-inner .terms-label.field-error {
  color: #d32f2f; /* red on error */
}

.quote-overlay-inner .terms-link {
  color: var(--primary-blue); /* blue hyperlink */
  text-decoration: underline;
}

.quote-overlay-inner .terms-label.field-error .terms-link {
  color: #d32f2f;
}

/* -------------------- HERO SECTION -------------------- */
.hero {
  position: relative;

  /* Removed fixed height. Use padding for proportional scaling. */
  height: 0;

  /* Calculate padding-bottom based on 600/1248 = 0.4807 or 48.07% */
  padding-top: 0; /* No top padding needed here */
  padding-bottom: 48.07%; /* Ensures proportional height based on 100% width */
  padding-left: 0;
  padding-right: 0;

  /* Set background to cover the full area */
  background: url("images/new-hero.jpg") no-repeat center center;
  background-size: cover; /* Ensures 100% fill, cropping if needed */

  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: none;
  display: block;
  max-width: 100%;
  z-index: 10;
}

.hero-content h1 {
  position: absolute;
  top: 35%;
  left: 5%; /* Adjusted for better spacing when padding is removed from .hero */
  transform: translateY(-50%);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-color);
  line-height: 1.2;
  margin: 0;
  max-width: 35%;
  white-space: normal;
  text-align: left;
}

.hero-sub-content {
  position: absolute;
  top: 35%;
  right: 15%; /* Adjusted for better spacing when padding is removed from .hero */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: auto;
  max-width: 300px;
  margin: 0;
}

.hero-sub-content p {
  font-size: clamp(1.2rem, 1.8vw, 2.1rem);
  color: var(--primary-blue); /* or #004d99 if you prefer */
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-align: right;
}

.emergency-cta-text {
  position: absolute;
  top: 15%; /* vertical position – adjust if you want it higher/lower */
  left: 50%;
  transform: translate(-50%, -50%); /* centers it horizontally */
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--text-color);
}

.emergency-cta-text .emergency-number {
  display: block;
  color: var(--primary-blue);
  text-decoration: none;
  font-size: clamp(1.5rem, 2.5vw, 3.5rem);
}

.hero-image {
  width: 100vw;
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  height: 100%;
  object-fit: cover;
}

/* -------------------- SERVICES SECTION -------------------- */
.services-section {
  padding: 4rem 5% 3rem;
  text-align: center;
  background-color: var(--light-grey);
}

/* heading inside services */
.services-section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--primary-blue);
  margin: 0 0 1.5rem;
}

/* SERVICES GRID – 4 desktop, 2 tablet, 1 phone */
.services-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 across on wide screens */
}

/* Tablet / small desktop: 2 × 2 */
@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones: single column */
@media (max-width: 700px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-item {
  background-color: var(--white);
  padding-top: 0.05rem;
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative; /* needed for flip icon and back panel */
  overflow: hidden;
}

.flip-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-blue);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 3; /* <-- always above front/back */
}

.flip-icon:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.service-front,
.service-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: opacity 0.3s ease;
}

/* back panel sits on top but is hidden until flipped */
.service-back {
  position: absolute;
  inset: 0;
  padding: 2rem;
  background-color: var(--white);
  opacity: 0;
  pointer-events: none;
  z-index: 1; /* <-- sits under the icon */
}

/* when flipped: hide front, show back */
.service-item.flipped .service-front {
  opacity: 0;
  pointer-events: none;
}

.service-item.flipped .service-back {
  opacity: 1;
  pointer-events: auto;
}

.service-item p {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-top: 0.5rem;
  line-height: 1.4;
  text-align: center;
}

.service-item .service-icon {
  width: 300px;
  height: 300px;
  object-fit: contain;
  margin-bottom: 1rem;
  margin-top: 0;
}
/* Landlord icon: visually smaller, but keeps the same 300px layout height
   so headings line up perfectly with other cards */
.service-icon--landlord {
  transform: scale(0.55); /* adjust 0.5–0.7 to taste */
  transform-origin: center center; /* keep it centred in its slot */
}

.service-item h3 {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-top: 0;
}

/* -------------------- COVERAGE MAP SECTION -------------------- */
.coverage-section {
  padding: 4rem 5%;
  background-color: #ffffff;
  text-align: center;
}

.coverage-section h2 {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.coverage-intro {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: #444;
}

.coverage-map-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.coverage-map {
  width: 100%;
  min-height: 350px;
  border: 0;
}

/* make it a bit taller on larger screens */
@media (min-width: 900px) {
  .coverage-map {
    min-height: 450px;
  }
}
/* SOCIAL MEDIA SECTION – GPF PLUMBING THEME */

.social-section {
  padding: 64px 16px;
  background: var(--light-grey);
  color: var(--text-color);
  font-family: var(--font-family);
}

.social-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.social-heading {
  margin: 0 0 8px;
  font-size: 2rem;
  text-align: center;
  color: var(--primary-blue);
}

.social-subheading {
  margin: 0 0 32px;
  text-align: center;
  font-size: 0.95rem;
  color: #555;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.social-card {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.social-card-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--primary-blue);
}

/* The widget frame (Instagram/Facebook) */
.social-embed {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #e6eef5; /* soft blue-ish background while loading */
  position: relative;
}

.social-iframe {
  width: 100%;
  border: 0;
}

.social-placeholder {
  margin: 0;
  padding: 40px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
}

/* Link under each card */
.social-link {
  margin-top: 12px;
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--secondary-blue);
}

.social-link:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .social-section {
    padding: 48px 16px;
  }

  .social-heading {
    font-size: 1.6rem;
  }
}

/* -------------------- TESTIMONIALS SECTION -------------------- */
.testimonials-section {
  padding: 4rem 5%;
  text-align: center;
  background-color: var(--white);
}

.testimonials-section h2 {
  margin-bottom: 2rem;
}

.carousel-container-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* Base slider layout */
.testimonial-slider {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 420px;
  overflow: hidden; /* hides cards sliding off-screen */
}

/* Base card – desktop-style carousel */
.testimonial-card {
  position: absolute;
  top: 0;
  left: 50%; /* centre reference */
  width: 100%;
  max-width: 860px;
  height: 100%;

  background-color: #fff;
  border-radius: 50px;
  padding: 2.5rem 3rem;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transform: translateX(100%) scale(0.9);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;

  z-index: 1; /* base layer */
}

/* Active = centred (always on top, fully opaque) */
.testimonial-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
  border: 3px solid var(--primary-blue);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);

  z-index: 10; /* above side cards */
}

/* To the right (next) */
.testimonial-card.next {
  opacity: 0.3;
  transform: translateX(10%) scale(0.85);
  z-index: 5; /* under active, above base */
}

/* To the left (previous) */
.testimonial-card.prev {
  opacity: 0.3;
  transform: translateX(-110%) scale(0.85);
  z-index: 5; /* under active, above base */
}

.testimonial-card p {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.testimonial-card cite {
  display: block;
  font-style: normal;
  font-weight: bold;
  color: var(--primary-blue);
  margin-top: 1rem;
}

/* ARROWS */
.nav-arrow {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 3.5rem;
  font-weight: bold;
  color: #999;
  opacity: 0.6;
  padding: 0 0.6rem;
  z-index: 20;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}

.nav-arrow:hover {
  opacity: 1;
  color: var(--primary-blue);
}

/* ---------- PHONES & TABLETS (single centred card, smooth slide) ---------- */
@media (max-width: 900px) {
  .testimonials-section {
    padding: 3rem 6%;
  }

  .testimonial-slider {
    height: 360px;
  }

  .testimonial-card {
    max-width: 520px;
    border-radius: 32px;
    padding: 1.75rem 1.5rem;
    /* start completely off-screen to the right */
    transform: translateX(150%) scale(0.96);
  }

  .testimonial-card.active {
    /* centred */
    transform: translateX(-50%) scale(1);
  }

  /* slide in/out from sides but keep only active visible */
  .testimonial-card.next {
    opacity: 0;
    pointer-events: none;
    transform: translateX(150%) scale(0.96); /* off to the right */
  }

  .testimonial-card.prev {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-250%) scale(0.96); /* off to the left */
  }

  .testimonial-card p {
    font-size: 1.05rem;
  }

  .nav-arrow {
    font-size: 2.6rem;
  }
}

/* ---------- LARGE DESKTOP – slightly larger cards ---------- */
@media (min-width: 1100px) {
  .testimonial-slider {
    max-width: 937.5px;
    height: 468.75px;
  }

  .testimonial-card {
    max-width: 859.375px;
    border-radius: 78.125px;
    padding: 3.9rem;
  }

  .testimonial-card p {
    font-size: 1.72rem;
    margin-bottom: 1.56rem;
  }

  .testimonial-card cite {
    margin-top: 1.56rem;
  }

  .nav-arrow {
    font-size: 4.6875rem;
  }

  /* show faint side cards again on big screens */
  .testimonial-card.next,
  .testimonial-card.prev {
    opacity: 0.3;
  }
}
/* -------------------- END TESTIMONIALS SECTION -------------------- */

/* -------------------- CONTACT SECTION -------------------- */
.contact-section {
  padding: 4rem 5%;
  background-color: var(--primary-blue);
  color: var(--white);
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  gap: 1rem;
}
/* Contact form fields + error states */
.contact-form input,
.contact-form textarea {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  font-family: var(--font-family);
}

.contact-form .field-error {
  border-color: #d32f2f;
  box-shadow: 0 0 0 1px rgba(211, 47, 47, 0.3);
}

/* Disabled send button */
.contact-form .cta-button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-submit {
  background-color: #ffffff;
  color: var(--primary-blue);
  border-radius: 999px;
  padding: 0.8rem 2.7rem;
  font-weight: 700;
  border: 2px solid #ffffff;
  align-self: center;
  margin-top: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
/* Disabled send button */
.contact-form .cta-button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.contact-submit:hover:not([disabled]) {
  background-color: var(--secondary-blue);
  color: #ffffff;
  border-color: var(--secondary-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.required-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #f5f5f5;
  opacity: 0.9;
  text-align: center;
}

/* Terms row */
.terms-row {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  text-align: left;
  font-size: 0.95rem;
}

.terms-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffeb3b; /* stands out on blue */
  font-weight: 500;
}

.terms-label.field-error {
  color: #d32f2f;
}

.terms-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* make the “Terms & Conditions” part pop as a link */
.terms-link {
  background: none;
  border: none;
  padding: 0;
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.terms-label.field-error .terms-link {
  color: #ffd0d0;
}

/* TERMS MODAL OVERLAY */
.terms-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* semi-transparent grey */
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.terms-modal.is-visible {
  display: flex;
}

.terms-modal-content {
  background: #fff;
  border-radius: 12px; /* curved corners */
  border: 3px solid var(--primary-blue); /* blue border */
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  padding: 2rem;
  position: relative;
  overflow-y: auto;
}

.terms-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.terms-agree-btn {
  margin-top: 1.5rem;
}

/* -------------------- FOOTER STYLING -------------------- */
.main-footer {
  background-color: var(--primary-blue);
  color: #ffffff;
  padding: 2.2rem 5% 1.6rem;
}

/* Force ALL footer links to stay white (including visited) */
.main-footer a,
.main-footer a:link,
.main-footer a:visited,
.main-footer a:hover,
.main-footer a:active {
  color: #ffffff !important;
  text-decoration: none;
}

.main-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.98;
}

.footer-content {
  max-width: 980px; /* narrower container = less dead space */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center; /* center the whole group */
  gap: 3rem; /* control the space between logo + info */
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-logo {
  display: inline-flex;
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  background: #ffffff; /* solid white background */
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.footer-logo img {
  max-width: 170px;
  height: auto;
  display: block;
}

.footer-info {
  text-align: left;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

.footer-row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.3;
}

.footer-emoji {
  width: 1.25rem;
  display: inline-flex;
  justify-content: center;
}

.footer-mini-nav {
  margin-top: 0.2rem;
  font-size: 0.72rem; /* smaller */
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.footer-mini-nav a {
  font-weight: 600;
  white-space: nowrap;
}

/* separators that never wrap onto their own line */
.footer-mini-nav a + a {
  position: relative;
  padding-left: 1rem;
  margin-left: 0.55rem;
}

.footer-mini-nav a + a::before {
  content: "•";
  position: absolute;
  left: 0.32rem;
  opacity: 0.65;
}

/* credit line sits under both columns */
.footer-credit {
  max-width: 1100px;
  margin: 1rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* keyboard focus */
.main-footer a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  border-radius: 6px;
}

/* -------------------- MOBILE LAYOUT ≤ 900px -------------------- */
@media (max-width: 900px) {
  /* HEADER: stack + center everything */
  .main-header {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 5% 1rem;
  }

  .logo {
    max-width: 210px; /* slightly smaller on mobile */
  }

  .logo-container {
    text-align: center;
  }

  .contact-info-wrapper {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .contact-text {
    align-items: center;
    text-align: center;
    gap: 0.25rem;
  }

  .phone-number {
    text-align: center;
  }

  .email-link {
    text-align: center;
    white-space: normal; /* ⬅ allow wrapping */
    word-break: break-word; /* ⬅ break long addresses if needed */
  }

  .header-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .header-cta-image {
    height: 55px;
  }

  .gas-safe-profile-btn {
    font-size: 0.9rem;
    padding: 0.3rem 0.9rem;
  }

  /* keep all main sections inside the viewport width */
  .main-header,
  .hero,
  .services-section,
  .coverage-section,
  .testimonials-section,
  .contact-section,
  .main-footer {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  /* HERO: remove absolute layout, let content drive height */
  .hero {
    position: relative;
    height: auto;
    padding: 0.5rem 5% 3rem;

    /* 🔹 mobile background: stretch vertically */
    background: url("images/new-hero.jpg") no-repeat center top;
    /* width = 100% of hero, height = scaled vertically */
    background-size: 100% var(--hero-mobile-bg-height-scale);

    overflow: hidden;
  }

  .hero-overlay,
  .hero-content {
    position: static;
    width: 100%;
    height: auto;
  }

  .emergency-cta-text {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 0; /* ⬅ removes the gap above the text */
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .emergency-cta-text .emergency-number {
    font-size: 1.35rem;
  }

  .hero-content h1 {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    margin: 0.2rem 0 0.1rem; /* tiny margins to tighten everything */
    max-width: 100%;
    text-align: center;
    font-size: clamp(1.4rem, 3.8vw, 1.5rem); /* ⬅ smaller heading */
    line-height: 1.1; /* a bit tighter */
  }

  .hero-sub-content {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-top: 0.15rem; /* effectively removes the big top gap */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-sub-content p {
    margin: 0;
    text-align: center;
    font-size: 1.2rem; /* a touch smaller */
    line-height: 1.25; /* slightly tighter block */
  }
  .services-intro {
    max-width: 850px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    opacity: 0.95;
  }

  /* SERVICES: icons smaller on mobile */
  .service-item .service-icon {
    width: 120px;
    height: 120px;
  }
  /* SERVICES: shrink text slightly on mobile / small tablets */
  .services-section h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  }

  .service-item {
    padding: 1.5rem 1.5rem 2.5rem; /* a bit tighter than desktop */
  }

  .service-item h3 {
    font-size: 1.7rem; /* was 2.5rem on desktop */
    line-height: 1.2;
  }

  .service-item p {
    font-size: 1.05rem; /* down from 1.5rem */
    line-height: 1.4;
  }

  /* Center the testimonial card on tablet/phone */
  .carousel-container-wrapper {
    justify-content: center;
  }

  .testimonial-slider {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex; /* ⬅ makes centering easy */
    justify-content: center;
  }

  .testimonial-card {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;

    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important; /* ⬅ centre horizontally */
  }

  /* CONTACT SECTION: slightly tighter padding */
  .contact-section {
    padding: 3rem 5%;
  }

  /* FOOTER: stack vertically */
  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-left {
    justify-content: center;
  }

  .footer-info {
    text-align: center;
    align-items: center;
  }

  .footer-row {
    justify-content: center;
  }

  .footer-mini-nav {
    justify-content: center;
  }
}

/* -------------------- EXTRA SMALL PHONES ≤ 600px -------------------- */
@media (max-width: 600px) {
  /* use more of the screen horizontally */
  .services-section,
  .coverage-section,
  .testimonials-section,
  .contact-section {
    padding-left: 4%;
    padding-right: 4%;
  }
}
/* -------------------- TABLET TUNING (768px–1024px) -------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Slightly larger hero text on tablets */
  .hero-content h1 {
    font-size: clamp(2.1rem, 3.2vw, 2.7rem);
  }
  .hero-sub-content p {
    font-size: clamp(1.8rem, 2.2vw, 1.8rem);
  }
  .emergency-cta-text {
    font-size: 2.25rem;
  }

  .emergency-cta-text .emergency-number {
    font-size: clamp(2.8rem, 3vw, 2.4rem);
  }

  /* Services heading + card text bigger on tablets */
  .services-section h2 {
    font-size: clamp(2.2rem, 3.4vw, 3rem);
  }

  .service-item h3 {
    font-size: 2.2rem;
  }

  .service-item p {
    font-size: 1.2rem;
  }
}
/* --- FINAL MOBILE/TABLET CAROUSEL FIX: single centred sliding card --- */
@media (max-width: 900px) {
  /* Keep wrapper centred */
  .carousel-container-wrapper {
    justify-content: center !important;
    gap: 1rem !important;
  }

  /* Slider area for phones/tablets */
  .testimonial-slider {
    max-width: 520px !important;
    height: 360px !important;
    margin: 0 auto !important;
    overflow: hidden !important; /* hide off-screen cards */
    display: block !important;
  }

  /* Base card – absolute, centred reference */
  .testimonial-card {
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;

    width: 100% !important;
    max-width: 520px !important;
    height: 100% !important;

    border-radius: 32px !important;
    padding: 1.75rem 1.5rem !important;

    box-sizing: border-box !important;

    /* default: parked off to the right */
    transform: translateX(150%) scale(0.96) !important;
    opacity: 0;
    pointer-events: none;

    transition: transform 0.5s ease, opacity 0.35s ease !important;
  }

  /* Active card – fully centred and readable */
  .testimonial-card.active {
    transform: translateX(-50%) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35) !important;
    border: 3px solid var(--primary-blue) !important;
  }

  /* Next card – off to the right, ready to slide in */
  .testimonial-card.next {
    transform: translateX(150%) scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Previous card – off to the left, ready to slide in */
  .testimonial-card.prev {
    transform: translateX(-250%) scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Slightly smaller text & arrows on small screens */
  .testimonial-card p {
    font-size: 1.05rem !important;
  }

  .nav-arrow {
    font-size: 2.6rem !important;
  }
}
