@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Default styles for screen display */
@page {
    size: A4;
    margin: 0.5cm;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.2;
    color: #333;
    background-color: #fff;
}


/* --- Main Container --- */
.container_marksheet_template1 {
    width: 100%;
    height: auto;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #0b722d;
    padding: 0;
    margin: 0 auto;
}

.content_container_template1 {
    padding: 10px 1.5%;
}

/* --- Header Section --- */
.header_template1 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    border-bottom: 1px solid #0b722d;
}

.logo_div_img_template1 img {
    width: 70px;
    height: auto;
    margin-right: 20px;
}

.header_institution {
    text-align: center;
}

.heading_template1 {
    font-size: 18pt;
    font-weight: 700;
    color: #0b722d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.heading_code_info_template1 {
    font-size: 9pt;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;
}

.heading_address_template1, 
.contact_template1 {
    font-size: 9pt;
    font-weight: bold;
    color: #666;
    text-transform: none;
}

/* --- Report Title Section --- */
.header_info_container {
    padding: 10px 0;
    margin-bottom: 5px;
    text-align: center; 
}

.heading_report_template1 {
    font-size: 14pt;
    font-weight: 700;
    color: #0b722d;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year_template1 {
    font-size: 10pt;
    font-weight: 500;
    color: #666;
}

/* --- Student Info Section --- */
.student_info_section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 5px 0;
}

.student_info_template1 {
    width: 45%; 
    padding: 3px 2%; 
}

.student_info_table_template1 {
    width: 100%;
    border-collapse: collapse;
}

.student_info_table_template1 td {
    padding: 2px 5px;
    font-size: 9pt;
    text-align: left; 
}

.student_info_table_template1 td:nth-child(2) {
    width: 5px;
    padding: 0;
    text-align: center;
}

.student_info_table_template1 td:first-child {
    font-weight: 600;
    color: #333;
    width: 30%;
}

/* --- Scholastic Table --- */
.table1_container_template1 {
    margin: 5px auto;
    width: 100%;
}

.table1_template1 {
    border-collapse: collapse;
    width: 100%;
    overflow: hidden;
}

.table1_template1 th {
    background-color: #0b722d;
    color: white;
    padding: 5px;
    text-align: center;
    font-size: 9pt;
    border: 1px solid #dcdcdc;
}

.table1_template1_subjects {
    color: #0b722d;
    padding: 5px;
    font-size: 9pt; 
    font-weight: bold;
    text-transform: uppercase;
}

.table1_template1 td {
    padding: 4px;
    text-align: center;
    font-size: 9pt; 
    border: 1px solid #dcdcdc;
}

.table1_template1 tr:nth-child(even) {
    background-color: #f3fcf4;
}

.table1_template1 tr:nth-child(odd) {
    background-color: #ffffff;
}

.table1_template1 .alignleft {
    text-align: left;
    padding-left: 5px;
}

/* --- Co-Scholastic & Social Traits Table --- */
.evaluation_table {
    overflow: hidden;
    margin-top: 10px;
}

.evaluation_table th {
    background-color: #0b722d;
    color: white;
    border: 1px solid #dcdcdc;
    padding: 5px;
    font-size: 9pt;
}

.evaluation_table td {
    text-align: left;
    font-size: 9pt;
    padding: 4px;
}

/* --- Specific Participation and Remarks --- */
.specific_participation_table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #dcdcdc;
    overflow: hidden;
    margin-top: 10px;
}

.specific_participation_table td {
    padding: 4px;
    font-size: 9pt;
    border: none;
    text-align: left;
    line-height: 1.4;
}

.specific_participation_table th {
    background-color: #0b722d;
    color: white;
    padding: 5px;
    font-size: 9pt;
    text-align: center;
}

/* --- Promotion and New Session --- */
.congratulate_message {
    font-size: 11pt;
    font-weight: 600;
    color: #0b722d;
    text-align: center;
}

.promotion_table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.promotion_table td {
    font-size: 10pt;
    font-weight: 600;
    text-align: left;
    border: none;
}

/* --- Summary Section --- */
.flexbox-row-spacearound-start {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin: 5px auto;
}

.summary-item {
    width: 24%; 
    text-align: center;
}

