/* ==========================================================================
   1. SYSTEM VARIABLES & RESET
   ========================================================================== */
:root {
  --primary-color: #57C92F;
  --primary-hover: #46a623;
  --primary-light: #eefbe8;
  --dark-color: #1e293b;
  --text-color: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 30px -10px rgba(87, 201, 47, 0.15);
  --transition: all 0.3s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-white);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select {
  font: inherit;
}

/* ==========================================================================
   2. LAYOUT & UTILITIES
   ========================================================================== */
.wrap {
  width: 100%;
  max-width: 1140px;
  margin: auto;
  padding: 10px 20px;
}

.section {
  padding: 80px 0;
}

.centerText {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.eyebrow.lime {
  color: #3b82f6;
}

.sectionHead {
  margin-bottom: 48px;
}

.sectionHead h2 {
  font-size: 2.25rem;
  color: var(--dark-color);
  margin-bottom: 12px;
  line-height: 1.3;
}

.sectionHead p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
  transition: var(--transition);
}

.btnPrimary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btnPrimary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btnWhite {
  background-color: #ffffff;
  color: var(--dark-color);
  border-color: var(--border-color);
}

.btnWhite:hover {
  background-color: var(--bg-light);
  border-color: #cbd5e1;
}

.btn.big {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.fullWidth {
  width: 100%;
}

/* ==========================================================================
   3. ANNOUNCEMENT & HEADER (DARK GREEN BACK-GROUND)
   ========================================================================== */
.topnote {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(87, 201, 47, 0.2);
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #1b5e20 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandLogo {
  height: 100px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand span {
  display: flex;
  flex-direction: column;
}

.brand b {
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1.2;
}

.brand small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.links {
  display: flex;
  gap: 32px;
}

.links a {
  font-weight: 500;
  color: #ffffff !important;
  transition: opacity 0.2s ease;
}

.links a:hover {
  opacity: 0.8;
}

.navActions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navActions .btnPrimary {
  background-color: #ff9800 !important;
  border: none !important;
}

.navActions .btnPrimary a {
  color: #ffffff !important;
  text-decoration: none;
}

.menuBtn {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
  color: #ffffff !important;
  cursor: pointer;
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero {
  padding: 60px 0;
  background: linear-gradient(180deg, var(--primary-light) 0%, rgba(255,255,255,0) 100%);
}

.heroGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.pill {
  display: inline-block;
  background-color: rgba(87, 201, 47, 0.15);
  color: var(--primary-hover);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.heroText h1 {
  font-size: 3rem;
  line-height: 1.2;
  color: var(--dark-color);
  margin-bottom: 20px;
}

.heroText h1 em {
  font-style: normal;
  color: var(--primary-color);
}

.heroText p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.heroActions {
  display: flex;
  gap: 16px;
}

.heroVisual {
  position: relative;
  display: flex;
  justify-content: center;
}

.device {
  width: 100%;
  max-width: 420px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.deviceTop {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.deviceTop span {
  color: var(--primary-color);
}

.teacherStage {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--bg-light);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.teacher {
  font-size: 2.5rem;
}

.bubble {
  font-size: 0.9rem;
  background-color: #ffffff;
  padding: 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.deviceInfo strong {
  display: block;
  font-size: 1.1rem;
  margin: 4px 0 16px;
}

.deviceInfo button {
  width: 100%;
  padding: 12px;
  background-color: var(--dark-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.deviceInfo button:hover {
  background-color: var(--primary-color);
}

/* ==========================================================================
   5. SWIPER SLIDER SECTION (16:9)
   ========================================================================== */
.mainSlider {
  width: 100%;
  max-width: 1000px;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 32px auto 0;
  box-shadow: var(--shadow-md);
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  display: block;
}

/* ==========================================================================
   6. QUICK STATS SECTION
   ========================================================================== */
.quickStats {
  background: linear-gradient(135deg, rgba(238, 251, 232, 0.7) 0%, rgba(248, 250, 252, 0.9) 100%);
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px -5px rgba(87, 201, 47, 0.2);
  border-color: var(--primary-color);
}

.stat-box .icon {
  font-size: 2.2rem;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.focus-box .icon { background: #ffe4e6; }
.memory-box .icon { background: #fce7f3; }
.reflex-box .icon { background: #fef9c3; }
.confidence-box .icon { background: #e0f2fe; }

.stat-box:hover .icon {
  transform: scale(1.15) rotate(6deg);
}

.stat-box b {
  display: block;
  font-size: 1.25rem;
  color: var(--dark-color);
  margin-bottom: 6px;
  font-weight: 700;
}

.stat-box small {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  display: block;
}

/* ==========================================================================
   7. PROGRAM CARDS SECTION
   ========================================================================== */
.cards3 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.programCard {
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
  background-image: url('../images/nencamxuc.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 35%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.programCard > * {
  position: relative;
  z-index: 2;
}

.programCard.visible {
  opacity: 1;
  transform: translateY(0);
}

.programCard:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(87, 201, 47, 0.4);
}

.programIcon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.programIcon.green { background-color: var(--primary-light); }
.programIcon.yellow { background-color: #fef9c3; }
.programIcon.blue { background-color: #dbeafe; }

.miniBadge {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.programCard h3 {
  font-size: 1.5rem;
  color: var(--dark-color);
  margin-bottom: 12px;
}

.programCard p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

.programCard a {
  font-weight: 600;
  color: var(--primary-color);
}

.course-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  transform: translateY(-5px);
}

.click-hint {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary-color, #57c92f);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================================================
   8. IMPRESSIVE NUMBERS SECTION
   ========================================================================== */
.impressive-stats {
  position: relative;
  background: 
    linear-gradient(180deg, rgba(238, 251, 232, 0.85) 0%, rgba(255, 255, 255, 0.95) 100%),
    url('../images/bg.png') center/cover no-repeat;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
  z-index: 2;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  border: 1px solid rgba(87, 201, 47, 0.2);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-6px);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-color);
}

/* ==========================================================================
   9. TRIAL SECTION & FORM
   ========================================================================== */
.trial-section {
  padding: 60px 0;
  background-color: #f8fafc;
}

.trial-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: start;
}

.trial-info .badge-sub {
  color: var(--primary-color, #57c92f);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.trial-info h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark-color, #1e293b);
  margin: 12px 0 24px;
  line-height: 1.3;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-item .icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

.contact-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--dark-color, #1e293b);
}

.contact-item p, 
.contact-item a {
  margin: 2px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.95rem;
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--primary-color, #57c92f);
}

.map-wrapper {
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color, #e2e8f0);
}

.trial-form-card {
  background: #ffffff;
  padding: 32px;
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.form-header-box {
  background-color: #ffeb3b !important;
  border-radius: 12px;
  padding: 14px 10px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.form-header-box .form-title,
.form-header-box h3 {
  color: #0b6623 !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  text-transform: uppercase !important;
}

.badge-free {
  display: block !important;
  margin-top: 6px !important;
  color: #d32f2f !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  animation: pulseZoom 1.2s infinite ease-in-out !important;
}

@keyframes pulseZoom {
  0% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.08); opacity: 1; text-shadow: 0 0 8px rgba(211, 47, 47, 0.4); }
  100% { transform: scale(1); opacity: 0.95; }
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark-color, #1e293b);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary-color, #57c92f);
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color, #57c92f);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 8px;
}

.btn-submit:hover {
  background-color: #46a724;
}

/* ==========================================================================
   10. MODAL POPUP
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: zoomIn 0.25s ease-out;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #57c92f;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   11. FOOTER & FLOATING CONTACT
   ========================================================================== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.floating-contact {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: relative;
  animation: phoneShake 2s infinite ease-in-out;
  transition: transform 0.3s ease;
}

.float-btn.zalo { background: #0088FF; animation-delay: 0s; }
.float-btn.phone { background: var(--primary-color); color: #fff; font-size: 1.3rem; animation-delay: 0.3s; }

.float-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: pulseWave 2s infinite;
}

.float-btn.zalo::before { background: rgba(0, 136, 255, 0.5); }
.float-btn.phone::before { background: rgba(87, 201, 47, 0.5); }

.float-btn:hover {
  animation-play-state: paused;
  transform: scale(1.15) !important;
}

@keyframes phoneShake {
  0% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-15deg) scale(1.1); }
  20% { transform: rotate(15deg) scale(1.1); }
  30% { transform: rotate(-15deg) scale(1.1); }
  40% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes pulseWave {
  0% { width: 100%; height: 100%; opacity: 0.8; }
  100% { width: 160%; height: 160%; opacity: 0; }
}

/* ==========================================================================
   12. RESPONSIVE MOBILE & TABLET
   ========================================================================== */
@media (max-width: 992px) {
  .heroGrid, .cards3, .trial-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
  }
  .wrap, section {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }
  .nav { height: 64px; }
  .brandLogo { height: 120px; }
  .brand b { font-size: 0.9rem; }
  .brand small, .links, .navActions .btnWhite { display: none; }

  .links.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px;
    gap: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
  }

  .links.active a {
    font-size: 1rem;
    color: var(--dark-color) !important;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .menuBtn { display: block; }
  .navActions { gap: 6px; }
  .navActions .btn { padding: 6px 12px; font-size: 0.8rem; border-radius: 16px; }

  .hero { padding: 30px 0; }
  .heroText { text-align: center; }
  .heroText h1 { font-size: 1.8rem; }
  .heroText p { font-size: 0.95rem; }
  .heroActions { flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
  .heroActions .btn { width: 100%; max-width: 280px; padding: 12px 16px; font-size: 0.9rem; white-space: normal; }

  .stats, .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 24px; }
  .stat-number { font-size: 2.25rem; }

  .programCard {
    padding: 20px 16px !important;
    background-size: 100% 45% !important;
  }
  .programCard img, .programCard .cardMedia, .programCard .miniBadge {
    max-width: 100% !important;
    height: auto !important;
  }
}