/* ==========================================================================
   Module: Hero Section — Mitsubishi Đồng Nai (Slider Version)
   BEM: .hero__*
   Phụ thuộc: variables.css, base.css, button.css, badge.css
   ========================================================================== */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-black);
  /* Kéo hero lên trùm body padding-top — loại bỏ khoảng trắng */
  margin-top: calc(-1 * (var(--header-height) + 36px));
  padding-top: calc(var(--header-height) + 36px);
}



.hero__slide {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: flex-start; /* Chuyển về căn đỉnh thay vì căn giữa */
  padding-top: 6rem; /* Tạo khoảng trống an toàn từ Header */
  overflow: hidden;
}

/* Animations using Swiper's active class */
.hero__badge-wrap,
.hero__title,
.hero__subtitle,
.hero__actions {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.swiper-slide-active .hero__badge-wrap { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.swiper-slide-active .hero__title      { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.swiper-slide-active .hero__subtitle   { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.swiper-slide-active .hero__actions    { opacity: 1; transform: translateY(0); transition-delay: 0.8s; }

/* ===== BACKGROUND ===== */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__video, .hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26,26,26,0.95) 0%,
    rgba(26,26,26,0.7) 40%,
    rgba(26,26,26,0.4) 70%,
    rgba(26,26,26,0.1) 100%
  );
  z-index: 1;
}

/* ===== CONTENT ===== */
.hero__content {
  position: relative;
  z-index: 10;
  padding-block: 2rem; /* Giảm padding để nội dung gần top hơn */
  max-width: 720px;
}

/* ===== BADGE ===== */
.hero__badge-wrap {
  margin-bottom: var(--space-2); /* Thu nhỏ khoảng cách badge */
}

/* ===== TITLE ===== */
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw + 1rem, 4rem); /* Cân chỉnh lại để mobile rớt xuống 2.2rem (35px) hợp lý hơn là 40px */
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  color: var(--color-white);
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero__title-highlight {
  background: linear-gradient(90deg, var(--color-primary) 0%, #B8922A 50%, var(--color-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine-gradient 5s linear infinite;
  display: block;
}

@keyframes shine-gradient {
  to { background-position: 200% center; }
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  margin-bottom: var(--space-8);
  max-width: 550px;
  font-weight: 500;
  border-left: 3px solid var(--color-primary);
  padding-left: 1.2rem;
}

/* ===== ACTIONS ===== */
.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.hero__actions .btn {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero__actions .btn--primary {
  background: linear-gradient(135deg, rgba(200, 0, 26, 0.4) 0%, rgba(200, 0, 26, 0.1) 100%) !important;
  color: #FFFFFF !important;
}

.hero__actions .btn--ghost {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
}

.hero__actions .btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.6) !important;
}

.hero__actions .btn--primary:hover {
  background: var(--color-primary) !important;
}

.hero__actions .btn--ghost:hover {
  background: #FFFFFF !important;
  color: #111 !important;
}

.hero__actions .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero__actions .btn--primary:hover {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.hero__actions .btn--ghost:hover {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  border-color: #FFFFFF !important;
}

.hero__actions .btn--ghost svg {
  transition: transform 0.3s ease;
}

.hero__actions .btn--ghost:hover svg {
  transform: translateX(4px);
  color: var(--color-primary);
}

/* Dash Pagination Style */
.hero__pagination.swiper-pagination {
  bottom: 80px !important;
  right: var(--container-padding, 2rem) !important;
  left: auto !important;
  width: auto !important;
  display: flex;
  gap: 8px;
  z-index: 50;
}

.hero__pagination .swiper-pagination-bullet {
  width: 20px;
  height: 2px;
  border-radius: 0;
  background: rgba(255,255,255,0.3);
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 !important;
}

.hero__pagination .swiper-pagination-bullet-active {
  background: var(--color-primary);
  width: 40px;
  box-shadow: 0 0 15px rgba(200, 0, 26, 0.4);
}

/* Fixed Stats Section */
.hero__stats-fixed {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  z-index: 40;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  width: fit-content;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.hero__stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.1);
}

/* ===== SCROLL INDICATOR ===== */
.hero__scroll {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}

.hero__scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  animation: hero-scroll 1.5s ease-in-out infinite;
}

@keyframes hero-scroll {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .hero, .hero__slide {
        min-height: 70vh;
        height: 70vh;
    }
    .hero__stats-fixed {
        bottom: 60px;
    }
    .hero__pagination.swiper-pagination {
        bottom: 120px !important;
    }
}

