html {
  font-size: 15px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

* {
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  margin-bottom: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  font-size: 1rem;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Hero logos marquee - infinite scroll right-to-left, no gap */
@keyframes hero-logos-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Header/Navbar */
.navbar-light .navbar-nav .nav-link {
  color: #333 !important;
  font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: #0d6efd !important;
}

.navbar-light .navbar-brand {
  color: #333 !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  padding: 10px 0;
  position: relative;
}

.hero-section h1 {
  font-weight: 700;
  line-height: 1.2;
}

.hero-section .lead {
  font-size: 1.15rem;
}

/* Gas Safe Logo in Hero Section */
.gas-safe-hero-logo {
  display: none !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
  z-index: 10;
  right: -60px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  max-height: 140px !important;
  max-width: 252px !important;
}

.gas-safe-hero-logo:hover {
  transform: translateY(-50%) scale(1.05) !important;
}

@media (max-width: 991px) {
  .gas-safe-hero-logo {
    max-height: 112px !important;
    max-width: 210px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: -30px !important;
  }
  
  .gas-safe-hero-logo:hover {
    transform: translateY(-50%) scale(1.05) !important;
  }
}

@media (max-width: 576px) {
  .gas-safe-hero-logo {
    max-height: 84px !important;
    max-width: 168px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: -15px !important;
  }
  
  .gas-safe-hero-logo:hover {
    transform: translateY(-50%) scale(1.05) !important;
  }
}

/* Gas Safe Logo next to Phone Number */
.gas-safe-phone-logo {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
  opacity: 0.9;
}

.gas-safe-phone-logo:hover {
  transform: scale(1.05);
  opacity: 1;
}

@media (max-width: 576px) {
  .gas-safe-phone-logo {
    height: 40px !important;
    max-width: 75px !important;
    margin-top: 0.5rem;
  }
}

/* Service Cards */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.service-icon {
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

/* Cards */
.card {
  border-radius: 10px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-title {
  font-size: 1.25rem;
}

.card-text {
  font-size: 1rem;
}

/* Product Service Cards */
.product-service-card {
  min-height: 300px;
  margin-bottom: 2rem;
}

.product-service-card .card-body {
  padding: 2rem !important;
}

.product-image-placeholder {
  width: 100%;
  height: 250px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.product-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

/* Navigation */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 1rem;
}

.nav-link:hover {
  color: rgba(255,255,255,0.8) !important;
}

/* Footer */
footer {
  margin-top: auto;
}

footer a {
  transition: color 0.3s ease;
}

footer a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* Buttons */
.btn {
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-lg {
  font-size: 1.1rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Forms */
.form-control, .form-select {
  border-radius: 5px;
  border: 1px solid #dee2e6;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
  font-weight: 600;
}

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Section Spacing */
section {
  padding: 50px 0;
}

/* Headings */
h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

.display-4 {
  font-size: 2.8rem;
}

.display-5 {
  font-size: 2.2rem;
}

.lead {
  font-size: 1.15rem;
}

/* Text Colors */
.text-primary {
  color: #0d6efd !important;
}

.bg-primary {
  background-color: #0d6efd !important;
}

/* Accessibility */
a:focus, button:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .navbar, footer, .btn {
    display: none;
  }
}

/* Smooth Animations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Gas Safety Page Specific Styles */
.gas-safety-page {
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.gas-safe-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gas-safe-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.gas-safe-logo {
  max-height: 140px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.gas-safe-logo:hover {
  transform: scale(1.05);
}

/* Boiler Company Logos */
.boiler-logo {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.9;
  object-fit: contain;
}

.boiler-logo:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Boiler Logos Carousel */
.boiler-logos-carousel-container {
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.boiler-logos-carousel {
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.boiler-logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}

/* Pause on hover */
.boiler-logos-carousel-container:hover .boiler-logos-carousel {
  transition-duration: 0.3s;
}

/* Service Icons Carousel */
.service-icons-carousel-container {
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.service-icons-carousel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.service-icon-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}

/* Pause on hover */
.service-icons-carousel-container:hover .service-icons-carousel {
  transition-duration: 0.3s;
}

/* "We fit and service" text styling */
.gas-safe-card .d-flex span {
  margin: 0 1rem;
}

@media (max-width: 768px) {
  .gas-safe-card .d-flex span {
    margin: 0.5rem 0;
    display: block;
    width: 100%;
  }
}

.section-title {
  color: #212529;
  letter-spacing: -0.5px;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  color: #6c757d;
  line-height: 1.8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Service Cards Modern Style */
.service-card-modern {
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}

.service-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

.service-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  transition: transform 0.5s ease;
}

.service-card-modern:hover .service-image {
  transform: scale(1.05);
}

.service-image-placeholder {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
}

.service-icon-large {
  font-size: 5rem;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.service-card-modern:hover .service-icon-large {
  transform: scale(1.1);
}

.service-icon-header {
  font-size: 2.8rem;
  transition: transform 0.3s ease;
}

.service-card-modern:hover .service-icon-header {
  transform: scale(1.1) rotate(5deg);
}

.service-title {
  color: #212529;
  font-size: 1.75rem;
  line-height: 1.3;
}

.service-price {
  font-size: 1.25rem;
  color: #0d6efd;
}

.service-tagline {
  color: #495057;
  font-size: 1.15rem;
  line-height: 1.5;
}

.service-description {
  color: #6c757d;
  line-height: 1.8;
  font-size: 1.05rem;
}

.service-btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Feature Cards */
.feature-card {
  border-radius: 12px;
  transition: all 0.3s ease;
  background: #ffffff;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1) !important;
}

.feature-icon {
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
}

/* Responsibilities Section */
.responsibilities-section {
  background: #f8f9fa;
  padding: 3rem;
  border-radius: 16px;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.responsibilities-list {
  list-style: none;
  padding: 0;
  max-width: 700px;
  margin: 0 auto;
}

.responsibilities-list li {
  padding: 1rem 1.5rem;
  margin-bottom: 0.75rem;
  background: #ffffff;
  border-left: 4px solid #0d6efd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  font-size: 1.05rem;
  line-height: 1.6;
}

.responsibilities-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-left-color: #0a58ca;
}

.responsibilities-list li:before {
  content: "✓";
  color: #0d6efd;
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

/* CTA Card */
.cta-card {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  transition: transform 0.3s ease;
}

.cta-card:hover {
  transform: scale(1.02);
}

.cta-btn {
  border-radius: 10px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ============================================
   RESPONSIVE DESIGN - Mobile, Tablet, Desktop
   ============================================ */

/* Mobile Devices (max-width: 576px) */
@media (max-width: 576px) {
  /* Gas Safety Page */
  .gas-safety-page {
    padding: 2rem 0 !important;
  }
  
  .gas-safe-card .card-body {
    padding: 1.5rem !important;
  }
  
  .gas-safe-logo {
    max-height: 100px;
  }
  
  .boiler-logo {
    max-height: 80px !important;
    max-width: 150px !important;
  }
  
  /* Section Titles */
  .section-title {
    font-size: 1.75rem !important;
    margin-bottom: 1rem;
  }
  
  .section-subtitle {
    font-size: 1rem !important;
    padding: 0 1rem;
  }
  
  /* Service Cards */
  .service-card-modern .card-body {
    padding: 1.5rem !important;
  }
  
  .service-card-modern .row {
    flex-direction: column;
  }
  
  .service-image,
  .service-image-placeholder {
    height: 200px;
    margin-bottom: 1.5rem;
  }
  
  .service-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.75rem;
  }
  
  .service-price {
    font-size: 1.1rem !important;
  }
  
  .service-tagline {
    font-size: 1rem !important;
    margin-bottom: 1rem;
  }
  
  .service-description {
    font-size: 1rem !important;
    margin-bottom: 1.5rem;
  }
  
  .service-icon-header {
    font-size: 2rem !important;
  }
  
  /* Buttons */
  .service-btn {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
  }
  
  .service-btn:last-child {
    margin-bottom: 0;
  }
  
  /* Feature Cards */
  .feature-card {
    margin-bottom: 1.5rem;
  }
  
  .feature-icon {
    font-size: 2rem !important;
  }
  
  /* Responsibilities Section */
  .responsibilities-section {
    padding: 1.5rem 1rem !important;
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
  }
  
  .responsibilities-section h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem;
  }
  
  .responsibilities-list {
    padding: 0;
  }
  
  .responsibilities-list li {
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  /* CTA Card */
  .cta-card .card-body {
    padding: 2rem 1.5rem !important;
  }
  
  .cta-card h3 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem;
  }
  
  .cta-card .lead {
    font-size: 1rem !important;
    margin-bottom: 1.5rem;
  }
  
  .cta-btn {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
  }
  
  .cta-btn:last-child {
    margin-bottom: 0;
  }
  
  /* Container Padding */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Spacing Adjustments */
  .mb-5 {
    margin-bottom: 2rem !important;
  }
  
  .mt-5 {
    margin-top: 2rem !important;
  }
  
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
  
  .mt-4 {
    margin-top: 1.5rem !important;
  }
}

/* Tablet Devices (577px - 992px) */
@media (min-width: 577px) and (max-width: 992px) {
  /* Gas Safety Page */
  .gas-safety-page {
    padding: 3rem 0;
  }
  
  .gas-safe-card .card-body {
    padding: 3rem !important;
  }
  
  .gas-safe-logo {
    max-height: 120px;
  }
  
  /* Section Titles */
  .section-title {
    font-size: 2rem !important;
  }
  
  .section-subtitle {
    font-size: 1.1rem !important;
    padding: 0 2rem;
  }
  
  /* Service Cards */
  .service-card-modern .card-body {
    padding: 2.5rem !important;
  }
  
  .service-image,
  .service-image-placeholder {
    height: 220px;
  }
  
  .service-title {
    font-size: 1.65rem !important;
  }
  
  .service-price {
    font-size: 1.15rem !important;
  }
  
  .service-tagline {
    font-size: 1.1rem !important;
  }
  
  .service-description {
    font-size: 1.05rem !important;
  }
  
  /* Buttons */
  .service-btn {
    padding: 0.875rem 1.75rem !important;
    font-size: 1.05rem !important;
  }
  
  /* Feature Cards Grid */
  .feature-card {
    margin-bottom: 1.5rem;
  }
  
  /* Responsibilities Section */
  .responsibilities-section {
    padding: 2.5rem 2rem !important;
  }
  
  .responsibilities-list li {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  /* CTA Card */
  .cta-card .card-body {
    padding: 3rem 2rem !important;
  }
  
  .cta-btn {
    padding: 0.875rem 2rem !important;
    margin-bottom: 0.5rem;
  }
  
  /* Container */
  .container {
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Small Desktop / Large Tablet (993px - 1199px) */
@media (min-width: 993px) and (max-width: 1199px) {
  .service-image,
  .service-image-placeholder {
    height: 240px;
  }
  
  .service-card-modern .card-body {
    padding: 3rem !important;
  }
  
  .container {
    max-width: 1140px;
  }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  .service-image,
  .service-image-placeholder {
    height: 250px;
  }
  
  .service-card-modern .card-body {
    padding: 4rem !important;
  }
  
  .container {
    max-width: 1320px;
  }
}

/* Landscape Mobile Orientation */
@media (max-width: 992px) and (orientation: landscape) {
  .service-image,
  .service-image-placeholder {
    min-height: 180px;
  }
  
  .gas-safe-logo {
    max-height: 90px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .service-btn,
  .cta-btn {
    min-height: 48px;
    padding: 0.875rem 1.5rem !important;
  }
  
  .service-card-modern,
  .feature-card,
  .gas-safe-card {
    cursor: pointer;
  }
  
  /* Larger tap targets for mobile */
  .service-btn,
  .cta-btn {
    font-size: 1.05rem !important;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-image,
  .gas-safe-logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .service-btn,
  .cta-btn,
  .gas-safe-card,
  .service-card-modern {
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  
  .service-image {
    height: 200px;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Improved Typography */
h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
}

/* Better Spacing */
.mb-5 {
  margin-bottom: 3.5rem !important;
}

.mt-5 {
  margin-top: 3.5rem !important;
}

/* FAQ Section Styles */
.faq-section {
  background: #ffffff;
  padding: 3rem 0;
}

.faq-section .accordion {
  max-width: 900px;
  margin: 0 auto;
}

.faq-section .accordion-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.faq-section .accordion-item:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.faq-section .accordion-button {
  background-color: #f8f9fa;
  color: #212529;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1.25rem 1.5rem;
  border: none;
  transition: all 0.3s ease;
}

.faq-section .accordion-button:not(.collapsed) {
  background-color: #0d6efd;
  color: #ffffff;
  box-shadow: none;
}

.faq-section .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  border-color: transparent;
}

.faq-section .accordion-body {
  padding: 1.5rem;
  background-color: #ffffff;
  color: #495057;
  line-height: 1.7;
  font-size: 1rem;
}

/* Responsive FAQ */
@media (max-width: 768px) {
  .faq-section {
    padding: 2rem 0;
  }
  
  .faq-section .accordion-button {
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
  }
  
  .faq-section .accordion-body {
    padding: 1.25rem;
    font-size: 0.95rem;
  }
}

/* Service Icon Cards */
.service-icon-card {
  background: #ffffff;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.service-icon-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: #0d6efd;
}

.service-icon-card i {
  transition: transform 0.3s ease;
}

.service-icon-card:hover i {
  transform: scale(1.15);
}

.service-icon-card h6 {
  font-weight: 600;
  color: #212529;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 768px) {
  .service-icon-card {
    min-height: 100px;
    padding: 1rem !important;
  }
  
  .service-icon-card i {
    font-size: 2rem !important;
  }
  
  .service-icon-card h6 {
    font-size: 0.8rem;
  }
  
  /* Prevent horizontal overflow on mobile */
  .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }
  
  .boiler-logos-carousel-container,
  .service-icons-carousel-container {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Keep all logos in one horizontal line on mobile - scrollable */
  .hero-section .col-lg-7 .d-flex.align-items-center {
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    flex-wrap: nowrap !important;
  }
  
  /* Mobile: Logo row - for marquee */
  .hero-section .hero-logos-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 15px !important;
    width: max-content !important;
  }
  
  /* Mobile: Logo items - slightly smaller */
  .hero-section .logo-item-static {
    width: 100px !important;
    height: 50px !important;
    flex-shrink: 0 !important;
    min-width: 100px !important;
  }
  
  /* Mobile: Carousel logo items - make them visible and scrollable */
  .hero-section .logo-item-carousel {
    width: 100px !important;
    height: 50px !important;
    flex-shrink: 0 !important;
    min-width: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Mobile: Ensure images inside logo items are visible */
  .hero-section .logo-item-carousel img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 98px !important;
    max-height: 43px !important;
  }
  
  /* Mobile: Ensure logos container is visible */
  .hero-section .hero-logos-container {
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
    padding: 0 15px !important;
  }
  
  /* Mobile: leytonlandlordcertificates.com - marquee */
  .hero-section .hero-logos-marquee-enabled .hero-logos-carousel-wrapper {
    overflow: hidden !important;
  }
  
  .hero-section .hero-logos-marquee-enabled .hero-logos-marquee-track {
    animation: hero-logos-marquee 20s linear infinite !important;
  }
  
  /* Mobile: Smaller text in service icons */
  .hero-section .logo-item-static h6,
  .hero-section .logo-item-carousel h6 {
    font-size: 0.55rem !important;
  }
  
  .hero-section .logo-item-static i,
  .hero-section .logo-item-carousel i {
    font-size: 1rem !important;
  }
  
  /* Mobile: Ensure logo carousel container is visible */
  .hero-section .hero-logos-container {
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
  }
  
  /* Mobile: base wrapper */
  .hero-section .hero-logos-carousel-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  /* Make boiler logos carousel scroll horizontally on mobile - one line */
  .boiler-logos-carousel-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 15px !important;
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: fit-content !important;
  }
  
  .boiler-logos-carousel {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem !important;
    width: max-content !important;
  }
  
  .boiler-logo-item {
    flex-shrink: 0 !important;
  }
  
  /* Gas Safe logo - inline on mobile */
  .hero-section .d-flex.align-items-center > div:has(.gas-safe-phone-logo) {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
  
  /* Make service icons carousel scroll horizontally on mobile - one line */
  .service-icons-carousel-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: fit-content !important;
  }
  
  .service-icons-carousel {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    width: max-content !important;
  }
  
  .service-icon-item {
    flex-shrink: 0 !important;
  }
  
  .d-flex {
    flex-wrap: wrap !important;
  }
  
  /* Gas Safe logo in navbar - mobile only */
  .gas-safe-navbar-logo {
    display: block !important;
  }
  
  /* Hide Gas Safe logo from hero section on mobile */
  .gas-safe-hero-logo-container {
    display: none !important;
  }
  
  /* Also hide the gas-safe-phone-logo class on mobile in hero section */
  .hero-section .gas-safe-phone-logo {
    display: none !important;
  }
  
  /* Hide company logo from hero section on mobile */
  .company-logo-hero {
    display: none !important;
  }
  
  /* Gap between boiler logos and Get Started box on mobile */
  .hero-section .col-lg-7.col-md-12 {
    margin-bottom: 2.5rem !important;
  }
  
  /* Keep buttons horizontal with small gap on mobile in blue section */
  .bg-primary.text-white .btn.btn-light.btn-lg.me-3 {
    margin-right: 0.5rem !important;
    display: inline-block !important;
  }
  
  .bg-primary.text-white .btn.btn-outline-light.btn-lg {
    display: inline-block !important;
    margin-left: 0 !important;
  }
  
  .bg-primary.text-white .container.text-center {
    white-space: nowrap;
  }
  
  .bg-primary.text-white .container.text-center > h2,
  .bg-primary.text-white .container.text-center > p {
    white-space: normal;
  }
}

/* Desktop alignment - all logos in one horizontal row, centered */
@media (min-width: 768px) {
  /* Keep text left-aligned */
  .hero-section .col-lg-7 {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  /* Parent container - full width for marquee */
  .hero-section .hero-logos-container {
    width: 100% !important;
    display: block !important;
    margin: 20px 0 0 0 !important;
    padding: 0 !important;
  }
  
  /* leytonlandlordcertificates.com: Marquee - hide overflow, scroll right-to-left */
  .hero-section .hero-logos-marquee-enabled .hero-logos-carousel-wrapper {
    overflow: hidden !important;
  }
  
  /* leytonlandlordcertificates.com only: Marquee track - infinite scroll */
  .hero-section .hero-logos-marquee-enabled .hero-logos-marquee-track {
    display: flex !important;
    width: max-content !important;
    animation: hero-logos-marquee 25s linear infinite !important;
  }
  
  /* leytonboilers.com: Centered, no animation */
  .hero-section .hero-logos-carousel-wrapper {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  /* Single row - all logos in one line, centered, no wrap, animated */
  .hero-section .hero-logos-row {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 30px !important;
    width: max-content !important;
    will-change: transform !important;
  }
  
  /* Carousel logo items - same size, all in one row */
  .hero-section .logo-item-carousel {
    width: 110px !important;
    height: 55px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    min-width: 110px !important;
  }
  
  /* Static logo items - same size, all in one row */
  .hero-section .logo-item-static {
    width: 110px !important;
    height: 55px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    min-width: 110px !important;
  }
}

/* Service Detail Page - Mobile Full Width Fix */
@media (max-width: 768px) {
  /* Ensure service detail page content fills full width on mobile */
  section.py-3 .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }
  
  /* Remove horizontal margins on mobile for cards */
  section.py-3 .card.mx-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }
  
  /* Ensure images fill full width on mobile */
  section.py-3 .card-img-top,
  section.py-3 .card-img-top img,
  section.py-3 .card-img-top video {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Ensure card body content fills full width */
  section.py-3 .card-body {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Ensure text content uses full width */
  section.py-3 .service-description {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Breadcrumb padding on mobile */
  section.py-3 nav.breadcrumb {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}