/* Testimonial Styles */
.testimonial-position{
    color:black;
}

/* Photo Gallery Styles */
.gallery-section {
  padding: 60px 0;
}

.gallery-heading {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.gallery-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

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

.gallery-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

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

.gallery-info {
  padding: 24px;
  background: #fff;
}

.gallery-info h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
}

.gallery-date {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gallery-count {
  color: #95a5a6;
  font-size: 0.85rem;
  margin: 8px 0 0;
  font-weight: 500;
}

.no-galleries {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Modal Styles */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s;
  background: none;
  border: none;
  line-height: 1;
}

.close-modal:hover {
  color: #bbb;
}

.modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 100px;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  margin: 0 auto;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  padding: 20px;
  user-select: none;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  z-index: 10000;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.prev {
  left: 30px;
}

.next {
  right: 30px;
}

.prev:hover, .next:hover {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
}

.modal-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  border-radius: 25px;
  z-index: 10000;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: #f0f0f0;
  border-color: #999;
}

.pagination .current {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .slide-content h2{
    font-size: 20px;
  }
  .gallery-heading {
    font-size: 2rem;
  }
  .banner-content h2{
    font-size: 3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .modal-content {
    padding: 60px 20px;
  }

  .prev, .next {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    padding: 15px;
  }

  .prev {
    left: 10px;
  }

  .next {
    right: 10px;
  }

  .close-modal {
    top: 20px;
    right: 20px;
    font-size: 2rem;
  }

  .modal-counter {
    bottom: 20px;
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 60px 10px;
  }
}

/* Continuous Scrolling Carousel CSS */
.continuous-carousel-wrapper {
    overflow: hidden;
    padding: 60px 0;
    background: var(--blue);
    position: relative;
}

.continuous-carousel-wrapper::before,
.continuous-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* .continuous-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.continuous-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
} */

.continuous-carousel {
    display: flex;
    gap: 50px;
    animation: scroll 40s linear infinite;
    width: fit-content;
}

.continuous-carousel:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.car-brand-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 180px;
    padding: 30px 20px;
    background: var(--blue);
    /* border: 1px solid #fff; */
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-brand-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.car-brand-item img {
    max-width: 120px;
    height: 70px;
    object-fit: contain;
    /* filter: grayscale(100%); */
    opacity: 0.6;
    transition: all 0.4s ease;
}

.car-brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

.car-brand-item h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .continuous-carousel {
        gap: 40px;
        animation-duration: 30s;
    }

    .car-brand-item {
        min-width: 150px;
        padding: 25px 15px;
    }

    .car-brand-item img {
        max-width: 100px;
        height: 60px;
    }

    .car-brand-item h5 {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .continuous-carousel-wrapper {
        padding: 40px 0;
    }

    .continuous-carousel {
        gap: 30px;
        animation-duration: 25s;
    }

    .car-brand-item {
        min-width: 130px;
        padding: 20px 12px;
    }

    .car-brand-item img {
        max-width: 80px;
        height: 50px;
    }

    .car-brand-item h5 {
        font-size: 0.85rem;
    }

    .continuous-carousel-wrapper::before,
    .continuous-carousel-wrapper::after {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .continuous-carousel {
        gap: 20px;
        animation-duration: 20s;
    }

    .car-brand-item {
        min-width: 110px;
        padding: 15px 10px;
    }

    .car-brand-item img {
        max-width: 70px;
        height: 45px;
    }

    .continuous-carousel-wrapper::before,
    .continuous-carousel-wrapper::after {
        width: 50px;
    }
}

/* Performance Video Container */
.category-card video.category-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%; 
  transform: translate(-50%, -50%);
  object-fit: cover; 
  z-index: 0;
  display: block;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link {
  display: block;
  background: #ffffff !important;
  color: var(--blue) !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: normal;
  padding: 0px 10px;
  line-height: 35px;
  text-decoration: none;
  text-transform: none;
  vertical-align: baseline;
}
#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:hover {
  color:  var(--red)!important;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:hover, #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:focus {
  background: #ffffff;
  font-weight: normal;
  text-decoration: none;
}

.site-header .btn.main-btn a:focus,
.site-header .btn.main-btn a:focus-visible,
.site-header .btn.main-btn a:active {
  outline: none !important;
  box-shadow: none !important;
  border: 1px solid #8e9bb3 !important; /* Keeps same border on click */
  -webkit-tap-highlight-color: transparent; /* Removes highlight on mobile */
  -moz-outline-style: none;
}


/* ***************
Brands Modal Code 
******************/

/* Brand Cards Hover Effect */
.brand-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.brand-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brand-card:hover .brand-hover-overlay {
    opacity: 1;
}

.view-details {
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.brand-card:hover .view-details {
    background: white;
    color: #333;
}

/* Modal Styles */
.brand-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.brand-modal.active {
    display: flex;
}

.brand-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.brand-modal-content {
    position: relative;
    max-width: 900px;
    width: 90%;
    margin: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow: hidden;
}

.brand-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.brand-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    color: var(--red);
    transform: rotate(90deg);
}

.brand-modal-body {
    display: flex;
    flex-wrap: wrap;
}

.brand-modal-image {
    flex: 0 0 40%;
    max-width: 40%;
    /* background: #f5f5f5; */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.brand-modal-image img {
    max-width: 100%;
    height: auto; 
    border-radius: 8px;
}

.brand-modal-info {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 40px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.brand-modal-info h2 {
    display: inline-block;
    margin: 0 0 20px 0;
    font-size: 32px;
    color: #333;
    border-bottom: 3px solid var(--red);
    /* padding-bottom: 15px; */
}

.brand-modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .brand-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .brand-modal-body {
        flex-direction: column;
    }
    
    .brand-modal-image,
    .brand-modal-info {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .brand-modal-image {
        padding: 20px;
    }
    
    .brand-modal-info {
        padding: 20px;
    }
    
    .brand-modal-info h2 {
        font-size: 24px;
    }
}