/* Global Styles */
:root {
  --primary: #e30613;
  --secondary: #000000;
  --light: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

span {
  color: var(--primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  font-size: 1.2em;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Preloader Styles */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--light);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.preloader-inner {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(227, 6, 19, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.preloader-text {
  color: var(--secondary);
  font-weight: 500;
  font-size: 1.2rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* When loading is complete */
.preloader.loaded {
  opacity: 0;
  pointer-events: none;
}

.text-center {
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  position: relative;
  display: block;
  width: 100%;
  text-align: center;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.section-subtitle {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
}

p {
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary);
  color: var(--light);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--primary);
}

.btn-link {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.btn-link i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

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

.btn-link:hover i {
  transform: translateX(5px);
}

/* Header Styles */
#mainHeader {
  background-color: var(--light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 80px;
  margin-right: 15px;
  transition: all 0.3s ease;
}

#mainNav ul {
  display: flex;
}

#mainNav ul li {
  margin-left: 30px;
}

#mainNav ul li a {
  font-weight: 500;
  color: var(--secondary);
  transition: color 0.3s ease;
  position: relative;
  font-size: 1.1rem;
}

#mainNav ul li a:hover {
  color: var(--primary);
}

#mainNav ul li a:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

#mainNav ul li a:hover:after {
  width: 100%;
}

/* Update the active state styles in your CSS */
#mainNav ul li a.active {
  color: var(--primary);
}

#mainNav ul li a.active:after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  z-index: 1001;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  background: url("../img/hero-background.jpg") no-repeat center center/cover;
  display: flex;
  align-items: center;
  color: var(--light);
  text-align: center;
  padding-top: 80px;
}

.hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Hero Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 40px auto;
  max-width: 800px;
}

.service-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 15px 10px;
  text-align: center;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  cursor: default;
  background: rgba(227, 6, 19, 0.3);
}

.service-item:hover {
  background: transparent;

  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.service-item i {
  font-size: 2rem;
  color: var(--light);
  margin-bottom: 10px;
  display: block;
}

.service-item span {
  color: var(--light);
  font-weight: 600;
  font-size: 0.9rem;
}

.service-item.highlight-offer {
  animation: pulse 2s infinite;
  border: 1px solid var(--primary);
  position: relative;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(227, 6, 19, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 6, 19, 0);
  }
}

.service-item.highlight-offer:before {
  content: "SPECIAL OFFER!";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Font Awesome Custom Icons */
.fa-engine:before {
  content: "\f0e4";
}

.fa-gears:before {
  content: "\f085";
}

.fa-brake-pedal:before {
  content: "\f0d1";
}

.fa-steering-wheel:before {
  content: "\f622";
}

.fa-bolt:before {
  content: "\f0e7";
}

.fa-tire:before {
  content: "\f1b2";
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .services-grid {
    display: none;
  }
}

@media (max-width: 480px) {
  .services-grid {
    display: none;
  }
}

/* About Section */
.about {
  padding: 80px 0;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--secondary);
}

.about-image {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

/* Services Section */
.services {
  padding: 80px 0;
  background-color: var(--light);
}

.services-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-overview-card {
  background-color: #f5f5f5;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.service-overview-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.service-overview-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.view-all-btn {
  margin-top: 40px;
}

/* Reviews Section */
.reviews {
  padding: 80px 0;
  background-color: #f5f5f5;
}

.reviews-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.review-card {
  background-color: var(--light);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.review-header {
  margin-bottom: 20px;
}

.review-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.2rem;
}

.author-info h4 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.review-stars {
  color: #ffc107;
  font-size: 0.9rem;
}

.review-content p {
  font-style: italic;
  color: #1a1a1a;
  line-height: 1.7;
}

/* Contact Section */
.contact {
  padding: 80px 0;
  background-color: var(--light);
}

.contact-container {
  display: flex;
  gap: 50px;
  margin-top: 50px;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--secondary);
}

