/* ═══════════════════════════════════════════════════════════════
   minister-word.css  —  كلمة الوزير  (enhanced version)
   Fonts: Amiri (quotes/display) · Cairo (UI/body)
   Enhanced with better text alignment and formatting
   ═══════════════════════════════════════════════════════════════ */

:root {
    --moif-blue-dark: #0D1B3E;
    --moif-blue: #1A2B4A;
    --moif-gold: #C9A227;
    --moif-gold-bright: #F4D03F;
    --moif-white: #FFFFFF;
    --page-bg: #F7F5F0;
    --surface: #FFFFFF;
    --text-dark: #1a1a2e;
    --text-body: #3a3a4a;
    --text-muted: #7a7a8a;
    --gold-line: rgba(201,162,39,.25);
    --shadow-sm: 0 2px 12px rgba(13,27,62,.08);
    --shadow-md: 0 6px 32px rgba(13,27,62,.12);
    /* Enhanced typography */
    --line-height-readable: 1.8;
    --line-height-tight: 1.4;
    --letter-spacing-arabic: -0.01em;
    --letter-spacing-english: -0.01em;
}

/* ───────────────────────────────────────────────────────────────
   1. PAGE BACKGROUND & BASE TYPOGRAPHY
   ─────────────────────────────────────────────────────────────── */
.minister-word-page {
    background: var(--page-bg);
    font-family: 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced text rendering */
.mw-content,
.mw-quote-text,
.mw-section-body p,
.mw-closing-text {
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}

/* ───────────────────────────────────────────────────────────────
   2. HERO HEADER  (dark, eyebrow + title)
   ─────────────────────────────────────────────────────────────── */
.mw-hero {
    background-color: var(--moif-blue-dark);
    position: relative;
    padding: 72px 0 60px;
    overflow: hidden;
    isolation: isolate;
    text-align: center;
}

    .mw-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient( 135deg, transparent, transparent 48px, rgba(201,162,39,.03) 48px, rgba(201,162,39,.03) 49px ), radial-gradient(ellipse 70% 100% at 80% 50%, rgba(201,162,39,.06) 0%, transparent 65%);
        pointer-events: none;
    }

.mw-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--moif-gold);
    margin-bottom: 16px;
    position: relative;
    opacity: 0;
    animation: mwFadeUp .55s ease forwards .05s;
}

    .mw-hero-eyebrow::before,
    .mw-hero-eyebrow::after {
        content: '';
        display: block;
        width: 28px;
        height: 1px;
        background: var(--moif-gold);
        opacity: .6;
    }

.mw-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    color: var(--moif-white);
    line-height: var(--line-height-tight);
    position: relative;
    opacity: 0;
    animation: mwFadeUp .6s ease forwards .18s;
    letter-spacing: var(--letter-spacing-arabic);
}

    .mw-hero-title span {
        color: var(--moif-gold);
    }

.mw-hero-rule {
    width: 64px;
    height: 3px;
    background: linear-gradient(to left, var(--moif-gold), var(--moif-gold-bright), transparent);
    border-radius: 2px;
    margin: 18px auto 0;
    opacity: 0;
    animation: mwFadeUp .6s ease forwards .3s;
}

/* ───────────────────────────────────────────────────────────────
   3. BREADCRUMB STRIP
   ─────────────────────────────────────────────────────────────── */
.mw-breadcrumb {
    background: var(--moif-blue);
    padding: 11px 0;
    border-bottom: 1px solid rgba(201,162,39,.12);
}

    .mw-breadcrumb ul {
        list-style: none;
        display: flex;
        align-items: center;
        gap: 6px;
        justify-content: center;
        padding: 0;
        margin: 0;
        flex-wrap: wrap;
    }

    .mw-breadcrumb li {
        font-size: .78rem;
        color: rgba(255,255,255,.45);
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .mw-breadcrumb li::after {
            content: '/';
            opacity: .35;
        }

        .mw-breadcrumb li:last-child::after {
            display: none;
        }

        .mw-breadcrumb li a {
            color: var(--moif-gold);
            text-decoration: none;
            transition: color .2s;
        }

            .mw-breadcrumb li a:hover {
                color: var(--moif-gold-bright);
            }

        .mw-breadcrumb li.active {
            color: rgba(255,255,255,.7);
        }

/* ───────────────────────────────────────────────────────────────
   4. PAGE CONTENT AREA
   ─────────────────────────────────────────────────────────────── */
.mw-content {
    padding: 64px 0 80px;
    background: var(--page-bg);
}

/* ───────────────────────────────────────────────────────────────
   5. INTRO CARD  (portrait + opening quote) - ENHANCED
   ─────────────────────────────────────────────────────────────── */
.mw-intro-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 280px 1fr;
    margin-bottom: 28px;
    opacity: 0;
    animation: mwFadeUp .65s ease forwards .35s;
}

