/* ── Article Content Styling ── */

/* Headings within article content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-color);
}

.entry-content h1 {
    font-size: 2em;
    margin-top: 2em;
}

.entry-content h2 {
    font-size: 1.6em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
}

.entry-content h3 {
    font-size: 1.3em;
}

/* Text formatting */
.entry-content strong,
.entry-content b {
    font-weight: 700;
    color: var(--text-color);
}

.entry-content em,
.entry-content i {
    font-style: italic;
    color: var(--text-color);
}

/* Paragraph spacing */
.entry-content p {
    margin-bottom: 1.2em;
    line-height: 1.8;
}

/* ── Tooltips ── */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted var(--text-muted);
    cursor: help;
    background-color: rgba(227, 242, 253, 0.3);
    padding: 0 2px;
    border-radius: 2px;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    color: #1565c0;
    text-align: left;
    border-radius: 4px;
    padding: 10px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9em;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #e3f2fd transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Tooltip variants */
.tooltip.tooltip-info .tooltip-text {
    background-color: #e3f2fd;
    border-left-color: #2196F3;
    color: #1565c0;
}

.tooltip.tooltip-info .tooltip-text::after {
    border-color: #e3f2fd transparent transparent transparent;
}

.tooltip.tooltip-success .tooltip-text {
    background-color: #f1f8e9;
    border-left-color: #4CAF50;
    color: #2e7d32;
}

.tooltip.tooltip-success .tooltip-text::after {
    border-color: #f1f8e9 transparent transparent transparent;
}

.tooltip.tooltip-warning .tooltip-text {
    background-color: #fff3e0;
    border-left-color: #FF9800;
    color: #e65100;
}

.tooltip.tooltip-warning .tooltip-text::after {
    border-color: #fff3e0 transparent transparent transparent;
}

/* Mobile tooltip positioning */
@media (max-width: 768px) {
    .tooltip .tooltip-text {
        width: 180px;
        bottom: auto;
        top: 125%;
    }

    .tooltip .tooltip-text::after {
        top: auto;
        bottom: 100%;
        border-color: transparent transparent #e3f2fd transparent;
    }
}

/* ── Comparison Tables ── */
.comparison-table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.comparison-table thead {
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
}

.comparison-table th {
    padding: 1em;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95em;
}

.comparison-table td {
    padding: 1em;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background-color: rgba(227, 242, 253, 0.2);
}

/* Feature column (first column) styling */
.comparison-table td:first-child {
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Checkmark and X styling in comparison tables */
.comparison-table .check {
    color: #4CAF50;
    font-weight: 700;
    font-size: 1.2em;
}

.comparison-table .cross {
    color: #f44336;
    font-weight: 700;
    font-size: 1.2em;
}

/* Responsive comparison table */
@media (max-width: 768px) {
    .comparison-table {
        display: block;
        border: none;
        box-shadow: none;
    }

    .comparison-table thead {
        display: none;
    }

    .comparison-table tbody {
        display: block;
    }

    .comparison-table tbody tr {
        display: block;
        margin-bottom: 1.5em;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        overflow: hidden;
    }

    .comparison-table tbody tr:hover {
        background-color: transparent;
    }

    .comparison-table td {
        display: block;
        padding: 0.75em 1em;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
        position: relative;
        padding-left: 50%;
    }

    .comparison-table td:last-child {
        border-bottom: none;
    }

    .comparison-table td:first-child {
        background-color: transparent;
        text-align: left;
        padding-left: 1em;
    }

    .comparison-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1em;
        font-weight: 600;
        width: 45%;
    }
}

/* ── Buttons ── */
.article-button {
    display: inline-block;
    padding: 0.75em 1.5em;
    margin: 0.5em 0.5em 0.5em 0;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.article-button:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.article-button:active {
    transform: translateY(0);
}

/* CTA Button - More prominent */
.cta-button {
    display: inline-block;
    padding: 1em 2em;
    margin: 1em 0.5em 1em 0;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
}

.cta-button:hover {
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.cta-button:active {
    transform: translateY(0);
}

/* Secondary button variant */
.article-button.secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.article-button.secondary:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Block-level buttons */
.article-button.block,
.cta-button.block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ── Lists within articles ── */
.entry-content ul,
.entry-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.entry-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.entry-content ul li {
    list-style-type: disc;
}

.entry-content ol li {
    list-style-type: decimal;
}

.entry-content ul ul,
.entry-content ol ol {
    margin: 0.5em 0 0.5em 1em;
}

/* ── Blockquotes ── */
.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5em;
    margin: 1.5em 0;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    color: var(--text-muted);
    font-style: italic;
    background-color: rgba(227, 242, 253, 0.2);
    border-radius: 4px;
    padding: 1em 0 1em 1.5em;
}

/* ── Code blocks ── */
.entry-content pre {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9em;
}

.entry-content code {
    font-family: 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.entry-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Dark mode adjustments */
[data-theme='dark'] .tooltip .tooltip-text {
    background-color: #1e3a5f;
    border-left-color: #90caf9;
    color: #e3f2fd;
}

[data-theme='dark'] .tooltip .tooltip-text::after {
    border-color: #1e3a5f transparent transparent transparent;
}

[data-theme='dark'] .comparison-table {
    border-color: var(--border-color);
}

[data-theme='dark'] .comparison-table tbody tr:hover {
    background-color: rgba(144, 202, 249, 0.1);
}

[data-theme='dark'] .comparison-table td:first-child {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] .entry-content blockquote {
    background-color: rgba(144, 202, 249, 0.1);
    color: rgba(227, 242, 253, 0.9);
}
