/* ============================================================
   JONESFIELDS LOGISTICS — styles.css
   Brand colours:
     --red   : #FF0000  (primary accent)
     --orange: #F25912  (secondary accent)
     --black : #000000
     --white : #ffffff
============================================================ */

/* ===== CSS VARIABLES (single place to update brand colours) ===== */
:root {
  --red: #FF0000;
  --orange: #F25912;
  --black: #000;
  --white: #fff;
  --transition: all 0.3s ease;
}

/* ===== GLOBAL RESET ===== */

/* Box-sizing on everything — padding never blows out widths */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Kills horizontal scrollbar on every device */
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  /* FIX: Add padding-top to account for fixed navbar height - prevents content overlap */
  padding-top: 100px;
  /* Prevents iOS tap highlight flash */
  -webkit-tap-highlight-color: transparent;
  /* Crisp text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Respect safe-area insets on notched phones (iPhone X+) */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* FIX: Responsive body padding for different screen sizes */
@media (max-width: 768px) {
  body {
    padding-top: 80px;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 70px;
  }
}

@media (max-width: 375px) {
  body {
    padding-top: 60px;
  }
}

/* Every image is fluid — never overflows its container */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent wide code/table blocks from causing horizontal scroll */
table, pre {
  max-width: 100%;
  overflow-x: auto;
}

h1, h2, h3 {
  color: var(--black);
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
}

/* FIX: Responsive heading sizes using clamp() for fluid typography */
h1 {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

/* Mobile heading sizing */
@media (max-width: 576px) {
  h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  h2 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }
  
  h3 {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }
}

section {
  /* FIX: scroll-margin-top MUST match navbar height to prevent overlap */
  /* When you click an anchor link, browser scrolls to position the section */
  /* with this much space at the top, preventing navbar from covering it */
  scroll-margin-top: 110px;  /* Desktop: navbar is 100px, add 10px for buffer */
  /* Sections never wider than the screen */
  width: 100%;
  max-width: 100%;
}

/* Responsive scroll-margin adjustments for different navbar heights */
@media (max-width: 768px) {
  section {
    scroll-margin-top: 90px;  /* Tablet: navbar is 80px, add 10px buffer */
  }
}

@media (max-width: 576px) {
  section {
    scroll-margin-top: 85px;  /* Mobile: navbar is 70px, add 15px buffer */
  }
}

@media (max-width: 375px) {
  section {
    scroll-margin-top: 75px;  /* Small phones: navbar is 60px, add 15px buffer */
  }
}

.container {
  max-width: 1300px;
  /* Safe horizontal padding on mobile — content never touches screen edge */
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  width: 100%;
}

