/* --- JOURNAL / BLOG SECTION --- */
.journal-section {
    padding: 0 5% 8rem;
    max-width: 1400px;
    margin: 0 auto;
}

.journal-grid {
    display: grid;
    /* Responsive auto-fit grid */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem;
}

.journal-card {
    background-color: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures all cards in a row stretch to the same height */
}

.journal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.06);
}

.journal-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 2; /* Locks the image crop to a clean rectangle */
    overflow: hidden;
    background-color: #eee;
}

.journal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.journal-card:hover .journal-image-wrapper img {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

.journal-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Tells the content area to fill the remaining height of the card */
}

.journal-title {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.journal-excerpt {
    color: var(--text-color);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}


/* --- ARTICLE / BLOG DETAIL SECTION --- */
.article-detail {
    padding: 4rem 5% 8rem;
    max-width: 1100px; /* Wider container for the hero image */
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-title {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.article-hero-image {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    margin-bottom: 4rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Constrain the reading width for optimal typography */
.article-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.15rem; /* Slightly larger text for reading */
    line-height: 1.9;
    color: var(--text-color);
}

/* Target the paragraphs generated by Django's linebreaks filter */
.article-content p {
    margin-bottom: 2rem;
}

/* Standardize any sub-headings you might use inside the blog content */
.article-content h2, 
.article-content h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-content h2 { font-size: 2.2rem; }
.article-content h3 { font-size: 1.6rem; }

.article-content a {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
}

.article-content a:hover {
    text-decoration-color: var(--accent-color);
}

.article-footer {
    max-width: 720px;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}

