/* Base styles for the page */
.page-ket-qua-xo-so {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main from custom palette */
  background: #B71C1C; /* Background from custom palette */
}

.page-ket-qua-xo-so__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-ket-qua-xo-so__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #FFF5E1; /* Text Main from custom palette */
}

.page-ket-qua-xo-so__text-block {
  font-size: 18px;
  margin-bottom: 20px;
  color: #FFF5E1;
}

.page-ket-qua-xo-so__text-block--centered {
  text-align: center;
}

/* Hero Section */
.page-ket-qua-xo-so__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, not --header-offset */
  padding-bottom: 40px;
  overflow: hidden;
  color: #ffffff;
}

.page-ket-qua-xo-so__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for desktop */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.page-ket-qua-xo-so__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-ket-qua-xo-so__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-ket-qua-xo-so__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFCC66; /* Glow from custom palette */
  line-height: 1.2;
}

.page-ket-qua-xo-so__subtitle {
  font-size: 1.25rem;
  margin-bottom: 30px;
  color: #FFF5E1;
}

.page-ket-qua-xo-so__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-ket-qua-xo-so__btn-primary,
.page-ket-qua-xo-so__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-ket-qua-xo-so__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button from custom palette */
  color: #7A0E0E; /* Deep Red for contrast on gold button */
  border: 2px solid transparent;
}

.page-ket-qua-xo-so__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-ket-qua-xo-so__btn-secondary {
  background: #D32F2F; /* Card BG from custom palette */
  color: #FFF5E1; /* Text Main for contrast */
  border: 2px solid #F2B544; /* Border from custom palette */
}

.page-ket-qua-xo-so__btn-secondary:hover {
  background: #7A0E0E; /* Deep Red on hover */
  border-color: #FFCC66; /* Glow on hover */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Intro Section */
.page-ket-qua-xo-so__intro-section {
  padding: 60px 0;
}

.page-ket-qua-xo-so__dark-section {
  background: #7A0E0E; /* Deep Red for contrast */
  color: #FFF5E1;
}

/* Lottery Types Section */
.page-ket-qua-xo-so__lottery-types-section {
  padding: 60px 0;
  background: #B71C1C;
}

.page-ket-qua-xo-so__cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-ket-qua-xo-so__card {
  background: #D32F2F; /* Card BG from custom palette */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  color: #FFF5E1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-ket-qua-xo-so__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-ket-qua-xo-so__card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 15px;
  color: #FFCC66; /* Glow from custom palette */
}

.page-ket-qua-xo-so__card-text {
  font-size: 16px;
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

.page-ket-qua-xo-so__btn-text {
  color: #F4D34D; /* Gold from custom palette */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-ket-qua-xo-so__btn-text:hover {
  color: #FFD86A; /* Lighter gold on hover */
  text-decoration: underline;
}

/* How to View Section */
.page-ket-qua-xo-so__how-to-view-section {
  padding: 60px 0;
}

.page-ket-qua-xo-so__content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-ket-qua-xo-so__content-grid--reverse {
  grid-template-areas: "image text";
}

.page-ket-qua-xo-so__content-grid--reverse .page-ket-qua-xo-so__content-text {
  grid-area: text;
}

.page-ket-qua-xo-so__content-grid--reverse .page-ket-qua-xo-so__content-image {
  grid-area: image;
}

.page-ket-qua-xo-so__image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: block;
}

.page-ket-qua-xo-so__ordered-list,
.page-ket-qua-xo-so__unordered-list {
  list-style-position: inside;
  padding-left: 0;
  margin-bottom: 20px;
  color: #FFF5E1;
}

.page-ket-qua-xo-so__ordered-list li,
.page-ket-qua-xo-so__unordered-list li {
  margin-bottom: 10px;
  font-size: 18px;
}

.page-ket-qua-xo-so__ordered-list strong {
  color: #FFCC66;
}

.page-ket-qua-xo-so__btn-primary--centered {
  margin-top: 30px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Benefits Section */
.page-ket-qua-xo-so__benefits-section {
  padding: 60px 0;
  background: #B71C1C;
}

.page-ket-qua-xo-so__benefits-list li {
  padding-left: 20px;
  position: relative;
}

.page-ket-qua-xo-so__benefits-list li::before {
  content: '✔';
  color: #F4D34D; /* Gold from custom palette */
  position: absolute;
  left: 0;
  top: 0;
}

/* Strategies Section */
.page-ket-qua-xo-so__strategies-section {
  padding: 60px 0;
}

/* FAQ Section */
.page-ket-qua-xo-so__faq-section {
  padding: 60px 0;
  background: #B71C1C;
}

.page-ket-qua-xo-so__faq-list {
  margin-top: 30px;
}

details.page-ket-qua-xo-so__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border from custom palette */
  overflow: hidden;
  background: #D32F2F; /* Card BG from custom palette */
  color: #FFF5E1;
}

details.page-ket-qua-xo-so__faq-item summary.page-ket-qua-xo-so__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-ket-qua-xo-so__faq-item summary.page-ket-qua-xo-so__faq-question::-webkit-details-marker {
  display: none;
}

details.page-ket-qua-xo-so__faq-item summary.page-ket-qua-xo-so__faq-question:hover {
  background: #7A0E0E; /* Deep Red on hover */
}

.page-ket-qua-xo-so__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFCC66; /* Glow from custom palette */
}

