/* style/casino.css */

/* Base styles for the casino page */
.page-casino {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for assumed dark body background */
  background-color: var(--dark-bg-1); /* Inherited from shared.css, likely dark */
}

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

.page-casino__section {
  padding: 60px 0;
  margin-bottom: 20px;
  background-color: var(--dark-bg-1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-casino__section:last-of-type {
  border-bottom: none;
}

/* Fixed header padding */
.page-casino__introduction-section {
  padding-top: 120px;
}

/* Hero Section */
.page-casino__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0; /* Remove margin to connect with products section */
}

.page-casino__hero-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.page-casino__hero-image {
  width: 100%;
  margin: 0;
}

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

/* Products Section */
.page-casino__products-section {
  width: 100%;
  padding: 40px 20px;
  background: #1A202C; /* Darker background for contrast */
  margin-top: 0; /* Remove top margin */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-casino__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: 4 small cards, 2 large cards */
  gap: 20px;
}

.page-casino__products-grid {
  display: grid;
  gap: 20px;
}

.page-casino__products-grid--small {
  grid-template-columns: repeat(4, 1fr);
}

.page-casino__products-grid--large {
  grid-template-columns: repeat(2, 1fr);
}

.page-casino__product-card {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for dark bg */
  border: 3px solid #FFD700; /* Gold border */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino__product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.page-casino__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-casino__product-card-image {
  width: 100%;
  height: 100%; /* Ensure image fills the card */
  overflow: hidden;
}

.page-casino__product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Headings */
.page-casino__main-title {
  font-size: 3em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.page-casino__section-title {
  font-size: 2.5em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 25px;
  font-weight: 600;
  line-height: 1.3;
}

.page-casino__sub-title {
  font-size: 2em;
  color: #f8f8f8;
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.page-casino__game-title, .page-casino__promotion-title, .page-casino__info-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.page-casino__blog-title {
  font-size: 1.5em;
  color: #FFD700;
  margin-top: 15px;
  margin-bottom: 10px;
  font-weight: 500;
  line-height: 1.4;
}

/* Text elements */
.page-casino__text-block {
  font-size: 1.1em;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.page-casino__text-block a {
  color: #FFD700; /* Gold for links */
  text-decoration: underline;
}

.page-casino__text-block a:hover {
  color: #fff;
}

.page-casino__highlight {
  color: #FFD700;
  font-weight: bold;
}

/* Lists */
.page-casino__link-list, .page-casino__promotion-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.page-casino__list-item {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  font-size: 1.1em;
  color: #e0e0e0;
}

.page-casino__list-item::before {
  content: '▶'; /* Custom bullet point */
  color: #FFD700;
  position: absolute;
  left: 0;
  top: 0;
}

.page-casino__link-item {
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-casino__link-item:hover {
  color: #fff;
}

/* Buttons */
.page-casino__button-wrapper {
  text-align: center;
  margin-top: 40px;
}

.page-casino__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: #FFD700;
  color: #1A202C;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  border: 2px solid #FFD700;
}

.page-casino__btn-primary:hover {
  background-color: #fff;
  color: #FFD700;
  transform: translateY(-3px);
}

/* Game Categories */
.page-casino__game-category {
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-casino__game-image-wrapper {
  margin-top: 20px;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #FFD700;
}

.page-casino__game-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Info Blocks (Security & Customer Service) */
.page-casino__info-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-casino__info-block .page-casino__info-title {
  color: #FFD700;
  margin-top: 0;
}

.page-casino__info-image-wrapper {
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #FFD700;
  max-width: 400px; /* Limit image width */
  width: 100%;
}

.page-casino__info-image {
  width: 100%;
  height: auto;
  display: block;
}

/* FAQ Section */
.page-casino__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-casino__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: #e0e0e0;
}

.page-casino__faq-item.active .page-casino__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
}

.page-casino__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #1A202C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-casino__faq-question:hover {
  background: #2a3447;
  border-color: #FFD700;
}

.page-casino__faq-question:active {
  background: #3a4457;
}

.page-casino__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: #f0f0f0;
  pointer-events: none;
}

.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-casino__faq-item.active .page-casino__faq-toggle {
  color: #fff;
  transform: rotate(180deg);
}

/* Blog Section */
.page-casino__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-casino__blog-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-casino__blog-link {
  text-decoration: none;
  display: block;
  color: inherit;
  padding-bottom: 20px; /* Add padding for content below image */
}

.page-casino__blog-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  overflow: hidden;
  border-bottom: 2px solid #FFD700;
}

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

