* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", sans-serif;
  background-color: #111;
  color: #fff;
}
:root {
  --mitsubishi-red: #e60012;
  --mitsubishi-black: #000000;
}
.text-red{
  color: var(--mitsubishi-red);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}
.bg-red {
  background-color: var(--mitsubishi-red);
  color: white;
}
.btn-red {
  background-color: var(--mitsubishi-red);
  color: white;
  border: none;
}
.btn-red:hover {
  background-color: #c40010;
  color: white;
}
.hero-slider img {
  height: 500px;
  object-fit: cover;
}
.card-car:hover {
  transform: translateY(-5px);
  transition: 0.3s;
  cursor: pointer;
}

/* BAGIAN NAVBAR */
.navbar-brand img {
    height: 60px;
    width: auto;  
    transition: 0.3s;
}

/* BAGIAN BANNER */
.carousel-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.carousel-caption {
    z-index: 2;
}
/* Update CSS yang sudah ada */
#heroCarousel {
  height: 90vh; /* Default Desktop */
  width: 100%;
  overflow: hidden;
}

#heroCarousel .carousel-item img {
  height: 90vh; /* Default Desktop */
  width: 100%;
  object-fit: cover;
  object-position: center;
}
.carousel-caption {
  bottom: 50%;
  transform: translateY(50%);
  width: 80%; /* Memberi ruang agar teks tidak menyentuh pinggir layar */
  left: 10%;
}
.carousel-caption {
  bottom: 50%;
  transform: translateY(50%);
}
.banner-btn {
  background-color: #E60012; 
  color: #fff; 
  padding: 1rem 2rem; 
  font-size: 1.1rem; 
  border-radius: 5px; 
  cursor: pointer; 
  transition: transform 0.3s, background 0.3s; 
  font-weight: bold;
  text-decoration: none; 
  display: inline-block;
}
.banner-btn:hover {
  background-color: #b3000e;
  color: #fff;
  transform: translateY(-3px);
  text-decoration: none; 
}

@media (max-width: 767.98px) {
  #heroCarousel, 
  #heroCarousel .carousel-item img {
    height: 60vh; /* Mengurangi tinggi di mobile agar tidak terlalu kotak */
  }

  .carousel-caption h2 {
    font-size: 1.2rem !important; /* Mengecilkan judul agar tidak pecah */
    margin-bottom: 0.5rem;
  }

  .carousel-caption p {
    font-size: 0.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .banner-btn {
    background-color: #E60012; 
    color: #fff; 
    padding: 0.7rem 1.5rem; 
    font-size: 0.8rem; 
    border-radius: 5px; 
    cursor: pointer; 
    transition: transform 0.3s, background 0.3s; 
    font-weight: bold;
    text-decoration: none; 
    display: inline-block;
  }
  .banner-btn:hover {
    background-color: #b3000e;
    color: #fff;
    transform: translateY(-3px);
    text-decoration: none; 
  }
}


/* BAGIAN TIPE MOBIL */

#tipeMobil .container {
  position: relative;
}

/* 2. Wrapper Slider */
.car-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding: 20px 5px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.car-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.car-item {
  flex: 0 0 320px; 
  width: 320px;
}

.card-car {
  display: flex;
  flex-direction: column;
  height: 100%; 
  background-color: #1e1e1e;
  color: #fff;
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.card-car:hover {
  background-color: #ffffff;
  color: #1e1e1e;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}

.card-car .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.25rem;
}

.card-car .card-body p {
  white-space: normal;
  line-height: 1.5;
}

.card-car .card-body p:last-of-type {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.car-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.nav-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #E60012;
  color: #fff;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-scroll-btn:hover {
  background-color: #b3000e;
  transform: translateY(-50%) scale(1.1);
}

.nav-scroll-btn.left { left: -20px; }
.nav-scroll-btn.right { right: -20px; }

@media (max-width: 768px) {
  .car-item {
    flex: 0 0 280px;
    width: 280px;
  } 
  
  .nav-scroll-btn {
    display: none;
  }

  .car-item img {
    height: 180px;
  }
}

/* BAGIAN NEWS */
.card-text {
    display: -webkit-box;
    ---webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem; 
}
.card-body {
    padding-bottom: 1.5rem !important;
}
.bg-news {
  background-color: #1a1a1a !important;
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.bg-news:hover {
  transform: translateY(-10px);
}
.bg-news img {
  height: 220px;
  object-fit: cover;
}
.bg-news .card-text {
  font-size: 0.9rem;
  color: #a0a0a0 !important;
}
.description-text {
    display: -webkit-box;
    --webkit-line-clamp: 3; /* Membatasi teks hanya 3 baris */
    --webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px; /* Jarak aman sebelum tombol */
}
.btn-baca {
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
}
.btn-baca:hover {
  background-color: #fff;
  color: #000;
}

/* BAGIAN TESTIMONI */
.testimoni-card {
    background-color: #1a1a1a;
    padding: 30px 20px;
    border-radius: 15px;
    border: 1px solid #E60012;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease;
}

.testimoni-card:hover {
    transform: translateY(-10px);
}

.testimoni-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #E60012;
    margin-bottom: 20px;
}

.testimoni-card p {
    font-style: italic;
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

.testimoni-card h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-top: 15px;
}

/* BAGIAN FOOTER */
.hover-red:hover {
    color: var(--mitsubishi-red) !important;
    transition: 0.3s;
}

.hover-white:hover {
    color: white !important;
    padding-left: 5px; /* Efek bergeser sedikit saat di-hover */
    transition: 0.3s;
}

/* DROPDOWN TIPE MOBIL */
/* Mengaktifkan Hover Dropdown pada Desktop */
@media (min-width: 992px) {
  .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0; /* Menghilangkan celah agar tidak tertutup saat pindah kursor */
    animation: fadeIn 0.3s ease;
  }
}

/* Animasi halus saat dropdown muncul */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Styling tambahan untuk item dropdown agar lebih elegan */
.dropdown-item:hover {
  background-color: #e60012; /* Warna merah khas Mitsubishi */
  color: white;
}