/* style/resources.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --login-color: #EA7C07;
}

.page-resources {
    font-family: 'Arial', sans-serif;
    color: var(--text-dark); /* Default text color for light body background */
    line-height: 1.6;
    background-color: var(--secondary-color);
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-resources__intro-section {
    padding: 60px 0 40px;
    text-align: center;
    background-color: var(--secondary-color);
}

.page-resources__main-title {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

.page-resources__description {
    font-size: 1.1em;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto 30px;
}

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

.page-resources__guides-section,
.page-resources__strategies-section,
.page-resources__news-section,
.page-resources__faq-section,
.page-resources__cta-section {
    padding: 60px 0;
}

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

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

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

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

.page-resources__card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px 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(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__card--dark {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.page-resources__card--dark .page-resources__card-title a,
.page-resources__card--dark .page-resources__card-text {
    color: var(--text-light);
}

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

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

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

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

.page-resources__card--dark .page-resources__card-title a {
    color: var(--text-light);
}

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

.page-resources__card-text {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-resources__btn-primary:hover {
    background-color: #1e87c0;
    border-color: #1e87c0;
    transform: translateY(-2px);
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.page-resources__btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.page-resources__cta-button {
    background-color: var(--login-color);
    color: var(--text-light);
    border: 2px solid var(--login-color);
    font-size: 1.2em;
    padding: 15px 35px;
    margin-top: 30px;
}

.page-resources__cta-button:hover {
    background-color: #c96500;
    border-color: #c96500;
    transform: translateY(-2px);
}

.page-resources__cta-section {
    text-align: center;
    padding-bottom: 80px;
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: 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;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Using !important */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--primary-color);
  border: 1px solid #1e87c0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-resources__faq-question:hover {
  background: #1e87c0;
  border-color: #1c78a8;
}

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

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

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--text-light);
  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(180deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 2.5em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__card-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-resources__card-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-resources__intro-section,
    .page-resources__guides-section,
    .page-resources__strategies-section,
    .page-resources__news-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        padding: 40px 0;
    }
    .page-resources__container {
        padding: 0 15px;
    }
    .page-resources__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__card-image {
        height: 200px;
    }
    .page-resources__card-content {
        padding: 20px;
    }
    .page-resources__card-title {
        font-size: 1.3em;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__cta-button {
        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__cta-button {
        font-size: 1.1em;
        padding: 12px 25px;
    }

    /* FAQ Mobile */
    .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;
    }

    /* Ensure all images are responsive and do not overflow */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}