/* ===========================================================================
   NOVA English — Landing page (HTML version)
   Custom CSS bổ sung cho Tailwind CDN.
   =========================================================================== */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Lexend:wght@300;400;500;600;700&display=swap');

/*
 * KHÔNG ĐẶT :root { --primary, --secondary, --accent, --muted } Ở ĐÂY!
 * CSS variables được layout.blade.php inject inline <style> trước <link>
 * này, đọc từ user config. Nếu redefine ở đây, file css load SAU sẽ
 * override config user → admin đổi màu không có hiệu lực.
 * Default fallback đã có trong layout.blade.php.
 *
 * Các biến không phụ thuộc theme tokens (giữ ở đây OK):
 */
:root {
  --foreground: 214 52% 25%;
  --border: 214 20% 90%;
  --cream: #FFF9EC;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Lexend', sans-serif;
  color: hsl(var(--foreground));
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-heading {
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* ── Hide scrollbar nhưng vẫn cuộn được (nếu cần) ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Hero gradient text underline SVG path color ── */
.hero-underline path {
  stroke: url(#heroUnderlineGradient);
}

/* ── Animation: fade-in on scroll (.reveal) ──
   Element bắt đầu mờ + dịch xuống. Khi script.js thêm class .visible
   (qua IntersectionObserver), nó hiện ra với transition.
*/
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variants */
.reveal.from-left  { transform: translateX(-24px); }
.reveal.from-right { transform: translateX(24px); }
.reveal.from-left.visible,
.reveal.from-right.visible { transform: translateX(0); }

/* Stagger delays — class .delay-1, .delay-2 ... */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ── Hero: floating cards entrance ── */
@keyframes floatIn-left {
  from { opacity: 0; transform: scale(0.85) translateX(-20px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}
@keyframes floatIn-right {
  from { opacity: 0; transform: scale(0.85) translateX(20px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}
.float-card-left  { animation: floatIn-left  0.7s 1.0s ease-out both; }
.float-card-right { animation: floatIn-right 0.7s 1.25s ease-out both; }

@keyframes barGrow {
  from { width: 0; }
  to   { width: var(--bar-w, 75%); }
}
.bar-grow { animation: barGrow 0.8s 1.8s ease-out both; }

/* ── Slider: cross-fade cho ảnh About ── */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.slide.active {
  opacity: 1;
  z-index: 2;
}

/* Progress bar (slider auto-play indicator) */
@keyframes progressBar {
  from { width: 0%; }
  to   { width: 100%; }
}
.progress-bar.run {
  animation: progressBar 4s linear forwards;
}

/* ── Teachers carousel track ── */
.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* ── FAQ accordion ── */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.open .faq-content {
  max-height: 600px;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: hsl(var(--primary));
}
.faq-chevron {
  transition: transform 0.3s ease, color 0.2s ease;
}

/* ── Mobile menu slide ── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-menu.open {
  max-height: 500px;
}

/* ── Form input focus ring ── */
.form-input:focus,
.form-select:focus {
  outline: 2px solid hsl(var(--primary) / 0.4);
  outline-offset: 2px;
  border-color: hsl(var(--primary));
}

/* ── Misc utility tweaks ── */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -8px rgba(0,0,0,0.12);
}

/* ── Floating contact widget: pop-in cho 3 nút phụ ── */
@keyframes fcPopIn {
  from { opacity: 0; transform: translateY(16px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
[data-fc-items] .fc-item {
  animation: fcPopIn 0.22s ease-out both;
}

/* ── Backdrop grid for hero (very subtle dot pattern) ── */
.hero-dot-bg {
  background-image: radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 38px 38px;
}

/* ── Backdrop grid for courses section ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ── Star line for hero badge ── */
.star-line svg + svg { margin-left: 1px; }

/* ── Scroll-snap hide native arrows in number inputs (just in case) ── */
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ── Reduced motion support ── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .float-card-left, .float-card-right, .bar-grow, .slide,
  .carousel-track, .faq-content, .mobile-menu {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
