:root {
    --primary-color: #FF8C1A;
    --secondary-color: #FFA53A;
    --card-bg: #17191F;
    --page-bg: #0D0E12;
    --text-main: #FFF3E6;
    --border-color: #A84F0C;
    --glow-color: #FFB04D;
    --deep-orange: #D96800;
}

/* Base styles for the page content */
.page-khuynmi {
    color: var(--text-main); /* Light text on dark body background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--page-bg); /* Ensure page content background matches body if body is dark */
}

/* Hero Section */
.page-khuynmi__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    overflow: hidden; /* Ensure no overflow from images */
}

.page-khuynmi__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure full width within max-width */
}

.page-khuynmi__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 100%; /* Ensure image container doesn't overflow */
    box-sizing: border-box;
}

.page-khuynmi__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Minimum image size requirement */
    min-height: 200px; /* Minimum image size requirement */
}

.page-khuynmi__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px; /* Constrain content width */
}

.page-khuynmi__main-title {
    font-size: clamp(2em, 5vw, 3.5em); /* Responsive H1 font size */
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Add some shadow for contrast */
}

.page-khuynmi__hero-description {
    font-size: clamp(1em, 2vw, 1.3em);
    color: var(--text-main);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuynmi__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Minimum button size */
    min-height: 50px; /* Minimum button size */
}

.page-khuynmi__cta-button:hover {
    background: linear-gradient(180deg, var(--deep-orange) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-khuynmi__section {
    padding: 60px 20px;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.page-khuynmi__overview-section {
    background-color: var(--page-bg); /* Match body background */
}

.page-khuynmi__types-section {
    background-color: var(--primary-color); /* Use primary color for dark section */
    color: #ffffff; /* Light text on dark background */
}

.page-khuynmi__terms-section {
    background-color: var(--page-bg);
}

.page-khuynmi__how-to-claim-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-khuynmi__security-section {
    background-color: var(--page-bg);
}

.page-khuynmi__faq-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-khuynmi__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Inner padding for container */
    box-sizing: border-box;
}

.page-khuynmi__section-title {
    font-size: clamp(1.8em, 4vw, 2.8em);
    color: var(--text-main);
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.page-khuynmi__section-title--light {
    color: #ffffff;
}

.page-khuynmi__text-block {
    font-size: clamp(1em, 1.5vw, 1.1em);
    margin-bottom: 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-main);
}

/* Grid for promotion cards */
.page-khuynmi__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuynmi__card {
    background-color: var(--card-bg); /* Dark card background */
    color: var(--text-main); /* Light text on dark card */
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px; /* Ensure cards have minimum height */
}

.page-khuynmi__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-khuynmi__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
}

.page-khuynmi__card-title {
    font-size: 1.5em;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.page-khuynmi__card-text {
    font-size: 0.95em;
    color: var(--text-main);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to grow and push button to bottom */
}

.page-khuynmi__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    min-width: 150px;
    min-height: 40px;
}

.page-khuynmi__btn-primary:hover {
    background: linear-gradient(180deg, var(--deep-orange) 0%, var(--secondary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.page-khuynmi__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    min-width: 150px;
    min-height: 40px;
}

.page-khuynmi__btn-secondary:hover {
    background: var(--secondary-color);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Steps Grid */
.page-khuynmi__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-khuynmi__step-card {
    background-color: var(--card-bg);
    color: var(--text-main);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid var(--border-color);
}

.page-khuynmi__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    color: #ffffff;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-khuynmi__step-title {
    font-size: 1.6em;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-khuynmi__step-text {
    font-size: 0.95em;
    color: var(--text-main);
}

.page-khuynmi__button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* FAQ Section */
.page-khuynmi__faq-list {
    margin-top: 40px;
    text-align: left;
}

details.page-khuynmi__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg); /* Dark background for FAQ item */
  color: var(--text-main); /* Light text */
}
details.page-khuynmi__faq-item summary.page-khuynmi__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;
  color: var(--text-main);
}
details.page-khuynmi__faq-item summary.page-khuynmi__faq-question::-webkit-details-marker {
  display: none;
}
details.page-khuynmi__faq-item summary.page-khuynmi__faq-question:hover {
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter on hover */
}
.page-khuynmi__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}
.page-khuynmi__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Use secondary color for toggle icon */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-khuynmi__faq-item .page-khuynmi__faq-answer {
  padding: 0 20px 20px;
  background: rgba(0, 0, 0, 0.2); /* Slightly darker background for answer */
  border-radius: 0 0 5px 5px;
  color: var(--text-main);
}
details.page-khuynmi__faq-item .page-khuynmi__faq-answer p {
    color: var(--text-main);
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-khuynmi__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-khuynmi__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-khuynmi__hero-image img {
        border-radius: 4px;
    }
    
    .page-khuynmi__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-khuynmi__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-khuynmi__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        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-khuynmi__section {
        padding: 40px 15px;
    }

    .page-khuynmi__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-khuynmi__text-block {
        font-size: 0.9em;
    }

    .page-khuynmi__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-khuynmi__card {
        padding: 20px;
        min-height: unset; /* Remove min-height on mobile */
    }

    .page-khuynmi__card-image {
        height: 180px;
    }

    .page-khuynmi__card-title {
        font-size: 1.3em;
    }

    .page-khuynmi__card-text {
        font-size: 0.85em;
    }

    .page-khuynmi__btn-primary,
    .page-khuynmi__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;
    }

    .page-khuynmi__button-group {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-khuynmi__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-khuynmi__step-card {
        padding: 25px;
    }

    .page-khuynmi__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
    }

    .page-khuynmi__step-title {
        font-size: 1.4em;
    }

    details.page-khuynmi__faq-item summary.page-khuynmi__faq-question { padding: 15px; }
    .page-khuynmi__faq-qtext { font-size: 1em; }
    .page-khuynmi__faq-toggle {
      margin-left: 10px;
      width: 24px;
      height: 24px;
      font-size: 20px;
    }
    details.page-khuynmi__faq-item .page-khuynmi__faq-answer {
      padding: 0 15px 15px;
    }
}

/* Global image responsive styles (important for all images) */
.page-khuynmi img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile forced responsive styles */
@media (max-width: 768px) {
  .page-khuynmi img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-khuynmi__section,
  .page-khuynmi__card,
  .page-khuynmi__container,
  .page-khuynmi__hero-image,
  .page-khuynmi__hero-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left: 15px; */
    /* padding-right: 15px; */
  }
  /* Hero image container specifically should not have extra padding to allow full bleed */
  .page-khuynmi__hero-image {
      padding-left: 0 !important;
      padding-right: 0 !important;
  }
  /* Content sections should have padding for text readability */
  .page-khuynmi__overview-section .page-khuynmi__container,
  .page-khuynmi__types-section .page-khuynmi__container,
  .page-khuynmi__terms-section .page-khuynmi__container,
  .page-khuynmi__how-to-claim-section .page-khuynmi__container,
  .page-khuynmi__security-section .page-khuynmi__container,
  .page-khuynmi__faq-section .page-khuynmi__container {
      padding-left: 15px !important;
      padding-right: 15px !important;
  }
}