/* =====================================================
   BLOG POST STYLES - Basic Calculator Online
   Individual Article Page Design
   ===================================================== */

/* ======================= POST HEADER ======================= */
.post-header {
    position: relative;
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    overflow: hidden;
}

.post-header-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.post-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.post-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.post-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
}

.post-breadcrumb .breadcrumb-item a:hover {
    color: #fff;
}

.post-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, .5);
}

.post-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, .4);
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1rem;
    background: rgba(255, 255, 255, .15);
    border-radius: var(--radius-full);
    color: #c7d2fe;
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.post-header .post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.post-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, .8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.post-meta-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.author-block {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.author-block .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .3);
}

.author-block .author-name {
    display: block;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.author-block .author-name:hover {
    text-decoration: underline;
}

.author-block .author-title {
    font-size: .8125rem;
    color: rgba(255, 255, 255, .6);
}

.meta-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, .2);
}

.meta-details {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .875rem;
    color: rgba(255, 255, 255, .7);
}

/* ======================= POST CONTENT ======================= */
.post-content-wrapper {
    padding: 3rem 0 4rem;
}

.post-content {
    background: #fff;
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.post-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.post-content p.lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.post-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 1.5rem;
}

.post-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.post-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 .75rem;
}

/* ======================= INLINE CALCULATOR WIDGET ======================= */
.inline-calculator-widget {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2rem;
}

.inline-calculator-widget .widget-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, .1);
    color: #fff;
    font-weight: 600;
}

.inline-calculator-widget .widget-body {
    padding: 1.5rem;
}

.calc-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.calc-row label {
    color: rgba(255, 255, 255, .9);
    font-weight: 500;
}

.calc-row input {
    width: 100px;
    padding: .625rem 1rem;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.calc-row input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .15);
}

.calc-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .1);
    border-radius: var(--radius-lg);
}

.calc-result .result-label {
    color: rgba(255, 255, 255, .8);
}

.calc-result .result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.inline-calculator-widget .widget-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, .1);
}

.widget-footer .widget-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
    font-weight: 500;
    font-size: .875rem;
}

.widget-footer .widget-link:hover {
    color: #fff;
    gap: .75rem;
}

/* ======================= TABLE OF CONTENTS ======================= */
.table-of-contents {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    overflow: hidden;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.toc-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: .25rem;
}

.toc-body {
    padding: 1rem 1.5rem;
}

.toc-list {
    margin: 0;
    padding-left: 1.25rem;
}

.toc-list li {
    margin-bottom: .5rem;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .9375rem;
    transition: color .2s;
}

.toc-list a:hover {
    color: #6366f1;
}

/* ======================= INFO BOX ======================= */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    margin: 1.5rem 0;
}

