:root {
  --primary-color: #0A192F;
  --secondary-color: #FFD700;
  --cta-color: #E53E3E; /* Red for CTA */
  --cta-color-hover: #C43434; /* Darker red for hover */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #0A192F;
  /* --header-offset will be defined in shared.css */
}

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-light);
  background-color: var(--bg-dark); /* Dark background for hero */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-resources__hero-section .page-resources__container {
  max-width: 900px;
}

.page-resources__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color); /* Gold color for H1 */
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.page-resources__cta-button--primary {
  background-color: var(--cta-color); /* Red CTA */
  color: var(--text-light);
}

.page-resources__cta-button--primary:hover {
  background-color: var(--cta-color-hover); /* Darken red */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-button--secondary {
  background-color: transparent;
  color: var(--secondary-color); /* Gold text */
  border: 2px solid var(--secondary-color);
}

.page-resources__cta-button--secondary:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-resources__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 50px;
  color: var(--text-dark);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Guides Section */
.page-resources__guides-section {
  padding: 80px 0;
  background-color: var(--bg-light);
}

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

.page-resources__guide-item {
  background-color: var(--bg-light);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-resources__guide-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-resources__guide-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-resources__guide-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__guide-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

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

.page-resources__guide-title a:hover {
  color: var(--secondary-color);
}

.page-resources__guide-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__read-more-link {
  display: inline-block;
  color: var(--cta-color);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__read-more-link:hover {
  color: var(--cta-color-hover);
  text-decoration: underline;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 80px 0;
  background-color: #f9f9f9; /* Light background for FAQ */
}

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

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

/* FAQ default state - answer hidden */
.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-dark);
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height to ensure it expands */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: var(--bg-light);
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #e0e0e0;
}

/* Question style */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-light);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources__faq-item.active .page-resources__faq-question {
  border-radius: 8px 8px 0 0;
  border-bottom-color: transparent;
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color);
}

/* Toggle icon */
.page-resources__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: 20px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

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

/* Blog Preview Section */
.page-resources__blog-preview-section {
  padding: 80px 0;
  background-color: var(--bg-dark); /* Dark background for blog */
  color: var(--text-light);
}

.page-resources__blog-preview-section .page-resources__section-title {
  color: var(--secondary-color); /* Gold title on dark background */
}

.page-resources__blog-preview-section .page-resources__section-description {
  color: var(--text-light);
}

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

.page-resources__blog-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark bg */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-resources__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-resources__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-resources__blog-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color); /* Gold title */
}

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

.page-resources__blog-item-title a:hover {
  color: var(--text-light);
}

.page-resources__blog-item-excerpt {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__blog-item-date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: auto;
}

.page-resources__view-all-cta {
  text-align: center;
  margin-top: 50px;
}

/* Support CTA Section */
.page-resources__support-cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 42px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__section-description {
    font-size: 16px;
  }
  .page-resources__guide-image,
  .page-resources__blog-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-resources__main-title {
    font-size: 36px;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__cta-button {
    width: 100%;
    max-width: 300px; /* Constrain max width for buttons */
    margin: 0 auto;
    font-size: 16px;
    padding: 12px 25px;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-resources__guides-section,
  .page-resources__faq-section,
  .page-resources__blog-preview-section,
  .page-resources__support-cta-section {
    padding: 50px 0;
  }

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

  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-resources__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

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

  .page-resources__guide-item,
  .page-resources__blog-item {
    flex-direction: column;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__guide-image,
  .page-resources__blog-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px; /* Ensure images are not too small */
  }

  /* FAQ mobile adaptation */
  .page-resources__faq-question {
    padding: 15px;
  }
  .page-resources__faq-question h3 {
    font-size: 16px;
  }
  .page-resources__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 10px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all content areas are constrained */
  .page-resources__hero-section .page-resources__container,
  .page-resources__guides-section .page-resources__container,
  .page-resources__faq-section .page-resources__container,
  .page-resources__blog-preview-section .page-resources__container,
  .page-resources__support-cta-section .page-resources__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}