/* ===================================================
   ConCanCode – Technology for Kids
   Main Stylesheet
   =================================================== */

/* ===== Google Fonts ===== */
/* ===== CSS Variables ===== */
:root {
  --primary: #1D4ED8;
  --primary-dark: #1E3A8A;
  --primary-mid: #2563EB;
  --primary-light: #3B82F6;
  --primary-xlight: #DBEAFE;
  --primary-bg: #EFF6FF;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-light: #FDE68A;
  --green: #10B981;
  --text-dark: #1E293B;
  --text-medium: #475569;
  --text-light: #94A3B8;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --transition: 0.3s ease;
  --font: 'Nunito', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: var(--font);
}

input,
select,
textarea {
  font-family: var(--font);
}

/* ===== Typography ===== */
h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
}

h4 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
}

/* ===== Layout Utilities ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-tag {
  display: inline-block;
  background: var(--primary-xlight);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.section-title {
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-medium);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(29, 78, 216, 0.4);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-white:hover {
  background: var(--primary-xlight);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.45);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.85rem;
}

/* ===== HEADER ===== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 44px;
  width: auto;
}

.logo .brand-logo-img {
  width: auto;
  height: 54px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .brand-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
}

.logo-text .brand-tagline {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-link .nav-arrow {
  font-size: 0.65rem;
  transition: transform var(--transition);
  opacity: 0.6;
}

.nav-item:hover>.nav-link .nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
  padding: 8px;
}

.nav-item:hover>.dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dark);
  transition: all var(--transition);
}

.dropdown-item:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.dropdown-item .d-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Nav CTA */
.nav-cta {
  margin-left: 16px;
  display: flex;
  align-items: center;
}

.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.88rem;
  transition: all var(--transition);
}

.btn-nav-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(29, 78, 216, 0.35);
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  background: none;
  border: none;
}