.map-container {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
}

.contact-details {
  margin-top: 30px;
}

.contact-item {
  display: flex;
  margin-bottom: 25px;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: 20px;
  margin-top: 5px;
}

.contact-item-content h4 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.contact-item-content p {
  font-size: 1rem;
}

.contact-item-content a {
  color: var(--primary);
  transition: color 0.3s ease;
}

.contact-item-content a:hover {
  color: var(--secondary);
}

/* Footer */
footer {
  background-color: var(--secondary);
  color: var(--light);
  padding: 60px 0 0;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col {
  margin-bottom: 30px;
}

.footer-logo {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.footer-col p {
  margin-bottom: 20px;
  opacity: 0.8;
}

.footer-col h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--light);
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--light);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
  padding-left: 5px;
}

.footer-contact-item {
  display: flex;
  margin-bottom: 15px;
}

.footer-contact-item i {
  color: var(--primary);
  margin-right: 15px;
  margin-top: 5px;
}

.footer-contact-item p {
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-bottom p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 25px;
}

.footer-bottom a {
  color: var(--primary);
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: var(--light);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary);
  transform: translateY(-5px);
}

/* Page Hero Styles */
.page-hero {
  background: url("../img/inner-page.jpg") no-repeat center center/cover;
  height: 400px;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--light);
  position: relative;
  margin-top: 80px;
}

.page-hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.page-hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Ontario Annual Safety Inspections Section */
.safety-inspections {
  padding: 80px 0;
  background-color: #f5f5f5;
}

.safety-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.safety-image {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.safety-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.safety-text {
  flex: 1;
}

.safety-text h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--secondary);
}

.safety-features {
  margin: 25px 0;
}

.safety-features li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.safety-features i {
  color: var(--primary);
  margin-right: 10px;
  font-size: 1.1rem;
}

/* Truck Brands We Service Section */
.brands-we-service {
  padding: 80px 0;
  background-color: var(--light);
}

.brands-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 30px;
  align-items: center;
  margin: 40px 0;
}

.brands-logos img {
  max-width: 100%;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.brands-logos img:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.1);
}

/* FAQ Section */
.faq-section {
  padding: 80px 0;
  background-color: #f5f5f5;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--light);
}

.faq-question {
  width: 100%;
  padding: 20px;
  text-align: left;
  background-color: var(--light);
  border: none;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: #f9f9f9;
}

.faq-question i {
  transition: transform 0.3s ease;
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
  padding-bottom: 20px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 20px 20px;
}

.faq-contact {
  margin-top: 40px;
}

.faq-contact a {
  color: var(--primary);
  font-weight: 600;
  transition: color 0.3s ease;
}

.faq-contact a:hover {
  color: var(--secondary);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .about-content,
  .about-page-content,
  .contact-container,
  .safety-content {
    flex-direction: column;
  }

  .emergency-services {
    flex-direction: column;
  }

  .emergency-image {
    order: -1;
    margin-bottom: 30px;
  }

  .map-container {
    min-height: 400px;
  }

  .safety-image {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  #mainNav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--light);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    padding: 80px 30px 30px;
    overflow-y: auto;
  }

  #mainNav.active {
    right: 0;
  }

  #mainNav ul {
    flex-direction: column;
  }

  #mainNav ul li {
    margin: 0 0 20px 0;
  }

  #mainNav ul li a {
    font-size: 1.2rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-btns,
  .cta-btns {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
  }

  .about-page-stats,
  .commitment-grid {
    grid-template-columns: 1fr;
  }

  .brands-logos {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .hero {
    min-height: 600px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2rem;
  }

  .hero p,
  .page-hero p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .page-hero {
    height: 300px;
  }

  .about-cta h2,
  .services-cta h2 {
    font-size: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .brands-logos {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
  }

  .faq-question {
    font-size: 1rem;
    padding: 15px;
  }
}
