/* ===================================
   PROFESSIONAL ISLAMIC TYPOGRAPHY SYSTEM
   Complete typography redesign with theme colors
   Gold (#a88d5e, #e59756) & Brown (#664131)
   =================================== */

/* ==========================================
   CSS VARIABLES - Islamic Theme Colors
   ========================================== */
:root {
    /* Primary Islamic Colors */
    --islamic-gold: #a88d5e;
    --islamic-gold-light: #e59756;
    --islamic-brown: #664131;
    --islamic-brown-dark: #4a2f24;
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #666666;
    --text-light: #999999;
    
    /* Background Colors */
    --bg-light: #f8f9fa;
    --bg-cream: #faf8f5;
    --bg-white: #ffffff;
    
    /* Accent Colors */
    --accent-success: #28a745;
    --accent-info: #17a2b8;
    --accent-warning: #ffc107;
    --accent-danger: #dc3545;
}

/* ==========================================
   BASE TYPOGRAPHY
   ========================================== */

/* Body & Root Typography */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Content Typography Container */
.content-typography {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================
   HEADINGS - Professional Islamic Style
   ========================================== */

.content-typography h1,
.content-typography h2,
.content-typography h3,
.content-typography h4,
.content-typography h5,
.content-typography h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
    color: var(--islamic-brown);
    line-height: 1.3;
    position: relative;
}

/* H1 - Majestic & Ornamental */
.content-typography h1 {
    font-size: 2.75rem;
    color: var(--islamic-brown);
    padding-bottom: 25px;
    margin-bottom: 1.5em;
    border-bottom: 3px solid var(--islamic-gold);
    position: relative;
}

.content-typography h1::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--islamic-gold), var(--islamic-gold-light));
    border-radius: 2px;
}

.content-typography h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 120px;
    height: 3px;
    background: var(--islamic-brown);
    border-radius: 2px;
}

/* H2 - Elegant with Gold Accent */
.content-typography h2 {
    font-size: 2.25rem;
    color: var(--islamic-brown);
    padding-left: 25px;
    padding-bottom: 15px;
    border-left: 5px solid var(--islamic-gold);
    position: relative;
    margin-bottom: 1.2em;
}

.content-typography h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(168, 141, 94, 0.3), transparent);
}

/* H3 - Modern with Subtle Decoration */
.content-typography h3 {
    font-size: 1.875rem;
    color: var(--islamic-brown);
    padding-left: 20px;
    border-left: 4px solid var(--islamic-gold-light);
    margin-bottom: 1em;
}

/* H4 - Clean & Professional */
.content-typography h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.content-typography h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 6px;
    height: 6px;
    background: var(--islamic-gold);
    border-radius: 50%;
}

/* H5 - Refined */
.content-typography h5 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* H6 - Uppercase Label Style */
.content-typography h6 {
    font-size: 1rem;
    color: var(--islamic-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Inter', sans-serif;
}

/* ==========================================
   PARAGRAPHS
   ========================================== */

.content-typography p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: var(--text-primary);
}

/* First Paragraph Drop Cap */
.content-typography > p:first-of-type::first-letter {
    font-size: 4em;
    font-weight: 700;
    float: left;
    line-height: 0.85;
    margin: 0.05em 0.15em 0 0;
    color: var(--islamic-gold);
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Lead Paragraph */
.content-typography .lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2em;
}

/* ==========================================
   LISTS - Islamic Style
   ========================================== */

.content-typography ul,
.content-typography ol {
    margin: 1.8em 0;
    padding-left: 0;
    list-style: none;
}

/* Unordered Lists with Custom Gold Markers */
.content-typography ul li {
    margin-bottom: 1em;
    position: relative;
    padding-left: 35px;
    line-height: 1.7;
}

.content-typography ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--islamic-gold);
    font-size: 1.1em;
    font-weight: 700;
}

/* Ordered Lists with Styled Numbers */
.content-typography ol {
    counter-reset: item;
}

.content-typography ol li {
    margin-bottom: 1em;
    position: relative;
    padding-left: 45px;
    counter-increment: item;
    line-height: 1.7;
}

