/* Enhanced Blog Article Styling */

/* Tables */
.article-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.article-content th {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.article-content tr:nth-child(even) {
    background-color: #f9fafb;
}

.article-content tr:hover {
    background-color: #f3f4f6;
}

/* Callout Boxes */
.callout {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.callout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.callout-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    padding: 16px;
    border-radius: 12px;
}

.callout-info::before {
    background-color: #3b82f6;
}

.callout-warning {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    padding: 16px;
    border-radius: 12px;
}

.callout-warning::before {
    background-color: #f59e0b;
}

.callout-success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
}

.callout-success::before {
    background-color: #10b981;
}

.callout-danger {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
}

.callout-danger::before {
    background-color: #ef4444;
}

.callout-expert {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    padding: 16px;
    border-radius: 12px;
}

.callout-expert::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.callout-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.callout-icon {
    font-size: 1.5rem;
}

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

.feature-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 1rem;
}

.feature-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.feature-card-content {
    color: #6b7280;
    line-height: 1.6;
}

/* Comparison Cards */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }
}

.comparison-card {
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.comparison-good {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
}

.comparison-bad {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.comparison-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.comparison-good .comparison-label {
    color: #10b981;
}

.comparison-bad .comparison-label {
    color: #ef4444;
}

/* Step-by-Step Process */
.process-steps {
    margin: 2rem 0;
}

.process-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 31px;
    top: 50px;
    bottom: -30px;
    width: 2px;
    background: #e5e7eb;
}

.process-step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.process-step-content {
    flex: 1;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.process-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

/* Interactive Elements */
.interactive-demo {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px dashed #9ca3af;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive-demo:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-color: #6b7280;
    transform: scale(1.02);
}

/* Quick Reference Cards */
.quick-ref {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.quick-ref-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-ref-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Table Styling */
.blog-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.blog-content thead {
    background: #f3f4f6;
    font-weight: 600;
    text-align: left;
}

.blog-content th,
.blog-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.blog-content thead th {
    color: #1f2937;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.blog-content tbody tr:hover {
    background: #f9fafb;
}

.blog-content tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
}

.table-responsive table {
    min-width: 600px;
}

/* Inline SVG Styling */
.inline-diagram {
    margin: 2rem 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.inline-diagram svg,
.inline-diagram img {
    max-width: 100%;
    height: auto;
}

.diagram-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    text-align: center;
}

/* Equation Styling */
.equation-box {
    background: #f3f4f6;
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    text-align: center;
}

/* Pro/Con Lists */
.pros-cons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.pros-list, .cons-list {
    padding: 0;
    list-style: none;
}

.pros-list li, .cons-list li {
    padding: 0.75rem 0.75rem 0.75rem 3rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    position: relative;
}

.pros-list li {
    background: #d1fae5;
    color: #065f46;
}

.cons-list li {
    background: #fee2e2;
    color: #991b1b;
}

.pros-list li::before, .cons-list li::before {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
}

.pros-list li::before {
    content: '✓';
    color: #10b981;
}

.cons-list li::before {
    content: '✗';
    color: #ef4444;
}

/* Decision Matrix */
.decision-matrix {
    overflow-x: auto;
    margin: 2rem 0;
}

.decision-matrix table {
    min-width: 600px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.decision-matrix th:first-child {
    background: #1f2937;
    position: sticky;
    left: 0;
    z-index: 10;
}

.decision-matrix td:first-child {
    background: #f3f4f6;
    font-weight: 600;
    position: sticky;
    left: 0;
    border-right: 2px solid #e5e7eb;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 2px dotted #3b82f6;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #1f2937;
    color: white;
    text-align: left;
    border-radius: 8px;
    padding: 1rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    line-height: 1.4;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '💡';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.2;
}

/* Code Comparison */
.code-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.code-comparison-block {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.code-comparison-label {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}