/* ===================================
   Islamic Theme Typography
   Beautiful content formatting for CKEditor output
   =================================== */

:root {
    --islamic-gold: #d4af37;
    --islamic-green: #122E5B;
    --islamic-teal: #00a896;
    --islamic-brown: #8b6f47;
    --islamic-dark: #2c3e50;
    --islamic-red: #c44536;
}

.content-typography {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 900px;
    margin: 0 auto 60px auto;
}

/* Headings with Islamic ornamental style */
.content-typography h1,
.content-typography h2,
.content-typography h3,
.content-typography h4,
.content-typography h5,
.content-typography h6 {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--islamic-dark);
    position: relative;
    padding-bottom: 12px;
}

.content-typography h1 {
    font-size: 2.5em;
    color: var(--islamic-green);
    border-bottom: 3px solid var(--islamic-gold);
    padding-bottom: 16px;
    margin-bottom: 1.5em;
}

.content-typography h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--islamic-green);
}

.content-typography h2 {
    font-size: 2em;
    color: var(--islamic-green);
    border-left: 5px solid var(--islamic-gold);
    padding-left: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.content-typography h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    padding-left: 15px;
    border-left: 4px solid var(--islamic-green);
}

.content-typography h4 {
    font-size: 1.3em;
    color: var(--islamic-brown);
}

.content-typography h5 {
    font-size: 1.1em;
    color: var(--islamic-dark);
    font-weight: 600;
}

.content-typography h6 {
    font-size: 1em;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Paragraphs */
.content-typography p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.content-typography p:first-of-type::first-letter {
    font-size: 3.5em;
    font-weight: bold;
    float: left;
    line-height: 0.9;
    margin: 0.1em 0.1em 0 0;
    color: var(--islamic-gold);
    font-family: Georgia, serif;
}

/* Lists with Islamic style markers */
.content-typography ul,
.content-typography ol {
    margin: 1.5em 0;
    padding-left: 40px;
}

.content-typography ul li {
    margin-bottom: 0.8em;
    position: relative;
    padding-left: 10px;
}

.content-typography ul li::marker {
    color: var(--islamic-gold);
    font-size: 1.2em;
}

.content-typography ol li {
    margin-bottom: 0.8em;
    padding-left: 10px;
}

.content-typography ol li::marker {
    color: var(--islamic-green);
    font-weight: bold;
}

/* Nested lists */
.content-typography ul ul,
.content-typography ol ol,
.content-typography ul ol,
.content-typography ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes - Islamic style with ornamental borders */
.content-typography blockquote {
    margin: 2em 0;
    padding: 25px 30px 25px 80px;
    background: linear-gradient(135deg, rgba(13, 128, 84, 0.05) 0%, rgba(0, 168, 150, 0.05) 100%);
    border-left: 5px solid var(--islamic-gold);
    border-right: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    font-style: italic;
    color: #34495e;
    border-radius: 0 8px 8px 0;
}

.content-typography blockquote::before {
    content: '"';
    position: absolute;
    left: 20px;
    top: 10px;
    font-size: 4em;
    color: var(--islamic-gold);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.content-typography blockquote p {
    margin-bottom: 0.5em;
}

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

/* Links */
.content-typography a {
    color: var(--islamic-teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 168, 150, 0.3);
    transition: all 0.3s ease;
}

.content-typography a:hover {
    color: var(--islamic-green);
    border-bottom-color: var(--islamic-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* Strong and emphasis */
.content-typography strong,
.content-typography b {
    font-weight: 700;
    color: var(--islamic-green);
}

.content-typography em,
.content-typography i {
    font-style: italic;
    color: var(--islamic-brown);
}

/* Code blocks */
.content-typography pre {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--islamic-teal);
    padding: 20px;
    overflow-x: auto;
    border-radius: 6px;
    margin: 1.5em 0;
}

.content-typography code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--islamic-red);
}

.content-typography pre code {
    background: transparent;
    padding: 0;
    color: #2c3e50;
}

/* Tables - Islamic ornamental style */
.content-typography table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.content-typography table thead {
    background: linear-gradient(135deg, var(--islamic-green) 0%, var(--islamic-teal) 100%);
    color: white;
}

.content-typography table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

.content-typography table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
}

.content-typography table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.content-typography table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.content-typography table tbody tr:nth-child(even):hover {
    background: rgba(212, 175, 55, 0.08);
}

.content-typography table td,
.content-typography table th {
    padding: 12px 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.content-typography table td:last-child,
.content-typography table th:last-child {
    border-right: none;
}

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

.content-typography figure {
    margin: 2em 0;
    text-align: center;
}

.content-typography figcaption {
    margin-top: 10px;
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Horizontal rule - Islamic ornamental */
.content-typography hr {
    border: none;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--islamic-gold), transparent);
    margin: 3em 0;
    position: relative;
}

.content-typography hr::after {
    content: '✦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 15px;
    color: var(--islamic-gold);
    font-size: 1.2em;
}

/* Special containers */
.content-typography .highlight-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(13, 128, 84, 0.1) 100%);
    border: 2px solid var(--islamic-gold);
    border-radius: 8px;
    padding: 25px;
    margin: 2em 0;
    position: relative;
}

.content-typography .highlight-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: var(--islamic-gold);
}

/* Note boxes */
.content-typography .note,
.content-typography .info,
.content-typography .warning {
    padding: 20px 25px;
    margin: 1.5em 0;
    border-radius: 8px;
    border-left: 5px solid;
}

.content-typography .note {
    background: rgba(0, 168, 150, 0.05);
    border-left-color: var(--islamic-teal);
}

.content-typography .info {
    background: rgba(52, 152, 219, 0.05);
    border-left-color: #3498db;
}

.content-typography .warning {
    background: rgba(196, 69, 54, 0.05);
    border-left-color: var(--islamic-red);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-typography {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .content-typography h1 {
        font-size: 2em;
    }
    
    .content-typography h2 {
        font-size: 1.6em;
    }
    
    .content-typography blockquote {
        padding: 20px 20px 20px 60px;
    }
    
    .content-typography table {
        font-size: 0.9em;
    }
}
