/* Custom Colors from prompt */
:root {
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-border: #2E7A4E;
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-divider: #1E3A2A;
  --color-text-main: #F2FFF6;
  --color-background: #08160F; /* Body background color from shared.css */
  --color-deep-green: #0A4B2C;
  --color-text-secondary: #A7D9B8;
}

/* Base styles for the page content, assuming body has --color-background */
.page-index {
  color: var(--color-text-main); /* Light text on dark background */
  background-color: var(--color-background);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-index a {
  color: var(--color-secondary); /* Ensure links are visible */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index a:hover {
  color: var(--color-glow);
}

/* HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css handles body padding-top for header */
  margin-top: 0;
  background-color: var(--color-background); /* Match body background */
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}
/* Desktop aspect ratio for hero */
@media (min-width: 850px) {
  .page-index__hero-image img {
    aspect-ratio: 16/5;
    object-fit: cover;
  }
}
/* Mobile hero image styling for contain */
@media (max-width: 849px) {
  .page-index__hero-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__hero-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: contain !important;
    max-height: none !important;
    display: block !important;
  }
}
/* Mobile specific padding for hero section */
@media (max-width: 768px) {
  .page-index__hero-section {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 10px !important; /* Ensure minimal top padding */
    margin-top: 0;
  }
}

/* Sản phẩm hiển thị khu vực */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: var(--color-background);
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, 1fr); /* Desktop: 6 columns */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-items: center; /* Center cards in grid cells */
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each card */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile product grid styling */
@media (max-width: 768px) {
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__products-container,
  .page-index__products-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__products-grid {
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 columns x 3 rows */
    gap: 15px;
  }
  .page-index__product-card,
  .page-index__product-card-image {
    max-width: 100%; /* Ensure cards don't exceed container width */
  }
}

/* Tiêu đề chính trang trí giữa */
.page-index__section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding: 24px 12px;
  box-sizing: border-box;
  text-align: center;
  background-color: var(--color-background);
}

.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem); /* Responsive font size */
  line-height: 1.35;
  font-weight: bold; /* Emphasize H1 */
  color: var(--color-text-main);
}

.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background-color: var(--color-divider); /* Use custom divider color */
  opacity: 0.6;
}

/* Mobile styling for decorative title */
@media (max-width: 768px) {
  .page-index__section-title-line {
    max-width: 40px; /* Shorter lines on mobile */
  }
  .page-index__section-title {
    font-size: clamp(1rem, 6vw, 1.5rem); /* Adjust font size for smaller screens */
  }
  .page-index__section-title-wrap {
    padding: 20px 10px;
  }
}

/* Nội dung SEO dài */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 48px;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll */
  background-color: var(--color-background);
  color: var(--color-text-main); /* Light text on dark background */
}

.page-index__article-body h2 {
  margin: 2rem 0 1rem;
  color: var(--color-text-main);
  font-size: clamp(1.5rem, 4vw, 2rem); /* Responsive H2 font size */
  font-weight: bold;
}

.page-index__article-body h3 {
  margin: 1.25rem 0 0.75rem;
  color: var(--color-text-main);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem); /* Responsive H3 font size */
  font-weight: bold;
}

.page-index__article-body p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary); /* Use secondary text color for paragraphs */
}

.page-index__article-body ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

.page-index__article-body li {
  margin-bottom: 0.5rem;
}

.page-index__article-figure {
  margin: 1.5rem auto;
  max-width: 800px;
  text-align: center;
}

.page-index__article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Slightly rounded corners for article images */
}

.page-index__article-figure figcaption {
  font-size: 0.9em;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.page-index__article-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-primary); /* Use primary color for quote border */
  background-color: var(--color-deep-green); /* Slightly different background for quote */
  color: var(--color-text-main);
  font-style: italic;
  border-radius: 0 5px 5px 0;
}

/* CTA Buttons */
.page-index__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons are responsive */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: var(--color-button-gradient); /* Use custom button gradient */
  color: #ffffff; /* White text on dark gradient */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-index__btn-secondary {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-index__btn-secondary:hover {
  background: var(--color-secondary);
  color: var(--color-background);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General image responsive styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsive styles for article body */
@media (max-width: 768px) {
  .page-index__article-body {
    padding: 0 15px 32px; /* Adjust padding for mobile */
    font-size: 16px;
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-index__article-body h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
  }
  .page-index__article-body h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.3rem);
    margin-top: 1rem;
    margin-bottom: 0.6rem;
  }
  .page-index__article-figure {
    margin: 1rem auto;
  }
  .page-index__article-figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding: 0 15px;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary {
    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;
  }
}

/* Ensure all images and containers are responsive on mobile */
@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__hero-section,
  .page-index__products-section,
  .page-index__article-body,
  .page-index__products-container,
  .page-index__products-grid,
  .page-index__section-title-wrap,
  .page-index__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Crucial for preventing horizontal scroll */
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Override specific paddings where needed to avoid double padding */
  .page-index__products-section,
  .page-index__section-title-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-index__products-container,
  .page-index__products-grid {
    padding-left: 15px;
    padding-right: 15px;
  }
}