/* ===========================================
   HERO SECTION 
   =========================================== */
.hero {
  position: relative;
  /* Giảm chiều cao tối thiểu để bớt khoảng trắng trên/dưới */
  min-height: clamp(500px, 85vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
  max-width: 100vw;
}

/* Tầng nền/overlay của hero không ảnh hưởng flow */
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 159, 201, 0.05),
    transparent 60%
  );
  z-index: 2;
  pointer-events: none;
}

/* Hero badge với floating animation */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #009fc9, #3498db);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 159, 201, 0.3);
  animation: floatingBadge 3s ease-in-out infinite;
  position: relative;
  z-index: 10;
  transform: translateY(-20px);
  margin: 0;
}

/* Floating animation cho badge */
@keyframes floatingBadge {
  0%,
  100% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(-30px);
  }
}

/* Pulse effect cho icon */
.hero-badge i {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 1000px;
  width: 100%;
  padding: 0 30px;
  animation: fadeInUp 1s ease-out;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.2;
  /* Giảm khoảng cách dưới tiêu đề */
  margin-bottom: 28px;
  font-family: "Nunito", sans-serif;
  text-align: center;
  width: 100%;
}

/* Gradient text với shimmer effect */
.title-main {
  background: linear-gradient(135deg, #009fc9, #3498db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 15px;
  padding: 12px 0; /* Giảm padding để gọn hơn */
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

.title-accent {
  color: #2c3e50;
  display: block;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #555;
  /* Giảm khoảng cách dưới mô tả */
  margin-bottom: 36px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: 100%;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

/* ===========================================
   FEATURED COURSES SECTION
   =========================================== */
.featured-courses {
  padding: 0px;
  background: #f8fafb;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 20px;
  font-family: "Nunito", sans-serif;
  position: relative;
  display: inline-block;
  padding: 10px;
}

/* Underline decoration cho section title */
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #009fc9, #3498db);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Grid layout 2x2 cho courses */
.courses-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
}

/* Course card component */
.course-item {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid #e2e8f0;
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

/* Hover effect với transform */
.course-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(0, 159, 201, 0.2);
  border-color: rgba(0, 159, 201, 0.2);
}

.course-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  flex-shrink: 0;
}

.course-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.course-image img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  transition: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Placeholder cho course image */
.course-placeholder {
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, #009fc9, #3498db);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  transition: none;
  box-shadow: 0 8px 25px rgba(0, 159, 201, 0.3);
}

.course-info {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 260px;
}

.course-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 12px;
  font-family: "Nunito", sans-serif;
  line-height: 1.25;
}

/* Text truncation với webkit-line-clamp */
.course-description {
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Course footer luôn ở cuối card */
.course-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* Section padding adjustments */
.hero {
  padding: 0;
  /* Đồng bộ với rule ở trên */
  min-height: clamp(560px, 85vh, 900px);
}

.featured-courses {
  padding: 60px 0;
}

.value-props {
  padding: 100px 0;
}

/* ===========================================
  LAYOUT FIXES
  =========================================== */
.value-props {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.value-props .container,
.testimonials .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Responsive grid với auto-fit minmax */
.props-grid {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  justify-items: center;
}

.prop-card {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

/* Prevent horizontal overflow */
.value-props * {
  max-width: 100%;
  box-sizing: border-box;
}

.featured-courses,
.testimonials,
.value-props,
.cta-section {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 30px;
  overflow-x: hidden;
}

/* ===========================================
   VALUE PROPOSITIONS SECTION
   =========================================== */
.value-props {
  padding: 80px 0;
  background: white;
  position: relative;
}

.value-props .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.value-props .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.value-props .section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 15px;
  font-family: "Nunito", sans-serif;
}

.value-props .section-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Grid layout 3 columns */
.value-props .props-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 0 auto;
}

/* Value proposition card với fixed height */
.prop-card {
  text-align: center;
  padding: 40px 25px;
  background: #ffffff;
  border-radius: 20px;
  position: relative;
  overflow: hidden; /* clip inner glows neatly */
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  isolation: isolate; /* create stacking context to avoid artifacts */
}

/* Gradient border using masking avoids bottom-corner seams */
.prop-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px; /* border thickness */
  background: linear-gradient(
    135deg,
    rgba(0, 159, 201, 0.45),
    rgba(52, 152, 219, 0.45)
  );
  /* Masking to create a hollow gradient border */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.prop-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0, 159, 201, 0.18);
}

