/* ========================================
   Pancake Blog - Styles
   ======================================== */

/* --- Blog Listing Cards --- */
.blog-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid #F3F4F6;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}
.blog-card-body {
    padding: 1.5rem;
}
.blog-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #279B75;
    background: #F0FDF4;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}
.blog-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.blog-card:hover .blog-card-title {
    color: #279B75;
}
.blog-card-excerpt {
    color: #6B7280;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #9CA3AF;
}
.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* --- Article Hero --- */
.article-hero {
    text-align: center;
    padding-top: 7rem;
    padding-bottom: 2rem;
    max-width: 48rem;
    margin: 0 auto;
}
.article-hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #111827;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .article-hero h1 {
        font-size: 3rem;
    }
}
.article-hero .lead {
    font-size: 1.125rem;
    color: #6B7280;
    line-height: 1.7;
    max-width: 36rem;
    margin: 0 auto;
}
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #9CA3AF;
}
.article-meta .category-pill {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #279B75;
    background: #F0FDF4;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* --- Article Body Prose --- */
.article-content {
    max-width: 42rem;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}
.article-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.625rem;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.article-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1F2937;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    line-height: 1.4;
}
.article-content p {
    margin-bottom: 1.25rem;
}
.article-content a {
    color: #279B75;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.article-content a:hover {
    color: #1E7A5C;
}
.article-content .cta-primary {
    color: white;
    text-decoration: none;
}
.article-content .cta-primary:hover {
    color: white;
}
.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.article-content ul {
    list-style-type: disc;
}
.article-content ol {
    list-style-type: decimal;
}
.article-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}
.article-content blockquote {
    border-left: 4px solid #279B75;
    background: #F0FDF4;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #1F2937;
    font-style: italic;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}
.article-content thead th {
    background: #F9FAFB;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #E5E7EB;
    color: #111827;
}
.article-content tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #F3F4F6;
}
.article-content tbody tr:hover {
    background: #F9FAFB;
}
.article-content img {
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}
.article-content strong {
    font-weight: 700;
    color: #111827;
}
.article-content code {
    background: #F3F4F6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

/* --- Sticky Table of Contents --- */
.article-toc {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}
.article-toc-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9CA3AF;
    margin-bottom: 0.75rem;
}
.article-toc a {
    display: block;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: #6B7280;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: color 0.2s ease, border-color 0.2s ease;
    line-height: 1.4;
}
.article-toc a:hover,
.article-toc a.active {
    color: #279B75;
    border-left-color: #279B75;
}
.article-toc a.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
}

/* --- In-Article CTA Banners --- */
.article-cta-inline {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid #BBF7D0;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    text-align: center;
}
.article-cta-inline h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
    margin: 0 0 0.5rem;
}
.article-cta-inline p {
    color: #4B5563;
    font-size: 0.9375rem;
    margin: 0 0 1rem;
}

.article-cta-end {
    background: linear-gradient(135deg, #0F3D2E 0%, #166534 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin: 3rem 0 2rem;
    text-align: center;
    color: white;
}
.article-cta-end h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
    color: white;
}
.article-cta-end p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0 0 1.5rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
.article-cta-end .cta-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}
.article-cta-end .cta-features span::before {
    content: '\2713';
    margin-right: 0.375rem;
    color: #34C793;
    font-weight: 700;
}

/* --- Calculator Widget (50/30/20 article) --- */
.calculator-widget {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.calculator-widget label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
}
.calculator-widget input[type="number"],
.calculator-widget input[type="range"] {
    width: 100%;
}
.calculator-widget input[type="number"] {
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.2s ease;
}
.calculator-widget input[type="number"]:focus {
    outline: none;
    border-color: #279B75;
    box-shadow: 0 0 0 3px rgba(39, 155, 117, 0.15);
}
.calculator-bar {
    height: 2.5rem;
    border-radius: 0.5rem;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    min-width: 3rem;
}
.calculator-bar--needs { background: linear-gradient(135deg, #279B75, #34C793); }
.calculator-bar--wants { background: linear-gradient(135deg, #F5A623, #F7C065); }
.calculator-bar--savings { background: linear-gradient(135deg, #166534, #279B75); }

.calculator-slider-group {
    margin-bottom: 1rem;
}
.calculator-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}
.calculator-slider-label span {
    font-size: 0.875rem;
    color: #6B7280;
}
.calculator-slider-label strong {
    font-size: 0.9375rem;
    color: #111827;
}
input[type="range"].calculator-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #E5E7EB;
    outline: none;
}
input[type="range"].calculator-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #279B75;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(39, 155, 117, 0.3);
}

/* --- Dark Mode Blog Overrides --- */
body.dark .blog-card {
    background: rgba(44, 44, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark .blog-card-title { color: white; }
body.dark .blog-card:hover .blog-card-title { color: #34C793; }
body.dark .blog-card-excerpt { color: rgba(255, 255, 255, 0.6); }
body.dark .blog-card-meta { color: rgba(255, 255, 255, 0.4); }
body.dark .blog-card-category { background: rgba(39, 155, 117, 0.15); color: #34C793; }

body.dark .article-hero h1 { color: white; }
body.dark .article-hero .lead { color: rgba(255, 255, 255, 0.6); }
body.dark .article-meta { color: rgba(255, 255, 255, 0.4); }
body.dark .article-meta .category-pill { background: rgba(39, 155, 117, 0.15); color: #34C793; }

body.dark .article-content { color: rgba(255, 255, 255, 0.8); }
body.dark .article-content h2 { color: white; }
body.dark .article-content h3 { color: rgba(255, 255, 255, 0.9); }
body.dark .article-content strong { color: white; }
body.dark .article-content blockquote { background: rgba(39, 155, 117, 0.1); border-left-color: #34C793; color: rgba(255, 255, 255, 0.8); }
body.dark .article-content thead th { background: rgba(255, 255, 255, 0.05); color: white; border-bottom-color: rgba(255, 255, 255, 0.1); }
body.dark .article-content tbody td { border-bottom-color: rgba(255, 255, 255, 0.05); }
body.dark .article-content tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
body.dark .article-content code { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.9); }

body.dark .article-toc a { color: rgba(255, 255, 255, 0.5); }
body.dark .article-toc a:hover,
body.dark .article-toc a.active { color: #34C793; border-left-color: #34C793; }

body.dark .article-cta-inline { background: rgba(39, 155, 117, 0.1); border-color: rgba(39, 155, 117, 0.2); }
body.dark .article-cta-inline h3 { color: white; }
body.dark .article-cta-inline p { color: rgba(255, 255, 255, 0.7); }

body.dark .calculator-widget { background: rgba(44, 44, 46, 0.9); border-color: rgba(255, 255, 255, 0.1); }
body.dark .calculator-widget label { color: rgba(255, 255, 255, 0.9); }
body.dark .calculator-widget input[type="number"] { background: rgba(30, 30, 32, 0.8); border-color: rgba(255, 255, 255, 0.15); color: white; }
