/* style/resources.css */
/* Base styles for the resources page */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color, #ffffff); /* Default text color, adjusted by body background */
    background-color: var(--primary-color); /* Inherit from shared, which is #0A1931 */
}

/* Ensure padding-top for fixed header offset if shared.css doesn't apply to body */
.page-resources {
    padding-top: 0; /* Assuming shared.css handles body padding-top */
}

/* Hero Section */
.page-resources__hero-section {
    background: linear-gradient(135deg, #0A1931, #213a69); /* Dark blue gradient */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.page-resources__hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFD700; /* Gold for emphasis */
    line-height: 1.2;
}

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

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

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

/* Section Titles and Descriptions */
.page-resources__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #FFD700; /* Gold for titles */
}

.page-resources__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0; /* Light text for dark backgrounds */
}

/* Category Section */
.page-resources__category-section {
    padding: 60px 0;
    background-color: #0A1931; /* Dark background */
    color: #ffffff; /* Light text */
}

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

.page-resources__category-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

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

.page-resources__category-image-wrapper {
    width: 100%;
    height: 200px; /* Fixed height for consistent card image size */
    overflow: hidden;
}

.page-resources__category-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-resources__category-title {
    font-size: 22px;
    font-weight: bold;
    margin: 20px 20px 10px 20px;
    color: #FFD700; /* Gold for card titles */
}

.page-resources__category-title a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__category-title a:hover {
    color: #ffffff;
}

.page-resources__category-text {
    font-size: 16px;
    color: #e0e0e0;
    padding: 0 20px 20px;
    flex-grow: 1;
}

/* Featured Articles Section */
.page-resources__featured-articles {
    padding: 60px 0;
    background-color: #0d1e3b; /* Slightly different dark background */
    color: #ffffff;
}

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

.page-resources__article-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    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.3);
}

.page-resources__article-image-wrapper {
    width: 100%;
    height: 200px; /* Consistent height for article images */
    overflow: hidden;
}

.page-resources__article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-resources__article-title {
    font-size: 20px;
    font-weight: bold;
    margin: 20px 20px 10px 20px;
    color: #FFD700;
}

.page-resources__article-title a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__article-title a:hover {
    color: #ffffff;
}

.page-resources__article-meta {
    font-size: 14px;
    color: #aaaaaa;
    margin: 0 20px 10px 20px;
}

.page-resources__article-summary {
    font-size: 16px;
    color: #e0e0e0;
    padding: 0 20px 20px;
    flex-grow: 1;
}

.page-resources__btn-text {
    display: inline-block;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px 20px 20px;
    transition: color 0.3s ease;
}

.page-resources__btn-text:hover {
    color: #ffffff;
}

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

/* FAQ Section */
.page-resources__faq-section {
    padding: 60px 0;
    background-color: #f8f8f8; /* Light background for FAQ */
    color: #333333; /* Dark text */
}

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

/* FAQ container styles */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* 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 15px;
  opacity: 0;
}

/* FAQ expanded state - \u26A0\uFE0F Use!important and sufficiently large max-height */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* \u26A0\uFE0F Use!important for priority, large value to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #ffffff; /* White background for answer */
  border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  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: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* Question title styles */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #0A1931; /* Dark blue for question text */
  pointer-events: none; /* Prevent h3 from blocking click events */
}

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

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #FFD700; /* Gold when active */
  transform: rotate(45deg); /* Rotate for 'x' effect, or use '-' */
}

.page-resources__app-download-button {
    margin-top: 20px;
    text-align: center;
}

/* Call to Action Section */
.page-resources__cta-section {
    background-color: #0A1931; /* Dark blue background */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Ensure buttons adapt to width */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
}

.page-resources__btn-primary {
    background-color: #FFD700; /* Gold button */
    color: #0A1931; /* Dark text on gold */
    border: 2px solid #FFD700;
}

.page-resources__btn-primary:hover {
    background-color: #e6c200;
    border-color: #e6c200;
    color: #0A1931;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: #FFD700; /* Gold text */
    border: 2px solid #FFD700;
}

.page-resources__btn-secondary:hover {
    background-color: #FFD700;
    color: #0A1931;
}

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 40px;
    }

    .page-resources__section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 60px 15px;
    }

    .page-resources__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-resources__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-resources__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 16px !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-x: hidden;
    }

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

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

    .page-resources__category-section,
    .page-resources__featured-articles,
    .page-resources__faq-section,
    .page-resources__cta-section {
        padding: 40px 0;
    }

    .page-resources__category-grid,
    .page-resources__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .page-resources__category-title,
    .page-resources__article-title {
        font-size: 18px;
        margin: 15px 15px 8px 15px;
    }

    .page-resources__category-text,
    .page-resources__article-summary {
        font-size: 15px;
        padding: 0 15px 15px;
    }

    .page-resources__btn-text {
        padding: 8px 15px 15px 15px;
    }

    /* FAQ Mobile */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-resources__faq-question h3 {
        font-size: 16px;
        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__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to container for mobile */
    }

    /* Mobile image adaptation */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-resources__category-card,
    .page-resources__article-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}