/* --------------------------
   Base Styles
-------------------------- */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: #111;
    color: #fff;
    padding: 15px 0;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

footer {
    padding: 20px 0;
    background: #222;
    color: #ccc;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.affiliate-disclaimer {
  font-size: 0.85em;
  margin-top: 10px;
}

.articles {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-excerpt {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.post-excerpt img {
    width: 200px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.post-text {
    flex: 1;
}

.read-more {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}

.main-content {
    flex: 1;
}

.content-layout {
    display: flex;
    gap: 20px;
}

/* --------------------------
   Sidebar & Hamburger
-------------------------- */
.sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #f5f5f5;
    overflow-y: auto;
    padding: 20px;
    z-index: 2000;
    transition: left 0.3s ease;
}

.sidebar.show {
    left: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
}

.sidebar-overlay.show {
    display: block;
}

.sidebar-toggle {
    display: block;
    font-size: 24px;
    color: #fff;
    background: transparent;
    border: 2px solid #fff;
    padding: 6px 12px;
    cursor: pointer;
    margin-top: 10px;
}

/* Sidebar links */
.sidebar h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 8px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* --------------------------
   CTA Boxes
-------------------------- */
.cta-box-compact {
    border: 2px solid #ff9900;
    background: #fff8e1;
    padding: 15px;
    margin: 25px 0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.cta-products-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cta-product-compact {
    width: 100px;
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-product-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cta-product-compact img {
    max-width: 80px;
    max-height: 80px;
    display: block;
    margin: 0 auto 5px;
    border-radius: 4px;
}

.cta-product-name {
    display: block;
    font-weight: bold;
    margin-bottom: 2px;
    color: #333;
}

.cta-product-action {
    display: block;
    color: #ff6600;
    font-weight: bold;
    font-size: 0.75rem;
}

/* --------------------------
   Media Queries
-------------------------- */

/* Tablets & small laptops */
@media (max-width: 1024px) {
    .content-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -260px;
        height: 100%;
        display: none;
        padding: 20px;
    }

    .sidebar.show {
        display: block;
        left: 0;
    }

    .sidebar-overlay {
        display: none;
    }

    .main-content {
        width: 100%;
    }

    header nav ul {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        gap: 10px;
    }

    .sidebar-toggle {
        display: inline-block;
    }

    .articles {
        display: block;
    }

    .post-excerpt {
        flex-direction: column;
    }

    .post-excerpt img {
        width: 100%;
        max-height: 250px;
        margin-bottom: 15px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .post-text h3 {
        font-size: 1.1rem;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .sidebar {
        display: block;
        position: static;
        transform: none;
        width: 250px;
        height: auto;
        padding: 0;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar-overlay {
        display: none;
    }

    .content-layout {
        flex-direction: row;
    }
}

.contact-form {
    max-width: 600px;
}

.contact-form label {
    display: block;
    margin-bottom: 12px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
}

.contact-form button {
    padding: 10px 16px;
    margin-top: 10px;
    cursor: pointer;
}

.form-success {
    color: green;
    margin-top: 15px;
}

.form-error {
    color: red;
    margin-top: 15px;
}

/* ===== Content Tables ===== */
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    background: #ffffff;
}

.main-content table th {
    background: #f3f6f9;
    color: #222;
    font-weight: 600;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #dbe3ec;
}

.main-content table td {
    padding: 10px;
    border-bottom: 1px solid #e6ecf2;
    vertical-align: top;
}

.main-content table tr:hover {
    background-color: #fafcff;
}

/* ===== Pros / Cons Blocks ===== */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 1.5em 0;
}

.pros-cons div {
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    padding: 14px;
    border-radius: 6px;
}

.pros-cons h4 {
    margin-top: 0;
}

/* ===== Lists ===== */
.main-content ul,
.main-content ol {
    padding-left: 1.2em;
    margin: 1em 0;
}

.main-content li {
    margin-bottom: 6px;
}

/* ===== Headings spacing ===== */
.main-content h2 {
    margin-top: 2em;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 6px;
}

.main-content h3 {
    margin-top: 1.5em;
}

/* ===== Mobile ===== */
@media (max-width: 700px) {
    .pros-cons {
        grid-template-columns: 1fr;
    }

    .main-content table {
        font-size: 0.9rem;
    }
}
/* Category Intro Styling */
.category-intro {
    font-size: 1.1rem;           /* Slightly larger than body text */
    line-height: 1.8;            /* Better readability */
    color: #333333;              /* Dark gray for easy reading */
    margin: 20px 0 30px 0;       /* Space above and below the intro */
    padding: 15px 20px;          /* Inner padding for a subtle block effect */
    background-color: #f9f9f9;   /* Light gray background to highlight intro */
    border-left: 4px solid #0073e6; /* Accent color on left side */
    border-radius: 5px;           /* Slightly rounded corners */
}

.category-posts article.post-excerpt {
    border-bottom: 1px solid #ddd; /* Light divider between posts */
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.category-posts article.post-excerpt:last-child {
    border-bottom: none; /* Remove border after last post */
}

.category-posts h3 a {
    color: #0073e6;

.affiliate-box {
    border: 1px solid #e0e0e0;
    background: #f9fafb;
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
}

.affiliate-btn {
    display: inline-block;
    background: #1f6feb;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.affiliate-btn:hover {
    background: #174ea6;
}

.affiliate-disclaimer {
    margin-top: 10px;
    color: #666;
}

.budget-form label {
    display: block;
    margin-bottom: 12px;
}

.budget-form input {
    width: 10%;
    padding: 8px;
    margin-top: 4px;
}

.budget-form button {
    margin-top: 15px;
    padding: 10px 16px;
    cursor: pointer;
}

.budget-results {
    margin-top: 20px;
    padding: 15px;
    background: #f5f7fa;
    border-left: 4px solid #2c7be5;
}

.post-content .budget-form label {
    display: block;
    margin-bottom: 15px;
}

.post-content .budget-form input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
}

.post-content .budget-form button {
    margin-top: 20px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
}

.post-content .budget-results {
    margin-top: 25px;
    padding: 15px;
    background: #f5f7fa;
    border-left: 4px solid #2c7be5;
}

.post-content .expenses-grid input:focus {
    outline: none;
    border-color: #2c7be5;
    box-shadow: 0 0 0 2px rgba(44,123,229,0.2);
}

/* ===== Budget Calculator ===== */

.post-content .expenses-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.post-content .expense-item {
    background: #f9fafb;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.post-content .expense-item label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.post-content .expense-item input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .post-content .expenses-grid {
        grid-template-columns: 1fr;
    }
}

.budget-summary {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    margin: 30px 0;
}

.budget-summary p {
    font-size: 1.05rem;
    margin: 8px 0;
}

.budget-summary .remaining {
    font-size: 1.2rem;
}
function updateChart(income, expenses) {
    const max = Math.max(income, expenses, 1);

    document.getElementById('incomeBar').style.width =
        (income / max * 100) + '%';

    document.getElementById('expenseBar').style.width =
        (expenses / max * 100) + '%';
}

.bar {
    width: 0;
    min-width: 30px;
    transition: width 0.4s ease;
}

/* Budget chart container */
.chart {
    margin-top: 30px;
    background: #f4f6f8;
    padding: 15px;
    border-radius: 8px;
}

/* Bars wrapper */
.chart .bar {
    height: 32px;
    line-height: 32px;
    margin-bottom: 12px;
    padding-left: 12px;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    width: 0;
    transition: width 0.4s ease;
}

/* Specific bars */
.income-bar {
    background: #2e7d32; /* green */
}

.expense-bar {
    background: #c62828; /* red */
}

/* FORCE budget chart visibility */
.chart {
    display: block !important;
    width: 100% !important;
    margin: 30px 0 !important;
}

.chart .bar {
    display: block !important;
    min-height: 32px !important;
    height: 32px !important;
    width: 0;
    margin-bottom: 12px;
    padding-left: 12px;
    line-height: 32px;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible !important;
}

/* Colours */
.income-bar {
    background-color: #2e7d32 !important;
}

.expense-bar {
    background-color: #c62828 !important;
}

.chart-wrapper {
    display: block;
    width: 100%;
}

.adsbygoogle:empty {
  display: none !important;
}

.sidebar-ad {
    margin-bottom: 20px;
}

@media (min-width: 1024px) {
    .sidebar-ad {
        position: sticky;
        top: 90px; /* clears header */
    }
}

.ad-label {
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 6px;
}