.page-casino__blog-title {
  padding: 15px 20px 0;
  color: #FFD700;
}

.page-casino__blog-summary {
  padding: 0 20px;
  font-size: 0.95em;
  color: #c0c0c0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-casino__products-container {
    grid-template-columns: 1fr; /* Stack the two grids vertically */
  }

  .page-casino__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-casino__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-casino__main-title {
    font-size: 2.5em;
  }

  .page-casino__section-title {
    font-size: 2em;
  }

  .page-casino__sub-title {
    font-size: 1.7em;
  }
}

@media (max-width: 768px) {
  .page-casino__container {
    padding: 0 15px;
  }

  .page-casino__section {
    padding: 40px 0;
  }

  .page-casino__introduction-section {
    padding-top: 100px;
  }

  /* Mobile HERO */
  .page-casino__hero-section {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  .page-casino__hero-image img {
    width: 100% !important;
    height: auto !important;
  }

  /* Mobile Products Section */
  .page-casino__products-section {
    padding: 30px 15px;
  }

  .page-casino__products-container {
    grid-template-columns: 1fr; /* Stack the two grids vertically */
    gap: 15px;
  }
  
  /* 4-grid for small cards: 2x2 layout, square cards */
  .page-casino__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .page-casino__products-grid--small .page-casino__product-card {
    aspect-ratio: 1 / 1; /* Make cards square */
  }
  
  .page-casino__products-grid--small .page-casino__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Make image fill the square container */
  }
  
  /* 2-grid for large cards: 1x1 layout (each card on its own row), square cards */
  .page-casino__products-grid--large {
    grid-template-columns: 1fr; /* 1 column */
    gap: 15px;
  }
  
  .page-casino__products-grid--large .page-casino__product-card {
    aspect-ratio: 1 / 1; /* Make cards square */
  }
  
  .page-casino__products-grid--large .page-casino__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Make image fill the square container */
  }

  .page-casino__main-title {
    font-size: 2em;
  }

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

  .page-casino__sub-title {
    font-size: 1.5em;
  }

  .page-casino__game-title, .page-casino__promotion-title, .page-casino__info-title {
    font-size: 1.4em;
  }

  .page-casino__blog-title {
    font-size: 1.2em;
  }

  .page-casino__text-block, .page-casino__list-item {
    font-size: 1em;
  }

  .page-casino__btn-primary {
    padding: 12px 25px;
    font-size: 1.1em;
  }

  .page-casino__info-block {
    padding: 15px;
  }
  
  /* Mobile FAQ */
  .page-casino__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-casino__faq-question h3 {
    font-size: 1.1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-casino__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-casino__faq-answer {
    padding: 0 15px;
  }
  
  .page-casino__faq-item.active .page-casino__faq-answer {
    padding: 15px !important;
  }

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

  .page-casino__blog-image-wrapper {
    height: 180px;
  }
}

/* Ensure all images are responsive and prevent overflow */
.page-casino img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile specific image and container overflow fix */
@media (max-width: 768px) {
  .page-casino img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-casino__section,
  .page-casino__card,
  .page-casino__container,
  .page-casino__game-image-wrapper,
  .page-casino__info-image-wrapper,
  .page-casino__blog-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left and padding-right are already set on .page-casino__container for smaller screens */
    /* For sections without specific container padding, ensure they don't cause overflow */
    overflow: hidden;
  }
}