/* --- General Setup --- */
:root {
    --primary-color: #4CAF50; /* Green from Logo */
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --heading-color: #212529;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

header a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

header a:hover, header a.active {
    color: var(--primary-color);
}

/* --- Main Content & Hero --- */
main {
    padding: 40px 0;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* --- Calculator Section --- */
.calculator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.calculator-form h2, .calculator-results h2 {
    margin-top: 0;
    color: var(--heading-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.cta-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #45a049; /* Darker Green */
}

.results-placeholder, .results-output {
    padding: 20px;
    background-color: var(--background-color);
    border-radius: 4px;
    min-height: 150px;
}

.results-placeholder p {
    color: var(--secondary-color);
    text-align: center;
    margin-top: 50px;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-align: center;
}

/* --- Results Display --- */
.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}
.result-item:last-child {
    border-bottom: none;
}
.result-item.total {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 10px;
}
.result-item span:first-child {
    font-weight: 600;
}

.result-visual {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.bar-chart {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    height: 25px;
}

.bar {
    height: 100%;
    transition: width 0.5s ease-in-out;
}

.bar-net {
    background-color: #28a745; /* Green */
}

.bar-tax {
    background-color: #dc3545; /* Red */
}

.bar-401k {
    background-color: #ffc107; /* Yellow */
}

.legend {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.legend-color {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border-radius: 2px;
}


/* --- Blog & Static Pages --- */
.blog-list-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-top: 0;
    color: var(--heading-color);
}

.card-content p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.card-content .date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.post-article h1 {
    font-size: 2.5rem;
    color: var(--heading-color);
}
.post-article h2 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-top: 40px;
}
.post-article p, .post-article li {
    font-size: 1.1rem;
    line-height: 1.8;
}
.post-article a {
    color: var(--primary-color);
    text-decoration: underline;
}
.post-article code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}
.post-article pre {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 4px;
    white-space: pre-wrap;
}

.static-page {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
}

/* --- Ad Placeholder --- */
.ad-placeholder {
    background-color: #e9ecef;
    border: 1px dashed var(--border-color);
    text-align: center;
    padding: 40px 20px;
    margin: 40px 0;
    color: var(--secondary-color);
}

/* --- Footer --- */
footer {
    background-color: var(--heading-color);
    color: var(--background-color);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .calculator-section {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    header nav {
        flex-direction: column;
        gap: 1rem;
    }
    header ul {
        gap: 1.5rem;
    }
}