@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

@page {
    margin: 0.5cm;
    size: A4;
}

body {
    background-color: #fff;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.container_marksheet_template1 {
    width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid #003366;
    page-break-after: always;
}

.content_container_template1 {
    padding: 10px 2%;
}

/* --- Header Styles --- */
.header_template1 {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.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: #003366;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.heading_code_info_template1,
.heading_address_template1,
.contact_template1 {
    font-size: 9pt;
    font-weight: 600;
    color: #7f8c8d;
}

/* --- Report Title --- */
.header_info_container {
    margin: 10px 0;
    text-align: center;
}

.heading_report_template1 {
    font-size: 14pt;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year_template1 {
    font-size: 10pt;
    font-weight: 600;
    color: #7f8c8d;
}

/* --- Student Info --- */
.student-info-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.student_info_template1 {
    background: #f8f9fa;
    padding: 5px;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.student_info_table_template1 {
    width: 100%;
}

.student_info_table_template1 tr {
    line-height: 1.5;
}

.student_info_table_template1 td:first-child {
    font-weight: 700;
    font-size: 9pt;
    color: #003366;
    min-width: 80px;
    padding-right: 5px;
}

.student_info_table_template1 td:last-child {
    font-weight: 400;
    font-size: 9pt;
    color: #003366;
}

/* --- Assessment Tables --- */
.assessment-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.assessment-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.assessment-table th {
    background-color: #3498db;
    color: white;
    padding: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 10pt;
}

.assessment-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    font-size: 8pt;
}

.assessment-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.subject-header {
    background-color: #e3f2fd !important;
    color: #003366 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

.section-header {
    background-color: #f1f8fe !important;
    color: #003366 !important;
    font-style: italic;
    font-weight: 600;
}

/* --- Promotion Message --- */
.promotion-container {
    background: #e3f2fd;
    padding: 8px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
    text-align: left;
}

.promotion-table {
    width: 100%;
    border-collapse: collapse;
}

.promotion-table td {
    padding: 5px;
}

.promotion-label {
    font-weight: 700;
    color: #003366;
    font-size: 10pt;
    padding-right: 15px; 
    white-space: nowrap;
}

.form-control {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 9pt;
    box-sizing: border-box;
    background-color: #fff;
    color: #333;
}

input[type="date"].form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 6px 10px;
}

select.form-control {
    cursor: pointer;
}

.congratulate_message {
    font-size: 12pt;
    color: #3498db;
    font-weight: 700;
}

.new_session {
    font-size: 10pt;
    color: #003366;
    font-weight: 700;
}

/* --- Signatures --- */
.signature-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 40px;
    padding-top: 10px;
}

.signature-box {
    text-align: center;
}

.signature-title {
    font-weight: 600;
    color: #003366;
    font-size: 9pt;
    margin-bottom: 5px;
}

.signature-line {
    border-top: 1px solid #003366;
    width: 90%;
    margin: 5px auto;
}

/* --- Footer Note --- */
.footer-note {
    text-align: center;
    font-size: 9pt;
    color: #e74c3c;
    margin-top: 20px;
    font-style: italic;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .assessment-container {
        display: block !important;
    }
    
  table {
    width: 100%;
    font-size: 14px; 
  }

  .header_template1 {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo_div_img_template1 img {
    max-width: 120px;
  }

  .signature-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .signature-title {
    font-weight: 600 !important;
    color: #003366 !important;
    font-size: 6pt !important;
    margin-bottom: 5px !important;
  }

    .footer-note {
        text-align: center !important;
        font-size: 6pt !important;
        color: #e74c3c !important;
        margin-top: 10px !important;
        font-style: italic !important;
    }
}

@media screen and (max-width: 480px) {
    .student-info-container,
    .assessment-container {
        display: block !important;
    }
  
  table {
    font-size: 12px;
  }
  
  .assessment-table th {
        font-size: 8pt;
    }

    .assessment-table td {
        padding: 6px 3px;
        font-size: 6pt;
    }
    
      .signature-title {
    font-weight: 600 !important;
    color: #003366 !important;
    font-size: 6pt !important;
    margin-bottom: 5px !important;
  }

    .footer-note {
        text-align: center !important;
        font-size: 6pt !important;
        color: #e74c3c !important;
        margin-top: 10px !important;
        font-style: italic !important;
    }
}

/* --- Utility Classes for Printing --- */
@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .student-info-container,
    .assessment-container {
        display: grid;
    }
}