/* style/resources.css */

/* Custom CSS variables for brand colors */
:root {
  --primary-color: #0056b3;
  --secondary-color: #ffc107;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #000000;
  --background-light: #f5f5f5;
  --border-color: #e0e0e0;
}

/* Base styles for the page-resources scope */
.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default to light text for dark body background */
  background-color: var(--background-dark); /* Inherited from body, but good to define for scope */
  min-height: 100vh;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

/* General container for content sections */
.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section titles */
.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 50px;
  color: var(--text-light); /* Default for dark sections */
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding: 80px 20px 100px;
  text-align: center;
  overflow: hidden;
}

.page-resources__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--secondary-color); /* Bright color for H1 */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__hero-description {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-light);
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  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.2);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
  max-width: 100%; /* Ensure button doesn't exceed container width */
  box-sizing: border-box;
}

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

.page-resources__btn-primary:hover {
  background: #004085;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

.page-resources__btn-secondary:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Featured Articles Section */
.page-resources__featured-articles {
  padding: 60px 0;
  background-color: var(--background-dark);
}

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

.page-resources__article-card {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-resources__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: var(--text-light);
}

.page-resources__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-resources__article-title a {
  color: var(--secondary-color); /* Highlight titles with secondary color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__article-title a:hover {
  color: var(--primary-color);
}

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

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

.page-resources__read-more-link:hover {
  color: var(--secondary-color);
}


/* Brand Section */
.page-resources__brand-section {
  padding: 60px 0;
  background-color: var(--primary-color); /* Dark blue background */
  color: var(--text-light); /* White text */
}

.page-resources__brand-section .page-resources__section-title {
  color: var(--secondary-color); /* Yellow title on blue background */
}

.page-resources__brand-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-resources__brand-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__brand-subtitle {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color); /* Yellow subtitle */
}

.page-resources__brand-item p {
  font-size: 16px;
  line-height: 1.7;
  color: #e0e0e0;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
  background-color: var(--background-dark); /* Dark background */
  color: var(--text-light); /* Light text */
}

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

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

/* FAQ item styles */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white */
}

/* 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 25px;
  opacity: 0;
  color: #cccccc;
}

/* FAQ expanded state - ensure it expands */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain any content */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  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.3);
}

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

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

/* Toggle icon */
.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}


/* Blog Section */
.page-resources__blog-section {
  padding: 60px 0;
  background-color: var(--primary-color); /* Dark blue background */
  color: var(--text-light); /* White text */
}

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

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

.page-resources__blog-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  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 8px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__blog-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  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: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

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

.page-resources__blog-item-excerpt {
  font-size: 16px;
  margin-bottom: 15px;
  flex-grow: 1;
  color: #e0e0e0;
}

.page-resources__blog-item-date {
  font-size: 14px;
  color: #cccccc;
  margin-top: auto; /* Push date to bottom */
}

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

.page-resources__view-all-button {
  display: inline-block;
  padding: 15px 40px;
  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.2);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* Global image responsive styles */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 17px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__article-title,
  .page-resources__blog-item-title {
    font-size: 20px;
  }
  .page-resources__brand-subtitle {
    font-size: 22px;
  }
  .page-resources__faq-question-title {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__container {
    padding: 30px 15px;
  }

  .page-resources__hero-section {
    padding: 60px 15px 80px;
  }

  .page-resources__main-title {
    font-size: 32px;
    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%;
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .page-resources__article-grid,
  .page-resources__brand-content,
  .page-resources__blog-list {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-resources__article-image,
  .page-resources__blog-image {
    height: 180px;
  }

  .page-resources__article-content,
  .page-resources__blog-content {
    padding: 20px;
  }

  .page-resources__article-title,
  .page-resources__blog-item-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .page-resources__article-excerpt,
  .page-resources__blog-item-excerpt {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .page-resources__brand-subtitle {
    font-size: 20px;
  }

  /* FAQ mobile adjustments */
  .page-resources__faq-item {
    margin-bottom: 10px;
  }

  .page-resources__faq-question {
    padding: 18px 20px;
  }
  
  .page-resources__faq-question-title {
    font-size: 16px;
    width: calc(100% - 40px); /* Adjust for toggle icon */
  }

  .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 20px !important;
  }

  .page-resources__blog-item-date {
    font-size: 13px;
  }

  .page-resources__view-all-button-container {
    margin-top: 40px;
  }

  .page-resources__view-all-button {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources__hero-section .page-resources__container,
  .page-resources__featured-articles .page-resources__container,
  .page-resources__brand-section .page-resources__container,
  .page-resources__faq-section .page-resources__container,
  .page-resources__blog-section .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  .page-resources__article-card,
  .page-resources__blog-item,
  .page-resources__brand-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px; /* Add padding to individual cards/items */
  }
  .page-resources__article-card .page-resources__article-content,
  .page-resources__blog-item .page-resources__blog-content,
  .page-resources__brand-item p {
    padding-left: 0;
    padding-right: 0;
  }

  /* Specific section paddings to manage overall layout */
  .page-resources__hero-section,
  .page-resources__featured-articles,
  .page-resources__brand-section,
  .page-resources__faq-section,
  .page-resources__blog-section {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    overflow: hidden; /* Ensure no horizontal scroll */
  }
}