/* FIX: Responsive container padding for different screen sizes */
@media (max-width: 768px) {
  .container {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Fluid container safety net — catches any Bootstrap container-fluid too */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
  max-width: 100%;
  overflow-x: hidden;
}

a, button {
  transition: var(--transition);
}

/* FIX: Responsive paragraph sizing for better readability across devices */
p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* Mobile paragraph sizing */
@media (max-width: 576px) {
  p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Desktop paragraph sizing */
@media (min-width: 1200px) {
  p {
    font-size: 1rem;
    line-height: 1.7;
  }
}


/* ===================================================================
   NAVBAR — Fixed on all devices
=================================================================== */
.navbar {
  /* FIXED: stays at top always, doesn't move with scroll */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Must be above all content, below modals (modals use z-index 10000) */
  z-index: 1030;
  /* Solid white background so content doesn't bleed through when scrolling */
  background-color: var(--white) !important;
  /* Smooth border + shadow transitions on scroll */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 100px;
  /* Prevent navbar from ever being wider than the viewport */
  width: 100%;
  max-width: 100vw;
}

#mainNavbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* FIX 1: Navbar scroll border now uses brand red #FF0000 */
.navbar-scrolled {
  border-bottom: 2px solid var(--red) !important;
  box-shadow: 0 2px 12px rgba(255, 0, 0, 0.15);
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.logo {
  height: 60px;
  width: auto;
}

/* ===================================================================
   NAV LINKS — Hover underline system
=================================================================== */
.navbar .nav-link {
  color: var(--black) !important;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
}

.navbar .nav-link::before {
  content: "";
  position: absolute;
  left: 1rem;
  bottom: 0px;
  width: 0%;
  height: 3px;
  background-color: var(--red);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar .nav-link:hover::before {
  width: calc(100% - 2rem);
}

/* ===================================================================
   GET A QUOTE BUTTON
=================================================================== */
.quote {
  background-color: var(--red) !important;
  color: var(--white) !important;
  border: 2px solid var(--red) !important;
  border-radius: 6px !important;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.quote:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.35);
  background-color: #cc0000 !important;
  color: var(--white) !important;
}

.quote:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

/* Mobile hamburger toggler — base reset */
.navbar-toggler {
  border: none;
  background: none;
  padding: 4px;
}

/* ── FIX 1: Animated burger → X ── */
.custom-toggler {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.toggler-bar {
  display: block;
  width: 24px;
  height: 2.5px;
  background-color: var(--black);
  border-radius: 2px;
  /* Smooth morph transition */
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* .is-open added by JS when menu opens */
.custom-toggler.is-open .bar-top {
  transform: translateY(7.5px) rotate(45deg);
}
.custom-toggler.is-open .bar-mid {
  opacity: 0;
  width: 0;
}
.custom-toggler.is-open .bar-bot {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ===================================================================
   RESPONSIVE NAVBAR
=================================================================== */
@media (max-width: 992px) {
  .navbar-collapse {
    background-color: var(--white);
    /* Full-width dropdown — no content peeks out on narrow screens */
    width: 100%;
    padding: 0.5rem 0 1rem;
    /* Subtle shadow to separate menu from page content */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  }

  .navbar-nav .nav-link {
    padding: 0.85rem 1.25rem;
    text-align: center;
    /* Minimum 44px touch target height — Apple/Google accessibility guideline */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  /* Quote button in mobile menu — full width for easy tapping */
  .navbar-nav .nav-item:last-child {
    padding: 0.75rem 1.25rem;
  }

  .navbar-nav .nav-item:last-child .quote {
    width: 100%;
    text-align: center;
    display: block;
  }
}

@media (max-width: 576px) {
  .navbar {
    min-height: 70px;
    /* Bump z-index slightly on small screens — ensures nothing overlaps */
    z-index: 1031;
  }
  .logo { height: 36px; }
}

@media (max-width: 375px) {
  /* Very small phones (SE, Galaxy A series) */
  .logo { height: 30px; }
  .navbar { min-height: 60px; }
}


/* ===================================================================
   FIX 4: HR LINES — All red except the one inside .contact-section
=================================================================== */

/* Section heading underlines (border-bottom on h2) */
h2.border-bottom {
  border-bottom-color: var(--red) !important;
}

/* Explicit <hr> tags — red globally */
hr {
  border-color: var(--red);
  opacity: 1;
}

/* Exception: the hr inside the contact/footer section stays white */
.contact-section hr {
  border-color: rgba(255, 255, 255, 0.5) !important;
  opacity: 1;
}


/* ===================================================================
   ABOUT SECTION
=================================================================== */
#about h1 {
  color: var(--black);
}

#about .btn {
  background-color: var(--red);
  color: var(--white);
  font-weight: 600;
  border: none;
}

#about .btn:hover {
  background-color: var(--black);
}


/* ===================================================================
   SERVICES SECTION
   FIX 3: Icon background changed to #FF0000
           Icons transform on hover
           Read More now styled as a navigation link
=================================================================== */
.feature-icon {
  width: 4rem;
  height: 4rem;
  border-radius: .75rem;
  /* FIX 3: Brand red background on icons */
  background-color: var(--red) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* FIX 3: Icon box hover transform */
.feature-icon:hover {
  transform: scale(1.14) rotate(-5deg);
  box-shadow: 0 10px 24px rgba(255, 0, 0, 0.28);
}

.icons {
  width: 45px;
  /* White icons so they're visible on the red background */
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.feature-icon:hover .icons {
  transform: scale(1.1);
}

/* FIX 3: Read More is now a link that navigates to the service page */
.read-more-btn {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 15px;
  text-decoration: none;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more-btn::after {
  content: " →";
  font-size: 14px;
  transition: transform 0.2s ease;
}

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

.read-more-btn:hover::after {
  transform: translateX(4px);
}

.icon-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 500;
}

.icon-link:hover {
  color: var(--black);
}


/* ===================================================================
   FLEET CAROUSEL
   NOTE: Selector updated to match renamed carousel ID #fleetCarousel
=================================================================== */
#fleetCarousel .carousel-item img {
  height: 70vh;
  object-fit: cover;
  border-radius: 1rem;
}

@media (max-width: 992px) {
  #fleetCarousel .carousel-item img { height: 45vh; }
}

@media (max-width: 576px) {
  #fleetCarousel .carousel-item img { height: 40vh; }
}


/* ===================================================================
   CONTACT / FOOTER SECTION
=================================================================== */
.contact-section {
  background-color: var(--red);
  color: var(--white);
  /* Full bleed width — no horizontal overflow */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.contact-section .form-control,
.contact-section .form-select {
  background-color: var(--white);
  border: 1px solid #ccc;
  border-radius: 6px;
}

.contact-section .form-control:focus,
.contact-section .form-select:focus {
  border-color: var(--black);
  box-shadow: none;
}

/* Submit button inside contact form — override btn-danger to black */
.contact-section .btn-danger {
  background-color: var(--black) !important;
  border-color: var(--black) !important;
  border-radius: 6px;
  color: var(--white);
  font-weight: 600;
}

.contact-section .btn-danger:hover {
  background-color: #222 !important;
  border-color: #222 !important;
}


/* ===================================================================
   SOCIAL ICONS
=================================================================== */
.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* FIX: Centre social icons on mobile */
@media (max-width: 576px) {
  .social-links {
    justify-content: center;
    width: 100%;
  }
}

.social-link img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s, filter 0.3s;
  /* Invert to white for visibility on red footer background */
  filter: brightness(0) invert(1);
}

.social-link:hover img {
  transform: scale(1.25);
  filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
}


/* ===================================================================
   FOOTER LINKS — Hover colour change to black on all devices
=================================================================== */
/* FIX: Target the anchor tags inside .footer-links.
   The links are white by default — on hover they turn black.
   "!important" is needed to override Bootstrap's .text-white utility. */
.footer-links a {
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--black) !important;
}


/* ===================================================================
   BACK TO TOP BUTTON
   FIX 4: Button removed from position:fixed.
   It now sits INLINE next to the social icons in the footer flex row.
   Arrow is centred with flexbox (display:flex + align + justify).
=================================================================== */
.back-to-top-btn {
  /* FIX 4: Inline in footer, NOT fixed to viewport */
  position: static;
  display: flex;
  align-items: center;     /* centres arrow vertically */
  justify-content: center; /* centres arrow horizontally */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--black);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top-btn:hover {
  background-color: #333;
  transform: translateY(-3px);
}


/* ===================================================================
   FOOTER BOTTOM BAR LAYOUT
=================================================================== */
.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 576px) {
  .footer-right {
    flex-direction: column;
    /* FIX: Changed from flex-start to center — keeps social icons + back-to-top centred on mobile */
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }
}


/* ===================================================================
   QUOTE MODAL
=================================================================== */
.quote-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  /* Above navbar (1031) — below nothing */
  z-index: 10000;
  overflow-y: auto;
  /* Safe padding on notched phones */
  padding: 2rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
  align-items: flex-start;
  justify-content: center;
}

.quote-modal-overlay.active {
  display: flex;
}

.quote-modal {
  background: var(--white);
  border-radius: 12px;
  /* Never wider than the screen */
  width: min(100%, 720px);
  max-width: 100%;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  /* Prevent modal content from overflowing horizontally */
  overflow-x: hidden;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Red top accent bar */
.quote-modal::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--red);
  border-radius: 12px 12px 0 0;
  position: absolute;
  top: 0; left: 0; right: 0;
}

/* Header: Company info + quote meta */
.quote-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #eee;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.quote-modal-header .company-info h3 {
  color: var(--red);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  letter-spacing: -0.3px;
}

