/* style/khuyen-mai.css */
:root {
  --fun88-primary-color: #FF8C1A;
  --fun88-secondary-color: #FFA53A;
  --fun88-card-bg: #17191F;
  --fun88-background: #0D0E12;
  --fun88-text-main: #FFF3E6;
  --fun88-border-color: #A84F0C;
  --fun88-glow-color: #FFB04D;
  --fun88-deep-orange: #D96800;
}

.page-khuyen-mai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--fun88-text-main); /* Ensure light text on dark body background */
  background-color: var(--fun88-background);
}

.page-khuyen-mai__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-khuyen-mai__section-title {
  font-size: 2.5em;
  color: var(--fun88-secondary-color);
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 165, 58, 0.5);
}

.page-khuyen-mai__section-description {
  font-size: 1.1em;
  color: var(--fun88-text-main);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-khuyen-mai__hero-carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Consistent with fixed header spacing rule */
  margin-bottom: 40px;
}

.page-khuyen-mai__hero-slider {
  position: relative;
  width: 100%;
  height: 351px; /* Height for 1020x351 aspect ratio */
  overflow: hidden;
}

.page-khuyen-mai__hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.page-khuyen-mai__hero-slide.is-active {
  opacity: 1;
}

.page-khuyen-mai__hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  z-index: 1;
}

.page-khuyen-mai__hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  text-align: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text */
  border-radius: 8px;
  max-width: 800px;
}

.page-khuyen-mai__hero-title {
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
  font-size: clamp(2em, 3.5vw, 3.5em); /* Responsive font size for H1 */
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.page-khuyen-mai__hero-description {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-khuyen-mai__hero-slider-prev,
.page-khuyen-mai__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 140, 26, 0.7);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5em;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.page-khuyen-mai__hero-slider-prev:hover,
.page-khuyen-mai__hero-slider-next:hover {
  background-color: var(--fun88-primary-color);
}

.page-khuyen-mai__hero-slider-prev {
  left: 10px;
}

.page-khuyen-mai__hero-slider-next {
  right: 10px;
}

.page-khuyen-mai__hero-slider-prev::before {
  content: '‹';
}

.page-khuyen-mai__hero-slider-next::before {
  content: '›';
}

.page-khuyen-mai__overview-section {
  padding: 40px 0;
  background-color: var(--fun88-background);
}

.page-khuyen-mai__guide-box {
  padding: 40px 0;
  background-color: var(--fun88-card-bg);
  border-radius: 8px;
  margin-bottom: 40px;
  border: 1px solid var(--fun88-border-color);
  box-shadow: 0 0 15px rgba(255, 140, 26, 0.3);
}

.page-khuyen-mai__guide-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-khuyen-mai__guide-card {
  flex: 0 0 calc(20% - 16px); /* 5 cards in a row, accounting for gap */
  max-width: calc(20% - 16px);
  text-align: center;
  color: var(--fun88-text-main);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.page-khuyen-mai__guide-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(255, 140, 26, 0.5);
}

.page-khuyen-mai__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical team cards */
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

/* Desktop specific vertical alignment for guide cards */
.page-khuyen-mai__guide-card--pos-1,
.page-khuyen-mai__guide-card--pos-5 {
  padding-top: 50px;
}

.page-khuyen-mai__guide-card--pos-2,
.page-khuyen-mai__guide-card--pos-4 {
  padding-top: 25px;
}

.page-khuyen-mai__home-content-box {
  max-width: 91%;
  margin: 0 auto 40px auto;
  padding: 10px 16px;
  border: 5px solid var(--fun88-deep-orange);
  border-radius: 15px;
  box-shadow: 0 0 20px var(--fun88-glow-color);
  height: 700px; /* Fixed height for desktop with scroll */
  background-color: var(--fun88-card-bg);
  color: var(--fun88-text-main);
}

.page-khuyen-mai__home-content-inner {
  height: 100%;
  overflow-y: auto; /* Scrollable content for desktop */
  padding-right: 10px; /* Space for scrollbar */
}

.page-khuyen-mai__home-content-inner p {
  margin-bottom: 1em;
  font-size: 1.05em;
  color: var(--fun88-text-main);
}

.page-khuyen-mai__home-content-inner ol {
  list-style-type: decimal;
  margin-left: 20px;
  margin-bottom: 1em;
}

.page-khuyen-mai__home-content-inner li {
  margin-bottom: 0.5em;
  color: var(--fun88-text-main);
}

.page-khuyen-mai__content-subtitle {
  font-size: 1.8em;
  color: var(--fun88-secondary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-khuyen-mai__blog-section {
  padding: 40px 0;
  background-color: var(--fun88-background);
}

.page-khuyen-mai__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.page-khuyen-mai__blog-card {
  background-color: var(--fun88-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--fun88-border-color);
}

.page-khuyen-mai__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 140, 26, 0.4);
}

.page-khuyen-mai__blog-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-khuyen-mai__blog-card img {
  width: 100%;
  height: 200px; /* Fixed height for blog card images */
  object-fit: cover;
  display: block;
}

.page-khuyen-mai__blog-title {
  font-size: 1.3em;
  color: var(--fun88-secondary-color);
  margin: 15px 15px 10px;
  font-weight: bold;
}

.page-khuyen-mai__blog-excerpt {
  font-size: 0.95em;
  color: var(--fun88-text-main);
  margin: 0 15px 15px;
}

.page-khuyen-mai__blog-date {
  font-size: 0.85em;
  color: #aaa;
  display: block;
  margin: 0 15px 15px;
}

.page-khuyen-mai__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

.page-khuyen-mai__cta-section {
  padding: 60px 0;
  text-align: center;
  background: linear-gradient(90deg, var(--fun88-primary-color), var(--fun88-secondary-color));
  margin-top: 40px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.page-khuyen-mai__cta-section .page-khuyen-mai__section-title {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

.page-khuyen-mai__cta-section .page-khuyen-mai__section-description {
  color: #f0f0f0;
  max-width: 900px;
}

/* --- Buttons --- */
.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  margin: 10px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
  background: linear-gradient(180deg, var(--fun88-secondary-color) 0%, var(--fun88-deep-orange) 100%);
  color: #ffffff; /* White text on dark orange gradient */
  border: 2px solid var(--fun88-primary-color);
  box-shadow: 0 5px 15px rgba(255, 140, 26, 0.4);
}

.page-khuyen-mai__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 140, 26, 0.6);
  background: linear-gradient(180deg, var(--fun88-primary-color) 0%, var(--fun88-deep-orange) 100%);
}

