/* =========================
   PRINT CSS - FINAL (FOCUSED FIX)
   ========================= */

@page {
    size: A4;
    margin: 10mm;
}

@media print {

    /* Reset */
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    /* Container fix */
    .container {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Reduce overall spacing */
    .content {
        padding: 10px 15px !important;
    }

    /* 🔥 HEADER FIX */
    .masthead {
        page-break-after: avoid !important;
        break-after: avoid !important;
        padding: 20px !important;
        margin-bottom: 5px !important;
    }

    /* 🔥 INTRO FIX */
    .main-head {
        page-break-after: avoid !important;
        break-after: avoid !important;
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
    }

    /* 🔥 ARTICLES WRAPPER FIX */
    .articles {
        display: block !important;
        page-break-before: avoid !important;
        break-before: avoid !important;
    }

    /* 🔥 CRITICAL: FIRST ARTICLE MUST STAY */
    .articles .article:first-child {
        page-break-before: avoid !important;
        break-before: avoid !important;
        margin-top: 0 !important;
    }

    /* General article safety */
    .article {
        display: block !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 20px !important;
    }

    /* Prevent inner splitting */
    .article h3,
    .article p,
    .article img {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Control image size */
    .article img {
        max-height: 240px !important;
        object-fit: contain !important;
    }

    /* Achievers clean start */
    .achievers-section {
        page-break-before: always !important;
    }

    /* Remove hover effects */
    .article:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Safety */
    img {
        page-break-inside: avoid !important;
    }

}