/* style/resources.css */

/* Base styles for the page content */
.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;
    box-sizing: border-box;
}

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

.page-resources__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 30px;
    color: #555555;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 70vh; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.page-resources__hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

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

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

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

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-card {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%; /* For responsiveness */
}

.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: #e02020;
    border-color: #e02020;
}

.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-card {
    background-color: #017439;
    color: #FFFFFF;
    border: 2px solid #017439;
    padding: 10px 20px;
    font-size: 0.9em;
    margin-top: 10px;
    margin-right: 10px;
}

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

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

.page-resources__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 30px;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 10px;
}

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

.page-resources__video-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1em;
    color: #555555;
}

/* Content Sections */
.page-resources__overview-section,
.page-resources__news-section,
.page-resources__safety-section {
    padding: 80px 0;
}

.page-resources__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-resources__dark-bg {
    background-color: #017439;
    color: #FFFFFF;
}

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

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

.page-resources__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-resources__image-left,
.page-resources__image-right {
    flex: 1;
    max-width: 50%;
    border-radius: 10px;
    height: auto;
    display: block;
    min-width: 200px; /* Ensure minimum image size */
    min-height: 200px;
}

.page-resources__image-right {
    order: 2; /* For layout adjustment */
}

.page-resources__text-block {
    flex: 1;
    max-width: 50%;
}

.page-resources__text-block p {
    margin-bottom: 20px;
    font-size: 1.05em;
}

/* Guides Section */
.page-resources__guides-section {
    padding: 80px 0;
    text-align: center;
}

.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: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.page-resources__guide-card .page-resources__card-title {
    font-size: 1.8em;
    color: #FFFFFF;
    margin-bottom: 15px;
}

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

.page-resources__guide-card .page-resources__card-title a:hover {
    color: #FFFF00; /* Highlight on hover */
}

.page-resources__guide-card p {
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
}

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

.page-resources__faq-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-title {
    font-size: 1.2em;
    color: #017439;
    margin: 0;
    flex-grow: 1;
}

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

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

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

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

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

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

.page-resources__cta-block {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
    color: #555555;
}

.page-resources__cta-block a {
    color: #017439;
    text-decoration: underline;
}

/* Final CTA Section */
.page-resources__cta-section {
    padding: 80px 0;
    text-align: center;
}

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

.page-resources__cta-section .page-resources__section-description {
    color: #f0f0f0;
}

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

/* --- Responsive Design --- */

/* Tablet and Mobile */
@media (max-width: 992px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }

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

    .page-resources__section-title {
        font-size: 2em;
    }

    .page-resources__content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .page-resources__image-left,
    .page-resources__image-right,
    .page-resources__text-block {
        max-width: 100%;
        text-align: center;
    }

    .page-resources__image-right {
        order: initial;
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .page-resources__hero-section {
        height: 60vh;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

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

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

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

    /* Force full width for buttons on mobile */
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-card,
    .page-resources a[class*="button"],
    .page-resources a[class*="btn"] {
        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;
    }

    /* Ensure button containers also adapt */
    .page-resources__hero-cta-buttons,
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    
    .page-resources__hero-cta-buttons {
        flex-direction: column; /* Ensure vertical stacking on mobile */
    }

    .page-resources__section-title {
        font-size: 1.8em;
    }

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

    /* Images responsiveness for content area */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min size even on mobile */
        min-height: 200px !important;
    }

    /* Video responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important;
    }

    /* Ensure main content containers adapt */
    .page-resources__container {
        padding: 0 15px;
    }

    .page-resources__faq-question {
        padding: 15px;
    }

    .page-resources__faq-title {
        font-size: 1.1em;
    }
    
    .page-resources__faq-answer {
        padding: 0 15px;
    }

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