/* Base Styles */
:root {
  --primary-color: #011A83;
  --secondary-color: #768D9B;
  --accent-color: #4CC9F0;
  --dark-blue: #0D2155;
  --text-color: #303C43;
  --light-color: #ffffff;
  --border-radius: 0;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Typography */
body, .ui {
  font-family: 'Montserrat', sans-serif;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.5;
  color: var(--text-color);
  height: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Force body and html to take full height for proper sidebar behavior */
html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

/* Fix for Fomantic UI sidebar */
body > .ui.sidebar,
body > .pusher {
  min-height: 100% !important;
}

/* Ensure proper stacking for sidebar and pusher */
.site-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.5;
  color: var(--text-color);
}

.ui.header, 
.ui.menu, 
.ui.button, 
.ui.input, 
.ui.label, 
.ui.list, 
.ui.segment, 
.ui.table, 
.ui.card, 
.ui.form {
  font-family: 'Montserrat', sans-serif;
}

b, strong {
  font-weight: 800;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

/* Typography Scale */
h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 3rem;
  font-weight: 800;
}

h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
}

h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--dark-blue);
}

h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--primary-color);
}

h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

h6 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  font-weight: 800;
}

p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

/* Dropdown behavior */
.ui.ui.multiple.dropdown {
  display: none; /* Initially hide the dropdowns */
}

body.js-loaded .ui.ui.multiple.dropdown {
  display: inline-block; /* Show the dropdowns once the JS has loaded */
}

/* Menu styles */
.hidden.menu {
  display: none;
}

.ui.menu .item > img:not(.ui) {
  display: inline-block;
  vertical-align: middle;
  margin: -.3em 0;
  width: 5.5em;
}

/* Pusher and container */
.pusher {
  min-height: 100%;
}

/* Logo styles */
.logo {
  width: 440px;
  margin-right: 10px;
  margin-top: -30px;
  max-width: 100%;
}

.oemlogo {
  margin-top: 50px;
}

/* Button styles */
.ui.aiblue.button, 
.ui.aiblue.buttons .button {
  background-color: var(--primary-color);
  color: var(--light-color);
  text-shadow: none;
  background-image: none;
  border-radius: var(--border-radius);
  padding: 1.125rem 2.625rem;
  font-size: 0.8125rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.ui.aiblue.button:hover, 
.ui.aiblue.buttons .button:hover {
  background-color: var(--accent-color);
  color: var(--light-color);
  transform: translateY(-2px);
}

.ui.basic.aiblue.button {
  background: transparent;
  box-shadow: 0 0 0 1px var(--primary-color) inset;
  color: var(--primary-color);
  padding: 1.5625rem 2.625rem;
  font-size: 0.9375rem;
  border-radius: var(--border-radius);
  transition: box-shadow 0.3s ease, color 0.3s ease;
}

.ui.basic.aigrey.button {
  background: transparent;
  box-shadow: 0 0 0 1px var(--secondary-color) inset;
  color: var(--secondary-color);
  padding: 1.5625rem 2.1875rem;
  font-size: 0.9375rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.ui.basic.button:hover, 
.ui.basic.buttons .button:hover {
  background: var(--light-color);
  color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color) inset;
}

.ui.airoundblue.button, 
.ui.blue.buttons .button {
  background-color: var(--primary-color);
  color: var(--light-color);
  text-shadow: none;
}

/* Menu styles */
.ui.secondary.inverted.menu .active.item {
  background: none;
  color: var(--accent-color);
  border-radius: initial;
  font-weight: 800;
}

.ui.inverted.menu .active.item {
  background: #3d3e3f;
  color: var(--accent-color);
}

.ui.secondary.menu .item {
  align-self: center;
  margin: 0 0 -2px;
  padding: 0.85714286em 1.14285714em;
  transition: color 0.1s ease;
  color: var(--light-color);
  font-weight: 500;
  top: 10px;
}

.ui.secondary.inverted.menu .link.item:not(.disabled), 
.ui.secondary.inverted.menu a.item:not(.disabled) {
  color: var(--light-color);
  border-radius: initial;
}

.ui.secondary.inverted.menu .dropdown.item:hover, 
.ui.secondary.inverted.menu .link.item:hover, 
.ui.secondary.inverted.menu a.item:hover {
  background: none;
  color: var(--accent-color);
  border-radius: initial;
}

/* Header sections */
.main-header {
  position: relative;
  background-image: url("../images/header-image.2fe72d669f80.jpg");
  background-size: cover;
  background-position: center;
  color: var(--light-color);
  display: flex;
  visibility: hidden;
  justify-content: center;
  align-items: center;
}

.main-header .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 46, 91, 0.5);
}