.menu-toggle:hover {
  background: var(--primary-bg);
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO SLIDER ===== */
.hero-slider {
  position: relative;
  margin-top: 72px;
  height: 620px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.slide.active .slide-bg {
  transform: scale(1);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
      rgba(15, 40, 100, 0.88) 0%,
      rgba(29, 78, 216, 0.72) 45%,
      rgba(29, 78, 216, 0.25) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.slide-inner {
  max-width: 80%;
  color: white;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--accent-light);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 22px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.slide-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  color: white;
  margin-bottom: 18px;
  line-height: 1.12;
}

.slide-title span {
  color: var(--accent-light);
}

.slide-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 36px;
  line-height: 1.75;
  max-width: 800px;
}

.slide-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Slider controls */
.slider-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.dot.active {
  background: white;
  width: 28px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
  transition: all var(--transition);
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.slider-prev {
  left: 24px;
}

.slider-next {
  right: 24px;
}

/* Floating stats on hero */
.hero-stats {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  gap: 14px;
  z-index: 10;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  text-align: center;
  color: white;
  min-width: 100px;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.82;
  letter-spacing: 0.4px;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  background: white;
}

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

.about-visual {
  position: relative;
}

.about-img-main {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
}

.about-img-float {
  position: absolute;
  bottom: -28px;
  right: -28px;
  width: 190px;
  height: 155px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 4px solid white;
  box-shadow: var(--shadow-xl);
}

.about-badge {
  position: absolute;
  top: -22px;
  left: -22px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.about-badge .big {
  font-size: 2.2rem;
  font-weight: 900;
  display: block;
  line-height: 1;
}

.about-badge .sm {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-content .section-title {
  text-align: left;
}

.about-content .section-tag {
  /* inherits */
}

.about-lead {
  font-size: 1.05rem;
  color: var(--text-medium);
  line-height: 1.85;
  margin-bottom: 28px;
}

.branch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.branch-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  transition: all var(--transition);
}

.branch-card:hover {
  background: var(--primary-xlight);
}

.branch-card .bc-icon {
  font-size: 1.3rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.branch-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.branch-card span {
  font-size: 0.82rem;
  color: var(--text-medium);
}

/* ===== COURSES SECTION ===== */
.courses-section {
  background: var(--gray-50);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.course-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.course-thumb {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.course-card:hover .course-thumb img {
  transform: scale(1.08);
}

.course-level {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 14px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-body {
  padding: 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.course-desc {
  font-size: 0.88rem;
  color: var(--text-medium);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.course-age {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 700;
}

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

.course-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  transition: gap var(--transition);
}

.course-cta:hover {
  gap: 8px;
}

/* ===== BENEFITS SECTION ===== */
.benefits-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1D4ED8 55%, #2563EB 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.benefits-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.benefits-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 380px;
  height: 380px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  pointer-events: none;
}

.benefits-section .section-title {
  color: white;
}

.benefits-section .section-subtitle {
  color: rgba(255, 255, 255, 0.78);
}

.benefits-section .section-tag {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  position: relative;
  z-index: 1;
}

.benefit-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  transition: all var(--transition);
}

.benefit-card:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}

.benefit-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 20px;
}

.benefit-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}

.benefit-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.72;
}

/* ===== GALLERY SECTION ===== */
.gallery-section {
  background: white;
}

/* ===== SHORTS SECTION ===== */
.shorts-section {
  background: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29, 78, 216, 0.65), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ===== VIDEO SECTION (Workshop) – light dot grid pattern ===== */
.video-section {
  background-color: #F8FAFF;
  background-image:
    radial-gradient(circle, #C7D7FF 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  position: relative;
  overflow: hidden;
}

.video-section::before { display: none; }
.video-section::after  { display: none; }

.video-section .container { position: relative; z-index: 1; }

/* Reset text màu về tối (nền trắng) */
.video-section .section-title { color: var(--text-dark); }
.video-section .section-title::after {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.video-section .section-title .text-gradient {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 50%, #0EA5E9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.video-section .section-subtitle { color: var(--text-medium); }
.video-section .section-tag {
  background: var(--primary-xlight) !important;
  color: var(--primary) !important;
  border: none !important;
}
.video-section .btn-outline {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}
.video-section .btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.video-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  aspect-ratio: 16/9;
  max-width: 880px;
  margin: 0 auto;
  background: var(--primary-dark);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
  cursor: pointer;
  position: relative;
}

.play-circle {
  width: 86px;
  height: 86px;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 20px;
  transition: all var(--transition);
}

.video-placeholder:hover .play-circle {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.1);
}

.video-label {
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.9;
}

/* ===== SCHEDULE SECTION ===== */
.schedule-section {
  background-color: #F8FAFF;
  background-image:
    radial-gradient(circle, #C7D7FF 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  position: relative;
}

.schedule-section::before { display: none; }

.schedule-section .container {
  position: relative;
  z-index: 1;
}

.tab-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.tab-btn {
  padding: 10px 26px;
  border-radius: 50px;
  border: 2px solid var(--gray-200);
  background: white;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-medium);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.38);
  transform: translateY(-2px);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule-tbl {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.schedule-tbl thead {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-mid));
  color: white;
}

.schedule-tbl th {
  padding: 16px 22px;
  text-align: left;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}

.schedule-tbl td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
  color: var(--text-medium);
}

.schedule-tbl tbody tr:last-child td {
  border-bottom: none;
}

.schedule-tbl tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.schedule-tbl tbody tr:hover {
  background: var(--primary-bg);
}

/* Branch info + map below schedule table */
.branch-info {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  margin-top: 24px;
  padding: 28px 32px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-xlight);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.08);
}
.branch-info-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.branch-info-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}
.branch-info-address {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.5;
}
.branch-info-phone {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.branch-info-phone a {
  color: var(--primary);
  text-decoration: none;
}
.branch-info-phone a:hover { text-decoration: underline; }
.branch-map iframe {
  width: 100%;
  height: 240px;
  border-radius: 10px;
  border: 0;
  display: block;
}
@media (max-width: 768px) {
  .branch-info { grid-template-columns: 1fr; }
  .branch-map iframe { height: 200px; }
}

.badge-open {
  background: #D1FAE5;
  color: #065F46;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge-coming {
  background: #FEF3C7;
  color: #92400E;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge-full {
  background: #FEE2E2;
  color: #991B1B;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
}

.contact-section::before,
.contact-section::after { display: none; }

/* Layout gọn – 1 card ngang */
.contact-compact {
  display: flex;
  align-items: center;
  gap: 48px;
  background: white;
  border-radius: var(--radius-2xl);
  padding: 52px 56px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}
.contact-compact-info { flex: 1; min-width: 0; }
.contact-compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 0.88rem;
  color: var(--text-medium);
}
.contact-compact-meta a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
.contact-compact-meta a:hover { text-decoration: underline; }
.contact-compact-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-compact-action .btn-primary {
  animation: ctaPulse 3.2s ease-in-out infinite;
}
@media (max-width: 768px) {
  .contact-compact {
    flex-direction: column;
    padding: 28px 20px;
    gap: 24px;
    text-align: center;
  }
  .contact-compact-meta { justify-content: center; }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: center;
}