.content-typography ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--islamic-gold), var(--islamic-gold-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 3px 8px rgba(168, 141, 94, 0.3);
}

/* Nested Lists */
.content-typography ul ul,
.content-typography ol ol,
.content-typography ul ol,
.content-typography ol ul {
    margin-top: 0.8em;
    margin-bottom: 0.8em;
}

.content-typography ul ul li::before {
    content: '▸';
    color: var(--islamic-gold-light);
}

/* ==========================================
   BLOCKQUOTES - Elegant Islamic Design
   ========================================== */

.content-typography blockquote {
    margin: 2.5em 0;
    padding: 30px 35px 30px 90px;
    background: linear-gradient(135deg, rgba(168, 141, 94, 0.03) 0%, rgba(229, 151, 86, 0.05) 100%);
    border-left: 5px solid var(--islamic-gold);
    border-radius: 0 12px 12px 0;
    position: relative;
    font-style: italic;
    color: var(--text-secondary);
    box-shadow: 0 4px 15px rgba(168, 141, 94, 0.08);
}

.content-typography blockquote::before {
    content: '"';
    position: absolute;
    left: 25px;
    top: 15px;
    font-size: 5em;
    color: var(--islamic-gold);
    opacity: 0.2;
    font-family: 'Cormorant Garamond', Georgia, serif;
    line-height: 1;
}

.content-typography blockquote::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, var(--islamic-gold), var(--islamic-gold-light));
}

.content-typography blockquote p {
    margin-bottom: 0.8em;
    font-size: 1.05em;
    line-height: 1.7;
}

.content-typography blockquote p:last-child {
    margin-bottom: 0;
}

.content-typography blockquote cite {
    display: block;
    margin-top: 1em;
    font-style: normal;
    font-weight: 600;
    color: var(--islamic-brown);
    font-size: 0.95em;
}

.content-typography blockquote cite::before {
    content: '— ';
}

/* ==========================================
   LINKS
   ========================================== */

.content-typography a {
    color: var(--islamic-brown);
    text-decoration: none;
    border-bottom: 2px solid rgba(168, 141, 94, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.content-typography a:hover {
    color: var(--islamic-gold);
    border-bottom-color: var(--islamic-gold);
    background: rgba(168, 141, 94, 0.08);
}

/* ==========================================
   TEXT FORMATTING
   ========================================== */

.content-typography strong,
.content-typography b {
    font-weight: 700;
    color: var(--islamic-brown);
}

.content-typography em,
.content-typography i {
    font-style: italic;
    color: var(--text-secondary);
}

.content-typography mark {
    background: linear-gradient(135deg, rgba(168, 141, 94, 0.2), rgba(229, 151, 86, 0.2));
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--islamic-brown);
}

.content-typography small {
    font-size: 0.875em;
    color: var(--text-muted);
}

.content-typography del {
    text-decoration: line-through;
    color: var(--text-light);
}

.content-typography ins {
    text-decoration: none;
    border-bottom: 2px solid var(--accent-success);
    color: var(--accent-success);
}

/* ==========================================
   CODE & PRE
   ========================================== */

.content-typography code {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.9em;
    background: var(--bg-light);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--islamic-brown);
    border: 1px solid rgba(168, 141, 94, 0.2);
}

.content-typography pre {
    background: var(--bg-cream);
    border: 2px solid rgba(168, 141, 94, 0.2);
    border-left: 5px solid var(--islamic-gold);
    padding: 25px;
    overflow-x: auto;
    border-radius: 8px;
    margin: 2em 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.content-typography pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

/* ==========================================
   TABLES - Professional Islamic Style
   ========================================== */

.content-typography table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5em 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.content-typography table thead {
    background: linear-gradient(135deg, var(--islamic-brown), var(--islamic-gold));
    color: white;
}

.content-typography table thead th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875em;
    font-family: 'Inter', sans-serif;
}

.content-typography table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.content-typography table tbody tr:hover {
    background: rgba(168, 141, 94, 0.05);
}

.content-typography table tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

.content-typography table tbody tr:nth-child(even):hover {
    background: rgba(168, 141, 94, 0.08);
}

