/* style/live.css */

:root {
  --kinggame-primary-color: #F2C14E;
  --kinggame-secondary-color: #FFD36B;
  --kinggame-card-bg: #111111;
  --kinggame-background: #0A0A0A;
  --kinggame-text-main: #FFF6D6;
  --kinggame-border: #3A2A12;
  --kinggame-glow: #FFD36B;
  --kinggame-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

.page-live {
  font-family: Arial, sans-serif;
  color: var(--kinggame-text-main); /* Ensure light text on dark body background */
  background-color: var(--kinggame-background); /* Body background is dark from shared.css */
}

.page-live__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
  overflow: hidden;
  color: var(--kinggame-text-main);
  background-color: var(--kinggame-background);
}

.page-live__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  height: auto;
  position: relative;
  margin-bottom: 30px;
}

.page-live__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.page-live__hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 0 15px;
}

.page-live__hero-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--kinggame-secondary-color);
}

.page-live__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  line-height: 1.6;
}

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

.page-live__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--kinggame-primary-color);
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.3;
}

.page-live__section-description {
  font-size: 1.1em;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--kinggame-text-main);
}

.page-live__btn-primary,
.page-live__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 50px;
  font-size: 1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  min-width: 180px;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-live__btn-primary {
  background: var(--kinggame-button-gradient);
  color: #ffffff; /* Ensure white text on button gradient */
  border: none;
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

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

.page-live__btn-secondary {
  background-color: transparent;
  color: var(--kinggame-primary-color);
  border: 2px solid var(--kinggame-primary-color);
}

.page-live__btn-secondary:hover {
  background-color: var(--kinggame-primary-color);
  color: var(--kinggame-background);
  transform: translateY(-2px);
}

/* Video Section */
.page-live__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--kinggame-background);
}

.page-live__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

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

.page-live__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-live__video-wrapper:hover .page-live__video-overlay {
  opacity: 1;
}

.page-live__video-text {
  color: #ffffff;
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.page-live__btn-play-video {
  background: var(--kinggame-button-gradient);
  color: #ffffff; /* Ensure white text on button gradient */
}

/* Game Categories */
.page-live__game-categories {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-live__category-card {
  background-color: var(--kinggame-card-bg);
  border: 1px solid var(--kinggame-border);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--kinggame-text-main);
}

.page-live__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(242, 193, 78, 0.2);
}

.page-live__category-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px var(--kinggame-glow)); /* Allowed for icon glow */
}

.page-live__category-title {
  font-size: 1.5em;
  color: var(--kinggame-primary-color);
  margin-bottom: 15px;
}

.page-live__category-card p {
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Why Choose Section */
.page-live__why-choose {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-live__feature-item {
  background-color: var(--kinggame-card-bg);
  border: 1px solid var(--kinggame-border);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: var(--kinggame-text-main);
  transition: box-shadow 0.3s ease;
}

.page-live__feature-item:hover {
  box-shadow: 0 8px 16px rgba(242, 193, 78, 0.2);
}

.page-live__feature-image {
  width: 100%;
  height: 267px; /* Maintain aspect ratio for 600x400 source */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-live__feature-title {
  font-size: 1.4em;
  color: var(--kinggame-primary-color);
  margin-bottom: 10px;
}

.page-live__feature-item p {
  font-size: 0.95em;
  line-height: 1.5;
}

/* Promotions Section */
.page-live__promotions-section {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-live__text-content {
  flex: 1;
  text-align: left;
}

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

.page-live__promo-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  border-radius: 12px;
  display: block;
}

.page-live__promo-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  color: var(--kinggame-text-main);
}

.page-live__promo-list li {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%23F2C14E"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat left center;
  background-size: 20px;
  padding-left: 30px;
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 1.05em;
}

/* Getting Started Section */
.page-live__getting-started {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-live__step-card {
  background-color: var(--kinggame-card-bg);
  border: 1px solid var(--kinggame-border);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: var(--kinggame-text-main);
  transition: box-shadow 0.3s ease;
}

.page-live__step-card:hover {
  box-shadow: 0 8px 16px rgba(242, 193, 78, 0.2);
}

.page-live__step-image {
  width: 100%;
  height: auto;
  max-height: 300px; /* Max height for consistent look */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-live__step-title {
  font-size: 1.4em;
  color: var(--kinggame-primary-color);
  margin-bottom: 10px;
}

.page-live__step-card p {
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Partners Section */
.page-live__partners-section {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(167px, 1fr)); /* Adjusted for 167px width */
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

.page-live__partner-logo {
  width: 167px; /* Fixed width as per requirement */
  height: 127px; /* Fixed height as per requirement */
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: brightness(0.7) grayscale(100%); /* Slightly dim and grayscale partners */
}

.page-live__partner-logo:hover {
  transform: scale(1.05);
  filter: brightness(1) grayscale(0%); /* Full color on hover */
}

/* FAQ Section */
.page-live__faq-section {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__faq-container {
  max-width: 900px;
  margin: 0 auto;
}

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

.page-live__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: var(--kinggame-card-bg);
  color: var(--kinggame-primary-color);
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-live__faq-question:hover {
  background-color: rgba(242, 193, 78, 0.1);
}

.page-live__faq-question h3 {
  margin: 0;
  font-size: 1.2em;
  color: var(--kinggame-primary-color);
}

.page-live__faq-toggle {
  font-size: 1.8em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: var(--kinggame-secondary-color);
}

.page-live__faq-item.active .page-live__faq-toggle {
  transform: rotate(45deg);
}

.page-live__faq-answer {
  max-height: 0; /* Initial state: collapsed */
  overflow: hidden;
  padding: 0 25px; /* Initial state: no padding */
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 1em;
  line-height: 1.6;
  color: var(--kinggame-text-main);
}

.page-live__faq-item.active .page-live__faq-answer {
  max-height: 1000px !important; /* Ensure it expands enough */
  padding: 15px 25px 25px 25px; /* Padding for expanded state */
}

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

/* CTA Section */
.page-live__cta-section {
  padding: 60px 20px;
  background-color: var(--kinggame-background);
}

.page-live__cta-section .page-live__content-wrapper {
  flex-direction: row-reverse; /* Image on left, text on right */
}

.page-live__cta-image {
  width: 100%;
  height: auto;
  max-width: 1000px;
  border-radius: 12px;
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-live__content-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .page-live__text-content {
    text-align: center;
  }
  
  .page-live__promo-list {
    text-align: left;
    margin: 0 auto 30px auto;
    max-width: 500px;
  }

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

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

@media (max-width: 768px) {
  .page-live {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-live__hero-section,
  .page-live__video-section,
  .page-live__game-categories,
  .page-live__why-choose,
  .page-live__promotions-section,
  .page-live__getting-started,
  .page-live__partners-section,
  .page-live__faq-section,
  .page-live__cta-section {
    padding: 40px 15px;
  }

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

  .page-live__hero-description,
  .page-live__section-description {
    font-size: 1em;
  }

  .page-live__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-live__btn-primary,
  .page-live__btn-secondary,
  .page-live a[class*="button"],
  .page-live 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-live__video-wrapper,
  .page-live__hero-image-wrapper,
  .page-live__category-card,
  .page-live__feature-item,
  .page-live__step-card,
  .page-live__faq-item,
  .page-live__content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-live img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-live__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-live__video-section {
    padding-top: 10px !important;
  }

  .page-live__partners-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .page-live__partner-logo {
    width: 120px; /* Adjust for smaller screens */
    height: auto;
  }
}