/* style/resources.css */

/* General styles for the page-resources scope */
.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 */
}

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

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

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

/* Buttons - General styles */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__faq-btn {
    display: inline-block;
    padding: 15px 30px;
    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;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure responsiveness */
}

/* Primary button (Register, Main CTA) */
.page-resources__btn-primary {
    background-color: #C30808; /* Register color */
    color: #FFFFFF; /* White text for contrast, overriding yellow for WCAG AA */
    border: 2px solid #C30808;
}

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

/* Secondary button (View Promotions, Login, Learn More) */
.page-resources__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Brand primary color */
    border: 2px solid #017439;
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 600px;
    padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
}

.page-resources__hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 1;
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #FFFFFF;
}

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

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

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

/* Introduction Section */
.page-resources__introduction-section {
    padding: 80px 0;
    background-color: #FFFFFF;
    color: #333333;
}

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

.page-resources__video-section .page-resources__section-title,
.page-resources__video-section .page-resources__text-block {
    color: #FFFFFF;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 40px auto 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer; /* Indicate clickable */
}

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

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

.page-resources__card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-resources__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    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;
    color: #017439;
    font-weight: bold;
}

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

.page-resources__card-title a:hover {
    text-decoration: underline;
}

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

.page-resources__card-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #017439;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

.page-resources__card-link:hover {
    background-color: #005a2e;
}

/* Safety Section */
.page-resources__safety-section {
    padding: 80px 0;
    background-color: #017439;
    color: #FFFFFF;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-resources__safety-section .page-resources__section-title,
.page-resources__safety-section .page-resources__text-block {
    color: #FFFFFF;
}

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

.page-resources__safety-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin: 40px auto 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #FFFFFF;
    border-bottom: 1px solid #e0e0e0;
}

.page-resources__faq-item:last-child .page-resources__faq-question {
    border-bottom: none;
}

.page-resources__faq-question:hover {
    background-color: #f0f0f0;
}

.page-resources__faq-title {
    font-size: 1.25em;
    color: #017439;
    margin: 0;
    font-weight: bold;
}

.page-resources__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #C30808; /* Red for toggle */
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Plus to X */
}

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

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

.page-resources__faq-answer p {
    margin-bottom: 15px;
    color: #555555;
}

.page-resources__faq-btn {
    background-color: #017439;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

.page-resources__faq-btn:hover {
    background-color: #005a2e;
}


/* CTA Section */
.page-resources__cta-section {
    padding: 80px 0;
    background-color: #C30808; /* Red for strong CTA */
    color: #FFFFFF;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-resources__cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Slight overlay */
    z-index: 1;
}

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

.page-resources__cta-section .page-resources__section-title,
.page-resources__cta-section .page-resources__text-block {
    color: #FFFFFF;
}

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

.page-resources__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6; /* Make it subtle */
}


/* 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__card-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        padding: 80px 0;
        min-height: 450px;
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-cta-buttons,
    .page-resources__button-group,
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to container for buttons */
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__faq-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-resources__video-section,
    .page-resources__guides-section,
    .page-resources__safety-section,
    .page-resources__faq-section,
    .page-resources__cta-section,
    .page-resources__introduction-section {
        padding: 50px 0;
    }

    .page-resources__container {
        padding: 0 15px; /* Adjust container padding for mobile */
    }

    /* Images responsiveness for content area */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .page-resources__card-image {
        height: 180px; /* Adjust card image height */
    }

    /* Video responsiveness */
    .page-resources__video-wrapper {
        margin: 30px auto 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
    }
    .page-resources__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure video section starts below header */
    }

    /* Card grid to single column */
    .page-resources__card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__card {
        padding-bottom: 0;
    }
    .page-resources__card-content {
        padding: 20px;
    }
    .page-resources__card-title {
        font-size: 1.3em;
    }

    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-title {
        font-size: 1.1em;
    }
    .page-resources__faq-toggle {
        font-size: 1.5em;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 10px 20px 20px;
    }

    /* Ensure content containers don't cause overflow */
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__introduction-section,
    .page-resources__video-section,
    .page-resources__guides-section,
    .page-resources__safety-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Dark background sections */
.page-resources__dark-section {
  color: #ffffff; /* Deep background needs light text */
}
.page-resources__dark-section .page-resources__section-title,
.page-resources__dark-section .page-resources__text-block,
.page-resources__dark-section .page-resources__hero-title,
.page-resources__dark-section .page-resources__hero-description {
  color: #ffffff;
}
.page-resources__dark-section .page-resources__card {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Light background sections */
.page-resources__light-bg {
  color: #333333; /* Light background needs dark text */
}
.page-resources__light-bg .page-resources__section-title {
  color: #017439; /* Brand color for titles */
}
.page-resources__light-bg .page-resources__card {
  background: #ffffff;
  color: #333333;
}