/* style/resources.css */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #28a745; /* Green */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --border-color: #e0e0e0;
}

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

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

/* Hero Banner */
.page-resources .hero-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color-light);
    gap: 40px;
}

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

.page-resources .hero-banner p {
    font-size: 1.3em;
    max-width: 800px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.page-resources .hero-banner .cta-button {
    display: inline-block;
    background: #ffc107; /* A contrasting yellow for CTA */
    color: var(--text-color-dark);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources .hero-banner .cta-button:hover {
    background: #e0a800;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-resources .hero-banner .hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    margin-top: 40px;
}

/* General Section Styling */
.page-resources section {
    padding: 60px 0;
    text-align: center;
}

.page-resources section:nth-of-type(even) {
    background-color: var(--background-light);
}

.page-resources h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

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

.page-resources h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-resources p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-color-dark);
}

/* Resource Categories */
.page-resources .resource-categories .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources .resource-categories .category-card {
    background: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-resources .resource-categories .category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-resources .resource-categories .category-card img {
    max-width: 100%;
    height: 200px; /* Enforce minimum height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-resources .resource-categories .category-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.6em;
    transition: color 0.3s ease;
}

.page-resources .resource-categories .category-card h3 a:hover {
    color: var(--secondary-color);
}

.page-resources .resource-categories .category-card p {
    font-size: 1em;
    color: #555;
    flex-grow: 1; /* Allow paragraph to take available space */
}

.page-resources .resource-categories .category-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources .resource-categories .category-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Detailed Guides */
.page-resources .detailed-guides .guide-item {
    background: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-resources .detailed-guides .guide-item img {
    max-width: 100%;
    height: 250px; /* Enforce minimum height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    align-self: center; /* Center image horizontally */
}

.page-resources .detailed-guides .guide-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.8em;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.page-resources .detailed-guides .guide-item h3 a:hover {
    color: var(--secondary-color);
}

.page-resources .detailed-guides .guide-item p {
    color: #555;
    font-size: 1.05em;
    margin-bottom: 20px;
}

.page-resources .detailed-guides .read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources .detailed-guides .read-more:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

.page-resources .faq-list {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

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

.page-resources .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-resources .faq-question:hover {
    background: #f5f5f5;
    border-color: var(--primary-color);
}

.page-resources .faq-question h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--text-color-dark);
}

.page-resources .faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    line-height: 1;
}

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

.page-resources .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 25px;
    background: #fdfdfd;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.page-resources .faq-item.active .faq-answer {
    max-height: 500px; /* Sufficient height for content */
    padding: 20px 25px;
    border-color: var(--primary-color);
}

.page-resources .faq-answer p {
    margin: 0;
    font-size: 1.05em;
    color: #555;
}

/* Latest Articles */
.page-resources .latest-articles .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources .latest-articles .article-card {
    background: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-resources .latest-articles .article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-resources .latest-articles .article-card img {
    width: 100%;
    height: 220px; /* Enforce minimum height */
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.page-resources .latest-articles .article-card .card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-resources .latest-articles .article-card h3 {
    margin-top: 0;
    font-size: 1.4em;
    line-height: 1.4;
    flex-grow: 1;
}

.page-resources .latest-articles .article-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources .latest-articles .article-card h3 a:hover {
    color: var(--secondary-color);
}

.page-resources .latest-articles .article-card p {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
}

.page-resources .latest-articles .article-card .article-date {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
}

.page-resources .latest-articles .article-card .read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.page-resources .latest-articles .article-card .read-more:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-resources .hero-banner h1 {
        font-size: 2.5em;
    }
    .page-resources .hero-banner p {
        font-size: 1.1em;
    }
    .page-resources h2 {
        font-size: 2em;
    }
    .page-resources h3 {
        font-size: 1.5em;
    }
    .page-resources .resource-categories .category-grid,
    .page-resources .latest-articles .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources .hero-banner {
        padding: 60px 15px;
    }
    .page-resources .hero-banner h1 {
        font-size: 2em;
    }
    .page-resources .hero-banner p {
        font-size: 1em;
    }
    .page-resources .hero-banner .cta-button {
        padding: 12px 30px;
        font-size: 1em;
    }
    .page-resources section {
        padding: 40px 0;
    }
    .page-resources h2 {
        font-size: 1.8em;
    }
    .page-resources .faq-question {
        padding: 15px 20px;
    }
    .page-resources .faq-question h3 {
        font-size: 1.1em;
    }
    .page-resources .faq-toggle {
        font-size: 20px;
    }
    .page-resources .faq-answer {
        padding: 0 20px;
    }
    .page-resources .faq-item.active .faq-answer {
        padding: 15px 20px;
    }
    .page-resources .detailed-guides .guide-item {
        padding: 20px;
    }
    .page-resources .detailed-guides .guide-item img {
        height: 200px; /* Adjust height for mobile */
    }
    .page-resources .latest-articles .article-card img {
        height: 180px; /* Adjust height for mobile */
    }
    .page-resources .latest-articles .article-card .card-content {
        padding: 15px;
    }
    .page-resources .latest-articles .article-card h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .page-resources .hero-banner h1 {
        font-size: 1.8em;
    }
    .page-resources h2 {
        font-size: 1.6em;
    }
    .page-resources h3 {
        font-size: 1.3em;
    }
    .page-resources p {
        font-size: 0.95em;
    }
    .page-resources .resource-categories .category-grid,
    .page-resources .latest-articles .article-grid {
        grid-template-columns: 1fr;
    }
    .page-resources .detailed-guides .guide-item img {
        height: 180px;
    }
    .page-resources .latest-articles .article-card img {
        height: 160px;
    }
}