/* Markdown Content Styles for Marketing Pages */

.markdown-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.markdown-content h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    margin-top: 0;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.markdown-content h1 + p {
    font-size: 1.25rem;
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.markdown-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    padding-top: 2.5rem;
    border-top: 2px solid var(--border-color);
    position: relative;
}

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

.markdown-content h2::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-2);
}

.markdown-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

.markdown-content p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
    font-size: 1.125rem;
    line-height: 1.8;
}

.markdown-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: var(--text-medium);
}

.markdown-content li {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

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

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

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2.5rem 0;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--text-dark);
    font-style: italic;
    font-size: 1.125rem;
    position: relative;
}

.markdown-content blockquote::before {
    content: '"';
    position: absolute;
    left: -15px;
    top: -10px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

.markdown-content code {
    background: var(--background-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.markdown-content pre {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: var(--text-dark);
    font-size: 0.875rem;
    border: none;
}

.markdown-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 4rem 0;
    position: relative;
}

/* Hide HR tags that appear right after H1 or subtitle */
.markdown-content h1 + hr,
.markdown-content h1 + p + hr,
.markdown-content p:first-of-type + hr {
    display: none;
}

/* Hide HR tags that appear before H2 or H3 headings (causes double lines) */
.markdown-content hr + h2,
.markdown-content hr + h3 {
    border-top: none !important;
    padding-top: 0 !important;
}

.markdown-content hr:has(+ h2),
.markdown-content hr:has(+ h3) {
    display: none;
}

/* Fallback for browsers without :has() support */
.markdown-content hr + h2::before,
.markdown-content hr + h3::before {
    display: none;
}

/* Hide consecutive HR tags */
.markdown-content hr + hr {
    display: none;
}

.markdown-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    transition: text-decoration-color 0.2s;
    font-weight: 500;
}

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

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: 0.5rem;
    overflow: hidden;
}

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

.markdown-content table th {
    background: var(--background-light);
    font-weight: 600;
    color: var(--text-dark);
}

/* Content sections after intro */
.markdown-content > *:not(h1):not(p):not(blockquote):not(h2):not(hr):not(ul):not(ol) {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .markdown-content h1 {
        font-size: 2rem;
    }

    .markdown-content h2 {
        font-size: 1.5rem;
    }

    .markdown-content h3 {
        font-size: 1.25rem;
    }
}