.contact-info h3 {
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.contact-info p {
  color: var(--text-medium);
  line-height: 1.82;
  margin-bottom: 32px;
}

.c-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.c-point {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
}

.c-point-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.form-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 42px;
  box-shadow: var(--shadow-xl);
}

.form-card h3 {
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.form-card .form-sub {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 26px;
}

.f-group {
  margin-bottom: 20px;
}

.f-group label {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.f-group input,
.f-group select,
.f-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  background: white;
  appearance: none;
}

.f-group input::placeholder,
.f-group textarea::placeholder {
  color: var(--text-light);
}

.f-group input:focus,
.f-group select:focus,
.f-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.f-group textarea {
  resize: vertical;
  min-height: 100px;
}

.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 12px;
  text-align: center;
}

/* ===== FOOTER ===== */
#site-footer {
  background: var(--primary-dark);
  color: white;
}

.footer-top {
  padding: 64px 0 44px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 44px;
}

.footer-logo {
  margin-bottom: 20px;
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 10px;
  background: white;
}

.footer-logo .brand-logo-img { height: 48px; }

.footer-logo .brand-name {
  color: white;
}

.footer-logo .brand-tagline {
  color: rgba(255, 255, 255, 0.55);
}

.footer-about {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.85;
  margin-bottom: 26px;
}

.social-row {
  display: flex;
  gap: 10px;
}

.soc-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--transition);
  text-decoration: none;
}

.soc-btn:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.soc-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.f-col-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: white;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.f-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.f-links a {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
}

.f-links a:hover {
  color: white;
}

.f-links a::before {
  content: '›';
  color: var(--primary-light);
  font-weight: 900;
  font-size: 1rem;
}

