/* --- GreenSoul Theme | Font: Montserrat | Tone: Friendly & Casual --- */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-color: #2E7D32; /* Deep Green */
    --secondary-color: #4CAF50; /* Lighter Green */
    --accent-color: #FFC107; /* Amber/Yellow for accents */
    --background-color: #F8F9FA; /* Very light grey */
    --surface-color: #FFFFFF; /* White for cards/surfaces */
    --text-color: #212529; /* Dark grey for text */
    --light-text-color: #6c757d; /* Lighter grey for meta text */
    --border-color: #dee2e6;
    --shadow: 0 4px 8px rgba(0,0,0,0.05);
    --font-family: 'Montserrat', sans-serif;
}

/* --- Base & Reset Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; color: var(--primary-color); }
h2 { font-size: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; margin-top: 2rem;}
h3 { font-size: 1.5rem; color: var(--secondary-color); margin-top: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* --- Layout --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.site-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--surface-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.site-title a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--secondary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.main-nav a {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* --- Main Content & Articles --- */
main, aside {
    padding: 1.5rem;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 8px;
}
.hero h1 {
    color: white;
    font-size: 2.8rem;
}
.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 1rem auto 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.article-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}
.article-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.article-card p {
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
    color: white;
}

/* Article Page Specifics */
.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.article-header h1 {
    font-size: 2.8rem;
}

.article-meta {
    color: var(--light-text-color);
    font-style: italic;
}

.article-content img {
    margin: 1.5rem 0;
}

.cta-section {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

.cta-section h3 {
    color: white;
    margin-top: 0;
}

.cta-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 5px;
    font-weight: 700;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.cta-button:hover {
    background-color: #ffca28;
    transform: scale(1.05);
    text-decoration: none;
    color: var(--text-color);
}

/* --- Sidebar --- */
.widget {
    margin-bottom: 2rem;
}
.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}
.widget ul {
    list-style: none;
    padding: 0;
}
.widget ul li a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: padding-left 0.3s ease;
}
.widget ul li a:hover {
    padding-left: 10px;
    text-decoration: none;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--text-color);
    color: var(--background-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.site-footer a {
    color: var(--accent-color);
}
.site-footer a:hover {
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* --- Contact Page --- */
.contact-details p {
    font-size: 1.1rem;
}
.contact-details strong {
    color: var(--primary-color);
}

/* --- Media Queries for Responsive Design --- */

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .site-grid {
        grid-template-columns: 2fr 1fr;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
     .homepage-articles {
        grid-template-columns: repeat(2, 1fr);
     }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .homepage-articles {
        grid-template-columns: repeat(3, 1fr);
    }
}