.quote-modal-header .company-info p {
  font-size: 0.78rem;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

.quote-modal-header .quote-meta {
  text-align: right;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.9;
}

.quote-modal-header .quote-meta strong {
  color: var(--black);
}

/* Close (×) button */
.quote-modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.quote-modal-close:hover {
  color: var(--red);
}

/* Section dividers inside modal */
.quote-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--red);
  border-bottom: 1px solid #eee;
  padding-bottom: 0.4rem;
  margin: 1.4rem 0 0.8rem;
}

/* Form labels */
.quote-modal label {
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--black);
}

/* Services checklist — 2 columns */
.quote-services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  margin-top: 0.5rem;
}

.quote-services-list .form-check-label {
  font-weight: 500;
  font-size: 0.83rem;
  color: #333;
}

/* Submit button */
.quote-submit-btn {
  background-color: var(--red);
  color: var(--white);
  border: none;
  padding: 0.7rem 2rem;
  font-weight: 700;
  border-radius: 6px;
  width: 100%;
  margin-top: 1.5rem;
  font-size: 1rem;
  transition: var(--transition);
}

.quote-submit-btn:hover {
  background-color: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 0, 0, 0.3);
}

/* Success confirmation panel */
.quote-success {
  display: none;
  text-align: center;
  padding: 2.5rem 1rem;
}