.f-branches {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.f-branch {
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.f-branch strong {
  display: block;
  font-size: 0.84rem;
  color: white;
  margin-bottom: 4px;
}

.f-branch span {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 1px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-row p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: white;
}

/* ================================================
   DESIGN ENHANCEMENTS
   ================================================ */

/* ── Floating decorative icons ── */
.deco-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.deco-icons span {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.16;
  animation: floatDeco 9s ease-in-out infinite;
  user-select: none;
  line-height: 1;
  display: block;
}

@keyframes floatDeco {
  0%,100% { transform: translateY(0)   rotate(-4deg) scale(1);    }
  33%      { transform: translateY(-16px) rotate(4deg)  scale(1.06); }
  66%      { transform: translateY(-6px)  rotate(-2deg) scale(0.97); }
}

/* Workshop icons – hidden on white bg */
.video-section .deco-icons { display: none; }

/* Workshop icons */
.video-section .deco-icons span:nth-child(1)  { top:8%;    left:4%;   font-size:3.5rem; animation-delay:0s;    animation-duration:10s; }
.video-section .deco-icons span:nth-child(2)  { top:14%;   right:5%;  font-size:2.5rem; animation-delay:2s;    animation-duration:8s;  }
.video-section .deco-icons span:nth-child(3)  { top:52%;   left:1.5%; font-size:2.2rem; animation-delay:4s;    animation-duration:9s;  }
.video-section .deco-icons span:nth-child(4)  { bottom:14%;left:16%;  font-size:3rem;   animation-delay:1s;    animation-duration:11s; }
.video-section .deco-icons span:nth-child(5)  { bottom:18%;right:6%;  font-size:2.8rem; animation-delay:3s;    animation-duration:7s;  }
.video-section .deco-icons span:nth-child(6)  { top:35%;   right:2%;  font-size:2rem;   animation-delay:5s;    animation-duration:12s; }

/* Contact icons – hidden (no dark bg) */
.contact-section .deco-icons { display: none; }

/* ── Gradient text ── */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 50%, #0EA5E9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section title underline accent ── */
.section-title {
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Left-aligned titles don't center the underline */
.about-content .section-title::after {
  left: 0;
  transform: none;
}

.contact-info .section-title::after {
  left: 0;
  transform: none;
}

/* ── Hero floating shapes (animation) ── */
.hero-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.hero-shape-1 {
  width: 320px;
  height: 320px;
  right: 5%;
  top: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, .2) 0%, transparent 70%);
  animation: floatBlob 7s ease-in-out infinite;
}

.hero-shape-2 {
  width: 200px;
  height: 200px;
  right: 22%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(245, 158, 11, .18) 0%, transparent 70%);
  animation: floatBlob 9s ease-in-out infinite reverse;
}

.hero-shape-3 {
  width: 140px;
  height: 140px;
  left: 42%;
  top: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, .1) 0%, transparent 70%);
  animation: floatBlob 5.5s ease-in-out infinite 1.5s;
}

.hero-shape-4 {
  width: 80px;
  height: 80px;
  left: 35%;
  bottom: 20%;
  background: radial-gradient(circle, rgba(16, 185, 129, .15) 0%, transparent 70%);
  animation: floatBlob 6s ease-in-out infinite 3s;
}

@keyframes floatBlob {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-22px) scale(1.07);
  }
}

/* Hero floating tech icons */
.hero-deco { z-index: 1; }
.hero-deco span { opacity: 0.22; }
.hero-deco span:nth-child(1) { top:18%;  right:12%; font-size:3.5rem; animation-delay:0s;   animation-duration:10s; }
.hero-deco span:nth-child(2) { top:55%;  right:22%; font-size:2.5rem; animation-delay:2s;   animation-duration:8s;  }
.hero-deco span:nth-child(3) { top:28%;  right:4%;  font-size:2.2rem; animation-delay:4s;   animation-duration:9s;  }
.hero-deco span:nth-child(4) { bottom:22%;right:16%;font-size:3rem;   animation-delay:1.5s; animation-duration:12s; }
.hero-deco span:nth-child(5) { top:12%;  right:30%; font-size:2rem;   animation-delay:3s;   animation-duration:7s;  }

/* Hero CTA pulse */
@keyframes ctaPulse {

  0%,
  100% {
    box-shadow: 0 6px 20px rgba(245, 158, 11, .4);
  }

  50% {
    box-shadow: 0 8px 32px rgba(245, 158, 11, .6), 0 0 0 10px rgba(245, 158, 11, .06);
  }
}

.btn-accent.btn-lg {
  animation: ctaPulse 3.2s ease-in-out infinite;
}

/* ── About section background decoration ── */
.about-section {
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(219, 234, 254, .7) 0%, transparent 65%);
  pointer-events: none;
}

.about-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(254, 243, 199, .6) 0%, transparent 65%);
  pointer-events: none;
}