.student_info_table_template2 {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.student_info_table_template2 th,
.student_info_table_template2 td {
    font-size: 9pt;
    white-space: nowrap;
    text-align: center; 
}

.student_info_table_template2 th.alignleft {
    text-align: right; 
}

.student_info_table_template2 th.colon {
    padding: 0;
    text-align: center;
}

.student_info_table_template2 td {
    width: 50%;
    text-align: left; 
}

/* --- Signature Section --- */
.signature_container {
    margin: 5px;
    display: flex;
    justify-content: space-around; 
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.signature_container > div {
    text-align: center; 
    width: 30%; 
}

.signature_container .student_info_table_template1 {
    margin-top: 30px; 
}

.signature_container .student_info_table_template1 td {
    text-align: center; 
    font-weight: 600;
    font-size: 9pt;
    color: #333;
    border-top: 1px solid #333;
}

/* --- Footer Note --- */
.disclaimer {
    font-style: italic;
    color: #e74c3c;
    margin-top: 20px;
    font-size: 9pt !important;
    text-align: center;
}

/* --- Utility Classes --- */
.fullstretch { width: 100%; }
.margintop5 { margin-top: 5px; }
.margintop10 { margin-top: 10px; }
.margintop20 { margin-top: 10px; }
.margintop50 { margin-top: 15px; }
.texttransformupper { text-transform: uppercase; }
.alignleft { text-align: left; }


/* Print specific rules to achieve the attached image's style */
@media print {
    body {
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 9pt;
    }
    
    .container_marksheet_template1 {
        width: 96.5% !important;
        height: 97.5% !important;
        background: none !important;
        border: none !important;
        font-size: 9pt !important;
        margin: 0 auto !important; 
        padding: 0 !important;
        box-shadow: none !important;
        page-break-after: always !important;
        margin-top: 0.5cm !important;
    }
    
    .content_container_template1 {
        padding: 0.5cm 1cm !important;
    }
    
    .header_template1 {
        flex-direction: column;
        align-items: center;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .logo_div_img_template1 {
        display: none !important;
    }
    
    .header_institution {
        text-align: center !important;
        margin-left: 0 !important;
        color: #000 !important;
    }
    
    .heading_template1 {
        opacity: 0 !important;
        margin: 0;
        padding: 0;
        height: 0;
        line-height: 0;
        font-size: 0;
    }
    
    .heading_code_info_template1, 
    .heading_address_template1, 
    .contact_template1 {
        font-size: 9pt !important;
        color: #000 !important;
        font-weight: normal !important;
        text-transform: none !important;
    }
    
    .heading_report_template1 {
        font-family: serif !important;
        font-size: 16pt !important;
        color: #000 !important;
        margin-bottom: 0px !important;
        margin-top: 3px !important;
        text-transform: uppercase !important;
        font-weight: bold !important;
    }
    
    .year_template1 {
        font-size: 10pt !important;
        color: #000 !important;
        font-weight: normal !important;
    }
    
    .student_info_section {
        justify-content: space-between;
        padding: 10px 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .student_info_template1 {
        width: 48%; /* Adjusting width to align well */
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        margin: 0 !important;
    }
    
    .student_info_table_template1 {
        width: 100%;
        border-collapse: collapse;
    }
    
    .student_info_table_template1 td {
        padding: 2px 5px !important;
        font-size: 9pt !important;
        border-bottom: none !important;
    }
    
    .student_info_table_template1 td:first-child {
        font-weight: bold !important;
        color: #000 !important;
        width: 40% !important;
    }
    
    .table1_container_template1 {
        margin: 10px auto;
        width: 100%;
    }
    
    .table1_template1_subjects {
        color: #000 !important;
        padding: 5px;
        font-size: 9pt; 
        font-weight: bold;
        text-transform: uppercase;
    }

    .table1_template1, .evaluation_table, .specific_participation_table {
        border-collapse: collapse;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        font-size: 9pt;
        border: 1px solid #000;
    }
    
    .table1_template1 th, .evaluation_table th, .specific_participation_table th {
        background-color: #fff !important;
        color: #000 !important;
        font-weight: bold !important;
        border: 1px solid #000 !important;
        padding: 5px !important;
        text-transform: none;
        text-align: center;
    }

    .table1_template1 td, .evaluation_table td {
        background-color: #fff !important;
        border: 1px solid #000 !important;
        font-size: 9pt !important;
        padding: 4px !important;
        text-align: center;
    }
    
    .table1_template1 th:first-child {
        text-align: center;
    }
    
    .table1_template1 .alignleft {
        text-align: left;
    }
    
    .flexbox-row-spacearound-start {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
        width: 100%;
        margin: 5px auto;
        padding: 0;
    }
    
    .summary-item {
        width: 24% !important; 
        text-align: center;
    }

    .student_info_table_template2 th, .student_info_table_template2 td {
        font-size: 9pt !important;
        white-space: normal;
        text-align: left;
    }
    
    .signature_container {
        margin-top: 30px !important;
        padding-top: 0;
        justify-content: space-around;
        align-items: flex-start;
        width: 100%;
        display: flex;
    }
    
    .signature_container .student_info_table_template1 {
        margin: 0 auto;
    }
    
    .signature_container .student_info_table_template1 td {
        border-top: none !important;
        padding-top: 5px;
        text-align: center;
        font-size: 9pt !important;
    }
    
    .congratulate_message {
        color: #000 !important;
    }

}