/* ================================================== */
/* === IMPORT DESKTOP & MOBILE STYLES === */
/* ================================================== */
@import url("style-mobile.css");
@import url("style-desktop.css");

/* ================================================== */
/* === GLOBAL OVERFLOW FIX - Phiên bản Mạnh mẽ hơn === */
/* ================================================== */
html,
body,
#root, /* Nếu bạn đang dùng React/Vue, có thể cần thêm #root */
#app /* Hoặc #app */ {
  overflow-x: hidden !important; /* Dùng !important để đảm bảo ghi đè */
  width: 100% !important;
  max-width: 100% !important; /* Đảm bảo không có gì vượt quá 100% */
}

/* Đảm bảo các container chính cũng không bị tràn */
.container {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Kiểm tra các phần tử có vị trí cố định/tuyệt đối */
.fixed, .absolute {
  max-width: 100% !important;
}
/* ================================================== */
/* === MOBILE MENU OVERLAP FIX V2 === */
/* ================================================== */

/* Đẩy toàn bộ section hero xuống lớp dưới cùng */
section#home {
  z-index: 1 !important;
}

/* Đảm bảo canvas của particles.js ở lớp dưới VÀ không nhận click */
#particles-js {
  z-index: 2 !important;
  pointer-events: none; /* Rất quan trọng: Cho phép click xuyên qua */
}

/* Đặt swiper hero nằm trên particles nhưng vẫn ở dưới header */
.swiper.hero-swiper {
  z-index: 3 !important;
}
/* ================================================== */
/* === BASE & TYPOGRAPHY STYLES (COMMON FOR ALL) === */
/* ================================================== */
html {
  height: 100%;
}
body {
  font-family: 'Montserrat', sans-serif;
  color: #212529;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex-grow: 1;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
}
.font-dancing-script {
  font-family: 'Dancing Script', cursive;
}
.font-oswald {
  font-family: 'Oswald', sans-serif;
}
.font-pacifico {
  font-family: 'Pacifico', cursive;
}

/* ================================================== */
/* === CUSTOM COLOR FOR DANCING SCRIPT TEXT === */
/* ================================================== */
.text-t86 {
  color: #e52b50;
}

/* ================================================== */
/* === SHARED SLIDER STYLES (HERO & PRODUCTS) === */
/* ================================================== */
.swiper-pagination-bullet-active {
  background-color: #c2d436 !important;
}
.swiper-button-next,
.swiper-button-prev {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  color: #ffffff;
  transition: all 0.3s ease-in-out;
  z-index: 30;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: #00a651;
  transform: scale(1.1);
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px;
  font-weight: 900;
}

/* ================================================== */
/* === HERO SECTION === */
/* ================================================== */
section#home {
  position: relative;
  z-index: 20;
}
section#home::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url('../static/background-1.jpg');
  background-size: cover;
  background-position: center;
}
@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}
#particles-js {
  z-index: 1;
}
.swiper.hero-swiper {
  position: relative;
  height: 100vh;
  z-index: 2;
}
.hero-features {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-features .feature-item {
  text-align: center;
  color: #fff;
  flex: 1;
  padding: 0 10px;
}
.hero-features .feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  animation: auto-glow 2s infinite alternate ease-in-out;
}
.hero-features .feature-icon i {
  font-size: 24px;
  color: #c2d436;
}
.hero-features .feature-item h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}
@keyframes auto-glow {
  from {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 5px rgba(194, 212, 54, 0.2);
    transform: scale(1);
  }
  to {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(194, 212, 54, 0.7);
    transform: scale(1.1);
  }
}
.hero-features .feature-item:nth-child(1) .feature-icon {
  animation-delay: 0s;
}
.hero-features .feature-item:nth-child(2) .feature-icon {
  animation-delay: 0.4s;
}
.hero-features .feature-item:nth-child(3) .feature-icon {
  animation-delay: 0.8s;
}
.hero-features .feature-item:nth-child(4) .feature-icon {
  animation-delay: 1.2s;
}

/* --- Hero Animations & Effects --- */
.hero-title,
.hero-subtitle,
#magnetic-btn {
  opacity: 0;
}
@keyframes text-reveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.swiper-slide-active .hero-title {
  animation: text-reveal 0.8s ease-out forwards 0.3s;
}
.swiper-slide-active .hero-subtitle {
  animation: text-reveal 0.8s ease-out forwards 0.5s;
}
.swiper-slide-active #magnetic-btn {
  animation: text-reveal 0.8s ease-out forwards 0.7s;
}
#hero-slide-1 .hero-title,
#hero-slide-2 .hero-title,
#hero-slide-3 .hero-title {
  color: #c2d436;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
}
#magnetic-btn .magnetic-effect {
  position: absolute;
  border-radius: 50%;
  background: #00a651;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  pointer-events: none;
  z-index: 0;
}
.swiper-slide .max-w-3xl {
  pointer-events: none;
}
.swiper-slide a,
.swiper-slide button {
  pointer-events: auto;
}

