/* ==========================================================================
   section-2-bot.css — Đầu tư BOT & Hạ tầng (Figma node 1134:90)
   Band nền đỏ brand, 2 cột: nội dung trái + ảnh & card nổi phải.
   ========================================================================== */

.bot {
  position: relative;
  background-color: var(--dsh-red);
  color: #ffffff;
  overflow: hidden;
}

/* Vân trang trí mờ trên nền đỏ */
.bot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 500px at 85% 20%, rgba(255, 255, 255, .06), transparent 60%),
    radial-gradient(900px 400px at 10% 90%, rgba(0, 0, 0, .12), transparent 60%);
  pointer-events: none;
}

.bot > .container { position: relative; z-index: 1; }

/* Bootstrap .carousel-inner mặc định overflow:hidden. Không để card/bóng tràn
   ra ngoài .bot-visual (sẽ bị clip) — nới .bot-visual thêm khoảng trống. */
.bot .carousel-inner { padding-bottom: 8px; }

/* -------- Cột nội dung -------- */
.bot-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .85);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.bot-eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background-color: var(--dsh-gold);
}

.bot-title {
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.bot-lead {
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  line-height: 1.6;
  max-width: 40ch;
  margin-bottom: var(--space-4);
}

.bot-tags {
  color: rgba(255, 255, 255, .7);
  font-size: .875rem;
  letter-spacing: .02em;
  margin-bottom: var(--space-5);
}

.bot-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.bot-actions .btn { border-radius: 8px; }

/* Khớp Figma (node 1134:143): nút chính nền đen, chữ trắng + mũi tên */
.bot-actions .btn-discover {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #000000;
  --bs-btn-border-color: #000000;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #1a1a1a;
  --bs-btn-hover-border-color: #1a1a1a;
  --bs-btn-padding-x: 40px;
  --bs-btn-padding-y: 16px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bot-actions .btn-discover .arrow-ic {
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url("../images/arrow-right.svg") center / contain no-repeat;
  mask: url("../images/arrow-right.svg") center / contain no-repeat;
}

/* Khớp Figma (node 1247:3961): nút phụ nền trắng, chữ đỏ brand */
.bot-actions .btn-outline-light-2 {
  --bs-btn-color: var(--dsh-red);
  --bs-btn-border-color: #ffffff;
  --bs-btn-bg: #ffffff;
  --bs-btn-hover-color: var(--dsh-red);
  --bs-btn-hover-bg: rgba(255, 255, 255, .88);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .88);
  --bs-btn-padding-x: 40px;
  --bs-btn-padding-y: 16px;
  font-size: 1rem;
  font-weight: 600;
}

/* -------- Cột ảnh + card nổi -------- */
/* Padding phải/dưới tạo vùng cho card nhô ra ngoài ảnh + cho bóng đổ,
   mà không tràn khỏi .bot-visual (tránh bị .carousel-inner cắt). */
.bot-visual {
  position: relative;
  padding-right: 52px;
  padding-bottom: 44px;
}

.bot-image {
  width: 100%;
  /* Chiều cao cố định theo viewport => mọi slide có ảnh cao BẰNG NHAU,
     ảnh crop cover giữ tỉ lệ ~3:2 như Figma (761×508). */
  height: clamp(240px, 28vw, 500px);
  object-fit: cover;
  border-radius: var(--radius-lg);
  /* Khớp Figma: bóng cứng lệch xuống phải (x22 y18, blur 2) */
  box-shadow: 22px 18px 2px rgba(0, 0, 0, .25);
  display: block;
}

.bot-card {
  position: absolute;
  /* Card nhô ra ngoài góc dưới-phải ảnh (ngồi trong padding của .bot-visual) */
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background-color: #000000;
  border: 1px solid rgba(255, 255, 255, .63);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .35);
}

/* Vệt sáng đỏ trang trí trong card (khớp Figma: ellipse góc trên-phải + cạnh trái) */
.bot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(78px 41px at 92% 8%, rgba(154, 18, 32, .95), transparent 72%),
    radial-gradient(102px 54px at 8% 62%, rgba(154, 18, 32, .8), transparent 72%);
}