@media (max-width: 780px) {
    .mw-intro-card {
        grid-template-columns: 1fr;
    }
}

/* Portrait panel */
.mw-portrait {
    position: relative;
    overflow: hidden;
}

    .mw-portrait img {
        width: 100%;
        height: 340px;
        min-height: 340px;
        object-fit: cover;
        object-position: top center;
        display: block;
        padding: 23px;
    }

    .mw-portrait::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(to left, var(--moif-gold-bright), var(--moif-gold));
    }

/* Quote panel - ENHANCED */
.mw-quote-panel {
    padding: 44px 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 4px solid var(--moif-gold);
}

@media (max-width: 780px) {
    .mw-quote-panel {
        border-right: none;
        border-top: 4px solid var(--moif-gold);
        padding: 32px 28px;
    }
}

.mw-quote-label {
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--moif-gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .mw-quote-label::before {
        content: '';
        display: block;
        width: 22px;
        height: 2px;
        background: var(--moif-gold);
    }

.mw-quote-mark {
    font-size: 4.5rem;
    line-height: .8;
    color: var(--moif-gold);
    opacity: .18;
    margin-bottom: -12px;
    display: block;
}

.mw-quote-text {
    font-size: clamp(1.1rem, 2vw, 1.28rem);
    line-height: var(--line-height-readable);
    color: var(--text-dark);
    margin-bottom: 28px;
    text-align: justify;
    text-justify: inter-word;
    word-spacing: normal;
    word-break: break-word;
    hyphens: auto;
}

     

.mw-minister-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--moif-blue-dark);
    margin-bottom: 3px;
}

.mw-minister-role {
    font-size: .82rem;
    color: var(--text-muted);
}

/* ───────────────────────────────────────────────────────────────
   6. TEXT SECTIONS - ENHANCED
   ─────────────────────────────────────────────────────────────── */
.mw-text-section {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 44px 48px;
    margin-bottom: 24px;
    opacity: 0;
    animation: mwFadeUp .65s ease forwards .5s;
}

    .mw-text-section:nth-child(3) {
        animation-delay: .62s;
    }

    .mw-text-section:last-child {
        margin-bottom: 0;
    }

@media (max-width: 600px) {
    .mw-text-section {
        padding: 28px 22px;
    }
}

.mw-section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

    .mw-section-label h3 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--moif-blue-dark);
        margin: 0;
    }

.mw-label-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--moif-gold);
    flex-shrink: 0;
}

.mw-label-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, #eee, var(--gold-line));
}

/* Enhanced paragraph styling */
.mw-section-body p {
    font-size: .98rem;
    line-height: var(--line-height-readable);
    color: var(--text-body);
    margin-bottom: 20px;
    text-align: justify;
    text-justify: inter-word;
    letter-spacing: var(--letter-spacing-arabic);
    word-spacing: normal;
    word-break: break-word;
    hyphens: auto;
}

    .mw-section-body p:last-child {
        margin-bottom: 0;
    }

    /* Added spacing between paragraphs */
    .mw-section-body p + p {
        margin-top: 20px;
    }

/* Enhanced list styling inside sections */
.mw-section-body ul,
.mw-section-body ol {
    margin: 20px 0;
    padding-right: 24px;
    line-height: var(--line-height-readable);
}

[dir="ltr"] .mw-section-body ul,
[dir="ltr"] .mw-section-body ol {
    padding-left: 24px;
    padding-right: 0;
}

.mw-section-body li {
    margin-bottom: 12px;
    text-align: justify;
}

    .mw-section-body li:last-child {
        margin-bottom: 0;
    }

/* Enhanced blockquote styling */
.mw-section-body blockquote {
    margin: 24px 0;
    padding: 20px 32px;
    border-right: 4px solid var(--moif-gold);
    background: linear-gradient(135deg, rgba(201,162,39,.03), rgba(201,162,39,.08));
    border-radius: 8px;
    font-style: normal;
    text-align: justify;
}

[dir="ltr"] .mw-section-body blockquote {
    border-left: 4px solid var(--moif-gold);
    border-right: none;
}

.mw-section-body blockquote p {
    margin-bottom: 0;
}