.content-typography table td,
.content-typography table th {
    padding: 15px 20px;
    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 & FIGURES
   ========================================== */

.content-typography img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2.5em 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: block;
    border: 3px solid white;
    outline: 1px solid rgba(168, 141, 94, 0.2);
}

.content-typography figure {
    margin: 2.5em 0;
    text-align: center;
}

.content-typography figcaption {
    margin-top: 15px;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95em;
    font-weight: 500;
}

/* ==========================================
   HORIZONTAL RULE - Ornamental
   ========================================== */

.content-typography hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--islamic-gold), transparent);
    margin: 3.5em 0;
    position: relative;
}

.content-typography hr::after {
    content: '✦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 20px;
    color: var(--islamic-gold);
    font-size: 1.5em;
}

/* ==========================================
   SPECIAL CONTENT BOXES
   ========================================== */

/* Highlight Box */
.content-typography .highlight-box {
    background: linear-gradient(135deg, rgba(168, 141, 94, 0.08) 0%, rgba(229, 151, 86, 0.08) 100%);
    border: 2px solid var(--islamic-gold);
    border-radius: 12px;
    padding: 30px;
    margin: 2.5em 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(168, 141, 94, 0.1);
}

.content-typography .highlight-box::before {
    content: '✦';
    position: absolute;
    top: -15px;
    left: 30px;
    background: white;
    color: var(--islamic-gold);
    font-size: 1.5em;
    padding: 0 15px;
}

/* Note Boxes */
.content-typography .note,
.content-typography .info,
.content-typography .warning,
.content-typography .success {
    padding: 25px 30px;
    margin: 2em 0;
    border-radius: 10px;
    border-left: 5px solid;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.content-typography .note {
    background: rgba(168, 141, 94, 0.05);
    border-left-color: var(--islamic-gold);
}

.content-typography .info {
    background: rgba(23, 162, 184, 0.05);
    border-left-color: var(--accent-info);
}

.content-typography .warning {
    background: rgba(255, 193, 7, 0.08);
    border-left-color: var(--accent-warning);
}

.content-typography .success {
    background: rgba(40, 167, 69, 0.05);
    border-left-color: var(--accent-success);
}

/* ==========================================
   RESPONSIVE TYPOGRAPHY
   ========================================== */

@media (max-width: 991px) {
    body {
        font-size: 15px;
    }

    .content-typography {
        font-size: 16px;
    }
    
    .content-typography h1 {
        font-size: 2.25rem;
    }
    
    .content-typography h2 {
        font-size: 1.875rem;
    }
    
    .content-typography h3 {
        font-size: 1.5rem;
    }
    
    .content-typography h4 {
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .content-typography {
        font-size: 15px;
        padding: 0 15px;
    }
    
    .content-typography h1 {
        font-size: 1.875rem;
        padding-bottom: 20px;
    }
    
    .content-typography h2 {
        font-size: 1.625rem;
        padding-left: 20px;
    }
    
    .content-typography h3 {
        font-size: 1.375rem;
        padding-left: 15px;
    }
    
    .content-typography blockquote {
        padding: 25px 20px 25px 70px;
    }
    
    .content-typography blockquote::before {
        font-size: 4em;
        left: 15px;
    }
    
    .content-typography table {
        font-size: 0.875em;
    }

    .content-typography > p:first-of-type::first-letter {
        font-size: 3em;
    }
}

@media (max-width: 575px) {
    .content-typography h1 {
        font-size: 1.625rem;
    }
    
    .content-typography h2 {
        font-size: 1.5rem;
    }
    
    .content-typography h3 {
        font-size: 1.25rem;
    }

    .content-typography ol li::before {
        width: 24px;
        height: 24px;
        font-size: 0.8em;
    }

    .content-typography blockquote {
        padding: 20px 15px 20px 60px;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.text-justify {
    text-align: justify !important;
}

.text-gold {
    color: var(--islamic-gold) !important;
}

.text-brown {
    color: var(--islamic-brown) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.font-weight-normal {
    font-weight: 400 !important;
}

.font-italic {
    font-style: italic !important;
}