@media (max-width: 767px) {
  .hero {
    min-height: 65vh; /* Trả lại kích thước chuẩn, không chiếm toàn màn hình */
    height: 65vh;
    margin-top: calc(-1 * var(--header-height-mobile));
    padding-top: var(--header-height-mobile);
  }
  
  .hero__slide {
    height: 100%;
    padding-top: calc(var(--header-height-mobile) + 1rem); /* Căn chỉnh khoảng trống an toàn */
  }

  /* Zoom nhẹ ảnh/video mobile để khung tâm điểm không bị mất chi tiết (Portrait fallback) */
  .hero__video, .hero__img {
    object-position: center center;
    transform: scale(1.1);
  }

  .hero__content {
    padding-block: 0;
    margin-top: 0vh; /* Thu gọn triệt để cho 65vh */
    position: relative;
    z-index: 10;
  }

  /* Định hình lại Gradient lớp phủ phù hợp khuôn dọc (Portrait) của Mobile chứ không dùng ngang của PC */
  .hero__overlay {
    background: linear-gradient(
      to bottom,
      rgba(15, 15, 15, 0.8) 0%,   /* Tối phía trên để làm nổi bật Headline */
      rgba(15, 15, 15, 0.3) 40%,  /* Trong suốt ở giữa để khoe mũi xe */
      rgba(15, 15, 15, 0.45) 75%,
      rgba(10, 10, 10, 0.95) 100% /* Tối mịt sát đáy để nổi bật Stats Bar */
    );
  }

  .hero__badge-wrap {
    margin-bottom: 0.75rem;
  }
  
  /* Badge trên mobile thiết kế chìm tinh tế hơn (Glassmorphism Badge) */
  .hero__badge-wrap .badge--outline-gold {
    background: rgba(184, 146, 42, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(184, 146, 42, 0.3);
    color: var(--color-gold);
    font-size: 10px;
    padding: 6px 14px;
    display: inline-flex;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }

  .hero__title {
    font-size: 2.1rem;
    line-height: 1.15;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8); /* Bóng đen đậm hơn để chữ nảy lên trên hình */
    margin-bottom: 0.5rem;
  }
  
  .hero__subtitle {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
  }

  .hero__actions {
    flex-direction: row; /* Để ngang */
    gap: 8px; /* Kéo lại gần nhau */
    margin-bottom: 0;
  }

  .hero__actions .btn {
    width: auto; /* Thuộc tính auto thay vì ép 50-50 để nút nhỏ gọn lại */
    padding: 10px 16px !important; /* Ghi đè padding của nút lớn chuẩn */
    font-size: 11.5px; /* Giảm cỡ chữ để nút trông thanh thoát */
    font-weight: 700;
    border-radius: 6px;
    min-height: 42px; /* Chiều cao vừa ngón tay chạm thay vì to sụ */
  }

  .hero__actions .btn svg {
    width: 14px; /* Thu nhỏ icon bên trong */
    height: 14px;
  }

  /* Tạo lực phản hồi haptic giả lập (khi người bấm vào) */
  .hero__actions .btn:active {
    transform: scale(0.95);
    box-shadow: none;
  }

  /* Điều chỉnh bộ số hóa / Tính năng cố định không bị chạm viền */
  .hero__stats-fixed {
    bottom: 0;
    padding: 0;
    width: 100%;
    z-index: 50;
  }

  .hero__stats {
    gap: 0;
    justify-content: space-between;
    padding: 12px 15px; /* Thu gọn padding một chút */
    border-radius: 0; 
    border: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(15, 15, 15, 0.6); /* Glassmorphism hiện đại thay vì solid */
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    width: 100%;
  }

  .hero__stat-number {
    font-size: 1.05rem;
  }
  
  .hero__stat-label {
    font-size: 8.5px;
    opacity: 0.7;
  }

  .hero__pagination.swiper-pagination {
    bottom: 75px !important; /* Hạ xuống chút nữa sát viền Stats */
    justify-content: center;
    right: 0 !important;
    left: 0 !important;
  }
  
  .hero__pagination .swiper-pagination-bullet {
    height: 3px; /* Đầm đà hơn, giống app xe hơi */
    border-radius: 2px;
  }
  
  .hero__pagination .swiper-pagination-bullet-active {
    background: var(--color-white); /* Chấm hiện tại nên là màu trắng sang trọng */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  .hero__scroll {
    display: none; /* Ẩn chuột lăn trên điện thoại */
  }
}
