/* style/resources.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
    --login-color: #EA7C07;
    --border-color: #e0e0e0;
    --bg-light-gray: #f9f9f9;
}

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

.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background: linear-gradient(135deg, var(--primary-color) 0%, #aee3f2 100%);
    color: var(--text-color-light);
    overflow: hidden;
}

.page-resources__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-resources__hero-title {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--text-color-light);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-light);
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--login-color); /* Using login color for primary CTA */
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__cta-button:hover {
    background: #e06a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-resources__introduction {
    background: var(--secondary-color);
    color: var(--text-color-dark);
}

.page-resources__guides {
    background: var(--bg-light-gray);
    color: var(--text-color-dark);
}

.page-resources__strategies {
    background: var(--secondary-color);
    color: var(--text-color-dark);
}

.page-resources__security-support {
    background: var(--primary-color);
    color: var(--text-color-light); /* Forced white text for dark background */
}

.page-resources__promotions {
    background: var(--bg-light-gray);
    color: var(--text-color-dark);
}

.page-resources__faq {
    background: var(--secondary-color);
    color: var(--text-color-dark);
}

.page-resources__quick-links {
    background: var(--primary-color);
    color: var(--text-color-light); /* Forced white text for dark background */
}

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

.page-resources__heading {
    font-size: 2.2em;
    margin-bottom: 30px;
    font-weight: bold;
    color: inherit;
}

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

.page-resources__highlight {
    font-weight: bold;
}

.page-resources__grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: left;
}

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

.page-resources__grid--3-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-resources__guide-card, .page-resources__card, .page-resources__info-card, .page-resources__promo-card {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color-dark);
    height: 100%; /* Ensure cards have equal height */
    box-sizing: border-box;
}

.page-resources__security-support .page-resources__info-card {
    background: rgba(255, 255, 255, 0.15); /* Semi-transparent white on primary-color bg */
    color: var(--text-color-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-resources__guide-image, .page-resources__card-image, .page-resources__info-image, .page-resources__promo-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    display: block; /* Ensure it behaves as a block element */
}

.page-resources__sub-heading, .page-resources__card-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    color: inherit;
    text-align: center;
}

.page-resources__card-text {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to grow and push link to bottom */
    color: inherit;
    text-align: center;
}

.page-resources__card-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Push link to the bottom */
}

.page-resources__security-support .page-resources__card-link {
    background: var(--login-color);
}

.page-resources__card-link:hover {
    background: #1e87bb;
}

.page-resources__security-support .page-resources__card-link:hover {
    background: #e06a00;
}

.page-resources__button-group {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-resources__btn-primary, .page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-resources__btn-primary:hover {
    background: #e06a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-resources__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px 15px !important;
    opacity: 1;
    background: var(--bg-light-gray);
    border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-resources__faq-question:hover {
    background: var(--bg-light-gray);
    border-color: #d0d0d0;
}

.page-resources__faq-question:active {
    background: #eeeeee;
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-color-dark);
}

.page-resources__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg); /* Change to minus sign visually */
}

.page-resources__link-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-resources__list-item a {
    display: block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 1em;
}

.page-resources__list-item a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1.1em;
    }
    .page-resources__heading {
        font-size: 1.8em;
    }
    .page-resources__grid--3-col {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
    }

    .page-resources__section {
        padding: 40px 15px;
    }
    .page-resources__heading {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    .page-resources__paragraph {
        font-size: 0.95em;
    }
    .page-resources__grid {
        gap: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .page-resources__grid--2-col, .page-resources__grid--3-col {
        grid-template-columns: 1fr;
    }
    .page-resources__guide-card, .page-resources__card, .page-resources__info-card, .page-resources__promo-card {
        padding: 20px;
        align-items: stretch; /* Allow images to be full width */
    }
    .page-resources__guide-image, .page-resources__card-image, .page-resources__info-image, .page-resources__promo-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    .page-resources__sub-heading, .page-resources__card-title {
        font-size: 1.2em;
        text-align: center;
    }
    .page-resources__card-text {
        font-size: 0.9em;
        text-align: center;
    }
    .page-resources__button-group {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-resources__btn-primary, .page-resources__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px;
        font-size: 1em;
    }
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-resources__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
    }
    .page-resources__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px !important;
    }
    .page-resources__link-list {
        flex-direction: column;
        gap: 10px;
    }
    .page-resources__list-item a {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* Ensure all images are responsive and not smaller than 200px in content area */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
    min-width: 200px; /* Minimum size for content images */
    min-height: 200px; /* Minimum size for content images */
}

.page-resources__hero-image img {
    min-width: unset; /* Hero image can be smaller if needed for responsiveness */
    min-height: unset;
}

@media (max-width: 768px) {
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-resources__hero-image img {
        min-width: unset !important;
        min-height: unset !important;
    }

    .page-resources__section, .page-resources__card, .page-resources__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Specific styling for security-support section to ensure contrast */
.page-resources__dark-bg .page-resources__heading,
.page-resources__dark-bg .page-resources__paragraph,
.page-resources__dark-bg .page-resources__sub-heading,
.page-resources__dark-bg .page-resources__card-title,
.page-resources__dark-bg .page-resources__card-text {
    color: var(--text-color-light); /* Enforce light text on dark background */
}

.page-resources__quick-links .page-resources__heading,
.page-resources__quick-links .page-resources__paragraph {
    color: var(--text-color-light);
}