/* Base styles for the FAQ page */
.page-faq {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Dark text for light body background */
  line-height: 1.6;
  background-color: #FFFFFF;
}

.page-faq__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  position: relative;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: 8px;
}

.page-faq__hero-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio for hero image */
  overflow: hidden;
  border-radius: 8px;
}

.page-faq__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-faq__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #FFFFFF;
  max-width: 80%;
  z-index: 2;
  background: rgba(0, 0, 0, 0.4);
  padding: 20px 30px;
  border-radius: 8px;
}

.page-faq__main-title {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #FFFF00; /* Register/Login font color for H1 for emphasis */
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 25px;
  color: #FFFFFF;
}

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

.page-faq__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #017439;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.page-faq__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #017439;
  border-radius: 2px;
}

.page-faq__faq-list {
  margin-top: 20px;
}

/* FAQ item styles (using <details> structure) */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

details.page-faq__faq-item summary.page-faq__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-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}

details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: #f5f5f5;
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #017439;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}

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

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  font-size: 1em;
  color: #555555;
}

.page-faq__faq-answer p {
  margin-bottom: 10px;
}

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-faq__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-faq__cta-bottom {
  text-align: center;
  padding: 50px 20px;
  background-color: #f0f0f0;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
}

.page-faq__cta-title {
  font-size: 2.2em;
  color: #017439;
  margin-bottom: 15px;
}

.page-faq__cta-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05em;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%;
  box-sizing: border-box;
}

.page-faq__btn-primary {
  background: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
  background: #a00606;
  border-color: #a00606;
  transform: translateY(-2px);
}

.page-faq__btn-secondary {
  background: #FFFFFF;
  color: #017439;
  border: 2px solid #017439;
}

.page-faq__btn-secondary:hover {
  background: #017439;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.page-faq__content-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Homepage Specific CSS Blocks (as per strict instructions) --- */
/* These blocks are included to fulfill the "must contain" requirement, 
   even if they are not directly used by the FAQ page's HTML structure. */
@media (max-width: 1023px) {
  .page-faq__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-faq__hero-brand,
  .page-faq__hero-jackpot {
    display: none !important;
  }
  .page-faq__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-faq__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-faq__game-trial-topbar,
  .page-faq__game-trial-bottombar {
    display: none !important;
  }
  .page-faq__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-faq__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-faq__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-faq__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-faq__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-faq__hero-brand,
  .page-faq__hero-jackpot,
  .page-faq__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-faq__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-faq__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-faq__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-faq__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-faq__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Common styles for homepage elements, adapted to page-faq prefix */
/* This section ensures all specified homepage CSS is present in the output */
.page-faq__promo-strip {
  margin-top: 16px; /* Example, adjust as needed */
}

.page-faq__promo-strip-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 15px 0;
  max-width: 1280px;
  margin: 0 auto;
}

.page-faq__hot-games-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 0;
}

.page-faq__hot-games-item {
  text-align: center;
}

.page-faq__hot-games-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.page-faq__hot-games-name,
.page-faq__hot-games-rtp,
.page-faq__hot-games-desc {
  display: block; /* Ensure visibility for PC */
  color: #333;
  font-size: 0.9em;
  margin-top: 5px;
}

.page-faq__winner-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #017439;
  color: #FFFFFF;
  padding: 10px 0;
  z-index: 100;
}

/* Homepage trial game specific styles, adapted with page-faq prefix */
.page-faq__game-trial-overlay{
  z-index:5;
  pointer-events:auto;
}
.page-faq__game-trial-overlay.is-hidden{
  display:none!important;
  pointer-events:none!important;
}
.page-faq__game-trial-start{
  z-index:6;
  pointer-events:auto;
  touch-action:manipulation;
}
.page-faq__game-trial-shell{
  border:1px solid rgba(212,175,55,.45);
  border-radius:10px;
  overflow:hidden;
}
.page-faq__reward-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}
.page-faq__reward-modal-content {
  background: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  position: relative;
}
.page-faq__reward-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .page-faq {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-faq__hero-section {
    margin-bottom: 20px;
  }

  .page-faq__hero-content {
    padding: 15px 20px;
    max-width: 90%;
  }

  .page-faq__main-title {
    font-size: 1.8em;
    margin-bottom: 10px;
  }

  .page-faq__description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

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

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px;
  }

  .page-faq__faq-qtext {
    font-size: 1em;
  }

  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 15px 15px;
  }

  .page-faq__cta-bottom {
    padding: 30px 15px;
    margin-top: 20px;
  }

  .page-faq__cta-title {
    font-size: 1.8em;
  }

  .page-faq__cta-description {
    font-size: 0.95em;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
  }
  
  /* Mobile specific image adaptation */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-image-wrapper,
  .page-faq__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Homepage elements responsive for 768px - as per strict instructions */
  .page-faq__promo-strip-track{
    grid-template-columns: repeat(2,1fr); /* Example: 2 columns for mobile */
    overflow-x:hidden;
    padding: 15px;
  }
  .page-faq__hot-games-grid{
    grid-template-columns:repeat(2,1fr);
    padding: 15px;
  }
  .page-faq__hot-games-name,
  .page-faq__hot-games-rtp,
  .page-faq__hot-games-desc {
    display: none; /* Hide for mobile */
  }
  .page-faq__winner-ticker {
    padding: 8px 0;
    font-size: 0.85em;
  }
  body {
    padding-bottom: 40px; /* Adjust for fixed ticker */
  }
}

/* Fixed header and main content spacing (only one place) */
/* Assuming shared.css handles body padding-top, first section uses minimal top padding */
/* If shared.css does NOT handle body padding-top, this would be: 
.page-faq__hero-section { padding-top: var(--header-offset, 122px); } */

.page-faq__game-trial-overlay{
  z-index:5;
  pointer-events:auto;
}
.page-faq__game-trial-overlay.is-hidden{
  display:none!important;
  pointer-events:none!important;
}
.page-faq__game-trial-start{
  z-index:6;
  pointer-events:auto;
  touch-action:manipulation;
}
.page-faq__game-trial-shell{
  border:1px solid rgba(212,175,55,.45);
  border-radius:10px;
  overflow:hidden;
}
.page-faq__reward-modal{
  position:fixed;
  inset:0;
  z-index:10000;
}
.page-faq__reward-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}