/* style/resources.css */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-register-login: #FFFF00;
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--secondary-color); /* Default body background is white */
}

.page-resources__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-color: var(--primary-color);
  color: var(--text-color-light);
}

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

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-resources__hero-title {
  font-size: 3em;
  margin-bottom: 15px;
  color: var(--text-color-light);
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-color-light);
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-register-bg);
  color: var(--button-text-register-login);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background: darken(var(--button-register-bg), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__section {
  padding: 80px 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.page-resources__section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  color: var(--primary-color);
}

.page-resources__text-block {
  font-size: 1.1em;
  margin-bottom: 30px;
  line-height: 1.8;
  text-align: left;
}

.page-resources__image-full {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  margin-top: 30px;
  object-fit: cover;
}

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

.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__dark-bg .page-resources__section-title {
  color: var(--text-color-light);
}

.page-resources__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
}

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

.page-resources__game-card,
.page-resources__news-card {
  background: var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
}

.page-resources__game-card:hover,
.page-resources__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__card-image {
  width: 100%;
  height: 200px; /* Fixed height for cards */
  object-fit: cover;
  display: block;
}

.page-resources__card-title {
  font-size: 1.3em;
  margin: 20px 20px 10px;
  color: var(--primary-color);
  line-height: 1.4;
}

.page-resources__card-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-resources__card-title a:hover {
  text-decoration: underline;
}

.page-resources__card-description {
  font-size: 0.95em;
  margin: 0 20px 20px;
  color: #555;
}

.page-resources__btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  margin: 0 20px 20px;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.page-resources__safety-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  text-align: left;
}

.page-resources__safety-text {
  flex: 1;
  min-width: 300px;
}

.page-resources__safety-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.page-resources__safety-list li {
  margin-bottom: 10px;
  font-size: 1.05em;
}

.page-resources__safety-list li a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-resources__safety-list li a:hover {
  text-decoration: underline;
}

/* FAQ Section */
.page-resources__faq-list {
  margin-top: 40px;
  text-align: left;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  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-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-color-dark);
  pointer-events: none;
}

.page-resources__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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-resources__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 15px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-color-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to ensure content is visible */
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(180deg);
}

.page-resources__useful-links {
  background-color: #f8f8f8;
}

.page-resources__link-item {
  display: block;
  padding: 15px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__link-item:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
}

.page-resources__btn-login {
  background: var(--button-login-bg);
  color: var(--button-text-register-login);
  border: none;
}

.page-resources__btn-login:hover {
  background: darken(var(--button-login-bg), 10%);
  color: var(--button-text-register-login);
}

.page-resources__btn-register {
  background: var(--button-register-bg);
  color: var(--button-text-register-login);
  border: none;
}

.page-resources__btn-register:hover {
  background: darken(var(--button-register-bg), 10%);
  color: var(--button-text-register-login);
}

/* All images must be responsive and not smaller than 200px */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__hero-title {
    font-size: 2em;
  }
  
  .page-resources__hero-description {
    font-size: 1em;
  }
  
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__section {
    padding: 40px 15px;
  }

  .page-resources__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-resources__text-block {
    font-size: 1em;
  }

  .page-resources__game-grid,
  .page-resources__news-grid,
  .page-resources__link-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources__card-image {
    height: 180px;
  }

  .page-resources__card-title {
    font-size: 1.2em;
    margin: 15px 15px 8px;
  }

  .page-resources__card-description {
    font-size: 0.9em;
    margin: 0 15px 15px;
  }

  .page-resources__btn-secondary {
    margin: 0 15px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__safety-content {
    flex-direction: column;
    gap: 20px;
  }

  .page-resources__safety-text,
  .page-resources__image-right {
    min-width: unset;
  }

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

  .page-resources__link-item {
    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-resources__btn-login, .page-resources__btn-register {
    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;
  }
  
  /* Ensure all content sections have proper mobile padding */
  .page-resources__container {
    padding-left: 0;
    padding-right: 0;
  }

  /* Force all images to be responsive and not overflow */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-resources__section,
  .page-resources__card,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
}