.page-khuyen-mai__btn-secondary {
  background-color: var(--fun88-card-bg);
  color: var(--fun88-secondary-color);
  border: 2px solid var(--fun88-secondary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__btn-secondary:hover {
  transform: translateY(-3px);
  background-color: var(--fun88-secondary-color);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(255, 165, 58, 0.4);
}

/* --- Responsive Styles --- */

/* General image responsiveness */
.page-khuyen-mai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile specific overrides */
@media (max-width: 768px) {
  .page-khuyen-mai__container {
    padding: 15px;
  }

  .page-khuyen-mai__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-khuyen-mai__hero-carousel-section {
    padding-top: 10px !important; /* Fixed header spacing */
    margin-bottom: 20px;
  }

  .page-khuyen-mai__hero-slider {
    height: 200px; /* Adjust hero slider height for mobile */
  }

  .page-khuyen-mai__hero-title {
    font-size: 1.5em !important; /* Ensure H1 is not too large */
  }

  .page-khuyen-mai__hero-description {
    font-size: 0.9em;
  }

  .page-khuyen-mai__hero-slider-prev,
  .page-khuyen-mai__hero-slider-next {
    padding: 8px 12px;
    font-size: 1.2em;
  }

  .page-khuyen-mai__guide-box {
    padding: 20px 0;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Temporary 6 column grid for spanning */
    gap: 10px;
  }

  .page-khuyen-mai__guide-card {
    flex: none;
    max-width: none;
    padding-top: 0 !important; /* Reset desktop padding-top */
  }

  .page-khuyen-mai__guide-card--pos-1,
  .page-khuyen-mai__guide-card--pos-2 {
    grid-column: span 3; /* First two cards take half width */
  }

  .page-khuyen-mai__guide-card--pos-3,
  .page-khuyen-mai__guide-card--pos-4,
  .page-khuyen-mai__guide-card--pos-5 {
    grid-column: span 2; /* Remaining three cards take one-third width */
  }

  .page-khuyen-mai__home-content-box {
    max-width: 100%;
    height: auto; /* Full height on mobile */
    padding: 10px;
    margin-bottom: 20px;
  }

  .page-khuyen-mai__home-content-inner {
    height: auto; /* Full height on mobile */
    overflow: visible; /* No scrollbar on mobile */
    padding-right: 0;
  }

  .page-khuyen-mai__content-subtitle {
    font-size: 1.4em;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .page-khuyen-mai__home-content-inner p,
  .page-khuyen-mai__home-content-inner li {
    font-size: 0.95em;
  }

  .page-khuyen-mai__blog-grid {
    grid-template-columns: repeat(1, 1fr); /* Single column for blog cards on mobile */
    gap: 15px;
  }

  .page-khuyen-mai__blog-card img {
    
  }

  .page-khuyen-mai__blog-title {
    font-size: 1.1em;
  }

  .page-khuyen-mai__blog-excerpt {
    font-size: 0.9em;
  }

  .page-khuyen-mai__cta-section {
    padding: 40px 15px;
  }

  /* Responsive images */
  .page-khuyen-mai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-khuyen-mai__hero-slide img,
  .page-khuyen-mai__guide-card img,
  .page-khuyen-mai__blog-card img {
    object-fit: cover;
  }

  /* Responsive buttons */
  .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 10px 0;
    padding: 12px 15px;
  }

  .page-khuyen-mai__cta-section .page-khuyen-mai__btn-primary,
  .page-khuyen-mai__cta-section .page-khuyen-mai__btn-secondary {
    display: block;
  }

  .page-khuyen-mai__view-all-button-container .page-khuyen-mai__btn-secondary {
    width: auto !important; /* Allow button to shrink */
    max-width: 100% !important;
  }
}