/* style/player-community.css */

/* Global styles for the page content, ensuring contrast with body background */
.page-player-community {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: #0a0a0a; /* Default to match body, but sections will have different backgrounds */
  padding-top: 120px; /* Desktop: Adjust for fixed header */
}

/* HERO Banner Section - adapted for non-homepage */
.page-player-community__hero-banner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.8), rgba(40, 167, 69, 0.8)); /* Overlay for text readability */
  overflow: hidden;
}

.page-player-community__hero-banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3; /* Make background image subtle */
}

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

.page-player-community__hero-banner-content {
  color: #ffffff;
  padding: 20px;
}

.page-player-community__main-heading {
  font-size: 3.2em;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-player-community__sub-heading {
  font-size: 1.4em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-player-community__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color); /* Using brand primary color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-player-community__cta-button:hover {
  background: var(--secondary-color); /* Using brand secondary color */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-player-community__section {
  padding: 60px 20px;
  margin-bottom: 20px;
  background-color: #1a1a1a; /* Darker background for sections */
  color: #f0f0f0;
}

.page-player-community__section--introduction {
  background-color: #0a0a0a; /* Darkest section for intro */
  color: #ffffff;
}

.page-player-community__section-title {
  font-size: 2.5em;
  color: #ffffff;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-player-community__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-player-community__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
  color: #e0e0e0;
}

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

.page-player-community__text-block a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

/* Card Grid Styling */
.page-player-community__card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-player-community__card {
  background: #2a2a2a; /* Slightly lighter dark for cards */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-player-community__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-player-community__card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Ensure min size */
}

.page-player-community__card-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-player-community__card-title a {
  color: #ffffff;
  text-decoration: none;
}

.page-player-community__card-title a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-player-community__card-text {
  font-size: 1em;
  color: #cccccc;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-player-community__card-text a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.page-player-community__cta-button--secondary {
  background: var(--secondary-color);
  color: #ffffff;
  border: none;
}

.page-player-community__cta-button--secondary:hover {
  background: #218838; /* Darker green on hover */
}

.page-player-community__cta-button--tertiary {
  background: #555555; /* Neutral grey for less prominent actions */
  color: #ffffff;
  border: none;
}

.page-player-community__cta-button--tertiary:hover {
  background: #777777; /* Lighter grey on hover */
}

/* Event List Styling */
.page-player-community__event-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 30px;
}

.page-player-community__event-item {
  background: #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-player-community__event-title {
  font-size: 1.6em;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-player-community__event-description {
  font-size: 1em;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-player-community__event-description a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-player-community__event-description a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

/* News List Styling */
.page-player-community__news-list {
  display: grid;
  grid-template-columns: 1fr; /* Single column for news */
  gap: 30px;
  margin-top: 30px;
}

.page-player-community__news-item {
  background: #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: row; /* Horizontal layout for news item */
  align-items: center;
  padding: 20px;
}

.page-player-community__news-image {
  width: 250px; /* Fixed width for image */
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  flex-shrink: 0;
  min-width: 200px; /* Enforce min size */
  min-height: 150px; /* Enforce min size */
}

.page-player-community__news-content {
  flex-grow: 1;
}

.page-player-community__news-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-player-community__news-title a {
  color: #ffffff;
  text-decoration: none;
}

.page-player-community__news-title a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-player-community__news-excerpt {
  font-size: 1em;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-player-community__news-excerpt a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-player-community__news-excerpt a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.page-player-community__news-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.page-player-community__news-link:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.page-player-community__news-arrow {
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.page-player-community__news-link:hover .page-player-community__news-arrow {
  transform: translateX(3px);
}

/* FAQ Section Styling */
.page-player-community__section--faq {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

.page-player-community__faq-list {
  margin-top: 30px;
}

.page-player-community__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a2a; /* Card background for FAQ items */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-player-community__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;
  color: #cccccc;
  font-size: 1em;
}

.page-player-community__faq-item.active .page-player-community__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px !important;
  opacity: 1;
  background: #3a3a3a; /* Slightly different background for open answer */
  border-radius: 0 0 8px 8px;
}

.page-player-community__faq-answer p {
  margin: 0;
}

.page-player-community__faq-answer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-player-community__faq-answer a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.page-player-community__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-player-community__faq-item.active .page-player-community__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.page-player-community__faq-question:hover {
  background: #3a3a3a;
  border-color: #4a4a4a;
}

.page-player-community__faq-question:active {
  background: #4a4a4a;
}

.page-player-community__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1.5;
  color: #ffffff;
  pointer-events: none; /* Allows click on parent div */
}

.page-player-community__faq-toggle {
  font-size: 28px;
  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; /* Allows click on parent div */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 123, 255, 0.1);
}

.page-player-community__faq-item.active .page-player-community__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-player-community__main-heading {
    font-size: 2.8em;
  }
  .page-player-community__sub-heading {
    font-size: 1.2em;
  }
  .page-player-community__section-title {
    font-size: 2em;
  }
  .page-player-community__news-image {
    width: 200px;
    height: 120px;
  }
  .page-player-community__news-title {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  .page-player-community {
    padding-top: 100px !important; /* Mobile: Adjust for fixed header */
  }

  .page-player-community__hero-banner {
    padding: 40px 15px;
  }
  .page-player-community__main-heading {
    font-size: 2.2em;
    margin-bottom: 10px;
  }
  .page-player-community__sub-heading {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-player-community__cta-button {
    padding: 12px 30px;
    font-size: 1em;
  }

  .page-player-community__section {
    padding: 30px 15px;
  }
  .page-player-community__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-player-community__text-block {
    font-size: 1em;
  }

  .page-player-community__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-player-community__card {
    padding: 20px;
  }
  .page-player-community__card-image {
    min-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 150px;
  }
  .page-player-community__card-title {
    font-size: 1.3em;
  }
  .page-player-community__card-text {
    font-size: 0.95em;
  }

  .page-player-community__event-item {
    padding: 20px;
  }
  .page-player-community__event-title {
    font-size: 1.4em;
  }
  .page-player-community__event-description {
    font-size: 0.95em;
  }

  .page-player-community__news-item {
    flex-direction: column; /* Stack image and content vertically */
    align-items: flex-start;
    padding: 15px;
  }
  .page-player-community__news-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 150px;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .page-player-community__news-content {
    width: 100%;
  }
  .page-player-community__news-title {
    font-size: 1.2em;
  }
  .page-player-community__news-excerpt {
    font-size: 0.9em;
  }

  .page-player-community__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-player-community__faq-question h3 {
    font-size: 1em;
    width: calc(100% - 40px);
  }
  .page-player-community__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  .page-player-community__faq-answer {
    padding: 0 15px;
  }
  .page-player-community__faq-item.active .page-player-community__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all images and containers adapt */
  .page-player-community img {
    max-width: 100% !important;
    height: auto !important;
  }
  .page-player-community__section,
  .page-player-community__card,
  .page-player-community__container,
  .page-player-community__hero-banner-container,
  .page-player-community__news-item,
  .page-player-community__event-item,
  .page-player-community__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}