.prop-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #009fc9, #3498db);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  position: relative;
  box-shadow: 0 12px 28px rgba(0, 159, 201, 0.25);
}
.prop-icon::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 28px;
  background: radial-gradient(
    60% 60% at 50% 50%,
    rgba(0, 159, 201, 0.18),
    rgba(0, 0, 0, 0) 70%
  );
  filter: blur(2px);
  z-index: -1;
}

.prop-icon i {
  font-size: 2rem;
  color: white;
}

.prop-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #12223a;
  margin-bottom: 14px;
  font-family: "Nunito", sans-serif;
  line-height: 1.25;
}

.prop-card p {
  color: #425974;
  line-height: 1.55;
  font-size: 0.96rem;
  margin: 0;
}

/* CTA section: mềm viền, chuyển tiếp mượt với các section khác */
.cta-section {
  position: relative;
  /* Nền nhạt với chút highlight ở hai góc */
  background: radial-gradient(
      60% 80% at 80% 0%,
      rgba(0, 159, 201, 0.06),
      transparent 70%
    ),
    radial-gradient(
      70% 80% at 0% 100%,
      rgba(52, 152, 219, 0.06),
      transparent 70%
    ),
    #f9fcff; /* nhạt hơn để bớt gắt */
}

/* Tạo hiệu ứng fade ở cả 4 cạnh để liền mạch hoàn toàn */
.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* 4 lớp gradient phủ viền: trên, dưới, trái, phải */
  background: linear-gradient(
      to bottom,
      #ffffff 0%,
      rgba(249, 252, 255, 0) 120px
    ),
    linear-gradient(to top, #ffffff 0%, rgba(249, 252, 255, 0) 120px),
    linear-gradient(to right, #ffffff 0%, rgba(249, 252, 255, 0) 120px),
    linear-gradient(to left, #ffffff 0%, rgba(249, 252, 255, 0) 120px);
}

.cta-section .container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* đảm bảo nằm trên lớp fade */
  z-index: 1;
}

.cta-section .cta-content {
  text-align: center;
  background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85),
        rgba(255, 255, 255, 0.9)
      )
      padding-box,
    linear-gradient(135deg, rgba(0, 159, 201, 0.35), rgba(52, 152, 219, 0.35))
      border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 20px 45px rgba(0, 159, 201, 0.18);
  border-radius: 24px;
  padding: 40px 36px;
  max-width: 860px;
  width: 100%;
}

.cta-section .cta-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f213a;
  margin: 0 0 10px 0;
  font-family: "Nunito", sans-serif;
}

.cta-section .cta-content p {
  color: #425974;
  margin: 0 0 22px 0;
  font-size: 1.05rem;
}

/* Upgrade the CTA button appearance while keeping markup */
.cta-section .btn-white {
  background: linear-gradient(135deg, #009fc9, #3498db) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 16px 28px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 28px rgba(0, 159, 201, 0.35) !important;
}
.cta-section .btn-white:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 34px rgba(0, 159, 201, 0.45) !important;
}

/* ===========================================
   COURSES CTA SECTION
   =========================================== */
.courses-cta {
  text-align: center;
  padding: 40px 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  max-width: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cta-buttons {
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn:first-child {
  display: inline-flex;
  padding: 16px 32px;
  font-size: 16px;
  white-space: nowrap;
  max-width: 300px;
  text-align: center;
  border-radius: 50px;
}

.cta-buttons .btn:not(:first-child) {
  display: none;
}