.main-header .content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1.25rem;
}

.main-header .content .column {
  display: flex;
}

.main-header .content h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
}

.main-header .content .ui.input input {
  border-radius: var(--border-radius);
}

.about-header {
  position: relative;
  background-image: url("../images/about-header.022b1cc88807.jpg");
  background-size: cover;
  background-position: center;
  color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.calculator-header {
  position: relative;
  background-image: url("../images/finance_calculator.5ff5d766a621.jpg");
  background-size: cover;
  height: 850px;
  color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.finance-header {
  position: relative;
  background-image: url("../images/finance-header.787258188086.jpg");
  background-position: top;
  margin-top: 120px;
  background-size: cover;
  height: 850px;
  color: var(--primary-color);
  display: flex;
  background-repeat: no-repeat;
  width: 100%;
}

.dealer-header {
  position: relative;
  background-image: url("../images/dealer_banner.c646e31cb3c6.jpg");
  background-size: cover;
  background-position: center;
  color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.news-header {
  position: relative;
  background-image: url("../images/news_hub.0020f184acae.jpg");
  background-size: cover;
  background-position: center;
  height: 850px;
  color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.locate {
  position: relative;
  background-image: url("../images/locate.a31436c3e54d.jpg");
  background-size: cover;
  background-position: center;
  height: 850px;
  color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-l {
  position: relative;
  background-image: url("../images/footer-bg.7cdc1c1dce46.png");
  background-size: cover;
  background-position: center;
  height: 750px;
  color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Component-specific styles */
#home-search-logos {
  background: rgba(1, 26, 131, 0.8);
  margin-top: -14px; 
  border-radius: var(--border-radius); 
  text-align: left; 
  width: 80%; 
  float: right;
}

#home-search {
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  width: 80%;
  float: right;
}

#about-text {
  font-size: 5.625rem;
  font-weight: 900;
  color: var(--light-color);
}

.attname {
  margin-left: 5px;
  font-weight: 800;
  color: var(--secondary-color);
  font-size: 0.8rem;
}

.attvalue {
  margin-left: 5px;
  font-weight: 800;
  color: var(--primary-color);
  font-size: 0.8rem;
}

.attname_detail {
  margin-left: 5px;
  font-weight: 800;
  color: var(--secondary-color);
  font-size: 0.9375rem;
}

.attvalue_detail {
  margin-left: 5px;
  font-weight: 800;
  color: var(--primary-color);
  font-size: 1rem;
}

/* Top menu */
.top-menu {
  background-color: #002e5b;
  color: var(--light-color);
  padding: 0.625rem 0;
}

.top-menu .item {
  color: var(--light-color);
}

.top-menu .item:hover {
  background-color: transparent;
  color: #f9c826;
}

/* Masthead */
.masthead.segment {
  padding: 1em 0;
}

.masthead.logo img {
  margin-right: 1em;
}

.masthead .ui.menu .ui.button {
  margin-left: 0.5em;
}

.masthead h1.ui.header {
  margin-top: 3em;
  margin-bottom: 0;
  font-size: 4em;
  font-weight: normal;
}

.masthead h2 {
  font-size: 1.7em;
  font-weight: normal;
}

/* Dealer menu */
.dealer-menu {
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 700;
}

/* Social icons */
.social-icons {
  margin: 0 5px;
  font-size: 1.25rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #545454;
  color: var(--light-color);
  border-radius: 50%;
  padding: 15px 22px;
  text-align: center;
  cursor: pointer;
  display: none;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.back-to-top:hover {
  background-color: #767676;
}

.back-to-top .icon {
  font-size: 2.1875rem;
}

.back-to-top span {
  display: block;
  font-size: 0.625rem;
  margin-top: 5px;
}

/* Input elements */
.ui.input > input {
  font-family: 'Montserrat', sans-serif;
}

#search-input {
  border-radius: var(--border-radius);
}

input::placeholder {
  color: var(--primary-color);
  opacity: 1;
}

/* Dropdown menus */
.ui.dropdown .menu > .item {
  color: var(--primary-color);
}

.ui.multiple.dropdown > .label {
  background-color: var(--primary-color);
  color: var(--light-color);
}

/* Badge indicators */
#favorites-badge, #compare-badge {
  position: absolute;
  top: -5px;
  right: 10px;
  font-size: 0.625rem;
  display: none;
}

/* Mobile bottom menu */
.mobile-bottom-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--primary-color);
  justify-content: space-around;
  padding: 10px 0;
  box-shadow: var(--box-shadow);
  z-index: 1000;
  display: none; /* Hidden by default */
}

