/* ============================================================
   Content Block Styles - For rendering editor content on frontend
   These styles apply to content created with the Web Artist editor
   ============================================================ */

.content-blocks {
    line-height: 1.8;
    color: var(--color-text);
    font-size: 1rem;
}

.content-blocks > *:first-child {
    margin-top: 0;
}

.content-blocks > *:last-child {
    margin-bottom: 0;
}

/* Headings */
.content-blocks h1,
.content-blocks h2,
.content-blocks h3,
.content-blocks h4,
.content-blocks h5,
.content-blocks h6 {
    margin: 1.5em 0 0.5em;
    line-height: 1.3;
    font-weight: 700;
}

.content-blocks h1 { font-size: 2rem; }
.content-blocks h2 { 
    font-size: 1.5rem; 
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--color-border);
}
.content-blocks h3 { font-size: 1.25rem; }
.content-blocks h4 { font-size: 1.1rem; }

/* Paragraphs */
.content-blocks p {
    margin: 0 0 1em;
}

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

.content-blocks em,
.content-blocks i {
    font-style: italic;
}

.content-blocks mark,
.content-blocks .highlight {
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-text);
}

.content-blocks u {
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-decoration-thickness: 2px;
}

.content-blocks s,
.content-blocks del {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Links */
.content-blocks a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-primary);
    transition: var(--transition);
}

.content-blocks a:hover {
    color: var(--color-secondary);
    border-bottom-style: solid;
}

/* Lists */
.content-blocks ul,
.content-blocks ol {
    margin: 0 0 1em;
    padding-right: 1.5em;
}

.content-blocks ul li {
    list-style: disc;
    margin-bottom: 0.5em;
}

.content-blocks ol li {
    list-style: decimal;
    margin-bottom: 0.5em;
}

.content-blocks li {
    margin-bottom: 0.5em;
}

/* Blockquote */
.content-blocks blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-right: 4px solid var(--color-primary);
    background: var(--color-bg-alt);
    border-radius: 8px;
    font-style: italic;
    color: var(--color-text-light);
}

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

/* Code */
.content-blocks code {
    background: var(--color-bg-alt);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    direction: ltr;
    display: inline-block;
}

.content-blocks pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1em 0;
    direction: ltr;
    text-align: left;
}

.content-blocks pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Images */
.content-blocks img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.content-blocks figure {
    margin: 1.5em 0;
    text-align: center;
}

.content-blocks figcaption {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Tables */
.content-blocks table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

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

.content-blocks th {
    background: var(--color-bg-alt);
    font-weight: 600;
}

/* ============================================================
   Special Blocks - Custom styled blocks from the editor
   ============================================================ */

/* Callout box */
.content-blocks .block-callout {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-right: 4px solid #3b82f6;
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.content-blocks .block-callout-title {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info box */
.content-blocks .block-info {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-right: 4px solid #10b981;
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.content-blocks .block-info-title {
    font-weight: 700;
    color: #065f46;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Warning box */
.content-blocks .block-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-right: 4px solid #f59e0b;
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.content-blocks .block-warning-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Danger box */
.content-blocks .block-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-right: 4px solid #ef4444;
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.content-blocks .block-danger-title {
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Success box */
.content-blocks .block-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-right: 4px solid #16a34a;
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.content-blocks .block-success-title {
    font-weight: 700;
    color: #14532d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Feature grid */
.content-blocks .block-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 1.5em 0;
}

.content-blocks .block-feature {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.content-blocks .block-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-blocks .block-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.content-blocks .block-feature-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.content-blocks .block-feature-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Two columns */
.content-blocks .block-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 1.5em 0;
}

.content-blocks .block-column {
    padding: 16px;
}

/* Three columns */
.content-blocks .block-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 1.5em 0;
}

/* CTA button */
.content-blocks .block-cta {
    text-align: center;
    margin: 2em 0;
    padding: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 12px;
    color: white;
}

.content-blocks .block-cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.content-blocks .block-cta-text {
    margin-bottom: 20px;
    opacity: 0.9;
}

.content-blocks .block-cta-button {
    display: inline-block;
    padding: 12px 32px;
    background: white;
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.content-blocks .block-cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Divider */
.content-blocks .block-divider {
    border: none;
    border-top: 2px dashed var(--color-border);
    margin: 2em 0;
}

/* Spacer */
.content-blocks .block-spacer {
    height: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .content-blocks .block-two-columns,
    .content-blocks .block-three-columns {
        grid-template-columns: 1fr;
    }
    
    .content-blocks .block-features {
        grid-template-columns: 1fr;
    }
}
