/* style/resources.css */

/* Base styles for the page content, ensuring text color contrast with body background */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #f0f0f0; /* Light text for dark body background */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

/* Section specific styling */
.page-resources__section {
    padding: 60px 0;
    text-align: center;
}

.page-resources__dark-bg {
    background-color: #1A237E; /* Main brand color */
    color: #ffffff;
}

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

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

.page-resources__sub-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: inherit;
    font-weight: 600;
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-resources__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin-bottom: 40px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFD700; /* Auxiliary color for emphasis */
    line-height: 1.2;
}

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

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    filter: brightness(0.7); /* Darken image to ensure text contrast, no color change */
}

/* CTA Buttons */
.page-resources__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.page-resources__btn-primary {
    background-color: #FFD700; /* Auxiliary color */
    color: #1A237E; /* Main brand color for text */
    border: 2px solid #FFD700;
}

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

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

.page-resources__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A237E;
    transform: translateY(-2px);
}

/* Feature Cards (Intro Section) */
.page-resources__feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-resources__card {
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-resources__card:hover {
    transform: translateY(-5px);
    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;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-resources__card-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #1A237E;
}

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

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

.page-resources__card-text {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows text to take up available space */
}

.page-resources__card-link {
    display: inline-block;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-resources__card-link:hover {
    color: #1A237E;
    border-color: #1A237E;
}

/* Content Grid Section */
.page-resources__content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    text-align: left;
    margin-bottom: 60px;
}

.page-resources__content-grid--reverse {
    grid-template-columns: 1fr 1fr;
    direction: rtl; /* Reverse order for content and image */
}

.page-resources__content-grid--reverse .page-resources__text-block {
    direction: ltr; /* Reset text direction */
}

.page-resources__content-grid--reverse .page-resources__image-wrapper {
    direction: ltr; /* Reset image direction */
}

.page-resources__content-grid p,
.page-resources__content-grid ul {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.page-resources__content-grid ul {
    list-style-type: disc;
    padding-left: 25px;
}

.page-resources__content-grid li {
    margin-bottom: 8px;
}

.page-resources__image-wrapper {
    text-align: center;
}

.page-resources__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Article List Section */
.page-resources__article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: left;
}

.page-resources__article-card {
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
}

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

.page-resources__article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.page-resources__article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-resources__article-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #1A237E;
}

.page-resources__article-title a {
    color: #1A237E;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__article-title a:hover {
    color: #FFD700;
}

.page-resources__article-summary {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__read-more-link {
    display: inline-block;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-resources__read-more-link:hover {
    color: #1A237E;
    border-color: #1A237E;
}

/* Safety Features Section */
.page-resources__safety-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}

.page-resources__feature-item {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

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

.page-resources__feature-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFD700;
}

.page-resources__feature-item p {
    font-size: 1em;
    line-height: 1.5;
}

/* FAQ Section */
.page-resources__faq-list {
    margin-top: 50px;
    text-align: left;
}

.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.08);
    color: #333333;
}

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

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

.page-resources__faq-question h3 {
    margin: 0;
    color: inherit;
    font-size: 1em; /* Keep h3 size consistent with parent */
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #FFD700;
}

.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;
}

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

.page-resources__faq-answer p {
    margin: 0;
    font-size: 1em;
    line-height: 1.6;
}

/* Download App Section */
.page-resources__download-app-section {
    padding: 80px 0;
}

.page-resources__download-app-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    text-align: left;
}

.page-resources__download-app-content .page-resources__text-block {
    max-width: none; /* Override max-width for flex layout */
    margin: 0;
}

.page-resources__app-image-wrapper {
    flex-shrink: 0;
    text-align: center;
}

.page-resources__app-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.page-resources__contact-item {
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    color: #333333;
}

.page-resources__contact-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #1A237E;
}

.page-resources__contact-item p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 20px;
}

.page-resources__contact-link {
    display: inline-block;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-resources__contact-link:hover {
    color: #1A237E;
    border-color: #1A237E;
}

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

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

    .page-resources__content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-resources__content-grid--reverse {
        grid-template-columns: 1fr;
        direction: ltr; /* Reset direction for smaller screens */
    }

    .page-resources__download-app-content {
        flex-direction: column;
        text-align: center;
    }
}

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

    .page-resources__hero-section {
        min-height: 400px;
        padding: 60px 15px;
    }

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

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

    .page-resources__section {
        padding: 40px 0;
    }

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

    .page-resources__sub-title {
        font-size: 1.5em;
    }

    .page-resources__text-block {
        font-size: 1em;
        padding: 0 15px; /* Add padding to text blocks */
    }

    .page-resources__container {
        padding: 0 15px;
    }

    /* Force responsive for images, videos, buttons */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__download-app-content,
    .page-resources__app-image-wrapper,
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container,
    .page-resources__faq-item,
    .page-resources__contact-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset for mobile */
    }

    /* Buttons specific for mobile */
    .page-resources__cta-button,
    .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__cta-section {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-resources__feature-cards,
    .page-resources__article-list,
    .page-resources__safety-features,
    .page-resources__contact-methods {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-resources__card,
    .page-resources__article-card,
    .page-resources__feature-item,
    .page-resources__contact-item {
        padding: 20px;
    }

    .page-resources__card-image,
    .page-resources__article-image {
        height: 180px;
    }

    .page-resources__faq-question,
    .page-resources__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__cta-button {
        padding: 12px 20px;
        font-size: 1em;
    }
}