@import url('https://fonts.googleapis.com/css?family=Roboto:400,700');

:root{
  --mainBlue:#40ACF1;
  --transparentBlue:rgba(64, 172, 241,0.7);
  --mainWhite:#FFFFFF;
  --mainBlack:#292F36;
  --mainGrey:rgb(216, 214, 214);
  --mainYellow:#e3b505;
}

h1, h2, h3 {
  word-wrap: break-word;
}

body{
  font-family: 'Roboto', sans-serif;
  color: var(--mainBlack);
  background: var(--mainWhite);
}

/* section title */
.section-title--special{
  background: var(--transparentBlue);
  color: var(--mainWhite);
  padding: 0.5rem 2rem;
  clip-path: polygon(10% 0, 100% 0, 90% 100%,0 100%);
}

/* preloader */
.preloader{
  position: fixed;
  top:0;
  bottom:0;
  left:0;
  right:0;
  background: var(--mainWhite);
  z-index: 999;
}
.hidePreloader{
  display: none!important;
}

/* navbar */
.navbar{
  background: black !important;
}
.navbar-icon{
  font-size: 2rem;
  color: var(--mainBlue);
}
.navbar-toggler{
  outline-color: var(--mainBlue)!important;
}
.nav-link{
  color: var(--mainBlack);
  text-transform: capitalize;
}
.nav-link:hover{
  color: var(--mainBlue);
}
.nav-icon{
  font-size: 1.5rem;
  color: var(--mainBlue);
  text-decoration: none!important;
  transition-property: color;
  transition-duration: 2s;
  transition-timing-function: linear;
}
.nav-icon:hover{
  color: var(--mainBlack);
}

/* header */
.header{
  clip-path: polygon(0 0,100% 0,100% 95%,50% 100%,0 95%);
  color:var(--mainWhite);
  overflow: hidden;
  position: relative;
}

/* Responsive hero image */
.height-max {
  min-height: calc(100vh - 76px);
  background: url('../img/hero_image_optimized.jpeg') center center / cover no-repeat;
  background-attachment: scroll; /* better mobile compatibility */
}

.header::before {
  content: "";
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.4); /* optional overlay for text readability */
}

@keyframes zoom{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.2) translateX(-5%); }
  100%{ transform: scale(1); }
}

.title-heading{
  background: rgba(0,0,0,0.4);
  border-left: 0.3rem solid var(--mainBlue);
}
.title{
  font-weight: 700;
  font-size: 1.9rem;
}
@media screen and (min-width:768px){
  .title{ font-size: 3rem; }
}
.title-icon{
  color: var(--mainBlue);
  text-decoration: none!important;
}
.title-icon:hover{
  color: var(--mainBlue);
  opacity: 0.6;
}

/* Responsive hero height adjustments */
@media screen and (max-width: 992px) {
  .height-max {
    min-height: 70vh;
  }
}
@media screen and (max-width: 768px) {
  .height-max {
    min-height: 60vh;
  }
}
@media screen and (max-width: 576px) {
  .height-max {
    min-height: 50vh;
  }
}

/* contact section override */
#contact {
  background: rgb(31, 31, 31);
  color: white;
  background-image: none !important;
}
.map-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}
.map-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.footer p {
  text-align: center;
}

/* ---------------------- RESPONSIVE FIXES ---------------------- */

/* Navbar dark link fix */
.navbar-dark .navbar-nav .nav-link {
  color: var(--mainWhite) !important;
}

/* Responsive header text adjustments */
@media screen and (max-width: 576px) {
  .header .title { font-size: 1.5rem; }
  .header h2 { font-size: 1.2rem; }
  .header h3, .header h6 { font-size: 1rem; }
}

