/* style/about.css */

/* Base styles for the About page content */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--secondary-color); /* #FFFFFF */
}

/* Container for consistent content width */
.page-about__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Section titles */
.page-about__section-title {
  font-size: 32px;
  font-weight: bold;
  color: #26A9E0; /* Primary color for titles */
  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-color: #26A9E0;
  border-radius: 2px;
}

.page-about__section-title--light {
  color: #FFFFFF;
}

.page-about__section-title--light::after {
  background-color: #FFFFFF;
}

/* Text blocks (paragraphs) */
.page-about__text-block {
  margin-bottom: 20px;
  font-size: 16px;
  text-align: justify;
}

.page-about__text-block--light {
  color: #f0f0f0; /* Lighter text for dark backgrounds */
}

/* Links within text */
.page-about__text-link {
  color: #26A9E0; /* Primary color for links */
  text-decoration: none;
  font-weight: bold;
}

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

/* 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, #26A9E0, #FFFFFF); /* Blending brand color with white */
  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-container 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.15);
  margin-bottom: 30px;
}

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

.page-about__hero-title {
  font-size: 44px;
  font-weight: 700;
  color: #FFFFFF; /* White text on hero for contrast */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-about__hero-description {
  font-size: 18px;
  color: #FFFFFF; /* White text for hero description */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #EA7C07; /* Login/Promo button color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 20px;
  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;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-about__cta-button--bottom {
    margin-top: 40px;
}

/* Intro section */
.page-about__intro-section {
  padding: 80px 0;
  background-color: #FFFFFF; /* Light background */
}

/* Vision & Mission section */
.page-about__vision-mission {
  padding: 80px 0;
  background-color: #26A9E0; /* Primary brand color background */
  color: #FFFFFF;
}

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

.page-about__card {
  background: #FFFFFF; /* White background for cards on dark section */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.page-about__card:hover {
  transform: translateY(-5px);
}

.page-about__card--light {
  background: rgba(255, 255, 255, 0.95); /* Slightly transparent white on dark background */
  color: #333333; /* Dark text on light card */
}

.page-about__card-title {
  font-size: 24px;
  font-weight: 700;
  color: #26A9E0; /* Primary color for card titles */
  margin-bottom: 15px;
}

.page-about__card--light .page-about__card-title {
    color: #26A9E0;
}

.page-about__list {
  list-style: disc;
  padding-left: 20px;
  margin-top: 15px;
}

.page-about__list li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* Why Choose Us section */
.page-about__why-choose-us {
  padding: 80px 0;
  background-color: #F8F8F8; /* Light gray background */
}

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

.page-about__feature-item {
  background: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease;
}

.page-about__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-about__feature-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block; /* Ensure it behaves as a block for max-width */
  margin-left: auto;
  margin-right: auto;
}

.page-about__feature-title {
  font-size: 22px;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 15px;
}

/* Responsible Gambling section */
.page-about__responsible-gambling {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #FFFFFF;
}

/* FAQ Section */
.page-about__faq-section {
  padding: 80px 0;
  background-color: #FFFFFF;
}

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

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

/* 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; /* Adjusted padding */
  opacity: 0;
  color: #333333; /* Ensure dark text on light background */
}

/* FAQ expanded state - ⚠️ Use !important and sufficiently large max-height */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* ⚠️ Use !important to ensure priority, value large enough to accommodate any content */
  padding: 20px !important; /* Adjusted padding */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  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 styles */
.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px; /* Adjusted font size */
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
  color: #26A9E0; /* Primary color for question title */
}

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

.page-about__faq-item.active .page-about__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Bottom CTA Section */
.page-about__cta-bottom {
  padding: 80px 0;
  background-color: #26A9E0;
  text-align: center;
  color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-about__hero-title {
    font-size: 38px;
  }
  .page-about__hero-description {
    font-size: 16px;
  }
  .page-about__section-title {
    font-size: 28px;
  }
  .page-about__card-title {
    font-size: 22px;
  }
  .page-about__feature-title {
    font-size: 20px;
  }
  .page-about__feature-image {
    height: 200px; /* Adjust height for smaller screens */
  }
}

@media (max-width: 768px) {
  /* Mobile fixed header padding */
  .page-about__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-about__hero-container img {
    border-radius: 4px;
    margin-bottom: 20px;
  }

  .page-about__hero-title {
    font-size: 30px;
    margin-bottom: 15px;
  }

  .page-about__hero-description {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .page-about__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important; /* Buttons full width */
    max-width: 300px !important; /* Limit max width for aesthetic */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-about__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-about__container {
    padding: 15px;
  }
  
  .page-about__intro-section,
  .page-about__vision-mission,
  .page-about__why-choose-us,
  .page-about__responsible-gambling,
  .page-about__faq-section,
  .page-about__cta-bottom {
    padding: 40px 0;
  }

  .page-about__grid,
  .page-about__feature-grid {
    grid-template-columns: 1fr; /* Stack columns on mobile */
    gap: 20px;
  }

  .page-about__feature-image {
    height: 180px; /* Further adjust height for mobile */
  }

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

  /* Image responsive rules for all images in content area */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__feature-item,
  .page-about__faq-list,
  .page-about__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Remove padding from containers that already have it from parent section */
  .page-about__intro-section .page-about__container,
  .page-about__vision-mission .page-about__container,
  .page-about__why-choose-us .page-about__container,
  .page-about__responsible-gambling .page-about__container,
  .page-about__faq-section .page-about__container,
  .page-about__cta-bottom .page-about__container {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Ensure images are not smaller than 200px (desktop) */
.page-about img:not(.page-about__faq-toggle) {
  min-width: 200px;
  min-height: 200px;
}

/* Specific overrides for desktop/tablet feature images to ensure min-size */
@media (min-width: 769px) {
  .page-about__feature-image {
    min-width: 200px;
    min-height: 200px;
  }
  .page-about__image {
    min-width: 200px;
    min-height: 200px;
  }
}

/* No CSS filters on images */
.page-about img {
  filter: none !important;
}