/* Hocdii Homepage Focus v2.6.10 — PA 1A Royal Sky Blue + Hocdii Mascot Bridge */
#hcm-home-exam-banner,
#hcm-home-exam-banner *,
.hcm-day-resume-bar,
.hcm-day-resume-bar * {
  box-sizing: border-box;
}

/* ===== 1. PA 1A EXAM BANNER — ROYAL SKY BLUE + MASCOT BRIDGE + DUAL LIGHT BEAMS ===== */
#hcm-home-exam-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 224px;
  width: 100%;
  border-radius: 18px;
  border: 1px solid #cdddf8;
  background: linear-gradient(112deg, #f3f7ff 0%, #eaf2ff 55%, #e2edff 100%);
  overflow: hidden;
  margin: 18px 0 22px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .06);
  cursor: pointer;
  transition: box-shadow .22s ease, border-color .22s ease;
  font-family: var(--hd-font, "Be Vietnam Pro", "Segoe UI", Roboto, system-ui, sans-serif);
}

/* Dual staggered slow light beams (6s loop, 3s stagger — synced with Một ngày ở Nhật) */
#hcm-home-exam-banner::after,
#hcm-home-exam-banner .hcm-hf-shine {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  right: auto;
  left: -70%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), rgba(219, 234, 254, .34), transparent);
  transform: skewX(-22deg);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  animation: hcmHfSlowShine 6s ease-in-out infinite;
}

#hcm-home-exam-banner .hcm-hf-shine {
  animation-delay: 3s;
}

@keyframes hcmHfSlowShine {
  0% { left: -70%; opacity: 0; }
  8% { opacity: .85; }
  95%, 100% { left: 135%; opacity: 0; }
}

@keyframes hcmHfTabletShine {
  0% { left: -70%; opacity: 0; }
  8% { opacity: .85; }
  70%, 100% { left: 135%; opacity: 0; }
}

@media (hover: hover) and (pointer: fine) {
  #hcm-home-exam-banner:hover {
    border-color: #5a8ef0;
    box-shadow: 0 10px 28px rgba(37, 99, 235, .17), 0 0 0 2px rgba(59, 130, 246, .16);
  }
  #hcm-home-exam-banner:hover .hcm-hf-bg-art img {
    transform: scale(1.05);
    filter: brightness(1.03);
  }
  #hcm-home-exam-banner:hover .hcm-hf-bridge-mascot {
    transform: translateY(-4px) scale(1.035);
  }
  #hcm-home-exam-banner:hover .hcm-hf-cta {
    background: #1e40af !important;
    box-shadow: 0 5px 14px rgba(29, 78, 216, .28);
  }
  #hcm-home-exam-banner:hover .hcm-hf-cta svg {
    transform: translateX(4px);
  }
}

#hcm-home-exam-banner:active .hcm-hf-cta {
  background: #1e40af !important;
}

@media (max-width: 1023px) {
  #hcm-home-exam-banner::after,
  #hcm-home-exam-banner .hcm-hf-shine {
    animation-name: hcmHfTabletShine;
  }
}

@media (max-width: 600px) {
  #hcm-home-exam-banner::after,
  #hcm-home-exam-banner .hcm-hf-shine {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hcm-home-exam-banner::after,
  #hcm-home-exam-banner .hcm-hf-shine {
    animation: none;
    display: none;
  }
  #hcm-home-exam-banner,
  #hcm-home-exam-banner .hcm-hf-bg-art img,
  #hcm-home-exam-banner .hcm-hf-bridge-mascot,
  #hcm-home-exam-banner .hcm-hf-cta,
  #hcm-home-exam-banner .hcm-hf-cta svg {
    transition: none;
  }
  #hcm-home-exam-banner:hover .hcm-hf-bg-art img,
  #hcm-home-exam-banner:hover .hcm-hf-bridge-mascot {
    transform: none;
  }
}

.hcm-hf-bg-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-width: 48%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
}

.hcm-hf-bg-art img {
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  display: block;
  object-fit: contain;
  object-position: right center;
  transform-origin: right center;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), filter .4s ease;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 70%, rgba(0,0,0,.55) 88%, transparent 100%);
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 70%, rgba(0,0,0,.55) 88%, transparent 100%);
}

.hcm-hf-bg-art.is-contain img {
  padding: 12px 20px;
  -webkit-mask-image: none;
  mask-image: none;
  filter: drop-shadow(0 8px 18px rgba(15, 41, 66, .12));
}

/* Hocdii study mascot bridge between left content & right exam cover */
.hcm-hf-bridge {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 215px;
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.hcm-hf-bridge::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .16) 0%, rgba(14, 165, 233, .06) 52%, transparent 74%);
  pointer-events: none;
}

.hcm-hf-bridge-mascot {
  position: relative;
  height: 92% !important;
  width: auto !important;
  max-width: 100% !important;
  display: block;
  object-fit: contain;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
  filter: drop-shadow(0 10px 18px rgba(29, 78, 216, .14));
}

.hcm-hf-left {
  position: relative;
  z-index: 3;
  max-width: 48%;
  padding: 24px 28px;
}

