* {
  font-family: "Noto Serif Bengali", "Noto Serif", serif;
}
/* hostel-admission-form.css */

.hostel-form {
  max-width: 900px;
  margin: 0 auto;
  font-family: "Noto Sans Bengali", sans-serif;
  font-size: 14px;
  color: #000;
  line-height: 1.6;
}

.form-title {
  text-align: center;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 16px;
}

.subtitle {
  font-size: 13px;
  font-weight: normal;
  margin-top: 2px;
}

.section {
  border: 1px solid #000;
  padding: 10px 12px;
  margin-top: 10px;
}

.section-title {
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #000;
  padding-bottom: 4px;
}

.subsection-title {
  font-weight: bold;
  margin: 10px 0 6px 0;
  font-size: 13px;
}

/* Field grid layouts */
.grid {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.grid.end {
  justify-items: end;
}

.field {
  display: flex;
  flex-direction: column;
}

.field span {
  margin-bottom: 4px;
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  font-size: 13px;
  resize: none;
}

/* Radio/checkbox */
.fieldset {
  border: 1px solid #000;
  padding: 8px 10px;
}

.fieldset legend {
  padding: 0 5px;
  font-size: 13px;
  font-weight: bold;
}

.check {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.declaration {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}

/* Buttons */
.actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.btn {
  border: 1px solid #000;
  padding: 6px 15px;
  background: #f9f9f9;
  cursor: pointer;
  font-size: 14px;
}

.btn.primary {
  background: #ddd;
  font-weight: bold;
}

/* Office use box */
.office-box {
  border: 1px solid #000;
  padding: 10px 12px;
  margin-top: 20px;
}

.office-box .line {
  margin: 6px 0;
}

.office-box .sig {
  margin-top: 12px;
  font-style: italic;
}
img.logo {
  height: 6rem;
}

.header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-box {
  border: 2px solid black;
  height: 9rem;
  width: 7.3636rem;
  font-size: 10pt;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.h-container {
  text-align: center;
}

.tag-line {
  font-size: 9pt;
  font-style: italic;
}

.uni-title {
  font-size: 14pt !important;
  font-weight: 800;
}

img.usub-logo {
  height: 7rem;
  margin: auto;
}

.unsub-header {
  text-align: center;
}

.usub-h {
  font-size: 18pt;
  font-weight: bold;
}

.img-box {
  position: absolute;
  top: 1rem;
  right: 3rem;
  padding: 10px;
}

.legalpage {
  position: relative;
  padding-top: 0;
}

.block {
  margin: 6px;
}

.block h3 {
  margin-bottom: 0;
  padding: 0;
  margin: 0;
}

.para {
  margin-top: 1rem;
}
/* --- Screen preview sizing (keep as-is) --- */
.legalpage {
  width: 216mm; /* US Legal width */
  min-height: 356mm; /* US Legal height */
  margin: 0 auto;
  background: #fff;
  color: #000;
  padding: 18mm 16mm; /* preview padding for screen */
  border: 1px solid #000;
  text-align: left;
  font-family: "Noto Serif Bengali", "Noto Serif", serif;
}

/* Ensure Page 2 starts on a new page (only in print) */
.page-break {
  /* no page-break on screen to avoid layout jumps */
}

/* --- PRINT SETTINGS --- */
/* Let the page box provide margins; remove inner padding to avoid overflow */
@page {
  size: legal; /* or: 8.5in 14in */
  margin: 12mm; /* OUTER margins for the whole printed page */
}

@media print {
  /* Hide UI buttons & form when printing */
  .actions,
  .hostel-form,
  .print-container > .actions {
    display: none !important;
  }

  /* Use the page box margins; avoid extra height/padding/margins */
  .legalpage {
    border: none;
    width: auto; /* let browser fit to page box */
    min-height: auto; /* prevent “extra” blank page */
    padding: 0; /* we’re using @page margin instead */
    margin: 0;
    box-sizing: border-box;
  }

  /* Force a new page only before the SECOND page container */
  .page-break {
    break-before: page; /* page-break-before: always; (legacy) */
  }
}

.p-header {
  text-align: center;
}

.block {
  margin: 0;
}

.kv {
  font-size: 8pt;
}

.ejfhu {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

span.nde {
  display: flex;
  flex: 1;
}

span.nefede {
  display: flex;
  flex: 1;
}

.\33 ijrij {
  display: flex;
  flex-direction: column;
}

.orefije {
  height: 1px;
  border-bottom: 1.5px solid black;
}

.uline {
  border-bottom: 1px solid;
}

.nde {
  display: flex;
  flex: 1;
  align-items: baseline;
}

p.j3rij {
  margin: 0;
  margin-top: 5px;
}

.h-divider {
  width: 100%;
  margin: 1rem 0;
  border-bottom: 2px dashed black;
}

.vhfrhefi {
  text-align: center;
  font-weight: bold;
  font-size: 14pt;
}

#page-2 * {
  font-size: 10pt;
}
/* hostel-admission-form.css */

/* Base */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: #f6f7f9;
  color: #111;
}

/* Form Shell */
.hostel-form {
  max-width: 930px;
  margin: 24px auto;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 20px;
}
.hostel-form h2 {
  text-align: center;
  margin: 6px 0 16px;
  font-size: 20px;
}

.section {
  border: 1px solid #c7ccd1;
  padding: 12px;
  margin: 12px 0;
  border-radius: 6px;
  background: #fff;
}
.section-title {
  font-weight: 700;
  border-bottom: 1px solid #c7ccd1;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.subsection-title {
  margin: 8px 0 8px;
  font-weight: 600;
}

/* Grids */
.grid {
  display: grid;
  gap: 10px;
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 800px) {
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }
}

/* Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field span {
  font-size: 13px;
}
.field input,
.field textarea,
.field select,
.grid input,
.grid textarea,
.grid select {
  width: 100%;
  height: 40px;
  padding: 3px 10px;
  box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 1px 0px,
    rgba(61, 59, 53, 0.16) 0px 0px 0px 1px,
    rgba(61, 59, 53, 0.08) 0px 2px 5px 0px;
  border: 0px;
  border-radius: 8px;
  outline: none;
  background-color: rgba(255, 255, 255, 0.5);
  color: rgb(55, 53, 47);
  caret-color: rgb(55, 53, 47);
  transition: box-shadow 0.15s ease;
}

.grid input[type="radio"] {
  box-shadow: none !important;
}
.field textarea {
  min-height: 84px;
}
.field input:focus,
.field textarea:focus,
.grid input:focus,
.field select:focus {
  box-shadow: rgba(58, 145, 224, 0.36) 0px 0px 0px 4px,
    rgba(61, 59, 53, 0.16) 0px 0px 0px 1px;
}
.err {
  color: #b00020;
  font-size: 12px;
  margin-top: 2px;
}

/* Radios & checkboxes */
.fieldset {
  border: 1px solid #c7ccd1;
  border-radius: 6px;
  padding: 10px;
}
.fieldset legend {
  font-weight: 700;
  padding: 0 6px;
}
.fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  justify-content: start;
  margin: 1rem 0;
}