/* ================================================== */
/* === PRODUCT SECTION === */
/* ================================================== */
.product-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}
.swiper-slide .anim-el,
.swiper-slide .product-ul li {
  opacity: 0;
}
.swiper-slide-active .anim-el {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.swiper-slide-active .anim-el.product-p {
  transition-delay: 0.1s;
}
.swiper-slide-active .anim-el.product-h2 {
  transition-delay: 0.2s;
}
.swiper-slide-active .anim-el.product-visuals {
  opacity: 1;
  transition-delay: 0.3s;
}
.swiper-slide-active .anim-el.product-btn-wrapper {
  transition-delay: 1.6s;
}
/* ================================================== */
/* === SẢN PHẨM: ANIMATION MƯỢT MÀ VÀ HOÀN CHỈNH === */
/* ================================================== */
/* Keyframes cho hiệu ứng xuất hiện của các mục */
@keyframes pulse-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98); /* Giảm độ co dãn và quãng đường di chuyển */
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Áp dụng animation cho từng mục trong danh sách khi slide active */
.swiper-slide-active .product-feature-item {
  animation: pulse-in 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards; /* Dùng easing function mượt hơn */
  will-change: transform, opacity;
}
/* Thiết lập animation-delay cho từng mục để tạo hiệu ứng nối tiếp */
.swiper-slide-active .product-feature-item:nth-child(1) {
  animation-delay: 0.3s;
}
.swiper-slide-active .product-feature-item:nth-child(2) {
  animation-delay: 0.4s;
}
.swiper-slide-active .product-feature-item:nth-child(3) {
  animation-delay: 0.5s;
}
.swiper-slide-active .product-feature-item:nth-child(4) {
  animation-delay: 0.6s;
}
.swiper-slide-active .product-feature-item:nth-child(5) {
  animation-delay: 0.7s;
}

 
.product-slide .product-h2 {
  color: #00833e;
  font-weight: 900;
}
.product-slide .product-p {
  color: #6c757d;
  font-weight: 500;
  letter-spacing: 1px;
}
.product-slide .product-ul li {
  color: #212529;
  font-weight: 500;
}
.product-slide .product-ul li .font-bold {
  color: #00833e;
}
.product-slide .product-ul li .fa-check {
  color: #00a651;
}
.product-slide .feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.product-slide .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.product-slide .feature-indicator {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-top: 0.4rem;
}

/* ================================================== */
/* === PRODUCT IMAGE UNIFORM SIZE FIX === */
/* ================================================== */
.product-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28rem;
  width: 100%;
}
.product-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes button-glow-shadow {
  from {
    box-shadow: 0 0 5px rgba(0, 166, 81, 0.4);
  }
  to {
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.9);
  }
}
.product-slide .btn-product {
  transition: background-color 0.3s ease, transform 0.3s ease;
  animation: button-glow-shadow 1.5s infinite alternate ease-in-out;
}
.product-slide .btn-product:hover {
  background-color: #00a651;
  transform: scale(1.05);
}
@keyframes button-glow-shadow {
  from {
    box-shadow: 0 0 5px rgba(0, 166, 81, 0.4);
  }
  to {
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.9);
  }
}
.product-slide .btn-product {
  animation: button-glow-shadow 1.5s infinite alternate ease-in-out;
}
.btn-product {
  left: 2rem;
}

/* ================================================== */
/* === STATS SECTION === */
/* ================================================== */
#stats {
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.stats-overlay {
  background: linear-gradient(
    90deg,
    rgba(0, 45, 91, 0.8) 0%,
    rgba(0, 131, 62, 0.7) 100%
  );
}
#stats-background-grid {
  display: flex;
  gap: 1rem;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
