.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(../img/Cover.png);
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgb(0, 0, 0) 3%,
    rgba(255, 255, 255, 0) 25%
  );
}

/* main */
.hero .content {
  position: relative;
  padding-top: 10%;
  padding-right: 15%;
  text-align: left;
  text-transform: uppercase;
}

.hero .content h1 {
  width: max-content;
  font-weight: 900;
  font-size: 56px;
  color: var(--sec);
  letter-spacing: 8.5px;
}

.hero .content h2 {
  width: max-content;
  margin-top: 15px;
  font-weight: 800;
  font-size: 48px;
  color: #7b0000;
  letter-spacing: 2.5px;
}

.hero .content .cta {
  position: relative;
  margin-top: 10px;
  width: 240px;
  height: 60px;
  background: var(--prm); /* pastikan var(--prm) sudah didefinisikan */
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none; /* hilangkan underline */
  color: white; /* pastikan teks terbaca */
  font-size: 1.1rem; /* atur ukuran teks */
  font-weight: bold;
  transition: background 0.3s ease, transform 0.1s ease;
  z-index: 9999;
}

.hero .content .cta:hover {
  background: #720000;
  transform: scale(1.03); /* efek hover */
}

.hero .content .cta:active {
  transform: scale(0.97); /* efek klik */
}

.hero .content a {
  font-weight: 800;
  font-size: 20px;
  color: var(--sec);
  text-transform: capitalize;
  margin: 0;
}

