/* style/nh.css */
:root {
  --page-nh-primary-color: #2F6BFF;
  --page-nh-secondary-color: #6FA3FF;
  --page-nh-text-main: #1F2D3D;
  --page-nh-text-dark: #000000;
  --page-nh-card-bg: #FFFFFF;
  --page-nh-background-bg: #F4F7FB;
  --page-nh-border-color: #D6E2FF;
  --page-nh-glow-color: #A5C4FF;
}

.page-nh {
  font-family: 'Arial', sans-serif;
  color: var(--page-nh-text-main); /* Default text color for light background */
  background-color: var(--page-nh-background-bg);
  line-height: 1.6;
}

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

.page-nh__section-title {
  font-size: 2.5em;
  color: var(--page-nh-text-dark);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-nh__sub-title {
  font-size: 1.5em;
  color: var(--page-nh-primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-nh__subtitle {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--page-nh-text-main);
}

.page-nh__text-block p {
  margin-bottom: 15px;
}

.page-nh__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Rely on body padding for header offset */
  margin-bottom: 40px;
  background: linear-gradient(180deg, var(--page-nh-secondary-color) 0%, var(--page-nh-primary-color) 100%);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
}

.page-nh__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image to content width */
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-nh__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-nh__hero-content-wrapper {
  text-align: center;
  padding: 0 20px 40px;
  max-width: 900px;
}

.page-nh__main-title {
  font-size: 3.2em;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.page-nh__hero-description {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-nh__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-nh__btn-primary,
.page-nh__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.page-nh__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-nh__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-nh__btn-secondary {
  background: #ffffff;
  color: var(--page-nh-primary-color);
  border: 2px solid var(--page-nh-primary-color);
}

.page-nh__btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.page-nh__introduction-section,
.page-nh__guide-section,
.page-nh__promotions-section,
.page-nh__security-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

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

.page-nh__dark-section .page-nh__section-title,
.page-nh__dark-section .page-nh__subtitle,
.page-nh__dark-section .page-nh__text-block p,
.page-nh__dark-section .page-nh__sub-title {
  color: #ffffff;
}

.page-nh__content-grid {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-nh__content-grid--reverse {
  flex-direction: row-reverse;
}

.page-nh__text-block,
.page-nh__image-block {
  flex: 1;
}

.page-nh__image-block img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-nh__game-types-section {
  padding: 60px 0;
  background-color: var(--page-nh-background-bg);
  margin-bottom: 40px;
}

.page-nh__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-nh__game-card {
  background-color: var(--page-nh-card-bg);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.page-nh__game-card:hover {
  transform: translateY(-5px);
}

.page-nh__game-image {
  width: 100%;
  height: 250px; /* Fixed height for consistent grid */
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  display: block;
}

.page-nh__game-title {
  font-size: 1.3em;
  color: var(--page-nh-primary-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.page-nh__game-description {
  font-size: 0.95em;
  color: var(--page-nh-text-main);
  margin-bottom: 20px;
}

.page-nh__game-btn {
  display: inline-block;
  padding: 10px 25px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.page-nh__game-btn:hover {
  background: var(--page-nh-secondary-color);
}

.page-nh__view-all-games {
  text-align: center;
}

.page-nh__strategy-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-nh__strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-nh__strategy-card {
  background-color: var(--page-nh-card-bg);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-nh__strategy-title {
  font-size: 1.4em;
  color: var(--page-nh-primary-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.page-nh__strategy-description {
  font-size: 1em;
  color: var(--page-nh-text-main);
}

.page-nh__strategy-image-wrapper {
  text-align: center;
  margin-top: 40px;
}

.page-nh__faq-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-nh__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-nh__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-nh__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.1em;
  color: #ffffff;
  background-color: var(--page-nh-primary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.page-nh__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-nh__faq-qtext {
  flex-grow: 1;
}

.page-nh__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-nh__faq-item[open] .page-nh__faq-toggle {
  transform: rotate(45deg);
}

.page-nh__faq-answer {
  padding: 20px 25px;
  background-color: #ffffff;
  color: var(--page-nh-text-main);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.page-nh__faq-answer p {
  margin: 0;
}

.page-nh__conclusion-section {
  padding: 60px 0 80px;
  text-align: center;
  background-color: var(--page-nh-background-bg);
}

.page-nh__conclusion-section .page-nh__text-block {
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 1.1em;
  color: var(--page-nh-text-main);
}

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

/* Responsive styles for mobile */
@media (max-width: 768px) {
  .page-nh {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-nh__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-nh__main-title {
    font-size: 2.2em;
  }

  .page-nh__hero-description {
    font-size: 1em;
  }

  .page-nh__hero-section {
    flex-direction: column;
    padding-top: 10px !important; /* Rely on body padding for header offset */
  }

  .page-nh__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-nh__hero-image {
    object-fit: contain !important; /* Ensure image is fully visible */
    max-height: none !important;
    aspect-ratio: unset !important;
  }

  .page-nh__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  .page-nh__btn-primary,
  .page-nh__btn-secondary,
  .page-nh a[class*="button"],
  .page-nh 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: 12px 20px;
    font-size: 1em;
  }

  .page-nh__content-grid {
    flex-direction: column;
    gap: 30px;
  }

  .page-nh__content-grid--reverse {
    flex-direction: column;
  }

  .page-nh__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    overflow-x: hidden;
  }

  .page-nh__game-image {
    height: auto; /* Allow height to adjust */
    aspect-ratio: 1/1;
    object-fit: cover;
  }

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

  .page-nh__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-nh__faq-answer {
    padding: 15px 20px;
  }
  
  .page-nh img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-nh__section,
  .page-nh__card,
  .page-nh__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-nh__game-card .page-nh__game-image {
    height: auto; /* Auto height for mobile to maintain aspect ratio with 1/1 */
    aspect-ratio: 1/1;
  }
}

/* Desktop specific for game grid, ensuring 250x250 aspect */
@media (min-width: 769px) {
  .page-nh__game-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
  }
}