/* ==============================
   TEDET Math Masters – Custom CSS
   ============================== */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero decorative blobs */
.blob {
  border-radius: 50%;
  filter: blur(40px);
  position: absolute;
  pointer-events: none;
}

/* Math Masters title style */
.mm-title {
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating animation for hero visual */
.float-anim { animation: float 4s ease-in-out infinite; }

/* CTA pulse */
.cta-pulse { animation: pulse-ring 2s ease-out infinite; }

/* Shimmer badge */
.shimmer-badge {
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 50%, #2563eb 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* Modal transition */
.modal-overlay {
  backdrop-filter: blur(4px);
}
.modal-enter {
  animation: fadeIn 0.2s ease;
}
.modal-card-enter {
  animation: fadeInUp 0.3s ease;
}

/* Step transition */
.step-content {
  animation: fadeInUp 0.3s ease;
}

/* Progress bar */
.progress-bar {
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form inputs */
.form-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: #fff;
  font-family: 'Noto Sans Thai', sans-serif;
}
.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-input.error {
  border-color: #ef4444;
}

/* Checkbox & Radio custom */
.custom-check {
  accent-color: #2563eb;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* Benefit card hover */
.benefit-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}

/* Pillar card */
.pillar-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pillar-card:hover {
  transform: translateY(-6px);
}

/* Nav link active */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

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

/* Testimonial card */
.testimonial-quote::before {
  content: '"';
  font-size: 4rem;
  line-height: 1;
  color: #bfdbfe;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-family: Georgia, serif;
}

/* Success check animation */
@keyframes checkmark {
  0%   { stroke-dashoffset: 50; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
.check-anim {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkmark 0.5s ease 0.2s forwards;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .modal-panel { margin: 0.75rem; border-radius: 1rem; }
}