.about-section .container {
  position: relative;
  z-index: 1;
}

/* ── Course card color personality ── */
.course-card::before {
  content: '';
  display: block;
  height: 6px;
  flex-shrink: 0;
}

/* Gradient top bar per card color */
.course-card[data-color="orange"]::before {
  background: linear-gradient(90deg, #FF6B35, #FBBF24);
}

.course-card[data-color="yellow"]::before {
  background: linear-gradient(90deg, #F97316, #FCD34D);
}

.course-card[data-color="blue"]::before {
  background: linear-gradient(90deg, #1D4ED8, #06B6D4);
}

.course-card[data-color="purple"]::before {
  background: linear-gradient(90deg, #7C3AED, #EC4899);
}

.course-card[data-color="green"]::before {
  background: linear-gradient(90deg, #059669, #10B981);
}

.course-card[data-color="teal"]::before {
  background: linear-gradient(90deg, #0F766E, #2563EB);
}

/* Badge color matches card */
.course-card[data-color="orange"] .course-level {
  background: #EA580C;
}

.course-card[data-color="yellow"] .course-level {
  background: #D97706;
}

.course-card[data-color="purple"] .course-level {
  background: #7C3AED;
}

.course-card[data-color="green"] .course-level {
  background: #059669;
}

.course-card[data-color="teal"] .course-level {
  background: #0F766E;
}

/* Colored hover shadow */
.course-card[data-color="orange"]:hover {
  box-shadow: 0 22px 48px rgba(255, 107, 53, .22);
}

.course-card[data-color="yellow"]:hover {
  box-shadow: 0 22px 48px rgba(249, 115, 22, .22);
}

.course-card[data-color="blue"]:hover {
  box-shadow: 0 22px 48px rgba(29, 78, 216, .22);
}

.course-card[data-color="purple"]:hover {
  box-shadow: 0 22px 48px rgba(124, 58, 237, .22);
}

.course-card[data-color="green"]:hover {
  box-shadow: 0 22px 48px rgba(5, 150, 105, .22);
}

.course-card[data-color="teal"]:hover {
  box-shadow: 0 22px 48px rgba(15, 118, 110, .22);
}

/* ── Benefit cards – unique icon color per position ── */
.benefit-card:nth-child(1) .benefit-icon {
  background: rgba(249, 115, 22, .22);
  color: #EA580C;
}

.benefit-card:nth-child(2) .benefit-icon {
  background: rgba(16, 185, 129, .2);
  color: #059669;
}

.benefit-card:nth-child(3) .benefit-icon {
  background: rgba(245, 158, 11, .22);
  color: #B45309;
}

.benefit-card:nth-child(4) .benefit-icon {
  background: rgba(139, 92, 246, .22);
  color: #7C3AED;
}

.benefit-card:nth-child(5) .benefit-icon {
  background: rgba(236, 72, 153, .2);
  color: #DB2777;
}

.benefit-card:nth-child(6) .benefit-icon {
  background: rgba(6, 182, 212, .2);
  color: #0891B2;
}

.benefit-card:nth-child(7) .benefit-icon {
  background: rgba(59, 130, 246, .2);
  color: #2563EB;
}

.benefit-card:nth-child(8) .benefit-icon {
  background: rgba(234, 179, 8, .22);
  color: #B45309;
}

/* ===== ZALO FAB ===== */
.zalo-fab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: zaloFloat 3s ease-in-out infinite;
}

.zalo-fab img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
}

.zalo-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 28px rgba(0, 162, 255, 0.45);
}

.zalo-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #0068FF;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
}

.zalo-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #0068FF;
}

.zalo-fab:hover .zalo-tooltip {
  opacity: 1;
}

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

/* ── Shared Float Animations ── */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

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

/* ── Schedule content column ── */
.course-content-cell {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.55;
  max-width: 320px;
}

/* ── Schedule table accent on first cell ── */
.schedule-tbl tbody tr td:first-child {
  border-left: 3px solid transparent;
  transition: border-color var(--transition);
}

.schedule-tbl tbody tr:hover td:first-child {
  border-left-color: var(--primary);
}

/* ── Wavy section separator ── */
.wave-sep {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -2px;
}

.wave-sep svg {
  display: block;
  width: 100%;
}

/* ── Gallery section dots pattern ── */
.gallery-section {
  position: relative;
}

.gallery-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background-image: radial-gradient(circle, var(--primary-xlight) 2px, transparent 2px);
  background-size: 20px 20px;
  opacity: 0.6;
  pointer-events: none;
}