/* Enhanced heading styles inside sections */
.mw-section-body h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--moif-blue-dark);
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(201,162,39,.3);
}

.mw-section-body h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--moif-blue);
    margin: 24px 0 12px;
}

/* Enhanced table styling */
.mw-section-body table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: .9rem;
    line-height: 1.6;
}

.mw-section-body th,
.mw-section-body td {
    border: 1px solid #e0e0e0;
    padding: 12px;
    text-align: right;
    vertical-align: top;
}

[dir="ltr"] .mw-section-body th,
[dir="ltr"] .mw-section-body td {
    text-align: left;
}

.mw-section-body th {
    background: rgba(201,162,39,.1);
    font-weight: 600;
    color: var(--moif-blue-dark);
}

.mw-section-body tr:nth-child(even) {
    background: rgba(0,0,0,.02);
}

/* Enhanced emphasis styles */
.mw-section-body strong {
    color: var(--moif-blue-dark);
    font-weight: 700;
}

.mw-section-body em {
    font-style: italic;
    color: var(--moif-blue);
}

.mw-section-body mark {
    background: rgba(201,162,39,.15);
    padding: 0 4px;
    border-radius: 4px;
    color: inherit;
}

/* ───────────────────────────────────────────────────────────────
   7. CLOSING SECTION  (dark card) - ENHANCED
   ─────────────────────────────────────────────────────────────── */
.mw-closing {
    background: var(--moif-blue-dark);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 44px 48px;
    display: flex;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 24px;
    opacity: 0;
    animation: mwFadeUp .65s ease forwards .75s;
}

@media (max-width: 640px) {
    .mw-closing {
        padding: 30px 24px;
        gap: 28px;
    }
}

.mw-closing-text {
    flex: 1 1 260px;
    font-size: 1.20rem;
    line-height: var(--line-height-readable);
    color: rgba(255,255,255,.85);
    margin: 0;
    text-align: justify;
    text-justify: inter-word;
}

.mw-sig-card {
    flex: 0 0 200px;
    text-align: center;
    border: 1px solid rgba(201,162,39,.25);
    border-radius: 8px;
    padding: 22px 24px;
    background: rgba(201,162,39,.05);
}

.mw-sig-rule {
    width: 40px;
    height: 2px;
    background: linear-gradient(to left, transparent, var(--moif-gold), transparent);
    margin: 0 auto 14px;
}

.mw-sig-card strong {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    color: var(--moif-gold);
    margin-bottom: 5px;
}

.mw-sig-card span {
    font-size: .76rem;
    color: rgba(255,255,255,.45);
}

/* ───────────────────────────────────────────────────────────────
   8. RTL OVERRIDES - ENHANCED
   ─────────────────────────────────────────────────────────────── */
[dir="rtl"] {
    --letter-spacing-arabic: -0.01em;
}

    [dir="rtl"] .mw-quote-panel {
        border-right: none;
        border-left: 4px solid var(--moif-gold);
    }

    [dir="rtl"] .mw-hero-rule {
        background: linear-gradient(to right, var(--moif-gold), var(--moif-gold-bright), transparent);
    }

    [dir="rtl"] .mw-label-line {
        background: linear-gradient(to right, #eee, var(--gold-line));
    }

    /* RTL specific text adjustments */
    [dir="rtl"] .mw-section-body p,
    [dir="rtl"] .mw-quote-text,
    [dir="rtl"] .mw-closing-text {
        text-align: right;
    }

      

/* LTR specific text adjustments */
[dir="ltr"] .mw-section-body p,
[dir="ltr"] .mw-quote-text,
[dir="ltr"] .mw-closing-text {
    text-align: left;
}

/* ───────────────────────────────────────────────────────────────
   9. ANIMATIONS
   ─────────────────────────────────────────────────────────────── */
@keyframes mwFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ───────────────────────────────────────────────────────────────
   10. PRINT STYLES - for PDF/Print export
   ─────────────────────────────────────────────────────────────── */
@media print {
    .mw-hero,
    .mw-breadcrumb {
        background: var(--moif-blue-dark);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .mw-text-section,
    .mw-intro-card,
    .mw-closing {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .mw-section-body p,
    .mw-quote-text {
        text-align: justify;
        widows: 3;
        orphans: 3;
    }
}

/* ───────────────────────────────────────────────────────────────
   11. UTILITY CLASSES
   ─────────────────────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-justify {
    text-align: justify;
}

 
.mw-highlight {
    background: linear-gradient(120deg, rgba(201,162,39,.1) 0%, rgba(201,162,39,.05) 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}