.hcm-hf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #1d4ed8;
  margin-bottom: 6px;
}

.hcm-hf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  flex: none;
}

/* Strict Cocoon theme h2 reset — eliminates grey background/border bar */
#hcm-home-exam-banner .hcm-hf-title {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-left: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 6px !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  color: #0f2942 !important;
}
#hcm-home-exam-banner .hcm-hf-title::before,
#hcm-home-exam-banner .hcm-hf-title::after {
  display: none !important;
  content: none !important;
}

#hcm-home-exam-banner .hcm-hf-sub {
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e40af !important;
  line-height: 1.45 !important;
}
@supports (background-clip: text) {
  #hcm-home-exam-banner .hcm-hf-sub {
    background: linear-gradient(100deg, #1e3a8a 0%, #2563eb 40%, #0ea5e9 55%, #1e3a8a 75%);
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent !important;
    animation: hcmHfSubGlow 8s ease-in-out infinite;
  }
}
@keyframes hcmHfSubGlow {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0 50%; }
}

.hcm-hf-prog {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 310px;
  margin-bottom: 14px;
}

.hcm-hf-prog-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .14);
  overflow: hidden;
}

.hcm-hf-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

.hcm-hf-prog-pct {
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  white-space: nowrap;
}

.hcm-hf-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  background: #1d4ed8 !important;
  border: 1px solid #1d4ed8;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.3;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(29, 78, 216, .18);
  white-space: nowrap;
  transition: background-color .25s ease, box-shadow .25s ease;
}

.hcm-hf-cta svg {
  flex: none;
  transition: transform .2s ease;
}

.hcm-hf-cta:hover {
  background: #1e40af !important;
  box-shadow: 0 5px 14px rgba(29, 78, 216, .28);
  color: #fff !important;
}

/* Responsive bridge sizing */
@media screen and (max-width: 960px) {
  .hcm-hf-bridge {
    right: 175px;
    width: 220px;
  }
}

@media screen and (max-width: 820px) {
  .hcm-hf-bridge {
    display: none;
  }
  .hcm-hf-left {
    max-width: 64%;
  }
}

/* ===== 2. SINGLE ONGOING CONVERSATION BAR DOCKED UNDER "MỘT NGÀY Ở NHẬT" ===== */
.hcm-day-resume-bar {
  margin-top: 10px;
  margin-bottom: 18px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  font-family: "Be Vietnam Pro", "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

.hcm-day-resume-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding: 11px 16px;
  background: #f5fbfd;
  border: 1px solid #d5e9ef;
  border-radius: 14px;
  text-decoration: none !important;
  color: #0f2942 !important;
  box-shadow: 0 4px 14px rgba(15, 41, 66, .04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.hcm-day-resume-link:hover {
  background: #edf8fb;
  border-color: #8cc9d6;
  box-shadow: 0 6px 18px rgba(21, 110, 132, .09);
}

.hcm-dr-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.hcm-dr-play {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #156e84;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  padding-left: 2px;
}

.hcm-dr-body {
  min-width: 0;
  flex: 1;
}

.hcm-dr-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #156e84;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hcm-dr-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f2942;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hcm-dr-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.hcm-dr-mini-bar {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: rgba(21, 110, 132, .14);
  overflow: hidden;
}

.hcm-dr-mini-fill {
  height: 100%;
  border-radius: 999px;
  background: #14b8a6;
}

.hcm-dr-badge {
  background: #e2f4f7;
  color: #156e84;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.hcm-dr-arr {
  font-size: 15px;
  font-weight: 700;
  color: #156e84;
}

/* Hidden legacy redundant homepage blocks (strictly front-page JS toggle) */
.hcm-hf-replaced {
  display: none !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media screen and (max-width: 768px) {
  #hcm-home-exam-banner {
    min-height: 158px;
    border-radius: 18px;
    margin: 10px 0 14px;
  }
  .hcm-hf-bg-art {
    max-width: 46%;
  }
  .hcm-hf-bg-art.is-contain img {
    padding: 10px 12px;
  }
  .hcm-hf-left {
    max-width: 68%;
    padding: 16px 15px;
  }
  .hcm-hf-eyebrow {
    font-size: 10.5px;
    margin-bottom: 4px;
  }
  #hcm-home-exam-banner .hcm-hf-title {
    font-size: 17px !important;
    margin-bottom: 4px !important;
  }
  #hcm-home-exam-banner .hcm-hf-sub {
    font-size: 12px !important;
    margin-bottom: 9px !important;
  }
  .hcm-hf-prog {
    margin-bottom: 10px;
    gap: 8px;
  }
  .hcm-hf-cta {
    padding: 8px 15px;
    font-size: 12.5px;
  }

  .hcm-day-resume-link {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
  }
  .hcm-dr-left {
    align-items: flex-start;
  }
  .hcm-dr-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
  }
  .hcm-dr-right {
    width: 100%;
    padding-left: 38px;
    justify-content: space-between;
    gap: 8px;
  }
  .hcm-dr-mini-bar {
    flex: 1;
    width: auto;
  }
  .hcm-dr-badge {
    font-size: 11px;
    padding: 2px 8px;
  }
}
