/* =========================================
   BU EXAM PAPER STYLESHEET (SCOPED)
   ========================================= */

/* Responsive Continuous Container - Acts as the 'body' for the paper */
.exam-container { 
    width: 100%; 
    max-width: 850px; 
    margin: 0 auto; 
    background: #fff; 
    padding: 30px 5%; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    color: #222;
    line-height: 1.6;
    /* Force serif font for the paper content */
    font-family: "Times New Roman", Times, serif !important; 
}

/* Reset margins inside exam container only */
.exam-container * {
    box-sizing: border-box;
}

/* Header Styling */
.exam-container .paper-header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #ccc; }
.exam-container .header-top-row { display: flex; justify-content: space-between; font-size: 11pt; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.exam-container .roll-no-box { font-family: "Courier New", Courier, monospace; font-size: 11pt; }
.exam-container .paper-header h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); margin: 5px 0; font-weight: bold; }
.exam-container .paper-header h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); margin: 5px 0; font-weight: bold; }
.exam-container .paper-header h4 { font-size: 11pt; margin: 5px 0; }
.exam-container .time-marks-row { display: flex; justify-content: space-between; font-size: 11pt; font-weight: bold; margin-top: 15px; flex-wrap: wrap; gap: 10px; }

/* Content Styling */
.exam-container .paper-instructions { margin-bottom: 30px; font-size: 11pt; }
.exam-container .hindi-text { font-size: 12pt; display: block; margin-top: 4px; color: #444; }
.exam-container .questions-list { font-size: 12pt; text-align: justify; }
.exam-container .question { margin-bottom: 30px; }
.exam-container .question-part { margin-bottom: 15px; display: flex; align-items: flex-start; flex-wrap: wrap; }
.exam-container .question-number { font-weight: bold; min-width: 35px; }
.exam-container .question-text-wrapper { flex-grow: 1; width: calc(100% - 40px); overflow-wrap: break-word; }
.exam-container .equation { font-family: "Courier New", Courier, monospace; font-weight: bold; display: block; margin: 10px 0; text-align: center; overflow-x: auto; }

/* Diagram Styling */
.exam-container .diagram-container { text-align: center; margin: 20px 0; width: 100%; }
.exam-container .diagram-container img { max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 4px; }

/* Footer Styling */
.exam-container .paper-footer { text-align: center; margin-top: 40px; font-size: 11pt; font-weight: bold; padding-top: 20px; border-top: 1px solid #ccc; display: flex; justify-content: space-between; }

/* Remove bottom margin from last children */
.exam-container p:last-child { margin-bottom: 0; }
.exam-container .question:last-child { margin-bottom: 0; }

/* Print Rules */
@media print { 
    body, .exam-container { background-color: #fff !important; } 
    .exam-container { box-shadow: none; padding: 0; max-width: 100%; border: none; } 
}