.info-box.blue {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.info-box.yellow {
    background: #fefce8;
    border: 1px solid #fde047;
}

.info-box .info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-box.blue .info-icon {
    background: #3b82f6;
    color: #fff;
}

.info-box.yellow .info-icon {
    background: #eab308;
    color: #fff;
}

.info-box h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.info-box.blue h4 { color: #1e40af; }
.info-box.yellow h4 { color: #854d0e; }

.info-box p,
.info-box ul {
    font-size: .9375rem;
    margin: 0;
}

.info-box.blue p { color: #1e40af; }
.info-box.yellow p { color: #854d0e; }

.info-box ul {
    padding-left: 1.25rem;
    margin-top: .5rem;
}

/* ======================= FORMULA BOX ======================= */
.formula-box {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: var(--radius-xl);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    text-align: center;
}

.formula-box.secondary {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
}

.formula-main {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.formula-note {
    font-size: .875rem;
    color: rgba(255, 255, 255, .7);
    margin-top: .75rem;
}

/* ======================= FORMULA CARDS ======================= */
.formula-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.formula-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}

.formula-card h4 {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .75rem;
}

.formula-card .formula {
    font-family: var(--font-mono);
    font-size: .875rem;
    background: #fff;
    padding: .625rem .875rem;
    border-radius: var(--radius-md);
    margin-bottom: .75rem;
    border: 1px solid var(--border-color);
}

.formula-card .example {
    font-size: .8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ======================= EXAMPLE BOX ======================= */
.example-box {
    background: var(--bg-body);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid #6366f1;
}

.example-box.green { border-left-color: #10b981; }
.example-box.blue { border-left-color: #3b82f6; }
.example-box.orange { border-left-color: #f59e0b; }
.example-box.purple { border-left-color: #8b5cf6; }

.example-box h4 {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.example-steps p {
    font-size: .9375rem;
    margin: .5rem 0;
    padding: .5rem .75rem;
    background: #fff;
    border-radius: var(--radius-md);
}

.example-result {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
    padding: .875rem 1rem;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
}

.example-result .result-label {
    font-weight: 500;
    color: var(--text-muted);
}

.example-result .result-value {
    font-weight: 700;
    color: #6366f1;
    font-size: 1.125rem;
}

/* ======================= STEPS BOX ======================= */
.steps-box {
    background: var(--bg-body);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.steps-box h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: .25rem;
}

.step-content p {
    font-size: .9375rem;
    color: var(--text-muted);
    margin: 0;
}

/* ======================= TIPS GRID ======================= */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.tip-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    text-align: center;
}

.tip-card h5 {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .5rem;
}

.tip-card p {
    font-size: .8125rem;
    color: var(--text-muted);
    margin: 0 0 .75rem;
}

.tip-example {
    display: block;
    font-family: var(--font-mono);
    font-size: .75rem;
    background: #fff;
    padding: .5rem;
    border-radius: var(--radius-md);
    color: #6366f1;
    font-weight: 500;
}

/* ======================= PRO TIP ======================= */
.pro-tip {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-xl);
    margin: 1.5rem 0;
}

.pro-tip-icon {
    width: 48px;
    height: 48px;
    background: #f59e0b;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.pro-tip h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 .5rem;
}

.pro-tip p {
    font-size: .9375rem;
    color: #78350f;
    margin: 0;
}

/* ======================= STYLED LIST ======================= */
.styled-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.styled-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: .75rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.styled-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .625rem;
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
}

/* ======================= TABLES ======================= */
.conversion-table,
.comparison-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.conversion-table table,
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.conversion-table th,
.conversion-table td,
.comparison-table th,
.comparison-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.conversion-table th,
.comparison-table th {
    background: var(--bg-body);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table .positive { color: #10b981; font-weight: 600; }
.comparison-table .negative { color: #ef4444; font-weight: 600; }

/* ======================= DISCOUNT CALCULATOR ======================= */
.discount-calculator {
    background: var(--bg-body);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.discount-calculator h4 {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.calc-field label {
    display: block;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: .5rem;
}

.calc-field input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: #fff;
}

.calc-output {
    padding: .75rem 1rem;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calc-output.green {
    color: #10b981;
}

/* ======================= CODE EXAMPLES ======================= */
.code-examples {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.code-block {
    background: #1e1b4b;
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}

.code-block h4 {
    font-size: .875rem;
    font-weight: 500;
    color: #a5b4fc;
    margin: 0 0 .75rem;
}

.code-block code {
    display: block;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #c7d2fe;
    padding: .75rem 1rem;
    background: rgba(0, 0, 0, .3);
    border-radius: var(--radius-md);
    margin-bottom: .5rem;
}

.code-note {
    font-size: .8125rem;
    color: #818cf8;
    margin: 0;
}

/* ======================= MISTAKES LIST ======================= */
.mistakes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.mistake-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mistake-wrong,
.mistake-right {
    padding: 1.25rem;
    border-radius: var(--radius-xl);
}

.mistake-wrong {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.mistake-right {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.mistake-wrong .label,
.mistake-right .label {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.mistake-wrong .label { color: #dc2626; }
.mistake-right .label { color: #16a34a; }

.mistake-wrong p,
.mistake-right p {
    font-size: .9375rem;
    margin: 0;
}

.mistake-wrong p { color: #991b1b; }
.mistake-right p { color: #166534; }

/* ======================= PRACTICE PROBLEMS ======================= */
.practice-problems {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.problem-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.problem-question {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
}

.problem-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
    flex-shrink: 0;
}

.problem-question p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    padding-top: .25rem;
}

.reveal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .875rem;
    background: #fff;
    border: none;
    border-top: 1px solid var(--border-color);
    color: #6366f1;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.reveal-btn:hover {
    background: #eef2ff;
}

.problem-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    transition: all .3s;
}

.problem-answer.show {
    padding: 1.25rem;
    max-height: 200px;
    border-top: 1px solid var(--border-color);
}

.problem-answer p {
    margin: 0 0 .5rem;
    font-size: .9375rem;
}

/* ======================= FAQ LIST ======================= */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 1.5rem 0;
}

.faq-item {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background .2s;
}

.faq-question:hover {
    background: #fff;
}

.faq-question span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-right: 1rem;
}

.faq-question i {
    color: var(--text-muted);
    transition: transform .3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all .3s;
}

.faq-item.active .faq-answer {
    padding: 0 1.25rem 1.25rem;
    max-height: 300px;
}

.faq-answer p {
    font-size: .9375rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

/* ======================= CONCLUSION ======================= */
.conclusion {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* ======================= CTA BOX ======================= */
.cta-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-xl);
    margin: 2rem 0;
}

.cta-box .cta-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    flex-shrink: 0;
}

.cta-box h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3730a3;
    margin: 0 0 .5rem;
}

.cta-box p {
    color: #4338ca;
    margin: 0 0 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: var(--radius-lg);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .4);
    color: #fff;
}

/* ======================= AUTHOR BIO ======================= */
.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-body);
    border-radius: var(--radius-xl);
    margin: 2rem 0;
}

.author-bio-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-bio h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .5rem;
}

.author-bio p {
    font-size: .9375rem;
    color: var(--text-secondary);
    margin: 0 0 .75rem;
    line-height: 1.6;
}

.author-social {
    display: flex;
    gap: .5rem;
}

.author-social a {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all .2s;
}

.author-social a:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* ======================= POST ACTIONS ======================= */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 2rem 0;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.share-label {
    font-size: .875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #4267b2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: #6366f1; }

/* ======================= POST TAGS SECTION ======================= */
.post-tags-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.tags-label {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tags-list a {
    padding: .375rem .875rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: .8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all .2s;
}

.tags-list a:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

/* ======================= POST SIDEBAR ======================= */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-sidebar .sidebar-widget {
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-sidebar .widget-title {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Sticky TOC */
.sticky-toc {
    position: sticky;
    top: 100px;
}

.sidebar-toc {
    display: flex;
    flex-direction: column;
    padding: .5rem;
}

.sidebar-toc a {
    padding: .625rem 1rem;
    font-size: .875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all .2s;
}

.sidebar-toc a:hover,
.sidebar-toc a.active {
    background: var(--bg-body);
    color: #6366f1;
}

/* Related Posts Widget */
.related-list {
    padding: .5rem;
}

.related-item {
    display: flex;
    gap: .875rem;
    padding: .75rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all .2s;
}

.related-item:hover {
    background: var(--bg-body);
}

.related-image {
    width: 70px;
    height: 50px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

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

.related-content h5 {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .25rem;
    line-height: 1.4;
}

.related-meta {
    font-size: .75rem;
    color: var(--text-muted);
}

/* Calculator Widget */
.calculator-widget {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
}

.calculator-widget .widget-content {
    padding: 1.5rem;
    text-align: center;
}

.calculator-widget .widget-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, .15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.calculator-widget h4 {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.calculator-widget p {
    color: rgba(255, 255, 255, .8);
    font-size: .875rem;
    margin-bottom: 1rem;
}

.widget-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: #fff;
    border-radius: var(--radius-lg);
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}

.widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

/* ======================= MORE POSTS SECTION ======================= */
.more-posts-section {
    padding: 4rem 0;
    background: var(--bg-body);
}

.more-posts-section .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.more-post-card {
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all .3s;
    height: 100%;
}

.more-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.more-post-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.more-post-card .card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.more-post-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.more-post-card:hover .card-image img {
    transform: scale(1.05);
}

.more-post-card .card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: .375rem .75rem;
    background: #6366f1;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
}

.more-post-card .card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.more-post-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 .5rem;
    line-height: 1.4;
}

.more-post-card p {
    font-size: .875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}

.more-post-card .card-meta {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    color: var(--text-muted);
}

/* ======================= RESPONSIVE ======================= */
@media (max-width: 1199.98px) {
    .formula-cards {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .code-examples {
        grid-template-columns: 1fr;
    }

    .calc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991.98px) {
    .post-header .post-title {
        font-size: 2rem;
    }

    .post-content {
        padding: 1.5rem;
    }

    .post-sidebar {
        margin-top: 2rem;
    }

    .sticky-toc {
        position: static;
    }

    .mistake-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .post-header {
        padding: 4rem 0 2.5rem;
    }

    .post-header .post-title {
        font-size: 1.5rem;
    }

    .post-subtitle {
        font-size: 1rem;
    }

    .post-meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .meta-divider {
        display: none;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .calc-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        flex-direction: column;
        text-align: center;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .post-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .share-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .calc-row {
        flex-direction: column;
        align-items: stretch;
    }

    .calc-row input {
        width: 100%;
    }
}

/* ======================= DARK MODE ======================= */
[data-theme="dark"] .post-content,
[data-theme="dark"] .post-sidebar .sidebar-widget,
[data-theme="dark"] .more-post-card {
    background: var(--bg-card);
}

[data-theme="dark"] .table-of-contents {
    background: var(--bg-card);
}

[data-theme="dark"] .toc-header {
    background: var(--bg-body);
}

[data-theme="dark"] .info-box.blue {
    background: #1e3a5f;
    border-color: #3b82f6;
}

[data-theme="dark"] .info-box.blue h4,
[data-theme="dark"] .info-box.blue p {
    color: #bfdbfe;
}

[data-theme="dark"] .info-box.yellow {
    background: #78350f;
    border-color: #f59e0b;
}

[data-theme="dark"] .info-box.yellow h4,
[data-theme="dark"] .info-box.yellow p {
    color: #fef3c7;
}

[data-theme="dark"] .example-box,
[data-theme="dark"] .steps-box,
[data-theme="dark"] .discount-calculator,
[data-theme="dark"] .problem-card,
[data-theme="dark"] .faq-item {
    background: var(--bg-body);
}

[data-theme="dark"] .example-steps p,
[data-theme="dark"] .example-result,
[data-theme="dark"] .reveal-btn,
[data-theme="dark"] .problem-answer,
[data-theme="dark"] .faq-question:hover {
    background: var(--bg-card);
}

[data-theme="dark"] .formula-card,
[data-theme="dark"] .tip-card {
    background: var(--bg-body);
}

[data-theme="dark"] .formula-card .formula,
[data-theme="dark"] .tip-example {
    background: var(--bg-card);
}

[data-theme="dark"] .pro-tip {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}

[data-theme="dark"] .pro-tip h4 { color: #fef3c7; }
[data-theme="dark"] .pro-tip p { color: #fde68a; }

[data-theme="dark"] .cta-box {
    background: linear-gradient(135deg, #312e81 0%, #3730a3 100%);
    border-color: #4338ca;
}

[data-theme="dark"] .cta-box h4,
[data-theme="dark"] .cta-box p {
    color: #c7d2fe;
}

[data-theme="dark"] .author-bio {
    background: var(--bg-body);
}

[data-theme="dark"] .author-social a {
    background: var(--bg-card);
}

[data-theme="dark"] .tags-list a {
    background: var(--bg-body);
}

[data-theme="dark"] .mistake-wrong {
    background: #450a0a;
    border-color: #991b1b;
}

[data-theme="dark"] .mistake-wrong .label { color: #fca5a5; }
[data-theme="dark"] .mistake-wrong p { color: #fecaca; }

[data-theme="dark"] .mistake-right {
    background: #052e16;
    border-color: #166534;
}

[data-theme="dark"] .mistake-right .label { color: #86efac; }
[data-theme="dark"] .mistake-right p { color: #bbf7d0; }

[data-theme="dark"] .conversion-table table,
[data-theme="dark"] .comparison-table table {
    background: var(--bg-card);
}

[data-theme="dark"] .conversion-table th,
[data-theme="dark"] .comparison-table th {
    background: var(--bg-body);
}
