/* ============================================
   TOPIC CONTENT FORMATTING CSS
   ADD THIS TO YOUR FRONTEND STYLESHEET
   ============================================ */

/* GENERAL CONTENT CONTAINER */
.topic-content {
    font-family: 'Noto Sans Bengali', 'Nirmala UI', 'Arial Unicode MS', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    max-width: 100%;
}

/* HEADINGS */
.topic-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.topic-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem 0;
    color: #34495e;
}

.topic-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #34495e;
}

/* PARAGRAPHS */
.topic-content p {
    margin: 0.75rem 0;
    line-height: 1.8;
}

/* DIVS (CONTENT SECTIONS) */
.topic-content div {
    margin: 0.5rem 0;
}

/* TABLES */
.topic-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
    table-layout: fixed;
}

.topic-content table td,
.topic-content table th {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    font-size: 15px;
}

.topic-content table th {
    background-color: #667eea;
    color: white;
    font-weight: 600;
    text-align: left;
}

.topic-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.topic-content table tr:hover {
    background-color: #f0f0f0;
}

/* RESPONSIVE TABLES */
@media (max-width: 768px) {
    .topic-content table {
        font-size: 14px;
    }

    .topic-content table td,
    .topic-content table th {
        padding: 8px 10px;
    }
}

/* LISTS */
.topic-content ul,
.topic-content ol {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

.topic-content ul li,
.topic-content ol li {
    margin: 0.5rem 0;
}

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

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

/* NESTED LISTS */
.topic-content ul ul,
.topic-content ol ul,
.topic-content ul ol,
.topic-content ol ol {
    margin: 0.25rem 0 0.25rem 1.5rem;
}

/* IMAGES */
.topic-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* VIDEOS */
.topic-content iframe,
.topic-content video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.topic-content iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    min-height: 315px;
}

/* LINKS */
.topic-content a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.2s;
}

.topic-content a:hover {
    color: #764ba2;
}

/* BLOCKQUOTES */
.topic-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 1.5rem 0;
    color: #555;
    font-style: italic;
    background: #f8f9fa;
    padding: 15px 15px 15px 20px;
    border-radius: 0 4px 4px 0;
}

/* CODE BLOCKS */
.topic-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

.topic-content pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 3px solid #667eea;
}

.topic-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* TEXT FORMATTING */
.topic-content strong,
.topic-content b {
    font-weight: 700;
    color: #2c3e50;
}

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

.topic-content u {
    text-decoration: underline;
}

.topic-content s,
.topic-content strike {
    text-decoration: line-through;
}

/* HORIZONTAL RULES */
.topic-content hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2rem 0;
}

/* TEXT ALIGNMENT */
.topic-content [style*="text-align: center"] {
    text-align: center;
}

.topic-content [style*="text-align: right"] {
    text-align: right;
}

.topic-content [style*="text-align: justify"] {
    text-align: justify;
}

/* FONT SIZES */
.topic-content font[size="1"] {
    font-size: 0.75em;
}

.topic-content font[size="3"] {
    font-size: 1em;
}

.topic-content font[size="5"] {
    font-size: 1.5em;
}

.topic-content font[size="7"] {
    font-size: 2em;
}

/* EXAMPLES SECTION (IF SEPARATE) */
.topic-examples {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.topic-examples h3 {
    margin-top: 0;
    color: #667eea;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .topic-content {
        font-size: 15px;
    }

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

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

    .topic-content h4 {
        font-size: 1.1rem;
    }

    .topic-content iframe {
        min-height: 200px;
    }
}

/* PRINT STYLES */
@media print {
    .topic-content {
        color: #000;
    }

    .topic-content table {
        box-shadow: none;
        border: 1px solid #000;
    }

    .topic-content table th {
        background: #ddd !important;
        color: #000 !important;
    }

    .topic-content a {
        color: #000;
        text-decoration: underline;
    }

    .topic-content img,
    .topic-content iframe {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}