
/* === Global Style === */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: #fff;
  color: #222;
}

/* === Header === */
header {
  text-align: center;
  border-bottom: 4px solid red;
  padding: 8px 0;
}
header img {
  width: 150px;
  height: auto;
}

/* === Main Section === */
main {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}
h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: bold;
}

/* === Tabs / Kategori === */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}
.tab {
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #555;
  position: relative;
  transition: color 0.3s ease;
}
.tab:hover {
  color: #000;
}
.tab.active {
  color: red;
}
.tab.active::after {
  content: "";
  display: block;
  height: 3px;
  background: red;
  width: 100%;
  margin-top: 4px;
  border-radius: 2px;
}

/* === Grid Motor Container === */
.motor-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  justify-content: center;
}

/* === Motor Card === */
.motor-card {
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  background: #fff;
}
.motor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.motor-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.new-label {
  position: absolute;
  top: 8px;
  right: 12px;
  color: red;
  font-weight: bold;
  font-size: 14px;
}
.motor-card .info {
  padding: 12px 16px 20px;
}
.motor-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: bold;
}
.motor-card p {
  margin: 4px 0;
  font-size: 14px;
}
.price {
  color: #111;
  font-weight: bold;
  margin: 4px 0 14px;
  font-size: 12px;
}
.btn {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  transition: 0.3s;
}
.btn:hover {
  background: red;
  color: #fff;
  border-color: red;
}


header a img,
footer a img {
  transition: opacity 0.3s ease;
}

header a img:hover,
footer a img:hover {
  opacity: 0.85;
  cursor: pointer;
}
/* === SLIDER KHUSUS HALAMAN POST (Seperti beat.html) === */
.image-slider {
  position: relative;
  width: 100%;
  max-width: 700px; /* biar gak terlalu besar di desktop */
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border-radius: 12px;
  background: #f8f8f8;
}

.slider-wrapper {
  display: flex;
  width: 100%;
  transition: transform 0.4s ease-in-out;
  touch-action: pan-y;
}

.slider-wrapper img {
  width: 100%;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
}

/* === FOOTER === */
footer {
  background: #111;
  color: #fff;
  padding: 40px 5vw 25px;
  border-top: 3px solid #e60012;
  font-family: 'Arial', sans-serif;
  width: 100%;
  box-sizing: border-box;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 40px;
}

/* Bagian kiri */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.footer-logo img {
  width: 120px;
  height: auto;
}

.footer-address {
  font-size: 14px;
  color: #ccc;
  line-height: 1.6;
}

/* Menu tengah */
.footer-menu {
  flex: 0.5;
  text-align: center;
}

.footer-menu h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #fff;
}

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

.footer-menu ul li {
  margin-bottom: 5px;
}

.footer-menu ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.footer-menu ul li a:hover {
  color: #fff;
}

/* Ikuti Kami kanan */
.footer-social {
  flex: 0.5;
  text-align: right;
}

.footer-social h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #fff;
}

.social-icons a {
  color: #fff;
  font-size: 18px;
  margin-left: 10px;
  transition: transform 0.2s, color 0.3s;
}

.social-icons a:hover {
  color: #e60012;
  transform: scale(1.15);
}

/* Copyright */
footer small {
  display: block;
  text-align: center;
  margin-top: 25px;
  font-size: 12px;
  color: #aaa;
}

/* === Tombol WhatsApp Melayang === */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  z-index: 999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
  filter: brightness(0) invert(1); /* bikin logo putih */
}
.spesifikasi-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  justify-content: center;
}

.spesifikasi-tab {
  background: #333;
  color: #fff;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

.spesifikasi-tab:hover {
  background: #ff2a2a;
}

.spesifikasi-tab.active {
  background: #ff2a2a;
  color: #fff;
}

.spesifikasi-content {
  display: none;
}

.spesifikasi-content.active {
  display: block;
}

.slide-hint {
  text-align: center;
  font-style: italic;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 10px;
  animation: fadeSlide 2s ease-in-out infinite alternate;
}
@keyframes fadeSlide {
  from { opacity: 0.6; transform: translateY(0px); }
  to { opacity: 1; transform: translateY(-2px); }
}

/* === RESPONSIVE (Mobile) === */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }

  .footer-left, 
  .footer-menu, 
  .footer-social {
    flex: unset;
    text-align: center;
  }

  .social-icons a {
    margin-left: 8px;
    margin-right: 8px;
  }
}

/* === RESPONSIVE FIX (agar desktop tetap 1 foto per slide) === */
@media (min-width: 768px) {
  .slider-wrapper img {
    min-width: 100%;
    max-width: 100%;
  }
}

/* === Responsive Fix === */
@media (max-width: 900px) {
  h2 {
    font-size: 24px;
  }
  .tab {
    font-size: 17px;
  }
}

@media (max-width: 600px) {
  .motor-container {
    grid-template-columns: repeat(2, 1fr); /* 2 kolom di HP */
  }
  .motor-card h3 {
    font-size: 15px;
  }
  .btn {
    font-size: 13px;
    padding: 6px 10px;
  }
    .post-container h1 {
    font-size: 1.4rem;
  }
  .post-container img {
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  .motor-container {
    grid-template-columns: 1fr; /* fallback 1 kolom di layar super kecil */
  }
}

/* === Halaman Post (beat.html & lainnya) === */
.post-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  line-height: 1.7;
  color: #222;
}

.post-container h1 {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 20px;
  border-left: 5px solid red;
  padding-left: 10px;
}

.post-container img {
  display: block;
  max-width: 700px; /* batas lebar di desktop */
  width: 100%;
  height: auto;
  margin: 0 auto 20px auto; /* center dan jarak bawah */
}

.post-container p {
  margin-bottom: 18px;
  font-size: 16px;
}

/* Tombol kembali */
.back-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 10px 18px;
  background: red;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}
.back-btn:hover {
  background: #c40000;
}
