/* Learning Center Specific Styles */

/* --- Layout & Container --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-color);
}

.article-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.intro {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Article Content Typography --- */
#article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

#article-content h3 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

#article-content h4 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#article-content h5 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

#article-content p {
    margin-bottom: 1.5rem;
}

#article-content ul, 
#article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

#article-content li {
    margin-bottom: 0.5rem;
}

#article-content a {
    color: var(--primary-color);
    text-decoration: none;
}

#article-content a:hover {
    text-decoration: underline;
}

/* --- Images --- */
.article-image {
    margin: 2rem 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.article-image figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
}

th, td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

th {
    background-color: var(--background-color);
    font-weight: 600;
}

/* --- Navigation Grid (Index Page) --- */
#learning-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.nav-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.nav-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.nav-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.5;
}

/* --- FAQ Specific Styles (The Fix) --- */
.faq-section {
    margin-bottom: 4rem; /* Adds large gap between major categories */
}

.faq-section h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color); /* Visual divider */
    color: var(--text-color);
}

.faq-item {
    margin-bottom: 2rem; /* Space between individual questions */
}

.faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color); /* Highlights the question */
}

.faq-item p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .article-header h2 {
        font-size: 2rem;
    }
    
    #learning-nav {
        grid-template-columns: 1fr;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}