.mobile-bottom-menu .menu-item {
  color: var(--light-color);
  text-align: -webkit-center;
  font-size: 0.875rem;
}

.mobile-bottom-menu .menu-item i {
  display: block;
  font-size: 1.5rem;
}

/* Fixed menu */
.ui.fixed.menu {
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#mainmenu {
  top: 0;
}

/* Header welcome */
#header-welcome {
  font-size: 1.5rem;
  font-weight: 800;
}

/* Header text */
#header-text {
  font-size: 5.5em;
  font-weight: 800;
  text-shadow: 0 6px 6px rgba(0, 0, 0, 0.5);
}

/* Custom menu */
.custom-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: 50px;
  background: var(--light-color);
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  padding: 15px;
  z-index: 1000;
  width: 200px;
}

.custom-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-menu ul li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--dark-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.custom-menu ul li i {
  margin-right: 10px;
}

.custom-menu ul li:hover {
  color: var(--accent-color);
}

.close-menu {
  text-align: right;
  font-size: 20px;
  cursor: pointer;
  color: var(--dark-blue);
  margin-top: 10px;
}

.close-menu:hover {
  color: #ff4c4c;
}

/* Slug and heading text */
.slug-text {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.heading-text {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-color);
}

/* Product card */
.product-card {
  text-align: center;
  padding: 2em;
  min-height: 310px;
}

/* Pagination */
.pagination-container {
  text-align: center;
  margin: 2.5rem 0;
}

.pagination {
  display: inline-block;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pagination .page-item {
  display: inline;
}

.pagination .page-item .page-link {
  color: #6c757d;
  padding: 5px 6px;
  text-decoration: none;
  border: 1px solid transparent;
  margin: 0 3px;
  font-size: 1.125rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.pagination .page-item .page-link:hover {
  color: var(--accent-color);
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
  color: var(--accent-color);
  font-weight: bold;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  color: #6c757d;
}

.pagination .page-item:first-child .page-link:hover,
.pagination .page-item:last-child .page-link:hover {
  color: var(--accent-color);
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

/* Slick dots */
.slick-dots {
  bottom: 15px;
  text-align: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.slick-dots li {
  display: inline-block;
  margin: 0 5px;
}

.slick-dots li button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 20px;
  height: 20px;
  position: relative;
}

.slick-dots li button:before {
  content: '';
  width: 12px;
  height: 12px;
  background-color: #D3D8E0;
  border-radius: 50%;
  display: inline-block;
  opacity: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.slick-dots li.slick-active button:before {
  width: 20px;
  height: 20px;
  background-color: var(--accent-color);
}

/* Contact details */
.contact-details {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 10px;
}



#header-container {
  margin-top: 190px;
  margin-bottom: 100px;
}

#submenu {
  background-color: var(--primary-color);
  padding-bottom: 20px;
  top: 54px;
}

#hassle-card {
  width: 835px;
  border-radius: var(--border-radius);
}

#hassle-image {
  width: 380px;
}

#whyus {
  margin-top: -53px;
}

/* Site Layout */
.site-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pusher {
  flex: 1;
}

.site-footer {
  margin-top: auto;
}

/* Media Queries */
@media (max-width: 768px) {
  html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    overscroll-behavior: none;
  }

  body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    overflow-y: auto;
  }
  
  /* Improve momentum scrolling */
  .pusher {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }

  #favorites-badge {
    position: absolute;
    top: -5px;
    right: 77px;
    font-size: 10px;
    display: none;
  }
  
  #compare-badge {
    position: absolute;
    top: -5px;
    right: 280px;
    font-size: 10px;
    display: none;
  }
  
  .secondary.right.menu .item,
  .secondary.menu .menu,
  .secondary.menu .logo {
    display: none;
  }

  .right.menu .item,
  .right.menu .menu {
    display: none;
  }

  .secondary.menu .toc.item {
    display: block;
  }

  #viewCompareButton {
    display: block;
  }
  
  .masthead h1.ui.header {
    font-size: 2em;
    margin-top: 1.5em;
  }
  
  .masthead h2 {
    margin-top: 0.5em;
    font-size: 1.5em;
  }
  
  #social_icons {
    display: none;
  }

  .ui.images {
    font-size: 0;
    margin: 0 -4.25rem;
  }

  .needmore {
    height: auto;
    padding-bottom: 50px;
    padding-top: 30px;
  }

  .onthemove {
    height: auto;
    padding-bottom: 50px;
  }

  .connect {
    height: auto;
    padding-bottom: 50px;
  }

  .footer-l {
    padding-top: 30px;
    height: auto;
    padding-bottom: 50px;
  }

  .menu_buttons {
    display: none;
  }

  .attname_detail {
    font-family: 'Montserrat', sans-serif;
    margin-left: 5px;
    font-weight: 800;
    color: #768D9B;
    font-size: 12px;
  }

  .attvalue_detail {
    font-family: 'Montserrat', sans-serif;
    margin-left: 5px;
    font-weight: 800;
    color: #011A83;
    font-size: 13px;
  }

  .logo {
    padding-left: 20px;
    margin-top: -12px;
    width: 327px;
  }

  #submenu {
    top: 0;
    padding-top: 20px;
    background-color: #011A83;
    padding-bottom: 20px;
  }

  #header-container {
    margin-top: 60px;
  }

  #mainmenu {
    display: none;
  }

  #about-text {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
  }
  
  #home-search {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0; 
    padding-bottom: 80px;
    padding: 40px 40px 40px;
    width: 100%;
    float: right;
  }
  
  #hassel-card {
    width: 400px;
  }

  #hassle-image {
    width: 150px;
  }

  #whyus {
    margin-top: 10px;
  }

  .contact-details {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .finance-header {
    position: relative;
    background-image: url("../images/finance-header-mobile.63afbd8806e8.jpg");
    background-position: center;
    background-size: contain;
    height: 850px;
    color: #011A83;
    display: inline;
    background-repeat: no-repeat;
    width: 100%;
  }
}