.page-ket-qua-xo-so__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F4D34D; /* Gold from custom palette */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-ket-qua-xo-so__faq-item .page-ket-qua-xo-so__faq-answer {
  padding: 0 20px 20px;
  background: #7A0E0E; /* Deep Red for answer background */
  border-radius: 0 0 5px 5px;
  color: #FFF5E1;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-ket-qua-xo-so__container {
    padding: 15px;
  }

  .page-ket-qua-xo-so__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-ket-qua-xo-so__subtitle {
    font-size: 1.1rem;
  }

  .page-ket-qua-xo-so__section-title {
    font-size: 30px;
  }

  .page-ket-qua-xo-so__text-block {
    font-size: 16px;
  }

  .page-ket-qua-xo-so__hero-image {
    object-fit: contain !important; /* Ensure image is fully visible */
    aspect-ratio: unset !important; /* Allow natural aspect ratio for contain */
  }
}

@media (max-width: 768px) {
  .page-ket-qua-xo-so__hero-section {
    padding-top: 10px; /* Small top padding */
    padding-bottom: 30px;
  }

  .page-ket-qua-xo-so__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 20px;
  }

  .page-ket-qua-xo-so__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 10px;
  }

  .page-ket-qua-xo-so__subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-ket-qua-xo-so__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  .page-ket-qua-xo-so__btn-primary,
  .page-ket-qua-xo-so__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-ket-qua-xo-so__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }

  .page-ket-qua-xo-so__text-block {
    font-size: 15px;
  }

  .page-ket-qua-xo-so__cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-ket-qua-xo-so__card-image {
    height: 200px;
  }

  .page-ket-qua-xo-so__card-title {
    font-size: 20px;
  }

  .page-ket-qua-xo-so__content-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .page-ket-qua-xo-so__content-grid--reverse {
    grid-template-areas: unset; /* Reset grid area for mobile */
  }

  .page-ket-qua-xo-so__content-grid--reverse .page-ket-qua-xo-so__content-text,
  .page-ket-qua-xo-so__content-grid--reverse .page-ket-qua-xo-so__content-image {
    grid-area: unset;
  }

  .page-ket-qua-xo-so__ordered-list li,
  .page-ket-qua-xo-so__unordered-list li {
    font-size: 15px;
  }

  .page-ket-qua-xo-so img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-ket-qua-xo-so__section,
  .page-ket-qua-xo-so__card,
  .page-ket-qua-xo-so__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  details.page-ket-qua-xo-so__faq-item summary.page-ket-qua-xo-so__faq-question {
    padding: 15px;
  }

  .page-ket-qua-xo-so__faq-qtext {
    font-size: 16px;
  }

  .page-ket-qua-xo-so__faq-toggle {
    font-size: 20px;
  }

  details.page-ket-qua-xo-so__faq-item .page-ket-qua-xo-so__faq-answer {
    padding: 0 15px 15px;
  }
}