/* style/resources.css */

/* Base styles for the page-resources scope */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #000000; /* Matching body background from shared.css */
}

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

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

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: center;
    color: #f0f0f0; /* Light grey for readability on dark background */
}

/* Color contrast enforcement */
.page-resources__dark-bg {
    background-color: #000000; /* Explicitly dark background */
    color: #ffffff; /* Light text */
    padding: 60px 0;
}

.page-resources__light-bg {
    background-color: #ffffff; /* Explicitly light background */
    color: #333333; /* Dark text */
    padding: 60px 0;
}

.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-description,
.page-resources__light-bg .page-resources__faq-title,
.page-resources__light-bg .page-resources__faq-answer p {
    color: #333333; /* Ensure dark text on light background */
}

/* Buttons */
.page-resources__btn-primary {
    display: inline-block;
    background-color: #26A9E0; /* Main brand color */
    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;
    font-size: 1.1em;
}

.page-resources__btn-primary:hover {
    background-color: #1a7bb0; /* Slightly darker on hover */
    transform: translateY(-2px);
}

.page-resources__btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #26A9E0; /* Main brand color for text */
    border: 2px solid #26A9E0;
    padding: 13px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    font-size: 1.1em;
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    text-align: center;
    overflow: hidden;
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

.page-resources__hero-description {
    font-size: 1.4em;
    margin-bottom: 40px;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Darken image for text readability */
}

/* About Section */
.page-resources__about-section .page-resources__text-block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.page-resources__about-section .page-resources__btn-secondary {
    margin-top: 20px;
    text-align: center;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Categories Section */
.page-resources__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources__category-card {
    background: rgba(255, 255, 255, 0.05); /* Slightly visible white on dark background */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-resources__category-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.page-resources__category-image {
    width: 100%; /* Ensure image fills card width */
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #26A9E0; /* Brand color for card titles */
}

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

.page-resources__category-card .page-resources__btn-primary {
    margin-top: auto; /* Push button to the bottom */
    width: 100%;
    padding: 10px 20px;
    font-size: 1em;
}

/* News Section */
.page-resources__news-section .page-resources__btn-secondary {
    margin-top: 20px;
    text-align: center;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Video Section */
.page-resources__video-section .page-resources__text-block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px; /* Max width for video container */
    margin: 30px auto 0 auto;
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-resources__video-link {
    display: block; /* Make the whole wrapper clickable */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.page-resources__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-resources__faq-item {
    background: rgba(255, 255, 255, 0.05); /* Slightly visible white on dark background */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly lighter 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;
    color: #ffffff; /* White text on dark background */
    margin: 0;
}

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

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: rgba(255, 255, 255, 0.02); /* Very subtle background for answer */
}

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

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

/* CTA Section */
.page-resources__cta-section .page-resources__text-block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

/* 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;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        flex-direction: column;
        padding-top: var(--header-offset, 120px) !important; /* Ensure offset on mobile */
        min-height: 60vh;
    }
    .page-resources__hero-content {
        padding: 15px;
    }
    .page-resources__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-resources__hero-cta-group {
        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__category-grid {
        grid-template-columns: 1fr;
    }

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

    /* Mobile image responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Mobile video responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Video and image container mobile adaptation */
    .page-resources__video-wrapper,
    .page-resources__category-card,
    .page-resources__container,
    .page-resources__cta-buttons,
    .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; /* Prevent overflow for containers */
    }

    .page-resources__cta-buttons {
      flex-direction: column;
      gap: 15px;
    }
    .page-resources__faq-question,
    .page-resources__faq-answer {
      padding-left: 15px;
      padding-right: 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
      padding: 15px 15px 25px 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__text-block {
        font-size: 0.9em;
    }
}