.quote-success .checkmark {
  font-size: 3rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.75rem;
}

.quote-success h4 {
  font-weight: 700;
  color: var(--black);
}

.quote-success p {
  color: #555;
  font-size: 0.9rem;
}

/* Mobile adjustments for modal */
@media (max-width: 576px) {
  .quote-modal {
    padding: 1.75rem 1rem;
    /* Full width on small phones — no side gaps */
    border-radius: 10px;
  }

  .quote-services-list {
    grid-template-columns: 1fr;
  }

  .quote-modal-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .quote-modal-header .quote-meta {
    text-align: left;
  }
}

@media (max-width: 375px) {
  /* Very small phones */
  .quote-modal {
    padding: 1.25rem 0.75rem;
  }

  .quote-modal-overlay {
    padding: 1rem 0.5rem;
  }
}


/* ===================================================================
   SERVICE PAGES — Hero, content cards, stats, CTA
   Used by: fleet-management.html, logistics-consulting.html,
            tyre-management.html, fleet-support.html
=================================================================== */

/* ── Hero Banner ── */
.service-hero {
  background-color: var(--red);
  color: var(--white);
  /* FIX: Responsive padding using clamp() for fluid spacing */
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}

.service-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.6);
}

.service-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  margin: 0 0 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.service-hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  max-width: 680px;
  margin: 0;
  line-height: 1.6;
}

/* Mobile service-hero adjustments */
@media (max-width: 768px) {
  .service-hero {
    padding: clamp(2rem, 5vw, 2.5rem) 0;
  }
  
  .service-hero-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    margin-bottom: 0.5rem;
  }
  
  .service-hero-subtitle {
    font-size: clamp(0.9rem, 3vw, 1rem);
  }
}

@media (max-width: 576px) {
  .service-hero {
    padding: clamp(1.75rem, 4vw, 2rem) 0;
  }
  
  .service-hero-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
}

/* ── Service content image ── */
.service-page-img {
  max-height: 360px;
  width: 100%;
  object-fit: cover;
}

/* ── Service cards (What's Included grid) ── */
.service-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  /* FIX: Responsive padding for service cards */
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 1.5rem);
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(255, 0, 0, 0.1);
  border-color: var(--red);
}

