/* Explain: Styles for rich text content, dark mode, and callout elements. */
/* Rich Text Content Styling (Guides / Articles) */
.rich-text-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-heading);
    line-height: 1.3;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    scroll-margin-top: 100px;
}

.rich-text-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    line-height: 1.4;
    scroll-margin-top: 100px;
}

.rich-text-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.rich-text-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.rich-text-content ul {
    list-style-type: none;
    padding-inline-start: 0;
    margin-bottom: 1.5rem;
}

.rich-text-content ol {
    list-style-type: decimal;
    padding-inline-start: 1.5rem;
    margin-bottom: 1.5rem;
}

.rich-text-content ul li {
    position: relative;
    padding-inline-start: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.rich-text-content ul li::before {
    content: "\f0da";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    color: var(--primary-color);
    top: 0.1rem;
}

.rich-text-content ol li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.rich-text-content ol li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

.rich-text-content strong, 
.rich-text-content b {
    font-weight: 600;
    color: var(--text-color);
}

.rich-text-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.rich-text-content a:hover {
    color: var(--primary-hover);
}

.rich-text-content blockquote {
    border-inline-start: 4px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-color);
    background-color: var(--background-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rich-text-content::after {
    content: "";
    display: table;
    clear: both;
}

.rich-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: block;
}

.rich-text-content iframe,
.rich-text-content video {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.rich-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    display: block;
    overflow-x: auto;
}

.rich-text-content th,
.rich-text-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: right;
}

.rich-text-content th {
    background-color: var(--background-color);
    font-weight: 600;
    color: var(--text-color);
}

/* Guide Dark Reading Mode */
.guide-dark-mode {
    --background-color: #0f172a !important;
    --surface-color: #1e293b !important;
    --text-color: #f8fafc !important;
    --text-muted: #94a3b8 !important;
    --border-color: #334155 !important;
    --primary-color: #94a3b8 !important;
    --primary-hover: #cbd5e1 !important;
}
.guide-dark-mode .rich-text-content img {
    opacity: 0.9;
    filter: brightness(0.9);
}