/* ── Stat pill shimmer on hover ── */
.stat-pill {
  transition: all var(--transition);
}

.stat-pill:hover {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-3px);
}

/* ── Section tag color variants ── */
.tag-orange {
  background: #FFF3E0 !important;
  color: #EA580C !important;
  border: none;
}

.tag-purple {
  background: #F3E5F5 !important;
  color: #7C3AED !important;
  border: none;
}

.tag-green {
  background: #ECFDF5 !important;
  color: #059669 !important;
  border: none;
}

.tag-pink {
  background: #FDF2F8 !important;
  color: #DB2777 !important;
  border: none;
}

.tag-teal {
  background: #F0FDFA !important;
  color: #0F766E !important;
  border: none;
}

/* ── Benefit section tag ── */
.benefits-section .section-title::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, .6), var(--accent-light));
}

/* ── Contact section decorative background ── */
.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(29, 78, 216, .08) 0%, transparent 65%);
  pointer-events: none;
}

/* ===== BACK TO TOP ===== */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  border: none;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.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;
}

/* ===== MISC ===== */
.divider {
  width: 64px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 0 auto 20px;
}

.view-all-wrap {
  text-align: center;
  margin-top: 36px;
}

/* Auto galleries: preserve the visual orientation of each source image. */
[data-auto-images] figure.auto-image-landscape {
  aspect-ratio: 4 / 3 !important;
}

[data-auto-images] figure.auto-image-portrait {
  aspect-ratio: 3 / 4 !important;
}

[data-auto-images] figure.auto-image-square {
  aspect-ratio: 1 / 1 !important;
}

[data-auto-images] figure > img {
  width: 100%;
  height: 100%;
  object-position: center;
}

[data-auto-images] figure[role="button"] {
  cursor: zoom-in;
}

[data-auto-images] figure[role="button"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

.auto-image-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 82px 34px;
  background: rgba(2, 10, 25, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.auto-image-modal.open {
  opacity: 1;
  visibility: visible;
}

.auto-image-modal-content {
  display: flex;
  max-width: min(1200px, 100%);
  max-height: 100%;
  margin: 0;
  align-items: center;
  flex-direction: column;
}

.auto-image-modal-content img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 145px);
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

.auto-image-modal-content figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, .82);
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
}

.auto-image-modal-count {
  margin-top: 5px;
  color: rgba(255, 255, 255, .48);
  font-size: .75rem;
}

.auto-image-modal-close,
.auto-image-modal-nav {
  position: fixed;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s, transform .2s;
}

.auto-image-modal-close:hover,
.auto-image-modal-nav:hover {
  background: rgba(255, 255, 255, .23);
}

.auto-image-modal-close {
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
}

