/* style/resources.css */

/* Base styles for the page content */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css (#121212) */
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 70vh; /* Ensure hero takes significant height */
    overflow: hidden;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Account for fixed header */
}

.page-resources__hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.page-resources__hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Darken video for text readability */
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background for text */
    border-radius: 8px;
}

.page-resources__hero-title {
    font-size: 2.8em;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-resources__hero-description {
    font-size: 1.2em;
    color: #f0f0f0;
    margin-bottom: 30px;
}

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

/* General Section Styling */
.page-resources__section {
    padding: 80px 20px;
    text-align: center;
}

.page-resources__light-bg {
    background-color: #ffffff; /* Light background for contrast */
    color: #333333; /* Dark text for light background */
}

.page-resources__dark-bg {
    background-color: #017439; /* Primary brand color for dark sections */
    color: #ffffff; /* White text for primary brand color background */
}

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

.page-resources__section-title {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from section background */
}

.page-resources__section-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit;
}

/* Card Grid */
.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: #f8f8f8; /* Light background for cards in light sections */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333; /* Dark text for light cards */
    display: flex;
    flex-direction: column;
}

.page-resources__card--dark-bg {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards in dark sections */
    color: #ffffff; /* White text for dark cards */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

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

.page-resources__card-title {
    font-size: 1.4em;
    margin: 20px 20px 10px 20px;
    min-height: 60px; /* Ensure consistent title height */
}

.page-resources__card-title a {
    color: inherit; /* Inherit color from card */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: #017439; /* Primary color on hover */
}

.page-resources__card--dark-bg .page-resources__card-title a:hover {
    color: #FFFF00; /* Yellow for dark card hover */
}

.page-resources__card-text {
    font-size: 0.95em;
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to take available space */
}

.page-resources__card-link {
    display: inline-block;
    background-color: #017439;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin: 0 20px 20px 20px;
    transition: background-color 0.3s ease;
}

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

.page-resources__card--dark-bg .page-resources__card-link {
    background-color: #C30808; /* Red button for dark cards */
    color: #FFFF00; /* Yellow text for red button */
}

.page-resources__card--dark-bg .page-resources__card-link:hover {
    background-color: #a30606;
}

/* Safety Section */
.page-resources__safety-section .page-resources__content-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}

.page-resources__safety-section .page-resources__text-block {
    flex: 2;
    min-width: 300px;
}

.page-resources__safety-section .page-resources__image-block {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-resources__safety-section .page-resources__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #017439; /* Primary color for sub-titles in light sections */
}
.page-resources__sub-title a {
    color: #017439;
    text-decoration: none;
}
.page-resources__sub-title a:hover {
    text-decoration: underline;
}

.page-resources__paragraph {
    font-size: 1em;
    margin-bottom: 20px;
    color: #555555;
}

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for FAQ items */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff; /* White text for FAQ items */
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05); /* Slightly darker background for question */
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-title {
    font-size: 1.2em;
    margin: 0;
    color: inherit;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg);
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    text-align: left;
    color: #f0f0f0;
}

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

.page-resources__faq-answer p {
    margin: 0;
}

.page-resources__faq-answer a {
    color: #FFFF00; /* Yellow for links in dark FAQ answer */
    text-decoration: underline;
}
.page-resources__faq-answer a:hover {
    color: #ffcc00;
}


/* Contact CTA Section */
.page-resources__contact-cta-section {
    padding: 60px 20px;
    background-color: #f0f0f0; /* Light background for CTA */
    color: #333333; /* Dark text for light CTA */
}

.page-resources__contact-cta-content {
    max-width: 800px;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-tertiary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure text wraps */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.page-resources__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

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

.page-resources__btn-tertiary {
    background-color: #017439; /* Primary color */
    color: #ffffff;
    border: 2px solid #017439;
    margin-top: 15px;
}

.page-resources__btn-tertiary:hover {
    background-color: #005f2c;
    border-color: #005f2c;
}

/* Image specific styles */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevent extra space below images */
}

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

@media (max-width: 768px) {
    /* General mobile adjustments */
    .page-resources__hero-section {
        min-height: 50vh;
        padding: 40px 15px;
    }
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__section {
        padding: 60px 15px;
    }
    .page-resources__section-title {
        font-size: 1.6em;
    }
    .page-resources__section-description {
        font-size: 0.95em;
    }

    /* Image responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important; /* Ensure images take full width */
        height: auto !important;
    }
    .page-resources__card-image {
        height: auto !important; /* Allow card images to scale */
    }

    /* Video responsiveness */
    .page-resources__hero-video,
    .page-resources__hero-video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Maintain aspect ratio */
    }

    /* Button responsiveness */
    .page-resources__cta-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;
        padding: 12px 15px !important;
        font-size: 1em !important;
    }

    /* Card grid responsiveness */
    .page-resources__card-grid {
        grid-template-columns: 1fr;
    }
    .page-resources__card-title {
        min-height: auto; /* No fixed height on mobile */
    }

    /* Safety section responsiveness */
    .page-resources__safety-section .page-resources__content-wrapper {
        flex-direction: column;
    }
    .page-resources__safety-section .page-resources__text-block,
    .page-resources__safety-section .page-resources__image-block {
        width: 100%;
    }

    /* Container padding for mobile */
    .page-resources__container {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    
    .page-resources__hero-section {
      padding-top: var(--header-offset, 120px) !important; /* Ensure hero section starts below fixed header on mobile */
    }
}

/* Ensure content area images are at least 200px */
.page-resources__section img {
  min-width: 200px;
  min-height: 200px;
}
.page-resources__card-image {
  min-width: 200px;
  min-height: 200px;
}
.page-resources__safety-section .page-resources__image {
  min-width: 200px;
  min-height: 200px;
}

/* Color contrast fixes based on body background #121212 (dark) */
/* .page-resources is already set to color: #ffffff; */

/* Ensure card titles/links in dark sections have good contrast */
.page-resources__card--dark-bg .page-resources__card-title a {
  color: #ffffff;
}
.page-resources__card--dark-bg .page-resources__card-title a:hover {
  color: #FFFF00; /* Yellow for hover on dark cards */
}