/* style/resources.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --button-register: #C30808;
    --button-login: #C30808;
    --button-text-yellow: #FFFF00;
    --background-white: #FFFFFF;
}

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

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

.page-resources__centered {
    text-align: center;
}

.page-resources__section {
    padding: 60px 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

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

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-resources__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #555555;
}

/* 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;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a8e063 100%); /* Lighter green gradient */
    color: var(--text-color-light);
}

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

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    margin-bottom: 30px;
}

.page-resources__hero-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--secondary-color); /* White text for contrast */
    line-height: 1.2;
}

.page-resources__hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-resources__hero-image {
    width: 100%;
    max-width: 900px; /* Adjust image size */
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-register);
    color: var(--button-text-yellow);
    text-decoration: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-resources__cta-button:hover {
    background: #e02020; /* Darker red on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--large {
    padding: 18px 50px;
    font-size: 22px;
}

/* General Card Styles */
.page-resources__card {
    background: var(--secondary-color);
    color: var(--text-color-dark);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin: 15px;
    text-align: left;
    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 img {
    width: 100%;
    height: 200px; /* Fixed height for card images */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.page-resources__card-title {
    font-size: 22px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
}

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

.page-resources__card-title a:hover {
    color: #00502a;
}

.page-resources__card p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-resources__list {
    list-style: disc inside;
    margin-bottom: 15px;
    padding-left: 20px;
    color: #555;
}

.page-resources__list li {
    margin-bottom: 5px;
}

.page-resources__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Push to bottom of card */
}

.page-resources__btn-primary:hover {
    background-color: #00502a;
}

.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto; /* Push to bottom of card */
}

.page-resources__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Guide Grid */
.page-resources__guide-grid,
.page-resources__strategy-grid,
.page-resources__advantage-list,
.page-resources__news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Dark Background Section */
.page-resources__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__dark-bg .page-resources__section-title {
    color: var(--secondary-color);
}

.page-resources__dark-bg .page-resources__section-title::after {
    background-color: var(--secondary-color);
}

.page-resources__dark-bg .page-resources__section-description {
    color: #f0f0f0;
}

.page-resources__dark-bg .page-resources__card {
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent white for cards */
    color: var(--text-color-dark);
}

.page-resources__dark-bg .page-resources__card-title a {
    color: var(--primary-color);
}

.page-resources__dark-bg .page-resources__card p,
.page-resources__dark-bg .page-resources__list li {
    color: #666;
}

/* News Section Specific */
.page-resources__news-date {
    display: block;
    font-size: 14px;
    color: #999;
    margin-top: 10px;
    margin-bottom: 10px;
}

.page-resources__button-group {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* FAQ Section */
.page-resources__faq-list {
    max-width: 900px;
    margin: 40px auto 0 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-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 20px;
  opacity: 0;
  background: var(--secondary-color);
  color: var(--text-color-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Use !important to ensure priority, value large enough to contain any content */
  padding: 20px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  color: var(--text-color-dark);
  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;
  font-size: 18px;
  font-weight: 600;
}

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

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

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

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.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: 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: #c30808; /* Change color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect from '+' */
}

/* Conclusion Section */
.page-resources__conclusion {
    padding: 80px 0;
    background: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__conclusion .page-resources__section-title {
    color: var(--secondary-color);
}

.page-resources__conclusion .page-resources__section-title::after {
    background-color: var(--secondary-color);
}

.page-resources__conclusion .page-resources__section-description {
    color: #f0f0f0;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-content h1 {
        font-size: 42px;
    }
    .page-resources__hero-content p {
        font-size: 18px;
    }
    .page-resources__section-title {
        font-size: 32px;
    }
    .page-resources__section-description {
        font-size: 16px;
    }
    .page-resources__card-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        padding-top: var(--header-offset, 120px) !important;
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__container {
        padding: 15px;
    }
    .page-resources__hero-section {
        padding: 40px 15px;
    }
    .page-resources__hero-content h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-resources__hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .page-resources__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__cta-button--large {
        padding: 15px 35px;
        font-size: 18px;
    }
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 28px;
    }
    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .page-resources__card {
        margin: 10px 0;
        padding: 20px;
    }
    .page-resources__card img {
        
    }
    .page-resources__card-title {
        font-size: 18px;
    }
    .page-resources__card p {
        font-size: 15px;
    }
    .page-resources__guide-grid, 
    .page-resources__strategy-grid, 
    .page-resources__advantage-list, 
    .page-resources__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__faq-question {
        padding: 15px;
        font-size: 16px;
    }
    .page-resources__faq-question h3 {
        font-size: 16px;
    }
    .page-resources__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px !important;
    }

    /* Ensure all images and containers 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__hero-content,
    .page-resources__hero-image,
    .page-resources__button-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__button-group {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        text-align: center;
    }
}