/* style/resources.css */

/* Base Styles */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default white */
}

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

.page-resources__section {
    padding: 60px 0;
    text-align: center;
}

.page-resources__dark-section {
    background-color: #017439; /* Main brand color */
    color: #ffffff; /* White text for dark background */
}

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

.page-resources__section-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit; /* Inherit from parent section */
}

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

.page-resources__btn-primary {
    background-color: #017439; /* Main brand color */
    color: #ffffff;
    border: 2px solid #017439;
}

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

.page-resources__btn-secondary {
    background-color: #ffffff;
    color: #017439; /* Main brand color */
    border: 2px solid #017439;
    margin-left: 20px;
}

.page-resources__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2d;
    border-color: #005a2d;
}

.page-resources__btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* Custom Colors for Register/Login */
a[href="register.html"].page-resources__btn-secondary {
    background-color: #C30808; /* Custom Register color */
    color: #FFFF00; /* Custom Register font color */
    border-color: #C30808;
}
a[href="register.html"].page-resources__btn-secondary:hover {
    background-color: #a30606;
    border-color: #a30606;
    color: #fff;
}
/* The promotion link uses btn-primary, so apply custom colors to it as well if it's for login/register */
.page-resources__cta-group a.page-resources__btn-primary,
.page-resources__cta-final a.page-resources__btn-primary {
    background-color: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}
.page-resources__cta-group a.page-resources__btn-primary:hover,
.page-resources__cta-final a.page-resources__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
    color: #fff;
}


/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding: 100px 0;
    padding-top: calc(100px + var(--header-offset, 120px)); /* Apply header offset */
    background-color: #017439; /* Dark background for hero */
    color: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 600px;
}

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

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

.page-resources__intro-text {
    font-size: 1.4em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    z-index: 1;
}

/* Steps Grid (Download Guide) */
.page-resources__steps-grid,
.page-resources__features-grid,
.page-resources__guides-grid,
.page-resources__news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources__step-card,
.page-resources__feature-card,
.page-resources__guide-card,
.page-resources__news-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
    height: 100%; /* Ensure cards have equal height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

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

.page-resources__step-image,
.page-resources__feature-image,
.page-resources__guide-image,
.page-resources__news-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 200px; /* Enforce min image size */
    object-fit: cover;
}

.page-resources__step-title,
.page-resources__feature-title,
.page-resources__guide-title,
.page-resources__news-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #017439;
    flex-grow: 0;
}

.page-resources__guide-title a,
.page-resources__news-title a {
    color: #017439;
    text-decoration: none;
}

.page-resources__guide-title a:hover,
.page-resources__news-title a:hover {
    text-decoration: underline;
}

.page-resources__step-text,
.page-resources__feature-text,
.page-resources__guide-text,
.page-resources__news-excerpt {
    font-size: 1em;
    color: #555555;
    flex-grow: 1; /* Allow text to grow and push buttons down */
}

.page-resources__news-date {
    font-size: 0.9em;
    color: #777777;
    margin-top: 10px;
    margin-bottom: 10px;
}

.page-resources__cta-group {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Security List */
.page-resources__security-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

.page-resources__security-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    color: #333333;
}

.page-resources__security-heading {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 15px;
}

.page-resources__security-text {
    font-size: 1em;
    color: #555555;
}

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

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #017439;
}

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

/* For details tag, hide default marker */
.page-resources__faq-item summary {
    list-style: none;
}
.page-resources__faq-item summary::-webkit-details-marker {
    display: none;
}


/* Final CTA */
.page-resources__cta-final {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
}

.page-resources__cta-final .page-resources__section-title {
    color: #ffffff;
}

.page-resources__cta-final .page-resources__section-description {
    color: #f0f0f0;
}

.page-resources__cta-final .page-resources__cta-buttons {
    margin-top: 40px;
}

.page-resources__cta-final .page-resources__btn-primary {
    background-color: #C30808; /* Custom Login/Register color */
    border-color: #C30808;
    color: #FFFF00; /* Custom Login/Register font color */
}

.page-resources__cta-final .page-resources__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
    color: #fff;
}

.page-resources__cta-final .page-resources__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border-color: #ffffff;
}

.page-resources__cta-final .page-resources__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2d;
    border-color: #f0f0f0;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 2.8em;
    }
    .page-resources__intro-text {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        min-height: 450px;
        padding-bottom: 80px;
    }

    .page-resources__main-title {
        font-size: 2em;
    }
    .page-resources__intro-text {
        font-size: 1em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__section-description {
        font-size: 0.95em;
    }

    /* Images */
    .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__step-card,
    .page-resources__feature-card,
    .page-resources__guide-card,
    .page-resources__news-card,
    .page-resources__security-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Buttons */
    .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;
        margin-left: 0 !important; /* Reset margin for stacking */
        margin-top: 10px; /* Add spacing between stacked buttons */
    }

    .page-resources__cta-group,
    .page-resources__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-resources__steps-grid,
    .page-resources__features-grid,
    .page-resources__guides-grid,
    .page-resources__news-grid,
    .page-resources__security-list {
        grid-template-columns: 1fr;
    }

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

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