/* style/about.css */

/* Custom color variables from requirements */
:root {
  --five88-primary-color: #11A84E;
  --five88-secondary-color: #22C768;
  --five88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --five88-card-bg: #11271B;
  --five88-background: #08160F;
  --five88-text-main: #F2FFF6;
  --five88-text-secondary: #A7D9B8;
  --five88-border: #2E7A4E;
  --five88-glow: #57E38D;
  --five88-gold: #F2C14E;
  --five88-divider: #1E3A2A;
  --five88-deep-green: #0A4B2C;
}

.page-about {
  font-family: 'Arial', sans-serif;
  color: var(--five88-text-main); /* Main text color for the page, as body background is dark */
  background-color: var(--five88-background); /* Page background */
}

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

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

.page-about__section--history,
.page-about__section--commitment,
.page-about__section--achievements,
.page-about__section--faq {
  background-color: var(--five88-background);
  color: var(--five88-text-main);
}

.page-about__dark-section {
  background-color: var(--five88-card-bg);
  color: var(--five88-text-main);
}

.page-about__section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--five88-text-main);
  line-height: 1.2;
}

.page-about__section-description {
  font-size: 18px;
  color: var(--five88-text-secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.page-about__grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  text-align: left;
}

.page-about__text-block p {
  margin-bottom: 15px;
  line-height: 1.8;
  font-size: 16px;
  color: var(--five88-text-secondary);
}

.page-about__text-block p strong {
  color: var(--five88-text-main);
}

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

.page-about__image-full-width {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

/* Hero Section */
.page-about__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top margin, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--five88-card-bg);
}

.page-about__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit height of the image wrapper */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-about__hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px 20px 0;
  max-width: 900px;
  margin-top: -80px; /* Pull content up slightly over the image for better flow */
}

.page-about__main-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: var(--five88-gold);
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-about__intro-text {
  font-size: 19px;
  line-height: 1.7;
  color: var(--five88-text-main);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-about__btn-primary {
  background: var(--five88-button-gradient);
  color: var(--five88-text-main);
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-about__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.page-about__btn-secondary {
  background-color: transparent;
  color: var(--five88-primary-color);
  border: 2px solid var(--five88-border);
  box-shadow: none;
}

.page-about__btn-secondary:hover {
  background-color: var(--five88-primary-color);
  color: var(--five88-text-main);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-about__text-link {
  color: var(--five88-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-about__text-link:hover {
  color: var(--five88-glow);
  text-decoration: underline;
}

/* Features Grid */
.page-about__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-about__feature-card {
  background-color: var(--five88-card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  box-sizing: border-box;
}

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

.page-about__feature-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--five88-text-main);
  margin-bottom: 15px;
}

.page-about__feature-text {
  font-size: 16px;
  color: var(--five88-text-secondary);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 20px;
}

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

.page-about__team-member-card {
  background-color: var(--five88-background);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.page-about__team-member-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--five88-primary-color);
}

.page-about__team-member-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--five88-text-main);
  margin-bottom: 10px;
}

.page-about__team-member-role {
  font-size: 15px;
  color: var(--five88-text-secondary);
  line-height: 1.6;
}

.page-about__team-culture-text {
  font-size: 16px;
  color: var(--five88-text-secondary);
  line-height: 1.7;
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Contact Section */
.page-about__contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  text-align: left;
  margin-top: 40px;
}

.page-about__contact-info,
.page-about__contact-channels {
  background-color: var(--five88-background);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--five88-border);
}

.page-about__contact-subtitle {
  font-size: 24px;
  font-weight: 700;
  color: var(--five88-text-main);
  margin-bottom: 20px;
}

.page-about__contact-info p {
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--five88-text-secondary);
}

.page-about__contact-info p strong {
  color: var(--five88-text-main);
}

.page-about__support-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.page-about__support-link {
  color: var(--five88-gold);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.page-about__support-link:hover {
  color: var(--five88-glow);
  text-decoration: underline;
}

/* FAQ Section */
.page-about__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.page-about__faq-item {
  background-color: var(--five88-card-bg);
  border: 1px solid var(--five88-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: var(--five88-text-main);
  cursor: pointer;
  background-color: var(--five88-deep-green);
  transition: background-color 0.3s ease;
}

.page-about__faq-question:hover {
  background-color: var(--five88-primary-color);
}

.page-about__faq-item[open] .page-about__faq-question {
  background-color: var(--five88-primary-color);
}

.page-about__faq-qtext {
  flex-grow: 1;
}

.page-about__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-about__faq-item[open] .page-about__faq-toggle {
  transform: rotate(45deg);
}

.page-about__faq-answer {
  padding: 0 25px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--five88-text-secondary);
}

.page-about__faq-answer p {
  margin-bottom: 10px;
}

/* Hide default details marker */
.page-about__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-about__faq-item summary::marker {
  display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-about__grid-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .page-about__grid-layout .page-about__text-block, 
  .page-about__grid-layout .page-about__image-block {
    order: unset;
  }
  
  .page-about__grid-layout:nth-child(even) .page-about__text-block {
    order: 1;
  }

  .page-about__grid-layout:nth-child(even) .page-about__image-block {
    order: 2;
  }

  .page-about__contact-grid {
    grid-template-columns: 1fr;
  }
}

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

  .page-about__hero-content {
    margin-top: -40px;
    padding-top: 20px;
  }

  .page-about__main-title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .page-about__intro-text {
    font-size: 17px;
  }

  .page-about__section-title {
    font-size: clamp(24px, 5vw, 36px);
  }

  .page-about__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Images responsive */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-about__section,
  .page-about__container,
  .page-about__feature-card,
  .page-about__team-member-card,
  .page-about__contact-info,
  .page-about__contact-channels,
  .page-about__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-about__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  /* Buttons responsive */
  .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: 12px 20px;
    font-size: 16px;
    margin-bottom: 15px; /* Add spacing for stacked buttons */
  }

  .page-about__hero-content .page-about__btn-primary {
    margin-bottom: 0; /* No extra margin if only one button */
  }

  .page-about__contact-info .page-about__btn-secondary,
  .page-about__text-block .page-about__btn-primary,
  .page-about__text-block .page-about__btn-secondary {
    margin-top: 20px;
  }

  .page-about__contact-info .page-about__btn-secondary {
    margin-bottom: 0;
  }

  .page-about__features-grid,
  .page-about__team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-about__contact-grid {
    gap: 20px;
  }

  .page-about__faq-question {
    font-size: 16px;
    padding: 15px 20px;
  }

  .page-about__faq-answer {
    padding: 0 20px 15px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .page-about__hero-content {
    margin-top: -20px;
  }
  .page-about__main-title {
    font-size: clamp(24px, 8vw, 32px);
  }
  .page-about__intro-text {
    font-size: 15px;
  }
  .page-about__section-title {
    font-size: clamp(22px, 6vw, 28px);
  }
  .page-about__section-description {
    font-size: 14px;
  }
  .page-about__btn-primary,
  .page-about__btn-secondary {
    font-size: 15px;
    padding: 10px 15px;
  }
  .page-about__feature-title {
    font-size: 20px;
  }
  .page-about__team-member-name {
    font-size: 18px;
  }
  .page-about__contact-subtitle {
    font-size: 20px;
  }
}