/* style/about.css */

/* Custom properties for colors from shared.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --login-color: #EA7C07;
  --black-color: #000000;
  --border-color: #e0e0e0;
}

.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--secondary-color); /* Matches body background */
}

/* Hero Section */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color), #5bc0de); /* Gradient using primary color */
  color: var(--text-light);
  min-height: 500px;
  overflow: hidden; /* Prevent image overflow */
}

.page-about__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-about__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-about__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.page-about__hero-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.page-about__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--login-color); /* Use login color for CTA */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-about__cta-button:hover {
  background: #d46c06; /* Slightly darker login color */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-about__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

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

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

.page-about__text-block {
  margin-bottom: 20px;
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--text-dark);
}

.page-about__text-block a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-about__text-block a:hover {
  text-decoration: underline;
}

/* Intro Section */
.page-about__intro-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

/* Mission & Values Section */
.page-about__mission-values {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-about__mission-values .page-about__section-title {
  color: var(--text-light);
}

.page-about__mission-values .page-about__section-title::after {
  background: var(--text-light);
}

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

.page-about__card {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for dark background */
  color: var(--text-light);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.page-about__mission-values .page-about__card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-about__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-about__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--text-light);
  text-align: center;
}

.page-about__card p, .page-about__card ul {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-light);
}

.page-about__card ul {
  list-style-type: disc;
  padding-left: 20px;
}

.page-about__card li {
  margin-bottom: 10px;
}

/* Games Section */
.page-about__games-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

.page-about__game-categories .page-about__card {
  background: var(--secondary-color);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.page-about__game-categories .page-about__card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-about__game-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-about__game-card .page-about__card-title {
  color: var(--primary-color);
  font-size: 1.3em;
  margin-bottom: 10px;
}

.page-about__game-card .page-about__card-title a {
  color: inherit;
  text-decoration: none;
}

.page-about__game-card .page-about__card-title a:hover {
  text-decoration: underline;
}

.page-about__game-card p {
  color: var(--text-dark);
  font-size: 0.95em;
}

/* Security & Support Section */
.page-about__security-support {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-about__security-support .page-about__section-title {
  color: var(--text-light);
}

.page-about__security-support .page-about__section-title::after {
  background: var(--text-light);
}

.page-about__security-support .page-about__card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-about__security-support .page-about__card-title {
  color: var(--text-light);
}

.page-about__security-support p {
  color: var(--text-light);
}

/* Responsible Gambling Section */
.page-about__responsible-gambling {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

.page-about__responsible-list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 30px;
}

.page-about__responsible-list li {
  background: #f9f9f9;
  border-left: 5px solid var(--primary-color);
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 1.05em;
  color: var(--text-dark);
}

.page-about__responsible-list li strong {
  color: var(--primary-color);
}

/* Future Vision Section */
.page-about__future-vision {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
}

.page-about__future-vision .page-about__section-title {
  color: var(--text-light);
}

.page-about__future-vision .page-about__section-title::after {
  background: var(--text-light);
}

.page-about__future-vision .page-about__text-block {
  color: var(--text-light);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__cta-button--bottom {
  margin-top: 40px;
  background: var(--login-color); /* Use login color for CTA */
  color: var(--text-light);
}

.page-about__cta-button--bottom:hover {
  background: #d46c06; /* Slightly darker login color */
}

/* FAQ Section */
.page-about__faq-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

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

/* FAQ container style */
.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ default state - answer hidden */
.page-about__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 20px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
}

/* FAQ expanded state - IMPORTANT: use !important and sufficiently large max-height */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* Ensures it can expand to fit content */
  padding: 20px 20px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-about__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-about__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-dark);
  pointer-events: none; /* Prevents h3 from blocking click event */
}

/* Toggle icon */
.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevents icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change to X or rotate for minus sign */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-about__hero-title {
    font-size: 2.2em;
  }
  .page-about__hero-description {
    font-size: 1.1em;
  }
  .page-about__section-title {
    font-size: 1.8em;
  }
  .page-about__card-title {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  /* Mobile padding and image overflow fix */
  .page-about__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure proper spacing for mobile header */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-about__hero-image img {
    border-radius: 4px;
  }
  
  .page-about__hero-title {
    font-size: 1.8em;
  }
  .page-about__hero-description {
    font-size: 1em;
  }
  .page-about__cta-button {
    padding: 12px 30px;
    font-size: 1em;
  }

  .page-about__section-title {
    font-size: 1.6em;
    margin-bottom: 30px;
  }

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

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

  .page-about__card {
    padding: 25px;
  }

  .page-about__game-card img {
    height: 200px; /* Adjust image height for mobile cards */
  }

  /* Image responsive fix for all images in content area */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important; /* Ensure block display for proper width */
  }

  /* Containers holding images or content */
  .page-about__intro-section,
  .page-about__mission-values,
  .page-about__games-section,
  .page-about__security-support,
  .page-about__responsible-gambling,
  .page-about__future-vision,
  .page-about__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0; /* Container padding handled by .page-about__container */
    padding-right: 0;
  }
  .page-about__intro-section > .page-about__container,
  .page-about__mission-values > .page-about__container,
  .page-about__games-section > .page-about__container,
  .page-about__security-support > .page-about__container,
  .page-about__responsible-gambling > .page-about__container,
  .page-about__future-vision > .page-about__container,
  .page-about__faq-section > .page-about__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Button responsive fix */
  .page-about__cta-button,
  .page-about__btn-primary,
  .page-about__btn-secondary,
  .page-about a[class*="button"],
  .page-about 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;
  }
  
  /* Button containers mobile adaptation */
  .page-about__cta-buttons,
  .page-about__button-group,
  .page-about__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex; /* Ensure flex context for wrap */
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

  /* FAQ mobile adaptation */
  .page-about__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-about__faq-question h3 {
    font-size: 1em;
    width: calc(100% - 40px); /* Adjust width for toggle icon */
  }
  
  .page-about__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-about__faq-answer {
    padding: 0 15px;
  }
  
  .page-about__faq-item.active .page-about__faq-answer {
    padding: 15px !important;
  }
}

/* Ensure contrast for links on dark backgrounds */
.page-about__dark-bg a {
  color: var(--text-light); /* White links on dark background */
  text-decoration: underline;
}

.page-about__dark-bg a:hover {
  color: #f0f0f0;
}