/* Enhanced Blog Post Formatting Styles */

/* Main Content Container */
.blog-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    line-height: 1.7;
    font-size: 1.125rem;
    color: #374151;
}

/* Reading Time Badge */
.reading-time {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    color: #0277bd;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid #81d4fa;
}

.reading-time::before {
    content: '⏱️';
    margin-right: 0.5rem;
}

/* Hero Section for Each Guide */
.guide-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.guide-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.guide-hero .subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.guide-hero .stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.guide-hero .stat {
    text-align: center;
}

.guide-hero .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #146eb4;
    display: block;
}

.guide-hero .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.blog-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-top: 4rem;
    margin-bottom: 2rem;
    color: #1e293b;
    padding-bottom: 1rem;
    border-bottom: 3px solid #ff9900;
    position: relative;
    line-height: 1.3;
}

.blog-content h2::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #146eb4;
    border-radius: 1px;
}

.blog-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #334155;
    display: flex;
    align-items: baseline;
    line-height: 1.4;
}

.blog-content h4 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #475569;
    line-height: 1.4;
}

.blog-content h3 .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff9900;
    margin-right: 1rem;
}

.blog-content p {
    margin-bottom: 1.75rem;
    color: #475569;
    line-height: 1.7;
}

.blog-content p:last-child {
    margin-bottom: 0;
}

.blog-content p.lead {
    font-size: 1.375rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: #334155;
    font-weight: 400;
}

.blog-content p.lead:first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    color: #146eb4;
    float: left;
    line-height: 1;
    margin-right: 0.25rem;
    margin-top: -0.1rem;
}

/* Enhanced Info Boxes */
.info-box {
    padding: 2rem;
    border-radius: 0.75rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Image Containers */
.image-container {
    margin: 3rem 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Interactive Elements */
.interactive-element {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    position: relative;
}

.interactive-element h4 {
    color: #146eb4;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Calculator Styles */
.calculator {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
}

.calculator h4 {
    color: #0284c7;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.calculator-input {
    margin-bottom: 1rem;
}

.calculator-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
}

.calculator-input input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.calculator-input input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.calculator-result {
    background: white;
    border: 2px solid #10b981;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #065f46;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.info-box.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.info-box.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.info-box.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.info-box.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.info-box-header {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.info-box-header .icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

/* Better Lists */
.blog-content ul {
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.blog-content ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: #4a5568;
}

.blog-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ff9900;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Enhanced Tables */
.data-table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #d1d5db;
}

.data-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.data-table tbody tr:hover {
    background-color: #f3f4f6;
}

.data-table td {
    padding: 1rem;
    color: #4b5563;
}

/* Section Separators */
.section-divider {
    margin: 3rem 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

/* Key Takeaway Boxes */
.key-takeaway {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2.5rem 0;
    position: relative;
}

.key-takeaway::before {
    content: '💡 Key Takeaway';
    position: absolute;
    top: -0.75rem;
    left: 1.5rem;
    background: white;
    padding: 0 0.5rem;
    font-weight: 700;
    color: #f59e0b;
}

/* Visual Cards for Comparisons */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.comparison-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.comparison-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comparison-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

/* Sticky Table of Contents */
.toc-sticky {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.toc-sticky h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #4b5563;
}

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

.toc-sticky li {
    margin-bottom: 0.5rem;
}

.toc-sticky a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
}

.toc-sticky a:hover {
    color: #146eb4;
    border-left-color: #146eb4;
}

.toc-sticky a.active {
    color: #146eb4;
    font-weight: 600;
    border-left-color: #146eb4;
    background: rgba(20, 110, 180, 0.05);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .blog-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
    
    .blog-content h3 .number {
        font-size: 2rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .toc-sticky {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
}