.service-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.service-card h4 {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* ── Highlight block (grey background strip) ── */
.service-highlight-block {
  background: #f8f8f8;
  border-left: 5px solid var(--red);
  border-radius: 0 12px 12px 0;
  padding: 2.5rem 2rem;
}

.service-highlight-block h3 {
  color: var(--black);
  margin-top: 0;
}

/* ── Stat display ── */
.service-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-number {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 900;
  color: var(--red);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: #666;
  text-align: center;
  max-width: 200px;
  line-height: 1.5;
}

/* ── CTA block ── */
.service-cta-block {
  background: #fff;
  border: 2px solid #eee;
  border-radius: 16px;
  padding: 3rem 2rem;
}

.service-cta-block h3 {
  color: var(--black);
  margin-top: 0;
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
  .service-hero {
    padding: 2.5rem 0 2rem;
  }

  .service-highlight-block {
    padding: 1.75rem 1.25rem;
  }

  .service-cta-block {
    padding: 2rem 1rem;
  }

  .service-cta-block .btn {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .service-cta-block .me-3 {
    margin-right: 0 !important;
  }
}


/* ===================================================================
   FORM VALIDATION MESSAGES
   Bootstrap's .invalid-feedback defaults to red (#dc3545).
   Override to black so it reads cleanly on the red contact background.
=================================================================== */
.invalid-feedback {
  color: #000 !important;
  font-weight: 500;
  font-size: 0.82rem;
}

/* ===================================================================
   SPONSORS / PARTNERS BAR  (#sponsor)
   Sits between the hr and the copyright row in the contact footer.
   White background so logos with any colour scheme display cleanly.
=================================================================== */
#sponsor {
  background-color: #fff;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;        /* breathing room above (from hr) and below (to copyright row) */
}

.sponsor-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #999;
  text-align: center;
  margin: 0 0 1rem;
}

.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;   /* centred on all screen sizes */
  gap: 1.5rem 2rem;
}

.sponsor-item {
  display: flex;
  align-items: center;
  justify-content: center;
  /* FIX: Fixed container size so every logo slot is identical */
  width: 130px;
  height: 70px;
  flex-shrink: 0;
}

.sponsor-item img {
  /* FIX: Both width AND height are fixed — logos fill the box evenly.
     object-fit: contain keeps the logo proportions correct (no stretching). */
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;              /* show full colour — no greyscale filter */
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.85;
}

.sponsor-item img:hover {
  transform: scale(1.08);
  opacity: 1;
}

/* Mobile: tighter gap, slightly smaller box — still equal sizes */
@media (max-width: 576px) {
  .sponsor-logos {
    gap: 1.25rem 1.5rem;
  }

  /* FIX: Smaller fixed box on mobile — still equal for all logos */
  .sponsor-item {
    width: 100px;
    height: 55px;
  }
}

/* ===================================================================
   RESPONSIVE UTILITIES
   Mobile-first rules that prevent overflow, ensure touch targets,
   and keep the layout clean across all screen sizes.
=================================================================== */

/* ── Row safety — Bootstrap rows use negative margins that cause overflow ── */
.row {
  /* Override Bootstrap's negative margins that cause 6–12px horizontal scroll */
  --bs-gutter-x: 1.5rem;
  margin-left: 0;
  margin-right: 0;
}

/* ── All sections get safe horizontal padding on mobile ── */
@media (max-width: 576px) {
  section.container,
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* FIX: Ensure contact section has proper horizontal padding */
  .contact-section .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* FIX: Ensure rows don't overflow on mobile */
  .row {
    margin-left: 0;
    margin-right: 0;
  }

  /* Stack flex rows vertically on very small screens */
  .d-flex.flex-wrap {
    gap: 0.75rem;
  }

  /* Full-width buttons on mobile — easier to tap */
  .btn-mobile-full {
    width: 100%;
    display: block;
    text-align: center;
  }
}

/* ── Touch targets — all interactive elements at least 44×44px ── */
@media (max-width: 992px) {
  a, button, [role="button"],
  .btn, .nav-link, .social-link,
  .back-to-top-btn, .read-more-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Exceptions: inline text links don't need min-height */
  p a, li a, address a, .footer-links a,
  .text-decoration-none {
    min-height: unset;
    display: inline;
  }
}

/* ===================================================================
   FLEET SECTION STYLING — Carousel (Desktop/Tablet) + Mobile Stats
   FIX: Comprehensive responsive design with proper color scheme
=================================================================== */

/* ── STAT COUNTER STYLING (Used in both carousel and mobile) ── */
/* FIX: Red color matches brand color (#FF0000) from site */
.stat-counter {
  color: var(--red);           /* Brand red (#FF0000) */
  font-weight: 900;             /* Extra bold for emphasis */
  font-size: 2.5em;             /* Large, eye-catching */
  line-height: 1;
  display: inline-block;
}

