/* style/resources.css */

/* --- General Styles --- */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Default body background is white */
}

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

.page-resources__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-resources__section-title--white {
    color: #FFFFFF;
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-resources__text-block--white {
    color: #FFFFFF;
}

/* --- Buttons --- */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-tertiary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent; /* Ensure consistent border size */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-resources__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border-color: #C30808;
}

.page-resources__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-resources__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border-color: #017439;
}

.page-resources__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2d;
    border-color: #005a2d;
}

.page-resources__btn-tertiary {
    background-color: transparent;
    color: #017439;
    border-color: #017439;
    padding: 8px 15px;
    font-size: 0.9em;
}

.page-resources__btn-tertiary:hover {
    background-color: #017439;
    color: #FFFFFF;
}

/* --- Hero Section --- */
.page-resources__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
    background-color: #017439; /* Brand color as background */
    color: #FFFFFF;
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 2;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFFFF;
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 1.4em;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    z-index: 1;
}

/* --- Intro Section --- */
.page-resources__intro-section {
    padding: 60px 0;
    background-color: #FFFFFF;
    color: #333333;
}

/* --- Guides Section --- */
.page-resources__guides-section {
    padding: 60px 0;
    background-color: #f8f8f8;
    color: #333333;
}

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

.page-resources__guide-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px; /* Space for button */
}

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

.page-resources__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.page-resources__card-title {
    font-size: 1.5em;
    color: #017439;
    margin: 20px 15px 10px;
    min-height: 70px; /* Ensure consistent title height */
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.page-resources__card-description {
    font-size: 1em;
    color: #555555;
    margin: 0 15px 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-resources__guide-card .page-resources__btn-tertiary {
    margin-top: auto; /* Push button to the bottom */
    align-self: center; /* Center the button */
}

/* --- Video Section --- */
.page-resources__video-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    text-align: center;
    color: #FFFFFF;
}

.page-resources__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px; /* Max width for video */
    margin: 40px auto;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-resources__video-link {
    display: block;
    line-height: 0; /* Remove extra space below video */
}

.page-resources__video {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.page-resources__cta-video {
    margin-top: 30px;
}

/* --- FAQ Section --- */
.page-resources__faq-section {
    padding: 60px 0;
    background-color: #FFFFFF;
    color: #333333;
}

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

.page-resources__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.page-resources__faq-item.active {
    background-color: #e6ffe6; /* Light green when active */
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    color: #017439;
    font-size: 1.15em;
    transition: color 0.3s ease;
}

.page-resources__faq-question:hover {
    color: #005a2d;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 25px;
}

.page-resources__faq-answer p {
    margin-bottom: 0;
    padding-bottom: 10px; /* Small padding for visual comfort */
}

.page-resources__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

/* --- Call to Action Section --- */
.page-resources__cta-section {
    padding: 80px 0;
    background-color: #017439;
    text-align: center;
    color: #FFFFFF;
}

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }
    .page-resources__hero-description {
        font-size: 1.2em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__guide-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* General Mobile Adjustments */
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-resources__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Ensure offset on mobile */
    }

    .page-resources__hero-title {
        font-size: 2.2em;
    }

    .page-resources__hero-description {
        font-size: 1em;
    }

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

    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-tertiary {
        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-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-resources__guide-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-resources__guide-card {
        margin: 0 auto;
        max-width: 400px; /* Constrain card width on mobile */
    }

    /* Images Mobile Responsiveness */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources__section, .page-resources__intro-section, .page-resources__guides-section, .page-resources__video-section, .page-resources__faq-section, .page-resources__cta-section,
    .page-resources__card, .page-resources__guide-card,
    .page-resources__container,
    .page-resources__video-wrapper,
    .page-resources__cta-buttons, .page-resources__hero-buttons {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden !important; /* Prevent horizontal scroll */
      padding-left: 15px;
      padding-right: 15px;
    }

    /* Video Mobile Responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources__video-section {
      padding-top: var(--header-offset, 120px) !important; /* Ensure video section has header offset */
    }
    .page-resources__video-wrapper {
      padding: 0 !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      border-radius: 0 !important;
      box-shadow: none !important;
    }

    .page-resources__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

    .page-resources__faq-answer {
        padding: 10px 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__hero-buttons {
        gap: 10px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 10px 20px;
    }
}