/* style/resources.css */

:root {
  --primary-color: #0A2463;
  --secondary-color: #E3B505;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f8f8f8;
  --background-dark: #0A2463;
  --border-color: #e0e0e0;
}

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

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

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

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

.page-resources__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  line-height: 1.7;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__text-block--light {
  color: var(--text-light);
}

/* Hero Section */
.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); /* Ensure content is below fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #0A2463 50%, #0A2463 100%);
  color: var(--text-light);
  overflow: hidden; /* Prevent image overflow */
}

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

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
  z-index: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.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%;
  padding: 20px;
  box-sizing: border-box;
}

.page-resources__main-heading {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--secondary-color);
  line-height: 1.2;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-resources__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 16px 45px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background: #ffcc00; /* Slightly lighter gold */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Section Styles */
.page-resources__introduction-section, 
.page-resources__why-trust-us, 
.page-resources__faq-section {
  padding: 80px 0;
  background-color: var(--background-light);
}

.page-resources__articles-section, 
.page-resources__cta-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

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

.page-resources__card {
  background: var(--text-light);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

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

.page-resources__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__card-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-resources__card-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

.page-resources__card-description {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.page-resources__card-link {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-resources__card-link:hover {
  color: var(--primary-color);
}

.page-resources__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-resources__feature-item {
  background: var(--text-light);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.page-resources__feature-item:hover {
  transform: translateY(-5px);
}

.page-resources__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
  filter: none; /* Ensure no color filters */
}

.page-resources__feature-item h3 {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__feature-item p {
  font-size: 16px;
  color: #555;
}

.page-resources__cta-container {
  text-align: center;
  padding: 60px 20px;
}

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

.page-resources__cta-button--secondary:hover {
  background: #ffcc00;
}

/* FAQ Section */
.page-resources__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  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 25px;
  background: var(--text-light);
  border: 1px solid var(--border-color);
  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: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change to X for active state */
}

.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;
  background: #fdfdfd;
  color: #555;
  font-size: 16px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to show content */
  padding: 20px 25px !important;
  opacity: 1;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
  margin: 0;
}

.page-resources__faq-answer a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-resources__faq-answer a:hover {
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-heading {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 30px;
  }
  .page-resources__card-title {
    font-size: 22px;
  }
  .page-resources__feature-item h3 {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__main-heading {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .page-resources__cta-button {
    padding: 14px 35px;
    font-size: 18px;
    width: 100% !important; /* Ensure full width on mobile */
    max-width: 100% !important;
  }
  .page-resources__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-resources__text-block {
    font-size: 16px;
    text-align: left;
  }
  .page-resources__introduction-section, 
  .page-resources__articles-section, 
  .page-resources__why-trust-us, 
  .page-resources__cta-section, 
  .page-resources__faq-section {
    padding: 60px 0;
  }
  .page-resources__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-resources__articles-grid, 
  .page-resources__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__card {
    margin-bottom: 15px;
  }
  .page-resources__card-image {
    height: 180px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-description {
    font-size: 15px;
  }
  .page-resources__feature-icon {
    width: 60px;
    height: 60px;
  }
  .page-resources__feature-item h3 {
    font-size: 18px;
  }
  .page-resources__faq-question {
    padding: 15px 20px;
  }
  .page-resources__faq-question h3 {
    font-size: 16px;
  }
  .page-resources__faq-toggle {
    font-size: 24px;
    width: 25px;
    height: 25px;
  }
  .page-resources__faq-answer {
    padding: 0 20px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px !important;
  }
  /* Ensure all images are responsive */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-resources__section, .page-resources__card, .page-resources__container, .page-resources__hero-container, .page-resources__cta-container, .page-resources__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-resources__hero-image {
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .page-resources__main-heading {
    font-size: 28px;
  }
  .page-resources__cta-button {
    font-size: 16px;
    padding: 12px 25px;
  }
  .page-resources__section-title {
    font-size: 24px;
  }
  .page-resources__card-image {
    height: 150px;
  }
  .page-resources__card-title {
    font-size: 18px;
  }
  .page-resources__card-description {
    font-size: 14px;
  }
  .page-resources__feature-item h3 {
    font-size: 16px;
  }
  .page-resources__feature-item p {
    font-size: 14px;
  }
  .page-resources__faq-question h3 {
    font-size: 15px;
  }
  .page-resources__faq-toggle {
    font-size: 22px;
    width: 22px;
    height: 22px;
  }
}