/* Actions */
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 6px;
}
.btn {
  cursor: pointer;
  border: 1px solid #222;
  background: #eee;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
}
.btn.primary {
  background: #008eff;
  color: #fff;
  border: none;
}

/* Print View */
.print-container {
  max-width: 930px;
  margin: 24px auto;
  text-align: center;
}
.a4page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  color: #000;
  padding: 18mm 16mm;
  border: 1px solid #000;
  text-align: left;
}
.a4page h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 18px;
}

.legalpage {
  width: 216mm;
  min-height: 356mm;
  margin: 0 auto;
  background: #fff;
  color: #000;
  padding: 0mm 16mm; /* inner content padding */
  border: 1px solid #000; /* visible border in screen preview */
  text-align: left;
  font-family: "Noto Serif Bengali", "Noto Serif", serif;
}
.legalpage h2 {
  text-align: center;
  margin-bottom: 0;
  font-size: 13pt !important;
  margin-top: -2px;
}

.block {
  margin: 11px 5px;
}
.block h3 {
  font-size: 13pt;
  border-bottom: 1px solid #000;
  padding-bottom: 0px;
  margin-bottom: 7px;
}
.kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  font-size: 13px;
}
.kv .full {
  grid-column: 1 / -1;
}
.para {
  font-size: 13px;
  white-space: pre-wrap;
  border: 1px dashed #999;
  padding: 8px;
  border-radius: 6px;
}

@page {
  /* You can use either keyword or explicit dimensions */
  size: legal; /* equivalent to 8.5in 14in portrait */
  /* size: 8.5in 14in;        /* alternative explicit form */
  margin: 0; /* let our .legalpage control margins/padding */
}

/* Print rules: show only the A4 content */
@media print {
  body {
    background: #fff;
  }
  .hostel-form,
  .actions,
  .print-container > .actions {
    display: none !important;
  }
  .legalpage {
    border: none;
    width: auto; /* let the browser fit page box */
    min-height: auto;
    padding: 0 16mm; /* keep your desired printable margins */
  }
}
#page-1 * {
  font-size: 8.5pt;
}

.kv {
  line-height: 1.2;
}
.fieldset label input {
  flex: 0;
}

h2.tc-header {
  margin-top: 2rem;
}
.field input:read-only {
  background-color: #f2f2f2;
}
