/* =============================================
   ICMR MIDAS 2.0 - Lite Version Document Styles
   ============================================= */

.document-page {
    background:
        radial-gradient(circle at top right, rgba(47, 128, 237, 0.08), transparent 34%),
        linear-gradient(180deg, #f7faff 0%, #f2f6fb 100%);
}

.document-hero {
    padding: 145px 0 70px;
}

.document-hero-card {
    background: linear-gradient(135deg, #1e3557 0%, #2f80ed 100%);
    border-radius: 22px;
    padding: 42px;
    color: #ffffff;
    box-shadow: 0 28px 60px rgba(31, 52, 86, 0.18);
}

.document-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
}

.document-kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.document-hero-card h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    color: #ffffff;
    margin-bottom: 16px;
}

.document-hero-card p {
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.88);
    max-width: 760px;
    margin-bottom: 0;
}

.document-meta {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.document-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 600;
}

.document-shell {
    padding: 0 0 90px;
}

.document-card {
    background: #ffffff;
    border: 1px solid rgba(47, 128, 237, 0.10);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(18, 38, 63, 0.08);
    overflow: hidden;
}

.document-card-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 26px;
    border-bottom: 1px solid #e5edf7;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.document-card-topbar strong {
    color: #21324b;
    font-size: 15px;
    font-weight: 700;
}

.document-card-topbar span {
    color: #66788f;
    font-size: 13px;
}

.portal-doc-brand {
    color: #2F80ED;
    font-size: 24px;
}

.header.header-2 .navbar .navbar-collapse { 
    justify-content: flex-end; 
}

.header.header-2 .navbar-nav { 
    flex-wrap: wrap; 
    align-items: center; 
    row-gap: 8px; 
}

.header.header-2 .navbar-nav .nav-item { 
    margin-right: 22px; 
}

.header.header-2 .navbar-nav .nav-item:last-child { 
    margin-right: 0; 
}

/* =============== CORE DOCUMENT RENDERING =============== */

.docx-render {
    padding: 44px 48px 54px;
    color: #37475d;
    background: #ffffff;
    min-height: 800px;
    line-height: 1.85;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
}

.docx-render p,
.docx-render li,
.docx-render td {
    color: #3b4d66;
    margin-bottom: 0.95rem;
}

/* Force visibility - critical for Word-exported content */
.docx-render *,
.docx-render p,
.docx-render li,
.docx-render td,
.docx-render th {
    color: #37475d !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
}

/* Fix transparent/spacing paragraphs from Word */
.docx-render p.p1  { font-size: 2.2rem; line-height: 1.2; text-align: center; margin-bottom: 0.2rem; }
.docx-render p.p2  { font-size: 1.1rem; line-height: 1.6; text-align: center; margin-bottom: 0.2rem; }
.docx-render p.p3,
.docx-render p.p5,
.docx-render p.p9,
.docx-render p.p11,
.docx-render p.p17,
.docx-render p.p20 {
    color: #37475d !important;
    opacity: 1 !important;
    min-height: 1.4em;
    margin-bottom: 0.4rem;
}

.docx-render p.p4,
.docx-render p.p6,
.docx-render p.p8,
.docx-render p.p12,
.docx-render p.p14,
.docx-render p.p15,
.docx-render p.p18,
.docx-render p.p19 {
    font-size: 1rem;
}

.docx-render p.p7,
.docx-render p.p18 {
    margin-top: 2.6rem;
    margin-bottom: 0.7rem;
    padding-top: 1.2rem;
    border-top: 1px solid #dde7f2;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.docx-render p.p12 b,
.docx-render p.p14 b {
    font-size: 1.08rem;
}

.docx-render p.p19 {
    text-align: right;
    font-style: italic;
    color: #66788f;
}

/* Tables - Word export often breaks borders */
.docx-render table {
    width: 100% !important;
    margin: 1.2rem 0 1.8rem;
    border-collapse: collapse;
    background: #ffffff;
    overflow: hidden;
}

.docx-render td,
.docx-render th {
    padding: 12px 14px !important;
    border: 1px solid #d7e2ee !important;
    vertical-align: top;
    background: #ffffff !important;
}

.docx-render tr:first-child td {
    background: #edf4fb !important;
    font-weight: 600;
}

/* Equations */
.docx-render .equation-block {
    margin: 1rem 0 1.4rem;
    padding: 20px 22px;
    border: 1px solid #d7e2ee;
    border-radius: 18px;
    background: linear-gradient(180deg, #f9fbfe 0%, #f3f7fc 100%);
}

.docx-render .equation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: "Cambria Math", Cambria, Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    line-height: 1.45;
    color: #21324b;
    text-align: center;
}

.docx-render .equation--compact {
    gap: 10px;
    font-size: 1.22rem;
}

.docx-render .equation-note {
    margin-top: 6px;
    font-size: 0.98rem;
    color: #4f6178;
    text-align: center;
}

/* Lists */
.docx-render ul {
    margin: 0.6rem 0 1.2rem 1.3rem;
    padding: 0;
}

.docx-render li {
    margin-bottom: 0.55rem;
}

/* Responsive */
@media (max-width: 991px) {
    .document-hero {
        padding: 125px 0 50px;
    }
    .document-hero-card {
        padding: 32px 26px;
    }
    .docx-render {
        padding: 32px 22px 40px;
    }
    .docx-render p.p1 {
        font-size: 1.85rem;
    }
    .docx-render .equation {
        font-size: 1.12rem;
    }
    .document-card-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}