/* 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 background */
    background-color: var(--dark-bg); /* Inherited from shared.css */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    text-align: center;
    overflow: hidden;
    background-color: #26A9E0; /* Brand primary color for hero background */
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
    display: block;
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 1;
}

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #FFFFFF;
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    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;
    text-align: center;
}

.page-resources__btn-primary {
    background-color: #EA7C07; /* Login color for primary CTA */
    color: #FFFFFF;
    border: 2px solid #EA7C07;
}

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

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

.page-resources__btn-secondary:hover {
    background-color: #FFFFFF;
    color: #26A9E0;
}

/* Content Sections */
.page-resources__content-section,
.page-resources__faq-section {
    background-color: #FFFFFF; /* Light background for content */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-resources__dark-section {
    background-color: #26A9E0; /* Brand primary color for dark sections */
    color: #FFFFFF; /* White text for dark background */
    padding: 60px 0;
}

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    color: inherit; /* Inherit color from section */
}

.page-resources__subsection-title {
    font-size: 2em;
    margin-top: 40px;
    margin-bottom: 30px;
    text-align: center;
    color: inherit; /* Inherit color from section */
}

.page-resources__text-block {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 30px auto;
    text-align: justify;
    color: inherit; /* Inherit color from section */
}

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

.page-resources__card {
    background-color: #f8f8f8;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #333333;
    height: 100%; /* Ensure cards are same height */
}

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

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

.page-resources__card-title {
    font-size: 1.4em;
    font-weight: bold;
    margin: 20px 20px 10px 20px;
    color: #26A9E0; /* Brand color for card titles */
}

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

.page-resources__card-title a:hover {
    color: #1a7bb7;
}

.page-resources__card-description {
    font-size: 1em;
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1; /* Push button to bottom */
}

.page-resources__btn-text {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__btn-text:hover {
    color: #1a7bb7;
}

.page-resources__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-resources__btn-text:hover .page-resources__arrow {
    transform: translateX(5px);
}

.page-resources__list {
    max-width: 900px;
    margin: 20px auto 40px auto;
    padding-left: 40px;
    list-style-type: disc;
    color: inherit;
}

.page-resources__list li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Video Section */
.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 900px; /* Max width for video */
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    cursor: pointer; /* Indicate clickable */
}

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

/* FAQ Section */
.page-resources__faq-list {
    max-width: 800px;
    margin: 40px auto;
}

.page-resources__faq-item {
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #333333;
}

.page-resources__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: #FFFFFF;
    color: #26A9E0;
    border-bottom: 1px solid #eee;
    list-style: none; /* Remove default marker */
    -webkit-touch-callout: none; /* Disable callout on iOS */
    -webkit-user-select: none; /* Disable text selection on iOS */
    user-select: none; /* Standard property */
}

.page-resources__faq-item summary::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit */
}

.page-resources__faq-question {
    display: flex;
    flex-grow: 1;
    align-items: center;
}

.page-resources__faq-qtext {
    flex-grow: 1;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    width: 20px;
    text-align: center;
}

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

.page-resources__faq-answer p {
    margin-bottom: 10px;
}
.page-resources__faq-answer p:last-child {
    margin-bottom: 0;
}
.page-resources__faq-answer a {
    color: #26A9E0;
    text-decoration: none;
}
.page-resources__faq-answer a:hover {
    text-decoration: underline;
}

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

.page-resources__cta-container {
    max-width: 900px;
}

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

.page-resources__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #FFFFFF;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__hero-description {
        font-size: 1.2em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__subsection-title {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1em !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__content-section,
    .page-resources__dark-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        padding: 40px 0;
    }

    .page-resources__container {
        padding: 0 15px; /* Add horizontal padding for content */
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__subsection-title {
        font-size: 1.5em;
        margin-top: 30px;
        margin-bottom: 20px;
    }
    .page-resources__text-block {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-resources__card-grid {
        grid-template-columns: 1fr;
    }
    .page-resources__card-image {
        height: 180px;
    }
    .page-resources__card-title {
        font-size: 1.2em;
    }
    .page-resources__faq-item summary {
        font-size: 1.1em;
        padding: 15px;
    }
    .page-resources__faq-answer {
        padding: 15px;
    }
    .page-resources__cta-title {
        font-size: 2em;
    }
    .page-resources__cta-description {
        font-size: 1em;
    }

    /* Mobile image and video responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .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,
    .page-resources__section,
    .page-resources__card,
    .page-resources__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-resources__cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column;
    }
}

/* Ensure content images are not tiny icons */
.page-resources__content-section img,
.page-resources__card img {
    min-width: 200px;
    min-height: 200px;
}

/* Override default details styling for better appearance */
.page-resources__faq-item[open] summary {
    border-bottom: 1px solid #eee;
}