/* style/resources.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --register-button-bg: #C30808;
    --login-button-bg: #C30808;
    --button-text-yellow: #FFFF00;
    --background-color: #FFFFFF;
}

.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-color);
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is below fixed header */
    text-align: center;
    overflow: hidden;
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color-light);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

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

/* General Section Styling */
.page-resources__section {
    padding: 60px 0;
}

.page-resources__light-bg {
    background-color: var(--background-color);
    color: var(--text-color-dark);
}

.page-resources__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherits from parent section */
}

.page-resources__section-intro {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

/* Grid Layouts */
.page-resources__grid-3-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

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

/* Card Styling */
.page-resources__card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-color-dark);
}

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

.page-resources__card--dark {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color-light);
}

.page-resources__card--dark .page-resources__card-title a,
.page-resources__card--dark .page-resources__btn-link {
    color: var(--text-color-light);
}

.page-resources__card--dark .page-resources__card-text {
    opacity: 0.8;
}

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

.page-resources__card-title {
    font-size: 1.4em;
    margin: 20px 20px 10px;
    line-height: 1.3;
}

.page-resources__card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: darken(var(--primary-color), 10%);
}

.page-resources__card-text {
    padding: 0 20px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.page-resources__btn-link {
    display: inline-block;
    margin: 0 20px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__btn-link:hover {
    color: darken(var(--primary-color), 10%);
}

.page-resources__btn-link--white {
    color: var(--text-color-light);
}

.page-resources__btn-link--white:hover {
    color: var(--secondary-color);
}

/* Call to Action Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    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;
}

.page-resources__btn-primary {
    background-color: var(--register-button-bg); /* Custom color for primary action */
    color: var(--button-text-yellow); /* Custom text color */
    border: 2px solid var(--register-button-bg);
}

.page-resources__btn-primary:hover {
    background-color: darken(var(--register-button-bg), 10%);
    border-color: darken(var(--register-button-bg), 10%);
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-resources__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Specific button styles for dark background */
.page-resources__hero-buttons .page-resources__btn-secondary {
    color: var(--text-color-light);
    border-color: var(--text-color-light);
}

.page-resources__hero-buttons .page-resources__btn-secondary:hover {
    background-color: var(--text-color-light);
    color: var(--primary-color);
}

/* App Download Section */
.page-resources__app-download-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-resources__app-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__app-text {
    flex: 1;
    min-width: 300px;
}

.page-resources__app-title {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-resources__app-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-resources__app-description {
    margin-bottom: 30px;
    font-size: 1.1em;
}

.page-resources__app-text .page-resources__btn-primary--download {
    background-color: var(--register-button-bg); /* Use register button color for consistency */
    color: var(--button-text-yellow);
    border-color: var(--register-button-bg);
    margin-right: 15px;
}

.page-resources__app-text .page-resources__btn-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* FAQ Section */
.page-resources__faq-section {
    background-color: var(--background-color);
}

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

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

.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;
    outline: none;
    color: var(--primary-color);
    background-color: #f9f9f9;
    list-style: none;
}

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

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

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-resources__faq-item[open] .page-resources__faq-toggle {
    transform: rotate(45deg);
}

.page-resources__faq-answer {
    padding: 15px 20px 20px;
    font-size: 1.05em;
    color: var(--text-color-dark);
    border-top: 1px solid #eee;
}

.page-resources__faq-answer p {
    margin-bottom: 10px;
}

.page-resources__faq-answer p:last-child {
    margin-bottom: 0;
}

/* CTA Section at the bottom */
.page-resources__cta-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-align: center;
    padding: 80px 20px;
}

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

.page-resources__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

.page-resources__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    opacity: 0.9;
}

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

.page-resources__cta-buttons .page-resources__btn-secondary {
    color: var(--text-color-light);
    border-color: var(--text-color-light);
}

.page-resources__cta-buttons .page-resources__btn-secondary:hover {
    background-color: var(--text-color-light);
    color: var(--primary-color);
}

/* Highlight text */
.page-resources__highlight {
    color: var(--button-text-yellow);
    font-weight: bold;
}

/* Image color filter restriction */
.page-resources img {
    filter: none; /* Ensure no CSS filter changes image colors */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__app-download-content {
        flex-direction: column;
        text-align: center;
    }
    .page-resources__app-text {
        min-width: unset;
        margin-top: 30px;
    }
    .page-resources__app-text .page-resources__btn-primary--download,
    .page-resources__app-text .page-resources__btn-secondary {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    .page-resources__app-text .page-resources__hero-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important;
        min-height: 400px;
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary, .page-resources__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__section-intro {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-resources__grid-3-cols, .page-resources__grid-2-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__card-image {
        height: 180px;
    }
    .page-resources__card-title {
        font-size: 1.2em;
    }
    .page-resources__card-text {
        font-size: 0.9em;
    }
    .page-resources__app-title {
        font-size: 1.8em;
    }
    .page-resources__app-description {
        font-size: 1em;
    }
    .page-resources__cta-section {
        padding: 60px 15px;
    }
    .page-resources__cta-title {
        font-size: 2em;
    }
    .page-resources__cta-description {
        font-size: 1em;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__faq-item summary {
        font-size: 1em;
        padding: 15px;
    }
    .page-resources__faq-answer {
        font-size: 0.95em;
        padding: 10px 15px 15px;
    }

    /* 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,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper,
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevents content overflow */
    }
    .page-resources__cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-resources__app-download-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__app-text .page-resources__hero-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__cta-title {
        font-size: 1.8em;
    }
}