/* style/resources.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark-bg: #FFFFFF;
    --text-color-light-bg: #333333;
    --button-register-bg: #C30808;
    --button-register-text: #FFFF00;
    --body-bg: #0a0a0a;
}

.page-resources {
    color: var(--text-color-dark-bg); /* Default text color for dark body background */
    background-color: var(--body-bg);
    padding-top: 0; /* Handled by shared.css body padding or specific section below */
}

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

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

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-color-dark-bg);
}

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

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    line-height: 1.6;
}

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

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

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

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

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

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

/* Specific button colors */
.page-resources__btn-register,
.page-resources__btn-login {
    background-color: var(--button-register-bg);
    color: var(--button-register-text);
    border-color: var(--button-register-bg);
}

.page-resources__btn-register:hover,
.page-resources__btn-login:hover {
    background-color: #a30606;
    border-color: #a30606;
}

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

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

.page-resources__guide-section {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for contrast */
    color: var(--text-color-dark-bg);
}

.page-resources__terms-section {
    background-color: var(--primary-color);
    color: var(--text-color-dark-bg);
}

.page-resources__optimization-section {
    background-color: var(--body-bg);
    color: var(--text-color-dark-bg);
}

.page-resources__faq-section {
    background-color: var(--primary-color);
    color: var(--text-color-dark-bg);
}

.page-resources__contact-section {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color-dark-bg);
}

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

.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--text-color-dark-bg);
}

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

.page-resources__ordered-list,
.page-resources__unordered-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 40px auto;
    max-width: 900px;
    text-align: left;
}

.page-resources__ordered-list li,
.page-resources__unordered-list li {
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 8px;
    color: var(--text-color-dark-bg);
}

.page-resources__ordered-list li p,
.page-resources__unordered-list li p {
    font-size: 1em;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 0;
}

.page-resources__list-title {
    font-size: 1.4em;
    color: var(--text-color-dark-bg);
    margin-top: 0;
    margin-bottom: 5px;
}

.page-resources__image-content {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-resources__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-resources__card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: left;
    color: var(--text-color-dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-resources__card-title {
    font-size: 1.5em;
    color: var(--text-color-dark-bg);
    margin-top: 0;
    margin-bottom: 15px;
}

.page-resources__card p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.page-resources__btn-link {
    color: var(--button-register-text); /* Yellow text for links in cards */
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
    align-self: flex-start;
}

.page-resources__btn-link:hover {
    text-decoration: underline;
}

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-color-dark-bg);
    background-color: rgba(255, 255, 255, 0.05);
}

.page-resources__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-title {
    margin: 0;
    color: var(--text-color-dark-bg);
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--button-register-text); /* Yellow for FAQ toggle */
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-color-dark-bg);
}

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

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

.page-resources__contact-info {
    margin-top: 30px;
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.page-resources__contact-info p {
    margin-bottom: 10px;
}

.page-resources__link {
    color: var(--button-register-text);
    text-decoration: none;
}

.page-resources__link:hover {
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile hero isn't covered */
    }
    .page-resources__hero-title {
        font-size: 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,
    .page-resources__btn-link,
    .page-resources a[class*="button"],
    .page-resources a[class*="btn"] {
        width: 100% !important; /* Full width for buttons on mobile */
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__section {
        padding: 40px 15px;
    }
    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__text-block,
    .page-resources__ordered-list li p,
    .page-resources__unordered-list li p,
    .page-resources__card p,
    .page-resources__faq-answer p {
        font-size: 0.95em;
    }
    .page-resources__list-title,
    .page-resources__card-title,
    .page-resources__faq-title {
        font-size: 1.2em;
    }
    .page-resources__card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .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__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; /* Prevent horizontal scroll */
    }
    .page-resources__contact-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__faq-question {
        font-size: 1em;
        padding: 15px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px;
        padding-top: 0;
    }
}