.auto-image-modal-nav {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.auto-image-modal-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.auto-image-modal-prev {
  left: 20px;
}

.auto-image-modal-next {
  right: 20px;
}

@media (max-width: 640px) {
  .auto-image-modal {
    padding: 58px 14px 30px;
  }

  .auto-image-modal-nav {
    top: auto;
    bottom: 18px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .auto-image-modal-nav:hover {
    transform: scale(1.06);
  }

  .auto-image-modal-prev {
    left: calc(50% - 58px);
  }

  .auto-image-modal-next {
    right: calc(50% - 58px);
  }

  .auto-image-modal-content img {
    max-height: calc(100vh - 170px);
  }
}

/* ===== WORKSHOP VIDEO LAYOUT ===== */
/* 1 featured (left) + 3 stacked small (right) */
.workshop-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* Left column – 1 large video */
.workshop-featured {
  flex: 1.9;
  min-width: 0;
  display: flex;
}

.workshop-featured .vid-card {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.workshop-featured .vid-thumb {
  flex: 1;
  /* fills the full height of the right stack */
  aspect-ratio: unset;
}

/* Right column – 3 small videos stacked */
.workshop-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workshop-stack .vid-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.workshop-stack .vid-thumb {
  flex: 1;
  aspect-ratio: unset;
}

/* Shared card styles */
.vid-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: var(--shadow-md);
}

.vid-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

.vid-thumb {
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 16/9;
  /* default; overridden by featured/stack rules above */
}

.vid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.vid-card:hover .vid-thumb img {
  transform: scale(1.06);
}

.vid-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity var(--transition);
}

.vid-play-btn {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  transition: all var(--transition);
}

.vid-card.featured .vid-play {
  opacity: 1;
}

.vid-card.featured .vid-play-btn {
  width: 72px;
  height: 72px;
  font-size: 2.2rem;
}

.vid-card:hover .vid-play {
  opacity: 1;
}

.vid-card:hover .vid-play-btn {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.3);
}

.vid-info {
  padding: 12px 16px 14px;
  background: white;
  flex-shrink: 0;
}

.vid-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 3px;
  line-height: 1.35;
}

.vid-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
}

.vid-card.featured .vid-info {
  padding: 16px 20px 18px;
}

.vid-card.featured .vid-title {
  font-size: 1.05rem;
}

/* ===== SHORTS (VERTICAL VIDEOS) SECTION ===== */
.shorts-section {
  background: var(--gray-50);
}

/* Desktop: 5 equal columns, 10 cards → 2 rows */
.shorts-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 16px;
  padding: 8px 0 20px;
}

.short-card {
  width: 100%;
  cursor: pointer;
  transition: all 0.35s ease;
}

.short-card:hover {
  transform: translateY(-8px);
}

.short-card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.short-thumb {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-200);
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
}

.short-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.short-card:hover .short-thumb img {
  transform: scale(1.06);
}

.short-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-lg);
}

.short-play-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  transition: all var(--transition);
}

.short-card:hover .short-play {
  opacity: 1;
}

.short-card:hover .short-play-btn {
  transform: scale(1.1);
}

.short-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
  padding: 0 2px;
  text-align: center;
}

/* Tag hiển thị loại lớp học trên từng short card */
.short-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 11px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 800;
  color: white;
  z-index: 2;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.short-tag.tag-scratch {
  background: rgba(234, 88, 12, .88);
}

.short-tag.tag-robotics {
  background: rgba(15, 118, 110, .88);
}

/* ===== MARKETING GALLERY ===== */
.mkt-gallery-section {
  background: linear-gradient(135deg, #FFF7ED 0%, #F8FAFC 50%, #F0FDFA 100%);
}

/* CSS Grid – uniform cells, zero gaps */
.mkt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mkt-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
}

.mkt-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.mkt-item:hover img {
  transform: scale(1.06);
}

.mkt-item .mkt-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29, 78, 216, .55) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  border-radius: var(--radius-md);
}

.mkt-item:hover .mkt-overlay {
  opacity: 1;
}

