/* style/resources.css */

:root {
    --primary-color: #CC0000;
    --secondary-color: #003366;
    --accent-color: #FFD700;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --bg-light: #f9f9f9;
    --border-color: #e0e0e0;
}

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

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

.page-resources__section-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

/* HERO Section */
.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); /* Ensure content is below fixed header */
    background-color: #1a1a1a;
    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: 2;
}

.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;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

/* Intro Section */
.page-resources__intro-section {
    padding: 60px 0;
    background-color: #ffffff;
}

/* Categories Section */
.page-resources__categories-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

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

.page-resources__category-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-resources__category-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-resources__card-title {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin: 20px 20px 10px;
    flex-grow: 1;
}

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

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

.page-resources__card-description {
    font-size: 0.95em;
    color: #666;
    padding: 0 20px;
    margin-bottom: 15px;
}

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

.page-resources__card-link:hover {
    background-color: var(--secondary-color);
}

/* Guides Section */
.page-resources__guides-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.page-resources__guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.page-resources__guide-item {
    background: var(--bg-light);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__guide-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-resources__guide-title {
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

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

.page-resources__guide-title a:hover {
    color: var(--primary-color);
}

.page-resources__guide-description {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
}

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

.page-resources__guide-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.page-resources__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #ffffff;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-color-dark);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.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 25px;
    opacity: 0;
    background: #fdfdfd;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Sufficiently large for content */
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px solid var(--border-color);
}

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

.page-resources__faq-answer p {
    margin: 0;
    font-size: 1em;
    color: #555;
}

/* CTA Bottom Section */
.page-resources__cta-bottom-section {
    padding: 80px 0;
    text-align: center;
    color: var(--text-color-light);
    background-color: var(--secondary-color);
}

.page-resources__cta-bottom-section .page-resources__section-title {
    color: var(--accent-color);
}

.page-resources__cta-bottom-section .page-resources__text-block {
    color: #e0e0e0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.page-resources__cta-bottom-section .page-resources__cta-button {
    background: var(--primary-color);
    font-size: 1.3em;
    padding: 18px 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__hero-description {
        font-size: 1.2em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__category-grid,
    .page-resources__guide-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .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: 2.2em;
        margin-bottom: 15px;
    }
    
    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    
    .page-resources__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    
    .page-resources__text-block {
        font-size: 1em;
    }
    
    .page-resources__category-grid,
    .page-resources__guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__category-card img {
        
    }

    .page-resources__container,
    .page-resources__intro-section .page-resources__container,
    .page-resources__categories-section .page-resources__container,
    .page-resources__guides-section .page-resources__container,
    .page-resources__faq-section .page-resources__container,
    .page-resources__cta-bottom-section .page-resources__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-resources__category-card,
    .page-resources__guide-item {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-question h3 {
        font-size: 1em;
    }
    .page-resources__faq-toggle {
        font-size: 1.5em;
        width: 25px;
        height: 25px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }
    .page-resources__cta-bottom-section .page-resources__cta-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}