/* Shared styles from common fragments */
:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy: #08162B;
  --btn-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --header-offset: 122px; /* Placeholder, will be defined in shared.css */
}

.page-casino {
  background-color: var(--deep-navy);
  color: var(--text-main);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-casino__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-casino__section {
  padding: 60px 0;
  text-align: center;
}

.page-casino__section-title {
  font-size: 3em;
  font-weight: 700;
  color: var(--gold-color);
  margin-bottom: 40px;
  line-height: 1.2;
}

.page-casino__sub-title {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-casino__description {
  font-size: 1.2em;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-casino__card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-main);
}

.page-casino__btn-primary,
.page-casino__btn-secondary,
.page-casino a[class*="btn"] {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-casino__btn-primary {
  background: var(--btn-gradient);
  color: #ffffff;
  border: none;
}

.page-casino__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-casino__btn-secondary {
  background: transparent;
  color: var(--gold-color);
  border: 2px solid var(--gold-color);
  margin-left: 15px;
}

.page-casino__btn-secondary:hover {
  background: var(--gold-color);
  color: var(--deep-navy);
  transform: translateY(-2px);
}

.page-casino__btn-small {
  padding: 8px 18px;
  font-size: 0.9em;
}

/* Hero Section */
.page-casino__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.page-casino__hero-image-wrapper {
  width: 100%;
  max-height: 700px;
  overflow: hidden;
}

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

.page-casino__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 30px 15px;
  max-width: 900px;
  margin-top: -150px; /* Overlap with image for visual flow */
  background: rgba(16, 35, 63, 0.8); /* Semi-transparent card-bg */
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

.page-casino__main-title {
  font-weight: 700;
  color: var(--gold-color);
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 100%;
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive H1 font size */
}

.page-casino__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Why Choose Section */
.page-casino__why-choose {
  background-color: var(--deep-navy);
}

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

.page-casino__feature-item {
  padding: 30px;
}

.page-casino__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-casino__feature-title {
  font-size: 1.5em;
  color: var(--gold-color);
  margin-bottom: 10px;
}

.page-casino__feature-text {
  color: var(--text-secondary);
  font-size: 1em;
}

/* Popular Games Section */
.page-casino__popular-games {
  background-color: var(--primary-color);
  padding: 80px 0;
}

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

.page-casino__game-card {
  padding: 20px;
  text-align: left;
}

.page-casino__game-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-casino__game-title {
  font-size: 1.6em;
  color: var(--gold-color);
  margin-bottom: 10px;
}

.page-casino__game-description {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Live Casino Experience Section */
.page-casino__live-experience {
  background-color: var(--deep-navy);
  text-align: left;
}

.page-casino__live-experience .page-casino__section-title {
  text-align: center;
}

.page-casino__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-casino__text-block {
  flex: 1;
  padding-right: 20px;
}

.page-casino__text-block p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-casino__image-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-casino__live-image {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

/* Promotions Section */
.page-casino__promotions {
  background-color: var(--primary-color);
  padding: 80px 0;
}

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

.page-casino__promo-card {
  padding: 20px;
  text-align: left;
}

.page-casino__promo-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-casino__promo-title {
  font-size: 1.6em;
  color: var(--gold-color);
  margin-bottom: 10px;
}

.page-casino__promo-description {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-casino__button-group {
  margin-top: 40px;
  text-align: center;
}

/* How to Start Section */
.page-casino__how-to-start {
  background-color: var(--deep-navy);
}

.page-casino__steps-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-casino__step-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-casino__step-title {
  font-size: 1.8em;
  color: var(--gold-color);
  margin-bottom: 15px;
}

.page-casino__step-item p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* FAQ Section */
.page-casino__faq-section {
  background-color: var(--primary-color);
  padding-bottom: 80px;
}

.page-casino__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

details.page-casino__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  color: var(--text-main);
}

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

details.page-casino__faq-item summary.page-casino__faq-question:hover {
  background: rgba(var(--border-color), 0.5); /* Lighter hover for dark background */
}

.page-casino__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}

.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-casino__faq-item .page-casino__faq-answer {
  padding: 0 20px 20px;
  background: var(--deep-navy);
  border-radius: 0 0 5px 5px;
  color: var(--text-secondary);
}

.page-casino__faq-answer p {
  margin-bottom: 0;
}

/* Global image and button responsiveness for content area */
.page-casino img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-casino__section,
.page-casino__card,
.page-casino__container,
.page-casino__cta-buttons,
.page-casino__button-group {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Homepage Specific CSS (as requested by prompt, applied with page-casino prefix) --- */
/* This section is primarily for the homepage (index.html) layout, 
   but included here as per strict instruction to ensure its presence in casino.css */

@media (max-width: 1023px) {
  .page-casino__home-hero { /* This class would typically be on index.html's hero */
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-casino__hero-brand,
  .page-casino__hero-jackpot {
    display: none !important;
  }
  .page-casino__game-trial { /* This class would typically be on index.html's 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-casino__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-casino__game-trial-topbar,
  .page-casino__game-trial-bottombar {
    display: none !important;
  }
  .page-casino__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-casino__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-casino__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-casino__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-casino__home-hero { /* This class would typically be on index.html's 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-casino__hero-brand, /* These classes would typically be on index.html's hero */
  .page-casino__hero-jackpot,
  .page-casino__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-casino__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-casino__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-casino__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-casino__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-casino__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  /* Additional desktop styles for other modules on homepage */
  .page-casino__promo-strip-track { /* Example, assuming this is a homepage element */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 16px;
  }
  .page-casino__promo-card { /* Example, assuming this is a homepage element */
    flex-direction: row;
    text-align: left;
  }
  .page-casino__hot-games-grid { /* Example, assuming this is a homepage element */
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    text-align: center;
  }
  .page-casino__hot-games-name,
  .page-casino__hot-games-rtp,
  .page-casino__hot-games-desc {
    display: block;
  }
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-casino__section {
    padding: 40px 0;
  }
  .page-casino__section-title {
    font-size: 2.2em;
    margin-bottom: 30px;
  }
  .page-casino__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }
  .page-casino__description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-casino__hero-content {
    margin-top: -80px;
    padding: 20px 15px;
  }
  .page-casino__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-casino__btn-secondary {
    margin-left: 0;
  }

  /* General content area responsive images and containers */
  .page-casino img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-casino__section,
  .page-casino__card,
  .page-casino__container,
  .page-casino__cta-buttons,
  .page-casino__button-group,
  .page-casino__features-grid,
  .page-casino__game-grid,
  .page-casino__promo-grid,
  .page-casino__steps-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Buttons specific */
  .page-casino__btn-primary,
  .page-casino__btn-secondary,
  .page-casino a[class*="button"],
  .page-casino 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-left: 15px;
    padding-right: 15px;
  }
  .page-casino__cta-buttons,
  .page-casino__button-group {
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-casino__cta-buttons {
    flex-direction: column;
  }

  .page-casino__features-grid,
  .page-casino__game-grid,
  .page-casino__promo-grid,
  .page-casino__steps-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-casino__content-wrapper {
    flex-direction: column;
  }
  .page-casino__text-block {
    padding-right: 0;
  }
  .page-casino__live-image {
    max-width: 100%;
  }
  .page-casino__promo-image {
    height: auto;
  }

  .page-casino__faq-qtext {
    font-size: 1em;
  }
  details.page-casino__faq-item summary.page-casino__faq-question {
    padding: 15px;
  }
  details.page-casino__faq-item .page-casino__faq-answer {
    padding: 0 15px 15px;
  }
  /* Homepage specific elements for mobile (as requested in prompt) */
  .page-casino__promo-strip-track { /* For homepage promo strip */
    grid-template-columns: repeat(2, 1fr) !important; /* Adjust as needed for specific layout */
    overflow-x: hidden;
  }
  .page-casino__hot-games-grid { /* For homepage hot games */
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .page-casino__hot-games-name,
  .page-casino__hot-games-rtp,
  .page-casino__hot-games-desc {
    display: none;
  }
  .page-casino__brand-intro { /* For homepage brand intro */
    display: block;
  }
  /* Winner Ticker and body padding for fixed footer (if applicable, from homepage) */
  .page-casino__winner-ticker { /* Assuming a fixed bottom ticker */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
  }
  /* If shared.css does not handle body padding for fixed header, this would be here */
  /* body { padding-bottom: 60px; } */
}

/* Game Trial Overlay & Modal (for homepage, but included in casino.css as per prompt) */
.page-casino__game-trial-overlay {
  z-index: 5;
  pointer-events: auto;
}
.page-casino__game-trial-overlay.is-hidden {
  display: none !important;
  pointer-events: none !important;
}
.page-casino__game-trial-start {
  z-index: 6;
  pointer-events: auto;
  touch-action: manipulation;
}
.page-casino__game-trial-shell {
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 10px;
  overflow: hidden;
}
.page-casino__reward-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page-casino__reward-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}
.page-casino__reward-modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  color: var(--text-main);
}
.page-casino__reward-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5em;
  color: var(--text-secondary);
  cursor: pointer;
}
.page-casino__reward-modal-close:hover {
  color: var(--gold-color);
}
.page-casino__reward-modal h3 {
  color: var(--gold-color);
  margin-bottom: 15px;
}
.page-casino__reward-modal p {
  color: var(--text-secondary);
  margin-bottom: 25px;
}
.page-casino--reward-open {
  overflow: hidden;
}