/* style/resources.css */

/* --- Base Styles --- */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Inherit from body var(--dark-bg-1) */
}

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

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

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

.page-resources__text-block a {
    color: #26A9E0;
    text-decoration: underline;
}

.page-resources__btn-primary {
    display: inline-block;
    background-color: #26A9E0;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.page-resources__btn-primary:hover {
    background-color: #1a7fb8;
    transform: translateY(-2px);
}

.page-resources__btn-secondary {
    display: inline-block;
    background-color: #ffffff;
    color: #26A9E0;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #26A9E0;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.page-resources__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
    transform: translateY(-2px);
}

.page-resources__btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
}

/* --- Section Specific Styles --- */

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.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); /* Dark overlay for text readability */
    z-index: 2;
}

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

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

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
}

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

/* About Section */
.page-resources__about-section {
    padding: 80px 0;
}

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

.page-resources__image-full {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

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

.page-resources__guide-card {
    background-color: #ffffff;
    color: #333333; /* Dark text for light background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #26A9E0;
    font-weight: bold;
}

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

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

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

.page-resources__card-link {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #26A9E0;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-resources__card-link:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Safety Section */
.page-resources__safety-section {
    padding: 80px 0;
}

.page-resources__image-center {
    display: block;
    margin: 0 auto 40px auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

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

.page-resources__feature-item {
    background-color: #ffffff;
    color: #333333; /* Dark text for light background */
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-resources__feature-title {
    font-size: 1.3em;
    color: #26A9E0;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-resources__feature-text {
    font-size: 0.95em;
}

.page-resources__feature-text a {
    color: #26A9E0;
    text-decoration: underline;
}

.page-resources__cta-section-bottom {
    text-align: center;
    margin-top: 50px;
}


/* Video Section */
.page-resources__video-section {
    padding: 80px 0;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    cursor: pointer; /* Indicate clickability for JS */
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-resources__video-caption {
    text-align: center;
    font-style: italic;
    margin-top: 20px;
    font-size: 0.95em;
}

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

.page-resources__faq-list {
    margin-top: 40px;
}

.page-resources__faq-item {
    background-color: #ffffff;
    color: #333333; /* Dark text for light background */
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

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

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

.page-resources__faq-toggle {
    font-size: 1.5em;
    color: #26A9E0;
    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 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
    color: #333333;
}

.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: 0;
    padding-bottom: 10px;
    color: #333333;
}

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

/* Call to Action Section */
.page-resources__cta-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.page-resources__cta-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    color: #ffffff;
}

.page-resources__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    color: #ffffff;
}

.page-resources__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    line-height: 1.5;
}

.page-resources__cta-description a {
    color: #26A9E0; /* Ensure visibility against dark background */
    text-decoration: underline;
}

/* --- Color Contrast Classes --- */
.page-resources__dark-bg {
    background-color: #1a1a1a; /* A darker background for sections */
    color: #ffffff;
}

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

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

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__container {
        padding: 0 15px;
    }

    /* Fixed header offset for mobile, controlled by shared */
    .page-resources__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure content is not hidden by fixed header */
    }

    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .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;
    }
    .page-resources__hero-actions {
        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__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .page-resources__guides-grid,
    .page-resources__safety-features {
        grid-template-columns: 1fr;
    }

    /* Image responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__guides-grid,
    .page-resources__safety-features,
    .page-resources__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Video responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !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;
    }
    .page-resources__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure video section also respects header offset */
    }

    .page-resources__cta-title {
        font-size: 1.8em;
    }
    .page-resources__cta-description {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 0.9em;
    }
    .page-resources__btn-large {
        padding: 15px 25px;
        font-size: 1em;
    }
    .page-resources__cta-title {
        font-size: 1.6em;
    }
}

/* Color contrast classes for sections, ensuring proper text color on different backgrounds */
.page-resources__dark-bg .page-resources__section-title,
.page-resources__dark-bg .page-resources__text-block,
.page-resources__dark-bg .page-resources__cta-title,
.page-resources__dark-bg .page-resources__cta-description,
.page-resources__dark-bg .page-resources__video-caption {
    color: #ffffff; /* Light text on dark backgrounds */
}

.page-resources__light-bg .page-resources__section-title,
.page-resources__light-bg .page-resources__text-block,
.page-resources__light-bg .page-resources__card-title,
.page-resources__light-bg .page-resources__card-text,
.page-resources__light-bg .page-resources__feature-title,
.page-resources__light-bg .page-resources__feature-text,
.page-resources__light-bg .page-resources__faq-title,
.page-resources__light-bg .page-resources__faq-answer p {
    color: #333333; /* Dark text on light backgrounds */
}