/* Inventory section title responsiveness */
@media screen and (max-width: 400px) {
  .section-title--special {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Car images: consistent max height and scaling */
.car-card .carousel-item img {
  max-height: 300px;
  object-fit: cover;
}
@media screen and (max-width: 576px) {
  .car-card .carousel-item img {
    max-height: 200px;
  }
}

/* Footer spacing improvement */
.footer p {
  margin-bottom: 0.5rem;
}

/* Map responsiveness */
.map-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
.map-container {
  width: 100%;
  min-height: 300px;
}

/* Responsive navbar dropdown adjustments */
@media (max-width: 767.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    right: 10px;
    background-color: black;
    width: 200px;
    text-align: center;
    z-index: 1000;
    border-radius: 0 0 5px 5px;
    padding: 0.5rem;
  }
  .navbar-collapse .navbar-nav {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .navbar-collapse .nav-item {
    width: 100%;
  }
  .navbar-collapse .nav-link {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
  }
}

/* Responsive padding for sections */
section, .footer, .header {
  padding-left: 15px;
  padding-right: 15px;
}

/* Responsive logo scaling */
.navbar-brand img {
  max-height: 60px;
  width: auto;
}
@media screen and (max-width: 576px) {
  .navbar-brand img {
    max-height: 40px;
  }
}

/* ---------------------- VEHICLE CARDS ---------------------- */

.vehicle-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.vehicle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.vehicle-card .card-img-top,
.vehicle-carousel-img {
  height: 200px;
  object-fit: cover;
}

.vehicle-card .card-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.vehicle-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #dc3545;
}

.vehicle-card .card-footer {
  border-top: none;
  padding-top: 0;
}

/* Carousel styling for inventory cards */
.vehicle-card .carousel {
  position: relative;
}

.vehicle-card .carousel-control-prev,
.vehicle-card .carousel-control-next {
  width: 15%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.vehicle-card:hover .carousel-control-prev,
.vehicle-card:hover .carousel-control-next {
  opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 15px;
  background-size: 50%;
}

.carousel-indicators-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
}

/* ---------------------- VEHICLE DETAIL PAGE ---------------------- */

.vehicle-detail-img {
  height: 400px;
  object-fit: cover;
}

@media screen and (max-width: 768px) {
  .vehicle-detail-img {
    height: 250px;
  }
}

.vehicle-thumbnails {
  background: #f8f9fa;
}

.vehicle-thumb {
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  padding: 0;
}

.vehicle-thumb:hover,
.vehicle-thumb.active {
  opacity: 1;
  border-color: #dc3545;
}

.vehicle-specs th {
  width: 40%;
  color: #6c757d;
  font-weight: 500;
}

.vehicle-specs td {
  font-weight: 600;
}

.vehicle-specs i {
  width: 20px;
  text-align: center;
  margin-right: 5px;
}

/* Breadcrumb styling */
.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: #6c757d;
}

.breadcrumb-item a:hover {
  color: #dc3545;
}

/* ---------------------- SOLD BANNER ---------------------- */

.sold-overlay-wrapper {
  position: relative;
  overflow: hidden;
}

.sold-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  background: rgba(220, 53, 69, 0.9);
  color: white;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 50px;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
  border-top: 3px solid rgba(255, 255, 255, 0.4);
  border-bottom: 3px solid rgba(255, 255, 255, 0.4);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sold-banner--detail {
  font-size: 3.5rem;
  padding: 8px 70px;
}

/* ---------------------- FEATURED SECTION ---------------------- */

.featured-inventory {
  background-color: #f4f6f9;
}

.featured-inventory .section-title--special {
  font-size: 1.5rem;
}

/* ---------------------- CREDIT APP MODAL ---------------------- */

#creditAppModal .modal-header {
  border-bottom: none;
}

#creditAppModal .modal-body {
  padding-top: 1rem;
}

.credit-step-label {
  color: #adb5bd;
  font-weight: 500;
  transition: color 0.3s;
}

.credit-step-label.active {
  color: #dc3545;
  font-weight: 700;
}

#creditAppModal .form-control:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.25);
}

#creditAppModal .is-invalid {
  border-color: #dc3545;
  background-image: none;
}

#creditAppModal .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-financing {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-financing:hover {
  background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}

@media (max-width: 576px) {
  #creditAppModal .form-row > .form-group {
    margin-bottom: 0.5rem;
  }
  .credit-step-label small {
    font-size: 0.7rem;
  }
}