/* ── STAT BADGE (Red number container) ── */
/* FIX: Wraps the animated number with proper spacing */
.stat-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  min-height: 60px;
}

/* ── Carousel container ── */
/* FIX: Wraps carousel for proper styling and responsive visibility */
.carousel-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ── Carousel basic structure ── */
#fleetCarousel,
.carousel,
.carousel-inner,
.carousel-item {
  max-width: 100%;
  overflow: hidden;
}

/* ── Carousel images ── */
/* FIX: Ensures images fill container proportionally */
.carousel-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 / 9;  /* FIX: Prevents layout shift while loading */
}

/* ── Carousel captions — Dark overlay background ── */
/* FIX: Semi-transparent dark background for text readability */
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 2rem;
  /* FIX: Gradient overlay (transparent to semi-dark) */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  text-align: center;
  margin: 0;
}

/* ── Carousel caption text ── */
/* FIX: White text for contrast on dark background */
.carousel-caption h4 {
  color: #fff;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

/* ── Carousel indicators (dots) ── */
/* FIX: Always visible, properly styled */
.carousel-indicators {
  bottom: 15px;
  opacity: 1 !important;
  display: flex !important;
  gap: 0.75rem;
  justify-content: center;
  padding: 0 1rem;
}

.carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid #fff;
  opacity: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* FIX: Active indicator is red and larger */
.carousel-indicators button.active {
  background-color: var(--red);
  transform: scale(1.4);
  border-color: var(--red);
}

.carousel-indicators button:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.15);
}

/* ── Carousel controls (prev/next arrows) ── */
/* FIX: Red background, always visible, large touch targets */
.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 0, 0, 0.7);
  border-radius: 50%;
  opacity: 1 !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(255, 0, 0, 0.95);
  transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev:active,
.carousel-control-next:active {
  transform: translateY(-50%) scale(0.95);
}

/* FIX: Position arrows inset from edges (not at very edge) */
.carousel-control-prev {
  left: 20px;
  right: auto;
}

.carousel-control-next {
  right: 20px;
  left: auto;
}

/* FIX: Arrow icons visibility */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 24px;
  height: 24px;
  filter: brightness(1.2);
}

/* ===== MOBILE STATS STYLING (<768px) ===== */

