/* =========================================================
   HERO SLIDESHOW — module CSS dùng CHUNG cho:
     - Giao diện Client (public/index.html, `.hero`)
     - Live Preview trong Admin (public/admin.html, `.hero-preview-wrapper`)

   Tách riêng khỏi styles.css/admin.css để hai nơi LUÔN LUÔN giống hệt nhau
   về mặt CSS (đúng yêu cầu "Đồng bộ 100%" ở docs/prompt.md) — chỉ sửa MỘT
   chỗ duy nhất khi cần đổi giao diện Hero. Hành vi JS tương ứng nằm ở
   public/hero-slideshow.js.
   ========================================================= */

:root{
  --blue: #2f8fe0;
}

/* `.hero` = khung Hero thật trên trang chủ Client.
   `.hero-preview-wrapper` = khung Live Preview trong Admin — dùng LẠI đúng
   các class con bên dưới (.hero-slides-container/.hero-overlay/.hero-content/
   .hero-top/.features/.hero-controls-bar/...) thay vì một bộ class riêng, để
   không bao giờ lệch pha với giao diện Client (xem docs/prompt.md). */
.hero, .hero-preview-wrapper{
  position:relative;
  border-radius:16px;
  height:100%;
  min-height:0;
  overflow:hidden; /* cắt các lớp slide tuyệt đối theo đúng bo góc */
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  /* Ảnh nền tĩnh dự phòng: hiện ngay lập tức trước khi JS tải xong danh sách
     slide (hoặc khi JS bị tắt) — .hero-slide.active sẽ phủ lên trên khi sẵn sàng. */
  background-image: url('assets/apollo-hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Lớp chứa các slide ảnh nền tuyệt đối — render động từ /api/v1/hero-slides
   (Client) hoặc từ danh sách đang chỉnh trong Admin (Live Preview). */
.hero-slides-container{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
}
.hero-slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  opacity:0;
  transform:none !important;
  transition: opacity 1.0s ease-in-out;
}
.hero-slide.active{
  opacity:1;
  transform:none !important;
}

/* Vô hiệu hóa hoàn toàn scale/zoom trên slide */
.hero-slides-container.effect-kenburns .hero-slide,
.hero-slides-container.effect-kenburns .hero-slide.active{
  transform:none !important;
  transition: opacity 1.0s ease-in-out !important;
}

/* Lớp phủ gradient bảo đảm độ tương phản chữ — độ tối chỉnh được từ Admin
   qua biến CSS --hero-overlay-strength (0 - 0.8), set trực tiếp bằng JS.

   Màu gradient để TĨNH, chỉ điều khiển bằng `opacity`. Bản cũ nhúng biến vào
   trong `calc()` của từng chặng alpha (`calc(0.55 + strength * 0.70)`) nên kể
   cả khi kéo về 0%, đáy ảnh vẫn bị phủ đen cố định 55% — ảnh không bao giờ
   sáng đúng như tệp gốc. Với `opacity`, strength = 0 nghĩa là lớp phủ tắt
   hoàn toàn, ảnh giữ nguyên 100% độ sáng/tương phản/màu gốc. */
.hero-overlay{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background: linear-gradient(
    180deg,
    rgba(5,11,24,0.35) 0%,
    rgba(5,11,24,0.85) 100%
  );
  opacity: var(--hero-overlay-strength, 0.5);
  transition: opacity 0.3s ease;
}
html[data-theme="light"] .hero-overlay{
  /* Chỉ đổi màu nền; `opacity` kế thừa từ rule gốc bên trên. */
  background: linear-gradient(
    180deg,
    rgba(10,20,40,0.25) 0%,
    rgba(10,20,40,0.75) 100%
  );
}

/* Nội dung chữ + thẻ tính năng — luôn nổi trên cùng, giữ nguyên padding/scroll
   mà `.hero` từng có trước khi trở thành container slideshow. */
.hero-content{
  position:relative;
  z-index:3;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
  padding: clamp(20px, 3vh, 38px) clamp(20px, 2.4vw, 38px);
  overflow-y:auto;
}

/* ================= ĐIỀU HƯỚNG SLIDESHOW (Prev/Next, Centered Pill Dots) ================= */
.hero-nav-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:10;
  width:38px;
  height:38px;
  border-radius:50%;
  background:rgba(10,20,40,0.6);
  border:1px solid rgba(255,255,255,0.2);
  color:#fff;
  font-size:calc(22px + 2pt);
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0.5;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.hero-nav-btn:hover{
  opacity:1;
  background: rgba(47,143,224,0.8);
  border-color:#7fc4ff;
  transform: translateY(-50%) scale(1.1);
}
.hero-nav-btn.prev{ left:14px; }
.hero-nav-btn.next{ right:14px; }

/* Thanh chấm điều hướng căn giữa thu nhỏ 50% & sát đáy (Centered Pill Dots) */
.hero-dots-wrap, .hero-controls-bar{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  padding-top:2px;
  padding-bottom:4px;
  margin-top:auto;
}

.hero-dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background: rgba(5,11,24,0.55);
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

.hero-dot{
  width:5px;
  height:5px;
  border-radius:50%;
  background: rgba(255,255,255,0.35);
  cursor:pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-dot:hover{
  background: rgba(255,255,255,0.85);
  transform: scale(1.2);
}

/* Dấu chấm active: kéo dài thành hình viên thuốc nhỏ 16px × 5px */
.hero-dot.active{
  width:16px;
  height:5px;
  border-radius:999px;
  background: var(--blue, #2f8fe0);
  box-shadow: 0 0 8px rgba(47,143,224,0.85);
  transform: scale(1.0);
}

/* ================= TYPOGRAPHY & THẺ TÍNH NĂNG ================= */
.hero-top{position:relative;}
.hero-top .eyebrow{
  color: #5bb2ff;
  letter-spacing:2px;
  font-size:calc(13px + 2pt);
  font-weight:800;
  margin-bottom:8px;
  text-shadow:
    -1px -1px 0 rgba(3, 8, 20, 0.85),
     1px -1px 0 rgba(3, 8, 20, 0.85),
    -1px  1px 0 rgba(3, 8, 20, 0.85),
     1px  1px 0 rgba(3, 8, 20, 0.85),
     0 1px 4px rgba(0, 0, 0, 0.90);
}
.hero-top h1, .hero-title{
  font-size:calc(clamp(30px, 5.2vh, 56px) + 2pt);
  margin:0 0 clamp(8px, 1.4vh, 16px) 0;
  color: #ffffff;
  letter-spacing:2px;
  font-weight:800;
  text-shadow:
    -1px -1px 0 rgba(5, 11, 24, 0.75),
     1px -1px 0 rgba(5, 11, 24, 0.75),
    -1px  1px 0 rgba(5, 11, 24, 0.75),
     1px  1px 0 rgba(5, 11, 24, 0.75),
     0 2px 8px rgba(0, 0, 0, 0.85),
     0 0 16px rgba(5, 11, 24, 0.60);
}
.hero-top .underline{
  width:90px;height:4px;background:var(--blue);border-radius:2px;
  margin-bottom: clamp(8px, 1.4vh, 16px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.65), 0 0 8px rgba(47, 143, 224, 0.5);
}
.hero-top p{
  color: #f0f4fc;
  max-width:460px;
  line-height:1.55;
  font-size:calc(clamp(13px, 1.7vh, 15px) + 2pt);
  font-weight:500;
  text-shadow:
    -0.5px -0.5px 0 rgba(3, 8, 20, 0.80),
     0.5px -0.5px 0 rgba(3, 8, 20, 0.80),
    -0.5px  0.5px 0 rgba(3, 8, 20, 0.80),
     0.5px  0.5px 0 rgba(3, 8, 20, 0.80),
     0 1px 3px rgba(0, 0, 0, 0.85),
     0 2px 6px rgba(5, 11, 24, 0.75);
}
/* Khối đáy dưới của Hero: thẻ tính năng + thanh tiến trình + thanh điều
   hướng — `.hero-content{justify-content:space-between}` tự đẩy khối này
   xuống đáy, không cần `.features{position:absolute}` như bản cũ. */
.hero-bottom{
  display:flex;
  flex-direction:column;
  gap: clamp(10px, 1.4vh, 14px);
}
.features{
  display:flex;
  flex-direction:column;
  gap: clamp(9px, 1.6vh, 16px);
}
.feature{
  display:flex;
  align-items:flex-start;
  gap:14px;
  width:fit-content;
  max-width:100%;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,0.26);
  border-radius:12px;
  /* Kính mờ trong suốt: giữ chữ rõ nhưng vẫn nhìn thấy kiến trúc phía sau. */
  background:rgba(7,15,30,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 5px 16px rgba(3,8,20,0.14);
  backdrop-filter:blur(8px) saturate(115%);
  -webkit-backdrop-filter:blur(8px) saturate(115%);
}
.feature .icon{
  width: clamp(34px, 4.4vh, 44px);
  height: clamp(34px, 4.4vh, 44px);
  border-radius:10px;
  background: rgba(47,143,224,0.2);
  border:1px solid rgba(47,143,224,0.5);
  display:flex;align-items:center;justify-content:center;
  color:#7fc4ff;
  font-size:calc(20px + 2pt);
  flex-shrink:0;
}
.feature h3{margin:0 0 4px 0;font-size:calc(15px + 2pt);color:#fff;}
.feature p{margin:0;color:#c3ceE0;font-size:calc(13px + 2pt);}