.visi-section {
  margin-top: 25px;
  width: 275px;
  height: 200px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.visi-item {
  width: 275px;
  display: flex;
  flex-direction: row;
  gap: 15px;
  align-items: center;
}

.visi-icon {
  width: 50px;
  height: 50px;
  background: var(--prm);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visi-icon-svg {
  color: #ffffff;
  width: 24px;
  height: 24px;
}

.visi-text {
  color: var(--sec);
  text-align: left;
  text-transform: capitalize;
}

.visi-text h4 {
  font-weight: 800;
  font-size: 20px;
}

.visi-text p {
  grid-area: 2 / 1;
  font-weight: 600;
  font-size: 16px;
}

/* fav */
.fav {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  margin: 7.5rem;
}

.fav h1 {
  font-weight: 800;
  font-size: 64px;
  text-transform: uppercase;
  letter-spacing: 10px;
  text-align: center;
  margin-bottom: 50px;
}

.fav h1 span {
  color: var(--prm);
}

.best-service {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
}

.service-card {
  position: relative;
  width: 400px;
  height: 350px;
  overflow: hidden;
  flex-shrink: 0;
}

.service-title {
  position: absolute;
  top: 15px;
  left: 20px;
  display: flex;
  flex-direction: row;
  gap: 25px;
  align-items: center;
  justify-content: flex-start;
}

.service-icon {
  width: 75px;
  height: 75px;
  background: #4c0000;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  text-transform: capitalize;
  width: 200px;
}

.service-info h3 {
  font-weight: 700;
  font-size: 24px;
  color: var(--sec);
}

.service-info .price {
  font-weight: 400;
  font-size: 16px;
  color: #ff5555;
}

.service-caption {
  position: absolute;
  top: 100px;
  left: calc(5%);
  width: 365px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-caption .description {
  font-weight: 400;
  font-size: 16px;
  color: var(--sec);
}

.service-list {
  font-weight: 400;
  font-size: 16px;
  color: var(--sec);
}

.service-list li {
  margin-bottom: 20px;
  margin-left: 24px;
}

.service-button {
  position: relative;
  top: 310px;
  left: 5%;
  width: 360px;
  height: 30px;
  background: var(--prm);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.service-button p {
  font-weight: 800;
  font-size: 20px;
  color: var(--sec);
  text-align: left;
}

.main {
  padding: 5rem;
}

.car-damage-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--sec);
}

.upload-area {
  background: #2a2a2a;
  border: 2px dashed #4a4a4a;
  border-radius: 15px;
  padding: 40px;
  margin: 30px 0;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--prm);
  background: #2f2f2f;
}

.upload-controls {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.file-input {
  display: none;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.btn-primary {
  background: var(--prm);
  color: var(--sec);
}

.btn-primary:hover {
  background: #7b0000;
  transform: translateY(-2px);
}

.btn-success {
  background: #28a745;
  color: var(--sec);
}

.btn-success:hover {
  background: #218838;
  transform: translateY(-2px);
}

.btn-info {
  background: #007bff;
  color: var(--sec);
}

.btn-info:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.btn-warning {
  background: #ffc107;
  color: #000000;
}

.btn-warning:hover {
  background: #e0a800;
  transform: translateY(-2px);
}

.image-preview {
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  max-width: 100%;
}

.preview-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.webcam-container {
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
}

.webcam-video {
  max-width: 100%;
  border-radius: 10px;
}

.results-container {
  background: #2a2a2a;
  border-radius: 15px;
  padding: 30px;
  margin-top: 30px;
  text-align: left;
}

.status-message {
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.status-message.info {
  background: rgba(23, 162, 184, 0.2);
  border: 1px solid #17a2b8;
  color: #17a2b8;
}

.status-message.error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #dc3545;
}

.status-message.success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #28a745;
}

.damage-results h3 {
  color: #ffc107;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.damage-item {
  background: #3a3a3a;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  border-left: 4px solid;
}

.damage-item.high {
  border-left-color: #dc3545;
}

.damage-item.medium {
  border-left-color: #ffc107;
}

.damage-item.low {
  border-left-color: #28a745;
}

.damage-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.damage-type {
  font-weight: 600;
  font-size: 16px;
}

.confidence-score {
  font-size: 14px;
  opacity: 0.8;
}

.confidence-bar {
  background: #4a4a4a;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
  transition: width 0.5s ease;
}

.no-damage {
  text-align: center;
  padding: 30px;
  color: #28a745;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* RESPONSIVE FIX MOBILE */

@media (max-width: 768px) {
  /* Hero section */
  .hero {
    min-height: auto;
    margin-top: 20%;
    padding: 80px 20px 40px; /* beri jarak agar konten tidak kepotong */
    text-align: left;
  }

  .hero .content {
    padding: 0;
    text-align: center;
  }

  .hero .content h1 {
    font-size: 32px;
    letter-spacing: 4px;
    width: 100%;
  }

  .hero .content h2 {
    font-size: 24px;
    letter-spacing: 1px;
    width: 100%;
  }

  .hero .content .cta {
    width: 180px;
    height: 50px;
    margin: 20px auto 0;
  }

  .hero .content .cta:hover {
    background: #720000;
    transform: scale(1.03); /* efek hover */
  }

  .hero .content .cta:active {
    transform: scale(0.97); /* efek klik */
  }

  .hero .content a {
    font-size: 16px;
  }

  .visi-section {
    width: 100%;
    height: auto;
    margin: 30px auto 0;
    gap: 15px;
    align-items: center;
  }

  .visi-item {
    width: 100%;
    justify-content: center;
  }

  .visi-text h4 {
    font-size: 18px;
  }

  .visi-text p {
    font-size: 14px;
  }

  /* Fav section */
  .fav {
    margin: 3rem 1rem;
  }

  .fav h1 {
    font-size: 32px;
    letter-spacing: 4px;
  }

  .best-service {
    flex-direction: column;
    gap: 15px;
    padding-bottom: 10px;
  }

  .service-card {
    width: 100%;
    max-width: 320px;
    min-width: 260px;
    height: auto;
    flex-shrink: 0;
    scroll-snap-align: center;
    padding: 15px;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .service-title {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 15px;
  }

  .service-info h3 {
    font-size: 18px;
  }

  .service-caption {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    padding: 0;
    margin-top: 10px;
  }

  .service-caption .description,
  .service-list {
    font-size: 14px;
  }

  .service-button {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-top: 15px;
  }

  .service-button p {
    font-size: 16px;
  }

  /* Main section */
  .main {
    padding: 2rem 1rem;
  }

  .car-damage-section {
    padding: 20px;
  }

  .section-title {
    font-size: 24px;
  }

  .upload-area {
    padding: 20px;
  }

  .upload-controls {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .results-container {
    padding: 20px;
  }

  .damage-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .damage-type {
    font-size: 14px;
  }

  .confidence-score {
    font-size: 12px;
  }
}
