/* Custom Stylesheet for Trường Học Không Khói Thuốc */

:root {
  --primary-color: #2ecc71;
  --secondary-color: #4fc3f7;
  --text-main: #0f172a;
  --bg-main: #ffffff;
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6, .heading-font {
  font-family: 'Be Vietnam Pro', sans-serif;
}

section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}


/* === Section: Thanh điều hướng và Màn hình mở đầu === */
/* Smooth Fade-up Animation on Scroll */
.reveal-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Premium Smoke Animation Layer */
.smoke-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: radial-gradient(circle at center, rgba(46, 204, 113, 0.05) 0%, transparent 60%);
    filter: blur(80px);
    opacity: 0.6;
}

.smoke-1 { animation: smokeMove 20s linear infinite; }
.smoke-2 { animation: smokeMove 25s linear infinite reverse; background-image: radial-gradient(circle at center, rgba(79, 195, 247, 0.05) 0%, transparent 60%); }
.smoke-3 { animation: smokeMove 30s linear infinite; top: 10%; }

@keyframes smokeMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(360deg); }
}

/* Floating Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, -30px) rotate(5deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, 20px) rotate(-10deg); }
}

.animate-float { animation: float 5s ease-in-out infinite; }
.animate-float-slow { animation: floatSlow 8s ease-in-out infinite; }
.animate-float-reverse { animation: floatReverse 10s ease-in-out infinite; }

/* Sticky Header Visuals */
header#main-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    height: 70px;
    box-shadow: 0 10px 40px -10px rgba(46, 204, 113, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f8fffc; }
::-webkit-scrollbar-thumb { background: #2ecc71; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #4fc3f7; }

/* === Section: Nhận diện các loại thuốc lá === */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --primary: #2ecc71;
  --secondary: #4fc3f7;
  --danger: #FF6B35;
}

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

/* Glassmorphism Refinement */
.backdrop-blur-xl {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Swiper Bullet Styling */
.tobacco-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #cbd5e1;
  opacity: 0.5;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tobacco-pagination .swiper-pagination-bullet-active {
  width: 35px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 1;
}

/* Entrance Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-fade-up {
  animation: fadeUp 1s ease-out forwards;
}

/* Custom shadow for specific elements */
.text-glow {
  text-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

/* Smooth Image Hover */
.group img {
  filter: saturate(1.1);
}

/* Fix for Safari backdrop blur */
.swiper-slide {
  height: auto !important;
}

/* === Section: Tác hại đa chiều - Infographic === */
@keyframes smokeFloat {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.15; }
  50% { transform: translate(30px, -40px) rotate(5deg) scale(1.1); opacity: 0.25; }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.15; }
}

.smoke-layer {
  animation: smokeFloat 12s ease-in-out infinite;
  filter: blur(80px);
}

.infographic-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backface-visibility: hidden;
}

.infographic-card:hover {
  box-shadow: 0 40px 80px -20px rgba(46, 204, 113, 0.2);
}

#harm .container {
  max-width: 1240px;
}

/* Custom scroll reveal initial state */
.infographic-card {
  opacity: 0;
  transform: translateY(30px);
}

.infographic-card.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* === Section: Luật và Quy định học đường === */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.animate-bounce-slow {
  animation: float 6s ease-in-out infinite;
}

.accordion-item.active {
  border-color: rgba(46, 204, 113, 0.3);
}

.accordion-content {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#legal-accordion .accordion-item {
  transform: translateZ(0);
  backface-visibility: hidden;
}

@media (max-width: 768px) {
  .accordion-header {
    padding: 1rem !important;
  }
  .accordion-content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* === Section: Kỹ năng phòng tránh và Từ chối === */
/* Giao diện tinh tế, hiện đại, không sử dụng hiệu ứng chuyển động phức tạp */
#ky-nang-tu-choi {
  background-image: radial-gradient(circle at top right, rgba(46, 204, 113, 0.03), transparent 400px),
                    radial-gradient(circle at bottom left, rgba(79, 195, 247, 0.03), transparent 400px);
}

/* Tùy chỉnh đổ bóng cho thẻ Step */
.shadow-custom-yellow {
  box-shadow: 0 20px 50px -15px rgba(241, 196, 15, 0.2);
}

/* Đảm bảo font chữ hiển thị chuẩn */
.font-be-vietnam {
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* Tối ưu khoảng cách trên thiết bị di động */
@media (max-width: 768px) {
  .step-number-bg {
    font-size: 5rem;
    top: -2.5rem;
  }
}

/* === Section: Hoạt động sáng tạo và Mini-game === */
/* Font settings as per design system */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;600;700;800;900&display=swap');

section#creative-activities {
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* Custom Swiper Pagination */
.activitySwiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 8px;
  height: 8px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.activitySwiper .swiper-pagination-bullet-active {
  background: #ffffff;
  width: 32px;
  border-radius: 4px;
}

/* Smoke Effect Animation */
.smoke-layer {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: radial-gradient(circle at center, #2ecc71 0%, transparent 40%);
  filter: blur(120px);
  z-index: 0;
}

.smoke-1 {
  animation: drift 30s linear infinite;
  opacity: 0.12;
}

.smoke-2 {
  animation: drift 40s linear reverse infinite;
  background-image: radial-gradient(circle at center, #4fc3f7 0%, transparent 40%);
  opacity: 0.1;
}

@keyframes drift {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  to { transform: rotate(360deg) scale(1); }
}

/* Button Bounce Fine-tuning */
@keyframes bounce-slow {
  0%, 100% {
    transform: translateY(-8%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}
.animate-bounce {
  animation: bounce-slow 2s infinite;
}

/* Slide Transition Effect */
#game-content-wrapper.updating {
  opacity: 0;
  transform: translateY(20px);
}

/* Interactive Card Rotation on Slide Change */
.game-card-pulse {
  animation: cardPulse 0.5s ease;
}

@keyframes cardPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Swiper Overlay Smoothness */
.swiper-slide .bg-gradient-to-t {
  transition: all 0.5s ease;
}

.swiper-slide:hover .bg-gradient-to-t {
  background-image: radial-gradient(circle at bottom, rgba(46, 204, 113, 0.9) 0%, rgba(0,0,0,0.4) 100%);
}

/* === Section: Học liệu và Thông điệp Cam kết === */
#hoc-lieu-cam-ket {
    scroll-behavior: smooth;
}

#hoc-lieu-cam-ket input::placeholder {
    color: #a0aec0;
}

/* Hiệu ứng hạt bụi li ti làm nền 3D */
#hoc-lieu-cam-ket::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#2ecc71 0.5px, transparent 0.5px);
    background-size: 30px 30px;
    opacity: 0.05;
    z-index: 1;
}

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* === Section: Chân trang === */
/* Smooth typography and layout enhancements */
body {
  font-family: 'Be Vietnam Pro', sans-serif;
}

.social-icon:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px -5px rgba(46, 204, 113, 0.4);
}

/* Glassmorphism effect for back to top button */
#back-to-top {
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom underline animation for titles */
footer h4 span {
  transition: width 0.3s ease;
}

footer div:hover > h4 span {
  width: 100%;
}

@keyframes smokeFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0.1; }
  50% { transform: translate(20px, -20px) scale(1.1); opacity: 0.15; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.1; }
}

footer .absolute.blur-\[100px\] {
  animation: smokeFloat 10s ease-in-out infinite;
}
