/* style/index.css */

.page-index {
  color: #333333; /* Mặc định cho nền trắng/sáng */
}

/* Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Nhỏ hơn so với header offset để tránh khoảng trống kép */
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__hero-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.page-index__hero-slider-slide {
  flex: 0 0 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page-index__hero-slider-slide.is-active {
  opacity: 1;
  position: relative;
}

.page-index__hero-slider-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__hero-slider-prev,
.page-index__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  border-radius: 4px;
  line-height: 1;
  transition: background-color 0.3s ease;
}

.page-index__hero-slider-prev:hover,
.page-index__hero-slider-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

.page-index__hero-slider-prev { left: 10px; }
.page-index__hero-slider-next { right: 10px; }

.page-index__hero-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.page-index__hero-slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-index__hero-slider-dots button.is-active {
  background: #26A9E0;
  border-color: #26A9E0;
}

/* Spacer */
.page-index__spacer {
  height: 30px;
}

/* Promo Duo */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__promo-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.page-index__promo-duo-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  object-fit: cover;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__promo-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__promo-cta--alert {
  background: #EA7C07; /* Màu cam cho nút CTA nổi bật */
  color: #fff;
}

.page-index__promo-cta--alert:hover {
  background: #d66f06;
}

/* Section Title (H1) */
.page-index__section-title {
  text-align: center;
  margin: 30px auto;
  max-width: 1250px;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__main-h1 {
  color: #26A9E0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 800px; /* Giới hạn độ rộng để tiêu đề không quá dài */
  margin: 0 auto;
  /* Không đặt font-size cố định quá lớn */
}

/* Long SEO Content */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px; /* Chiều cao cố định cho desktop */
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #FFFFFF;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1); /* Bóng nhẹ thay vì màu trắng */
  background: rgba(255, 255, 255, 0.92);
}

.page-index__home-content-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  text-align: justify;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  color: #333333; /* Đảm bảo màu chữ tối cho nền sáng */
}

.page-index__home-content-inner::-webkit-scrollbar {
  width: 10px;
}

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background-color: #4C9BB6;
  border-radius: 20px;
  border: 3px solid #FFFFFF;
}

.page-index__home-content-inner h2,
.page-index__home-content-inner h3 {
  color: #26A9E0;
  margin-top: 25px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-index__home-content-inner p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.page-index__home-content-inner ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.page-index__home-content-inner li {
  margin-bottom: 5px;
}

.page-index__home-content-inner a {
  color: #EA7C07; /* Màu cam cho liên kết trong nội dung */
  text-decoration: underline;
}

.page-index__home-content-inner a:hover {
  color: #d66f06;
}

.page-index__content-figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

.page-index__content-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__content-figure figcaption {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
}

.page-index__table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
}

.page-index__content-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  min-width: 600px; /* Đảm bảo bảng không quá hẹp trên mobile khi overflow */
}

.page-index__content-table th,
.page-index__content-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  color: #333333;
}

.page-index__content-table th {
  background-color: #26A9E0;
  color: #ffffff;
  font-weight: bold;
}

.page-index__quick-access-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background-color: #26A9E0;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__quick-access-link:hover {
  background-color: #1e87bb;
}

/* Blog Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__blog-slider-title {
  text-align: center;
  color: #26A9E0; /* Màu chủ đạo cho tiêu đề */
  text-transform: uppercase;
  margin-bottom: 25px;
}

.page-index__blog-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px; /* Để tránh scrollbar bị che khuất */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}

.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: #26A9E0;
  border-radius: 4px;
}

.page-index__blog-slider-track::-webkit-scrollbar-track {
  background-color: #f0f0f0;
}

.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 cột trên desktop */
  scroll-snap-align: start;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.page-index__post-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-index__post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Tỷ lệ 16:9 cố định */
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: #fff;
  border: 2px solid #26A9E0;
  border-radius: 4px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: #26A9E0;
  font-weight: bold;
}

.page-index__post-date-day {
  display: block;
  font-weight: 700;
  font-size: 16px;
}

.page-index__post-date-month {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.page-index__post-item h5 {
  color: #26A9E0;
  margin: 15px 12px 8px;
  font-size: 18px;
  line-height: 1.4;
  text-align: left;
}

.page-index__post-item p {
  color: #666;
  font-size: 14px;
  margin: 0 12px 15px;
  line-height: 1.5;
  text-align: left;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #26A9E0;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #1e87bb;
}

/* Global image and button responsiveness for mobile */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

.page-index__promo-cta,
.page-index__quick-access-link,
.page-index a[class*="button"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__promo-duo-col,
.page-index__blog-slider-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  .page-index__hero-slider {
    padding-top: 10px !important; /* Đảm bảo không có khoảng trống lớn */
    padding-left: 0;
    padding-right: 0;
  }

  .page-index__hero-slider-slide img {
    border-radius: 0;
    box-shadow: none;
  }

  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 20px;
  }

  .page-index__hero-slider-dots {
    bottom: 5px;
    gap: 5px;
  }

  .page-index__promo-duo {
    padding: 0 12px;
  }

  .page-index__promo-duo-grid {
    grid-template-columns: 1fr; /* Một cột trên mobile */
    gap: 15px;
  }

  .page-index__promo-cta {
    padding: 12px 15px;
    font-size: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__section-title {
    margin: 20px auto;
    padding: 0 12px;
  }

  .page-index__main-h1 {
    font-size: 24px; /* Giảm kích thước font cho mobile */
  }

  .page-index__home-content {
    height: 60vh; /* Chiều cao cố định tương đối cho mobile */
    min-height: 420px;
    max-height: 560px;
    margin: 16px 12px;
    border-width: 3px;
    padding: 5px;
  }

  .page-index__home-content-inner {
    padding: 10px 12px;
  }

  .page-index__home-content-inner h2 {
    font-size: 20px;
  }

  .page-index__home-content-inner h3 {
    font-size: 18px;
  }

  .page-index__content-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
  }

  .page-index__content-table th,
  .page-index__content-table td {
    padding: 8px;
  }

  .page-index__blog-slider {
    padding: 0 12px;
    margin-top: 20px;
  }

  .page-index__blog-slider-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .page-index__blog-slider-wrap {
    gap: 5px;
  }

  .page-index__blog-slider-track {
    gap: 15px;
    padding-bottom: 8px;
  }

  .page-index__post-item {
    flex: 0 0 100%; /* Một cột trên mobile */
  }

  .page-index__post-item h5 {
    font-size: 16px;
    margin: 10px 10px 6px;
  }

  .page-index__post-item p {
    font-size: 13px;
    margin: 0 10px 10px;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  /* General image and container rules for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-index__cta-button,
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-index__cta-buttons {
    display: flex;
    flex-direction: column; /* Trên mobile, nút xếp dọc */
  }
}