/* Auto Numbered Sections Styles */
.auto-numbered-sections-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.auto-numbered-section {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.auto-numbered-section:last-child {
    border-bottom: none;
}

/* Number container */
.section-number-container {
    flex-shrink: 0;
    margin-right: 20px;
    margin-top: 5px;
}

.section-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    background-color: #999999;
    position: relative;
}

/* Number styles */
.section-number.circle {
    border-radius: 50%;
}

.section-number.square {
    border-radius: 0;
}

.section-number.rounded-square {
    border-radius: 8px;
}

.section-number.plain {
    background-color: transparent !important;
    color: inherit !important;
    font-size: 24px;
    font-weight: bold;
}

/* Content container */
.section-content-container {
    flex: 1;
    min-width: 0;
}

.section-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    color: #333333;
}

.section-content {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
}

.section-content p {
    margin: 0 0 15px 0;
}

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

/* Empty state */
.auto-numbered-sections-empty {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .auto-numbered-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-number-container {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .section-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-content {
        font-size: 14px;
    }
}

/* Animation effects */
.auto-numbered-section {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.auto-numbered-section:nth-child(1) { animation-delay: 0.1s; }
.auto-numbered-section:nth-child(2) { animation-delay: 0.2s; }
.auto-numbered-section:nth-child(3) { animation-delay: 0.3s; }
.auto-numbered-section:nth-child(4) { animation-delay: 0.4s; }
.auto-numbered-section:nth-child(5) { animation-delay: 0.5s; }
.auto-numbered-section:nth-child(n+6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects */
.section-number {
    transition: transform 0.2s ease-in-out;
}

.auto-numbered-section:hover .section-number {
    transform: scale(1.1);
}

/* Google Fonts Support */
.auto-numbered-sections-wrapper {
    font-display: swap;
}

/* Heading tag styles - ensure all heading levels work properly */
.section-title.h1, .section-title h1 { font-size: 2.5em; margin: 0.67em 0; }
.section-title.h2, .section-title h2 { font-size: 2em; margin: 0.75em 0; }
.section-title.h3, .section-title h3 { font-size: 1.75em; margin: 0.83em 0; }
.section-title.h4, .section-title h4 { font-size: 1.5em; margin: 1.12em 0; }
.section-title.h5, .section-title h5 { font-size: 1.25em; margin: 1.5em 0; }
.section-title.h6, .section-title h6 { font-size: 1em; margin: 1.67em 0; }

/* Reset margins for better control */
.section-title h1, .section-title h2, .section-title h3, 
.section-title h4, .section-title h5, .section-title h6 {
    margin: 0 0 10px 0;
}

/* Rich text editor content styling */
.section-content .mce-content-body {
    margin: 0;
    padding: 0;
}

.section-content ul, .section-content ol {
    margin: 0 0 15px 20px;
    padding: 0;
}

.section-content li {
    margin-bottom: 5px;
}

.section-content strong, .section-content b {
    font-weight: bold;
}

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

.section-content a {
    color: inherit;
    text-decoration: underline;
}

.section-content a:hover {
    text-decoration: none;
}

/* Dynamic content highlighting */
.dynamic-variable {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    border: 1px solid #ffeeba;
}
@media print {
    .auto-numbered-section {
        page-break-inside: avoid;
        animation: none;
        opacity: 1;
    }
    
    .section-number {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}