/* ── Mobile stats container ── */
/* FIX: Vertical layout for mobile devices */
.mobile-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ── Individual stat card ── */
/* FIX: Card layout with dark semi-transparent background */
.stat-card {
  padding: 2rem 1.5rem;
  border-radius: 8px;
  /* FIX: Dark semi-transparent background (matching carousel caption style) */
  background-color: rgba(0, 0, 0, 0.7);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ── Stat card text ── */
/* FIX: White text for readability on dark background */
.stat-card p {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

.stat-card .stat-badge {
  min-height: auto;
  margin-bottom: 1rem;
}

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

/* ── Tablet (768px - 1023px) — Carousel visible ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 45px;
    height: 45px;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 20px;
    height: 20px;
  }

  .carousel-caption {
    padding: 2rem 1.5rem 1.5rem;
  }

  .carousel-caption h4 {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
  }

  .stat-counter {
    font-size: 2em;
  }
}

/* ── Small Mobile (< 576px) — Extra small optimizations ── */
@media (max-width: 575px) {
  .mobile-stats {
    gap: 1.25rem;
  }

  .stat-card {
    padding: 1.5rem 1.25rem;
  }

  .stat-card p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .stat-badge {
    min-height: 50px;
  }

  .stat-counter {
    font-size: 2em;
  }
}

/* ── Very Small Mobile (≤ 375px) ── */
@media (max-width: 375px) {
  .mobile-stats {
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem 1rem;
  }

  .stat-card p {
    font-size: 0.9rem;
  }

  .stat-counter {
    font-size: 1.75em;
  }
}

/* ── Desktop (≥1024px) — Optimal carousel ── */
@media (min-width: 1024px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 50px;
    height: 50px;
  }

  .carousel-caption {
    padding: 3rem 2rem 2rem;
  }

  .carousel-caption h4 {
    font-size: 1.5rem;
  }

  .stat-counter {
    font-size: 2.5em;
  }
}

/* ===== ACCESSIBILITY & REDUCED MOTION ===== */

/* ── High Contrast Mode ── */
@media (prefers-contrast: more) {
  .carousel-control-prev,
  .carousel-control-next {
    background-color: rgba(255, 0, 0, 0.9);
    border: 2px solid #fff;
  }

  .carousel-indicators button {
    border: 2px solid #fff;
  }

  .stat-card {
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators button,
  .stat-card,
  .stat-counter {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Focus Visible (Keyboard Navigation) ── */
/* FIX: Improves accessibility for keyboard users */
.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible,
.carousel-indicators button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* ===== TOUCH TARGET SIZING (Mobile Accessibility) ===== */

/* ── Ensure buttons are at least 44×44px on mobile ── */
@media (max-width: 992px) {
  .carousel-control-prev,
  .carousel-control-next {
    min-width: 44px;
    min-height: 44px;
  }

  .carousel-indicators button {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== PREVENT OVERFLOW ===== */

/* FIX: Ensure no overflow or horizontal scroll */
#fleet {
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
}

.carousel-container {
  max-width: 100%;
  overflow: hidden;
}

.mobile-stats {
  max-width: 100%;
}

.stat-card {
  max-width: 100%;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.carousel-inner {
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-item {
  max-width: 100%;
  overflow: hidden;
}

/* ── About section image — never taller than viewport on mobile ── */
@media (max-width: 768px) {
  #about img {
    max-height: 55vw;
    width: 100%;
    object-fit: cover;
  }

  /* FIX: Reduce gap between image and text on mobile */
  #about .row {
    gap: 0.75rem;
  }
}

@media (max-width: 576px) {
  /* Even tighter on small phones */
  #about .row {
    gap: 0.5rem;
  }
}

/* ── Services grid — single column on small phones ── */
@media (max-width: 480px) {
  #services .row {
    row-gap: 1.25rem;
  }
}

/* ── Promise section image ── */
@media (max-width: 768px) {
  #promise img {
    max-height: 50vw;
    width: 100%;
    object-fit: cover;
    margin-top: 0.75rem;
  }
}

@media (max-width: 576px) {
  #promise img {
    margin-top: 0.5rem;
  }
}

/* ── Contact section — stack columns on mobile ── */
@media (max-width: 767px) {
  /* FIX: Reduce gap between contact columns on mobile */
  .contact-section .row {
    gap: 1rem;
  }

  /* Contact form inputs — full width + comfortable height */
  .contact-form .form-control,
  .contact-form .form-select {
    font-size: 1rem;   /* prevents iOS auto-zoom on focus (must be ≥16px) */
    min-height: 44px;
  }
  
  /* FIX: Reduce spacing between form fields on mobile */
  .contact-form .form-group,
  .contact-form .mb-3,
  .contact-form .mb-4 {
    margin-bottom: 0.75rem !important;
  }
}

/* FIX: Reduce contact section spacing on mobile */
@media (max-width: 576px) {
  .contact-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  /* Reduce spacing before "Let's Get In Touch" heading */
  .contact-section h5 {
    margin-top: 0.75rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Reduce spacing on contact info headings */
  .contact-section h6 {
    margin-bottom: 0.5rem !important;
  }
}

/* ── Sponsor bar — wraps cleanly on all sizes ── */
@media (max-width: 400px) {
  .sponsor-item {
    width: 80px;
    height: 45px;
  }
}

/* ── Footer copyright row — stack on mobile ── */
@media (max-width: 576px) {
  .d-flex.flex-wrap.justify-content-between {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
}

/* ── Service pages — hero text never overflows on phones ── */
@media (max-width: 480px) {
  .service-hero {
    padding: 2rem 0 1.5rem;
  }

  .service-hero-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .service-hero-subtitle {
    font-size: 0.95rem;
  }

  .service-card {
    padding: 1.25rem 1rem;
  }

  /* Stats — single column on very small screens */
  .service-highlight-block .row {
    gap: 1.5rem;
  }
}