@keyframes scroll-up {
  from {
    transform: translateY(0%);
  }
  to {
    transform: translateY(-50%);
  }
}
.stats-bg-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: scroll-up linear infinite;
}
.stats-bg-column img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.stats-bg-column:nth-child(1) { animation-duration: 30s; }
.stats-bg-column:nth-child(2) { animation-duration: 42s; }
.stats-bg-column:nth-child(3) { animation-duration: 28s; }
.stats-bg-column:nth-child(4) { animation-duration: 38s; }
.stats-bg-column:nth-child(5) { animation-duration: 25s; }
.stats-bg-column:nth-child(6) { animation-duration: 35s; }
.stats-bg-column:nth-child(7) { 
  animation-duration: 45s;
  animation-direction: reverse; 
}
.stats-bg-column:nth-child(8) { animation-duration: 25; }
#stats-background-grid::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    rgba(12, 23, 26, 0.85) 10%,
    rgba(12, 23, 26, 0)
  );
}
#stats-background-grid::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(12, 23, 26, 0.85) 10%,
    rgba(12, 23, 26, 0)
  );
}
#stats-background-grid::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(12, 23, 26, 1) 10%,
    rgba(12, 23, 26, 0)
  );
}
#stats h3 {
  font-size: 5rem;
}
#stats p {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

/* ================================================== */
/* === ABOUT US PAGE === */
/* ================================================== */
.about-top-bar {
  background-color: #2d5b2d;
}
#about-hero-new {
  background-color: #c4d3b4;
  padding: 4rem 2rem;
  text-align: center;
  color: #1a3a1e;
}
#about-hero-new h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
}
#about-hero-new p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  margin-top: 1rem;
  opacity: 0.9;
}
#about-hero-new a {
  color: #1a3a1e;
}
.about-content-bg {
  background-color: #f7f7f7;
}
#about-content {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
#core-values {
padding-top: 5rem;
  padding-bottom: 5rem;
}

/* ================================================== */
/* === PARTNER LOGOS MARQUEE === */
/* ================================================== */
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.marquee {
  min-height: 10rem;
  display: flex;
  align-items: center;
}
.marquee-content {
  animation: marquee 40s linear infinite;
  position: relative;
  z-index: 1;
}
.marquee:hover .marquee-content {
  animation-play-state: paused;
}
.partner-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 20rem;
  width: 9rem;
  padding: 1rem;
}
.partner-logo-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease-in-out;
}
.partner-logo-img:hover {
  transform: scale(2.1);
}

/* ================================================== */
/* === FOOTER BOTTOM / COPYRIGHT SECTION STYLES === */
/* ================================================== */
.financity-copyright-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
}
.financity-copyright-left,
.financity-copyright-right {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ================================================== */
/* === HEADER GRADIENT BACKGROUND === */
/* ================================================== */
#header-placeholder {
  background-image: linear-gradient(to right, #002d5b, #00833e);
  box-shadow: none;
}
#header-placeholder a.nav-link.font-bold {
  opacity: 1;
  color: #c2d436;
}

/* ================================================== */
/* === BLURRED BACKGROUND FOR FIND-US PAGE === */
/* ================================================== */
body#find-us-page {
  position: relative;
  z-index: 0;
}
body#find-us-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('../static/together.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(1px);
  transform: scale(1.1);
}

/* ======================================================= */
/* === NÚT SẢN PHẨM "VAY NGAY" === */
/* ======================================================= */
.product-slides-container {
  position: relative;
}
.product-nav-next,
.product-nav-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.product-nav-next {
  right: -60px;
}
.product-nav-prev {
  left: -60px;
}
.product-nav-next:hover,
.product-nav-prev:hover {
  background-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}
.product-nav-next::after,
.product-nav-prev::after {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 1.25rem;
}
.product-nav-next::after { content: '\f054'; }
.product-nav-prev::after { content: '\f053'; }

/* ========================================= */
/* === CORE VALUES SECTION (DARK BG STYLES) === */
/* ========================================= */
.core-value-icon-dark {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00b74f;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.text-t86-green {
    color: #00b74f;
}
.text-gradient-blue-green {
  background: linear-gradient(
    90deg,
    #0056b3 0%,
    #28a745 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.core-value-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1dad3f;
  font-size: 2.2rem;
  line-height: 1;
}
.core-value-tagline {
  font-style: italic;
  font-weight: 600;
  color: #374151;
}

/* ======================================================= */
/* === NÚT SẢN PHẨM "VAY NGAY" (BẢN SỬA LỖI MẤT GÓC CUỐI CÙNG) === */
/* ======================================================= */
.product-slides-container .btn-product {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, background-color 0.3s ease;
  animation: final-button-glow 1.5s infinite alternate ease-in-out;
  border-radius: 9999px;
  overflow: hidden;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  will-change: transform;
}
.product-slides-container .btn-product:hover {
  background-color: #00A651;
  transform: scale(1.05);
}
@keyframes final-button-glow {
  from {
    box-shadow: 0 0 5px rgba(0, 166, 81, 0.4);
  }
  to {
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.9);
  }
}
@media (min-width: 768px) {
  #mobile-menu {
    display: none !important; /* Quan trọng: Ẩn hoàn toàn menu trên desktop */
  }
}