.mkt-overlay-text {
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Load more button */
.mkt-load-more-wrap {
  text-align: center;
  margin-top: 36px;
}

.mkt-item.mkt-hidden,
.mkt-item[style*="display: none"] {
  display: none !important;
}

@media (max-width: 1024px) {
  .mkt-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .mkt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .mkt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== VIDEO POPUP MODAL ===== */
.vid-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 10, 30, 0.92);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vid-modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.vid-modal-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vid-modal-inner.portrait {
  width: min(360px, 85vw);
}

.vid-modal-inner.landscape {
  width: min(880px, 92vw);
}

.vid-modal-inner iframe {
  display: block;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.vid-modal-inner.portrait iframe {
  aspect-ratio: 9/16;
  width: 100%;
}

.vid-modal-inner.landscape iframe {
  aspect-ratio: 16/9;
  width: 100%;
}

.vid-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 42px;
  height: 42px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  color: var(--text-dark);
  transition: all var(--transition);
  line-height: 1;
  z-index: 1;
}

.vid-modal-close:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .about-grid {
    gap: 44px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 180px);
  }

  .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .hero-stats {
    display: none;
  }

  .contact-grid {
    gap: 44px;
  }

  .workshop-layout {
    gap: 12px;
  }

  .workshop-featured {
    flex: 1.5;
  }
}

@media (max-width: 768px) {

  /* Workshop stacks vertically on tablet */
  .workshop-layout {
    flex-direction: column;
  }

  .workshop-featured .vid-thumb {
    aspect-ratio: 16/9;
    flex: unset;
  }

  .workshop-stack {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .workshop-stack .vid-thumb {
    aspect-ratio: 16/9;
    flex: unset;
  }

  .workshop-stack .vid-card {
    flex: 1 1 calc(33.33% - 8px);
    min-width: 140px;
  }
}

@media (max-width: 640px) {

  /* Shorts: switch to horizontal scroll on small screens */
  .shorts-row {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-xlight) transparent;
  }

  .shorts-row::-webkit-scrollbar {
    height: 4px;
  }

  .shorts-row::-webkit-scrollbar-thumb {
    background: var(--primary-xlight);
    border-radius: 4px;
  }

  .short-card {
    flex-shrink: 0;
    width: 145px;
    scroll-snap-align: start;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 52px 0;
  }

  /* Mobile Nav */
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    box-shadow: var(--shadow-xl);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 998;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
  }

  .nav-link {
    padding: 12px 16px;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin: 6px 0 6px 12px;
    padding: 6px;
    display: none;
  }

  .nav-item.mob-open>.dropdown {
    display: block;
  }

  .nav-cta {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
  }

  .menu-toggle {
    display: flex;
  }

  /* Hero */
  .hero-slider {
    height: 520px;
  }

  .slide-title {
    font-size: 2rem;
  }

  .slide-desc {
    font-size: 0.95rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    order: -1;
  }

  .about-img-main {
    height: 300px;
  }

  .about-img-float {
    display: none;
  }

  .about-badge {
    top: -16px;
    left: 16px;
  }

  .about-content .section-title {
    text-align: center;
  }

  .about-content .section-tag {
    display: block;
    text-align: center;
  }

  /* Courses */
  .courses-grid {
    grid-template-columns: 1fr;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 160px);
  }

  .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .f-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 28px 22px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
  }

  /* Schedule */
  .schedule-tbl th,
  .schedule-tbl td {
    padding: 12px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 460px;
  }

  .slide-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    padding: 9px 16px;
    font-size: 0.8rem;
  }

  .schedule-tbl {
    font-size: 0.78rem;
  }

  .schedule-tbl th,
  .schedule-tbl td {
    padding: 10px 10px;
  }

  .hero-stats {
    display: none;
  }

  /* Stack workshop vertically on mobile */
  .workshop-layout {
    flex-direction: column;
  }

  .workshop-featured .vid-thumb {
    aspect-ratio: 16/9;
    flex: unset;
  }

  .workshop-stack .vid-thumb {
    aspect-ratio: 16/9;
    flex: unset;
  }

  .workshop-stack {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .workshop-stack .vid-card {
    flex: 1 1 calc(50% - 8px);
  }

  .vid-modal-inner.portrait {
    width: 90vw;
  }

  .vid-modal-inner.landscape {
    width: 95vw;
  }
}
