/* style/resources.css */

:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #000000; /* Body background from shared.css */
  --card-bg-dark-mode: rgba(255, 255, 255, 0.08);
  --border-color-dark-mode: rgba(255, 255, 255, 0.15);
}

.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Text color for dark body background */
  background-color: var(--bg-dark); /* Ensure consistency with body background */
}

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

.page-resources__hero-section {
  position: relative;
  width: 100%;
  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 below fixed header */
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
  overflow: hidden;
}

.page-resources__hero-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.page-resources__main-title {
  font-size: 3.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.3em;
  color: var(--text-light);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-resources__cta-button:hover {
  background: darken(var(--primary-color), 10%); /* Simulated darken */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--text-light);
}

.page-resources__cta-button--secondary:hover {
  background: lighten(var(--secondary-color), 10%); /* Simulated lighten */
  color: var(--text-light);
}

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}

.page-resources__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-resources__text-block {
  font-size: 1.1em;
  color: var(--text-light);
  margin-bottom: 20px;
  text-align: justify;
}

.page-resources__image-content {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__dark-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
}

.page-resources__introduction-section, 
.page-resources__casino-strategies-section, 
.page-resources__responsible-gambling-section, 
.page-resources__other-resources-section {
  background-color: var(--bg-dark);
}

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

.page-resources__guide-item, .page-resources__strategy-item, .page-resources__news-item {
  background: var(--card-bg-dark-mode);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color-dark-mode);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__guide-item:hover, .page-resources__strategy-item:hover, .page-resources__news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-resources__guide-title, .page-resources__strategy-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-resources__guide-item p, .page-resources__strategy-item p {
  font-size: 1em;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-resources__read-more-button:hover {
  background: lighten(var(--secondary-color), 10%); /* Simulated lighten */
}

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

.page-resources__news-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__news-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-resources__news-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
  color: lighten(var(--primary-color), 10%); /* Simulated lighten */
}

.page-resources__news-excerpt {
  font-size: 0.95em;
  color: var(--text-light);
  margin-bottom: 10px;
  flex-grow: 1;
}

.page-resources__news-date {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: auto;
}

.page-resources__responsible-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-resources__responsible-list li {
  background: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
  margin-bottom: 15px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-resources__responsible-list li p {
  margin: 0;
  color: var(--text-light);
}

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

/* FAQ Section Styles */
.page-resources__faq-section {
  padding-bottom: 60px;
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-color-dark-mode);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-dark-mode);
  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: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.page-resources__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  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-item.active .page-resources__faq-toggle {
  color: var(--text-light);
  transform: rotate(45deg); /* Change to X or rotate for minus */
}

.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 20px;
  opacity: 0;
  color: var(--text-light);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large for content */
  padding: 20px !important;
  opacity: 1;
  background: var(--card-bg-dark-mode);
  border-top: 1px solid var(--border-color-dark-mode);
  border-radius: 0 0 5px 5px;
}

.page-resources__other-links {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-resources__other-links li {
  margin-bottom: 15px;
  background: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
  border-radius: 8px;
  padding: 15px 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-resources__other-links li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.page-resources__other-links li a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 500;
  display: block;
}

.page-resources__other-links li a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.1em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
}

@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;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-resources__hero-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-resources__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

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

  .page-resources__image-content {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

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

  .page-resources__guide-item, .page-resources__strategy-item, .page-resources__news-item {
    padding: 20px;
  }

  .page-resources__guide-title, .page-resources__strategy-title {
    font-size: 1.3em;
  }

  .page-resources__news-title {
    font-size: 1.2em;
  }

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

  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 1em;
    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__other-links li {
    padding: 12px 15px;
  }

  .page-resources__other-links li a {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 1.8em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
  .page-resources__cta-button {
    padding: 10px 20px;
    font-size: 0.9em;
  }
}