/* Mobile scrolling optimizations */
@media only screen and (max-width: 767px) {
    html, body {
        -webkit-overflow-scrolling: touch; /* Enables momentum scrolling on iOS devices */
        overflow-x: hidden; /* Prevents horizontal scroll */
        height: 100%; /* Ensures proper height calculations */
    }
    
    body.sidebar-open {
        overflow: hidden !important; /* Prevents background scrolling when sidebar is open */
    }
    
    .pusher {
        /* Improve scrolling on mobile devices */
        -webkit-overflow-scrolling: touch;
        min-height: 100%;
        padding-bottom: 60px; /* Space for mobile bottom menu */
    }
    
    /* Improve touch target sizes */
    .ui.menu .item, 
    .ui.button,
    .ui.sidebar .item {
        padding: 14px !important; /* Larger touch targets */
    }
    
    /* Smooth transition for all interactive elements */
    a, button, .ui.button, .ui.menu .item {
        transition: all 0.2s ease-in-out !important;
    }
    
    /* Fix for iOS scrolling issues with fixed elements */
    .ui.fixed.menu {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

@media only screen and (min-width: 1000px) {
  .ui.ui.ui.container:not(.fluid) {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .logo {
    width: 440px;
    margin-right: 10px;
    margin-top: -30px;
  }

  .oemlogo {
    margin-top: 50px;
  }

    #home-search-logos {
      background: rgba(1, 26, 131, 0.8);
      margin-top: -14px; 
      border-radius: 0; 
      text-align: left; 
      width: 80%; 
      float: right;
    }

    #desc {
      padding: 30px;
    }

    #car_detail {
      padding-left: 40px;
    }

    #header-container {
      margin-top: 190px;
      margin-bottom: 100px;
    }
  }

@media only screen and (min-width: 2000px) {
    .ui.ui.ui.container:not(.fluid) {
        width: 65%;
        margin-left: auto;
        margin-right: auto;
    }

    #desc {
      padding: 30px;
    }

    #car_detail {
      padding-left: 40px;
    }

    #header-container {
      margin-top: 190px;
      margin-bottom: 100px;
    }
}

/* Desktop-specific styles */
@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }

  .button-container {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
  
  .desktop-only {
    display: block !important;
  }
  
  .mobile-bottom-menu {
    display: none !important;
  }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  /* Header text */
#header-text {
  font-size: 4.5em;
  font-weight: 800;
  text-shadow: 0 6px 6px rgba(0, 0, 0, 0.5);
}

#home-search-logos {
  background: rgba(1, 26, 131, 0.8);
  margin-top: -14px; 
  border-radius: var(--border-radius); 
  text-align: left; 
  width: 100%; 
  float: right;
}

.button-container {
  position: absolute;
  top: 0px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
  
  .mobile-only {
    display: block !important;
  }
  
  .mobile-bottom-menu {
    display: flex !important;
  }
  
  #mainmenu {
    display: none !important;
  }
  
  #social_icons {
    display: none !important;
  }
  
  .menu_buttons {
    display: none !important;
  }
  
  .secondary.menu .toc.item {
    display: block !important;
  }
  
  #favorites-badge-mobile {
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 10px;
  }
  
  #compare-badge-mobile {
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 10px;
  }
}



.ui.inverted.menu .active.item {
  color: #4CC9F0 !important;
}