.bot-card > * { position: relative; z-index: 1; }

.bot-card h3 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.bot-card p {
  color: var(--dsh-muted);
  font-size: .82rem;
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

.bot-card .bot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-card .chip {
  font-size: .7rem;
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Chip là link tới trang thẻ: bỏ gạch chân, hover ánh vàng kim */
a.chip {
  text-decoration: none;
  transition: color var(--transition-base), border-color var(--transition-base), background-color var(--transition-base);
}

a.chip:hover {
  color: var(--dsh-white);
  border-color: var(--dsh-gold);
  background-color: rgba(201, 168, 76, .22);
}

/* -------- Điều khiển slider (trang trí, khớp Figma) -------- */
.bot-slider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
}

.bot-slider .progress-wrap { display: flex; align-items: center; gap: 16px; }

.bot-slider .counter {
  color: rgba(255, 255, 255, .7);
  font-size: .6875rem;
  font-weight: 500;
}

.bot-slider .dashes { display: flex; gap: 8px; align-items: center; padding: 0; margin: 0; border: 0; }

.bot-slider .dashes .dash {
  height: 2px;
  width: 12px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background-color: rgba(255, 255, 255, .4);
  transition: width var(--transition-base), background-color var(--transition-base);
}

.bot-slider .dashes .dash.active { width: 40px; background-color: var(--dsh-gold); }

.bot-slider .nav { display: flex; gap: 8px; }

.bot-slider .nav-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.bot-slider .nav-btn:hover { background-color: rgba(255, 255, 255, .15); }
.bot-slider .nav-btn img { width: 16px; height: 16px; }

/* Tablet/mobile: ảnh + card ghép thành 1 khối liền mạch (khớp Figma mobile
   node 1248:4523) — ảnh bo góc trên, card đen dính ngay dưới bo góc dưới. */
@media (max-width: 991.98px) {
  .bot-visual { padding-right: 0; padding-bottom: 0; }
  .bot-image {
    box-shadow: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-bottom: -1px; /* khít với card, tránh khe hở do làm tròn pixel */
  }
  .bot-card {
    position: static;
    width: auto;
    max-width: none;
    margin-top: 0;
    right: auto;
    bottom: auto;
    border-top: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}

/* Mobile (Figma op1-3-mobile, node 1248:4359): cột nội dung canh giữa,
   tiêu đề 1 dòng, 2 nút chia đôi trên cùng 1 hàng.
   Card nổi vẫn giữ chữ canh trái để dễ đọc. */
@media (max-width: 767.98px) {
  .bot-eyebrow { justify-content: center; }
  .bot-title,
  .bot-tags { text-align: center; }

  /* Tiêu đề 1 dòng: bỏ ngắt dòng cứng, thu nhỏ về 28px như Figma */
  .bot-title {
    font-size: clamp(1.5rem, 6.8vw, 1.75rem);
    line-height: 1.3;
  }
  .bot-title br { display: none; }

  .bot-lead {
    text-align: center;
    max-width: none;
    margin-inline: auto;
  }

  /* 2 nút chia đôi đều nhau, nằm trên cùng 1 hàng (không xuống dòng) */
  .bot-actions { flex-wrap: nowrap; gap: 12px; }
  .bot-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
  }
  .bot-actions .btn-discover,
  .bot-actions .btn-outline-light-2 {
    --bs-btn-padding-x: 14px;
    --bs-btn-padding-y: 10px;
    font-size: .875rem;
  }
  /* Figma mobile (node 1248:4379): nút chính đổi sang đỏ brand, không phải đen */
  .bot-actions .btn-discover {
    --bs-btn-bg: var(--dsh-red);
    --bs-btn-border-color: var(--dsh-red);
    --bs-btn-hover-bg: var(--dsh-red);
    --bs-btn-hover-border-color: var(--dsh-red);
  }

  .bot-card { text-align: left; }
}
