/* 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: transparent; /* Body background is handled by 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;
    color: #ffffff; /* Default for dark sections */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-resources__section-description {
    font-size: 1.1em;
    color: #f0f0f0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-resources__sub-title {
    font-size: 1.8em;
    color: #017439; /* Brand color for sub-titles in light sections */
    margin-bottom: 15px;
    font-weight: bold;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-tertiary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    max-width: 100%; /* Ensure button fits container */
}

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

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: #017439; /* Brand color */
    border: 2px solid #017439;
}

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

.page-resources__btn-tertiary {
    background-color: #017439;
    color: #ffffff;
    border: 2px solid #017439;
    padding: 10px 20px;
    font-size: 0.95em;
}

.page-resources__btn-tertiary:hover {
    background-color: #02944b;
    border-color: #02944b;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background-color: #1a1a1a; /* Match body background */
    overflow: hidden;
}

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Darken background image for text readability */
    filter: brightness(0.7); /* Further darken to ensure contrast */
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 900px;
    padding: 20px;
}

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

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

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

/* Introduction Section */
.page-resources__introduction-section {
    padding: 80px 0;
}

/* Featured Resources Section */
.page-resources__featured-resources {
    padding: 80px 0;
    background-color: #0d0d0d; /* Slightly lighter dark background */
}

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

.page-resources__card {
    background-color: rgba(255, 255, 255, 0.05); /* Semi-transparent white on dark background */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff; /* Light text on dark card */
}

.page-resources__card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

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

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

/* Guides & Tips Section */
.page-resources__guides-tips {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
    color: #333333; /* Dark text on light background */
}

.page-resources__guides-tips .page-resources__section-title,
.page-resources__guides-tips .page-resources__section-description {
    color: #333333;
}

.page-resources__grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.page-resources__text-block {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.page-resources__text-block h3 {
    color: #017439;
    margin-bottom: 15px;
}

.page-resources__text-block p {
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-resources__text-block ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: #555555;
}

.page-resources__text-block li {
    margin-bottom: 5px;
}

/* Platform Advantages Section */
.page-resources__platform-advantages {
    padding: 80px 0;
}

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

.page-resources__advantage-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__advantage-icon {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    object-fit: contain;
}

.page-resources__advantage-title {
    font-size: 1.5em;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-resources__advantage-item p {
    color: #f0f0f0;
}

.page-resources__btn-center {
    display: block;
    margin: 40px auto 0 auto;
    width: fit-content;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
    color: #333333; /* Dark text on light background */
}

.page-resources__faq-section .page-resources__section-title,
.page-resources__faq-section .page-resources__section-description {
    color: #333333;
}

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

.page-resources__faq-item {
    background-color: #f8f8f8;
    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: 18px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    list-style: none; /* For details/summary */
}

.page-resources__faq-question::-webkit-details-marker {
    display: none;
}

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

.page-resources__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 20px;
    text-align: center;
}

.page-resources__faq-item[open] > .page-resources__faq-question {
    background-color: #e8e8e8;
    border-bottom: 1px solid #d0d0d0;
}

.page-resources__faq-answer {
    padding: 15px 25px 20px 25px;
    font-size: 1em;
    color: #555555;
    background-color: #ffffff;
}

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

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

/* Color Contrast Specific Styles */
.page-resources__dark-bg {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
}
.page-resources__dark-section {
    background-color: #0d0d0d; /* Dark background from body. */
    color: #ffffff;
}

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

.page-resources__light-bg .page-resources__section-title,
.page-resources__light-bg .page-resources__section-description,
.page-resources__light-bg p,
.page-resources__light-bg li {
    color: #333333;
}

/* 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__sub-title {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        min-height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Fixed header spacing for mobile */
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-tertiary {
        width: 100% !important;
        max-width: 300px !important; /* Max width for buttons on small screens */
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-resources__sub-title {
        font-size: 1.4em;
    }

    .page-resources__card {
        padding: 20px;
    }
    .page-resources__card-image {
        height: 200px;
    }
    .page-resources__card-title {
        font-size: 1.4em;
    }

    .page-resources__text-block {
        padding: 20px;
    }

    /* Mobile image and video responsive rules */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__introduction-section,
    .page-resources__featured-resources,
    .page-resources__guides-tips,
    .page-resources__platform-advantages,
    .page-resources__faq-section,
    .page-resources__cta-section,
    .page-resources__resource-grid,
    .page-resources__grid-2-col,
    .page-resources__advantage-list,
    .page-resources__faq-list,
    .page-resources__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-resources__hero-content,
    .page-resources__hero-buttons {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-resources__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-resources__faq-answer {
        padding: 10px 20px 15px 20px;
    }
}