/* BK8 Malaysia — supplemental styles layered on top of the Tailwind CDN
   utility set. Kept small and hand-written: animations, focus states and the
   handful of interaction patterns (mega menu, FAQ accordion, skeletons) that
   utility classes alone don't express well. */

/* Defense-in-depth: no single component (long badge text, a wide table, etc.)
   should ever be able to force horizontal page scroll on mobile. */
html, body { max-width: 100%; overflow-x: hidden; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
  }
  .animate-float { animation: float 7s ease-in-out infinite; }

  @keyframes fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .reveal { opacity: 0; animation: fade-in-up 0.6s ease forwards; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Focus visibility (WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid #F9B905;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #071A35; }
::-webkit-scrollbar-thumb { background: #2D5E99; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #024BA0; }
html { scrollbar-color: #2D5E99 #071A35; scrollbar-width: thin; }

/* Mega menu + FAQ chevrons rotate off aria-expanded, no extra JS classes needed */
[data-mega-trigger][aria-expanded="true"] .mega-chevron,
.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-panel { display: grid; transition: grid-template-rows 0.3s ease; }

/* Skeleton loading shimmer, used while below-the-fold images lazy-load */
.skeleton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #0F2B52 25%, #143E70 37%, #0F2B52 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Glass panel helper for ad-hoc glassmorphism surfaces */
.glass {
  background: rgba(15, 43, 82, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(45, 94, 153, 0.5);
}

/* Sticky CTA visible state (toggled via main.js once the user has scrolled) */
#sticky-cta.cta-visible { transform: translateY(0); }

/* Back to top visible state */
#back-to-top.btt-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Long-form article prose */
.prose-bk8 h2 { font-family: "Poppins", sans-serif; font-weight: 700; color: #FFFFFF; font-size: 1.4rem; margin-top: 2.25rem; margin-bottom: 0.9rem; scroll-margin-top: 5.5rem; }
.prose-bk8 h3 { font-family: "Poppins", sans-serif; font-weight: 600; color: #FFFFFF; font-size: 1.125rem; margin-top: 1.75rem; margin-bottom: 0.6rem; scroll-margin-top: 5.5rem; }
.prose-bk8 p { color: #DCE8F7; line-height: 1.8; margin-bottom: 1.1rem; }
.prose-bk8 ul, .prose-bk8 ol { color: #DCE8F7; margin: 1rem 0 1.25rem 1.25rem; line-height: 1.8; }
.prose-bk8 ul { list-style: disc; }
.prose-bk8 ol { list-style: decimal; }
.prose-bk8 li { margin-bottom: 0.4rem; }
.prose-bk8 a { color: #F9B905; text-decoration: underline; text-underline-offset: 2px; }
.prose-bk8 strong { color: #FFFFFF; }
.prose-bk8 table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.prose-bk8 th { background: #143E70; color: #FFFFFF; text-align: left; padding: 0.65rem 0.9rem; font-weight: 600; }
.prose-bk8 td { padding: 0.65rem 0.9rem; border-top: 1px solid #2D5E99; color: #DCE8F7; }
.prose-bk8 blockquote { border-left: 3px solid #F9B905; padding: 0.25rem 0 0.25rem 1.1rem; color: #A2B7D0; font-style: italic; margin: 1.25rem 0; }

/* Print: keep it legible on white paper */
@media print {
  header, footer, #sticky-cta, #back-to-top, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
